/src/grpc-swift/FuzzTesting/Sources/EchoModel/echo.pb.swift
Line | Count | Source (jump to first uncovered line) |
1 | | // DO NOT EDIT. |
2 | | // swift-format-ignore-file |
3 | | // swiftlint:disable all |
4 | | // |
5 | | // Generated by the Swift generator plugin for the protocol buffer compiler. |
6 | | // Source: echo.proto |
7 | | // |
8 | | // For information on using the generated types, please see the documentation: |
9 | | // https://github.com/apple/swift-protobuf/ |
10 | | |
11 | | // Copyright (c) 2015, Google Inc. |
12 | | // |
13 | | // Licensed under the Apache License, Version 2.0 (the "License"); |
14 | | // you may not use this file except in compliance with the License. |
15 | | // You may obtain a copy of the License at |
16 | | // |
17 | | // http://www.apache.org/licenses/LICENSE-2.0 |
18 | | // |
19 | | // Unless required by applicable law or agreed to in writing, software |
20 | | // distributed under the License is distributed on an "AS IS" BASIS, |
21 | | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
22 | | // See the License for the specific language governing permissions and |
23 | | // limitations under the License. |
24 | | |
25 | | import SwiftProtobuf |
26 | | |
27 | | // If the compiler emits an error on this type, it is because this file |
28 | | // was generated by a version of the `protoc` Swift plug-in that is |
29 | | // incompatible with the version of SwiftProtobuf to which you are linking. |
30 | | // Please ensure that you are building against the same version of the API |
31 | | // that was used to generate this file. |
32 | | fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { |
33 | | struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} |
34 | | typealias Version = _2 |
35 | | } |
36 | | |
37 | | public struct Echo_EchoRequest: Sendable { |
38 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
39 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
40 | | // methods supported on all messages. |
41 | | |
42 | | /// The text of a message to be echoed. |
43 | 5.44M | public var text: String = String() |
44 | | |
45 | 5.44M | public var unknownFields = SwiftProtobuf.UnknownStorage() |
46 | | |
47 | 1.74M | public init() {} |
48 | | } |
49 | | |
50 | | public struct Echo_EchoResponse: Sendable { |
51 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
52 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
53 | | // methods supported on all messages. |
54 | | |
55 | | /// The text of an echo response. |
56 | 14.2M | public var text: String = String() |
57 | | |
58 | 14.2M | public var unknownFields = SwiftProtobuf.UnknownStorage() |
59 | | |
60 | 8.19M | public init() {} |
61 | | } |
62 | | |
63 | | // MARK: - Code below here is support for the SwiftProtobuf runtime. |
64 | | |
65 | | fileprivate let _protobuf_package = "echo" |
66 | | |
67 | | extension Echo_EchoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
68 | | public static let protoMessageName: String = _protobuf_package + ".EchoRequest" |
69 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
70 | | 1: .same(proto: "text"), |
71 | | ] |
72 | | |
73 | 39.3k | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
74 | 113k | while let fieldNumber = try decoder.nextFieldNumber() { |
75 | 113k | // The use of inline closures is to circumvent an issue where the compiler |
76 | 113k | // allocates stack space for every case branch when no optimizations are |
77 | 113k | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
78 | 113k | switch fieldNumber { |
79 | 113k | case 1: try { try decoder.decodeSingularStringField(value: &self.text) }() |
80 | 113k | default: break |
81 | 113k | } |
82 | 113k | } |
83 | 39.3k | } |
84 | | |
85 | 0 | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
86 | 0 | if !self.text.isEmpty { |
87 | 0 | try visitor.visitSingularStringField(value: self.text, fieldNumber: 1) |
88 | 0 | } |
89 | 0 | try unknownFields.traverse(visitor: &visitor) |
90 | 0 | } |
91 | | |
92 | 0 | public static func ==(lhs: Echo_EchoRequest, rhs: Echo_EchoRequest) -> Bool { |
93 | 0 | if lhs.text != rhs.text {return false} |
94 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
95 | 0 | return true |
96 | 0 | } |
97 | | } |
98 | | |
99 | | extension Echo_EchoResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
100 | | public static let protoMessageName: String = _protobuf_package + ".EchoResponse" |
101 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
102 | | 1: .same(proto: "text"), |
103 | | ] |
104 | | |
105 | 0 | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
106 | 0 | while let fieldNumber = try decoder.nextFieldNumber() { |
107 | 0 | // The use of inline closures is to circumvent an issue where the compiler |
108 | 0 | // allocates stack space for every case branch when no optimizations are |
109 | 0 | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
110 | 0 | switch fieldNumber { |
111 | 0 | case 1: try { try decoder.decodeSingularStringField(value: &self.text) }() |
112 | 0 | default: break |
113 | 0 | } |
114 | 0 | } |
115 | 0 | } |
116 | | |
117 | 2.62M | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
118 | 2.62M | if !self.text.isEmpty { |
119 | 2.62M | try visitor.visitSingularStringField(value: self.text, fieldNumber: 1) |
120 | 2.62M | } |
121 | 2.62M | try unknownFields.traverse(visitor: &visitor) |
122 | 2.62M | } |
123 | | |
124 | 0 | public static func ==(lhs: Echo_EchoResponse, rhs: Echo_EchoResponse) -> Bool { |
125 | 0 | if lhs.text != rhs.text {return false} |
126 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
127 | 0 | return true |
128 | 0 | } |
129 | | } |