/src/swift-protobuf/Sources/SwiftProtobuf/wrappers.pb.swift
Line | Count | Source (jump to first uncovered line) |
1 | | // DO NOT EDIT. |
2 | | // swift-format-ignore-file |
3 | | // |
4 | | // Generated by the Swift generator plugin for the protocol buffer compiler. |
5 | | // Source: google/protobuf/wrappers.proto |
6 | | // |
7 | | // For information on using the generated types, please see the documentation: |
8 | | // https://github.com/apple/swift-protobuf/ |
9 | | |
10 | | // Protocol Buffers - Google's data interchange format |
11 | | // Copyright 2008 Google Inc. All rights reserved. |
12 | | // https://developers.google.com/protocol-buffers/ |
13 | | // |
14 | | // Redistribution and use in source and binary forms, with or without |
15 | | // modification, are permitted provided that the following conditions are |
16 | | // met: |
17 | | // |
18 | | // * Redistributions of source code must retain the above copyright |
19 | | // notice, this list of conditions and the following disclaimer. |
20 | | // * Redistributions in binary form must reproduce the above |
21 | | // copyright notice, this list of conditions and the following disclaimer |
22 | | // in the documentation and/or other materials provided with the |
23 | | // distribution. |
24 | | // * Neither the name of Google Inc. nor the names of its |
25 | | // contributors may be used to endorse or promote products derived from |
26 | | // this software without specific prior written permission. |
27 | | // |
28 | | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
29 | | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
30 | | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
31 | | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
32 | | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
33 | | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
34 | | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
35 | | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
36 | | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
37 | | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
38 | | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
39 | | |
40 | | // Wrappers for primitive (non-message) types. These types are useful |
41 | | // for embedding primitives in the `google.protobuf.Any` type and for places |
42 | | // where we need to distinguish between the absence of a primitive |
43 | | // typed field and its default value. |
44 | | // |
45 | | // These wrappers have no meaningful use within repeated fields as they lack |
46 | | // the ability to detect presence on individual elements. |
47 | | // These wrappers have no meaningful use within a map or a oneof since |
48 | | // individual entries of a map or fields of a oneof can already detect presence. |
49 | | |
50 | | import Foundation |
51 | | |
52 | | // If the compiler emits an error on this type, it is because this file |
53 | | // was generated by a version of the `protoc` Swift plug-in that is |
54 | | // incompatible with the version of SwiftProtobuf to which you are linking. |
55 | | // Please ensure that you are building against the same version of the API |
56 | | // that was used to generate this file. |
57 | | fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { |
58 | | struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} |
59 | | typealias Version = _2 |
60 | | } |
61 | | |
62 | | /// Wrapper message for `double`. |
63 | | /// |
64 | | /// The JSON representation for `DoubleValue` is JSON number. |
65 | | public struct Google_Protobuf_DoubleValue { |
66 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
67 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
68 | | // methods supported on all messages. |
69 | | |
70 | | /// The double value. |
71 | | public var value: Double = 0 |
72 | | |
73 | 21.4k | public var unknownFields = SwiftProtobuf.UnknownStorage() |
74 | | |
75 | 10.2k | public init() {} |
76 | | } |
77 | | |
78 | | /// Wrapper message for `float`. |
79 | | /// |
80 | | /// The JSON representation for `FloatValue` is JSON number. |
81 | | public struct Google_Protobuf_FloatValue { |
82 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
83 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
84 | | // methods supported on all messages. |
85 | | |
86 | | /// The float value. |
87 | | public var value: Float = 0 |
88 | | |
89 | 9.59k | public var unknownFields = SwiftProtobuf.UnknownStorage() |
90 | | |
91 | 4.81k | public init() {} |
92 | | } |
93 | | |
94 | | /// Wrapper message for `int64`. |
95 | | /// |
96 | | /// The JSON representation for `Int64Value` is JSON string. |
97 | | public struct Google_Protobuf_Int64Value { |
98 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
99 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
100 | | // methods supported on all messages. |
101 | | |
102 | | /// The int64 value. |
103 | | public var value: Int64 = 0 |
104 | | |
105 | 12.3k | public var unknownFields = SwiftProtobuf.UnknownStorage() |
106 | | |
107 | 6.21k | public init() {} |
108 | | } |
109 | | |
110 | | /// Wrapper message for `uint64`. |
111 | | /// |
112 | | /// The JSON representation for `UInt64Value` is JSON string. |
113 | | public struct Google_Protobuf_UInt64Value { |
114 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
115 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
116 | | // methods supported on all messages. |
117 | | |
118 | | /// The uint64 value. |
119 | | public var value: UInt64 = 0 |
120 | | |
121 | 27.4k | public var unknownFields = SwiftProtobuf.UnknownStorage() |
122 | | |
123 | 12.7k | public init() {} |
124 | | } |
125 | | |
126 | | /// Wrapper message for `int32`. |
127 | | /// |
128 | | /// The JSON representation for `Int32Value` is JSON number. |
129 | | public struct Google_Protobuf_Int32Value { |
130 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
131 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
132 | | // methods supported on all messages. |
133 | | |
134 | | /// The int32 value. |
135 | | public var value: Int32 = 0 |
136 | | |
137 | 7.00k | public var unknownFields = SwiftProtobuf.UnknownStorage() |
138 | | |
139 | 3.67k | public init() {} |
140 | | } |
141 | | |
142 | | /// Wrapper message for `uint32`. |
143 | | /// |
144 | | /// The JSON representation for `UInt32Value` is JSON number. |
145 | | public struct Google_Protobuf_UInt32Value { |
146 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
147 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
148 | | // methods supported on all messages. |
149 | | |
150 | | /// The uint32 value. |
151 | | public var value: UInt32 = 0 |
152 | | |
153 | 14.9k | public var unknownFields = SwiftProtobuf.UnknownStorage() |
154 | | |
155 | 7.35k | public init() {} |
156 | | } |
157 | | |
158 | | /// Wrapper message for `bool`. |
159 | | /// |
160 | | /// The JSON representation for `BoolValue` is JSON `true` and `false`. |
161 | | public struct Google_Protobuf_BoolValue { |
162 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
163 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
164 | | // methods supported on all messages. |
165 | | |
166 | | /// The bool value. |
167 | | public var value: Bool = false |
168 | | |
169 | 31.5k | public var unknownFields = SwiftProtobuf.UnknownStorage() |
170 | | |
171 | 15.3k | public init() {} |
172 | | } |
173 | | |
174 | | /// Wrapper message for `string`. |
175 | | /// |
176 | | /// The JSON representation for `StringValue` is JSON string. |
177 | | public struct Google_Protobuf_StringValue { |
178 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
179 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
180 | | // methods supported on all messages. |
181 | | |
182 | | /// The string value. |
183 | 9.60k | public var value: String = String() |
184 | | |
185 | 9.60k | public var unknownFields = SwiftProtobuf.UnknownStorage() |
186 | | |
187 | 5.58k | public init() {} |
188 | | } |
189 | | |
190 | | /// Wrapper message for `bytes`. |
191 | | /// |
192 | | /// The JSON representation for `BytesValue` is JSON string. |
193 | | public struct Google_Protobuf_BytesValue { |
194 | | // SwiftProtobuf.Message conformance is added in an extension below. See the |
195 | | // `Message` and `Message+*Additions` files in the SwiftProtobuf library for |
196 | | // methods supported on all messages. |
197 | | |
198 | | /// The bytes value. |
199 | 6.13k | public var value: Data = Data() |
200 | | |
201 | 6.13k | public var unknownFields = SwiftProtobuf.UnknownStorage() |
202 | | |
203 | 3.65k | public init() {} |
204 | | } |
205 | | |
206 | | // MARK: - Code below here is support for the SwiftProtobuf runtime. |
207 | | |
208 | | fileprivate let _protobuf_package = "google.protobuf" |
209 | | |
210 | | extension Google_Protobuf_DoubleValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
211 | | public static let protoMessageName: String = _protobuf_package + ".DoubleValue" |
212 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
213 | | 1: .same(proto: "value"), |
214 | | ] |
215 | | |
216 | 6.40k | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
217 | 7.24k | while let fieldNumber = try decoder.nextFieldNumber() { |
218 | 7.24k | // The use of inline closures is to circumvent an issue where the compiler |
219 | 7.24k | // allocates stack space for every case branch when no optimizations are |
220 | 7.24k | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
221 | 7.24k | switch fieldNumber { |
222 | 2.90k | case 1: try { try decoder.decodeSingularDoubleField(value: &self.value) }() |
223 | 4.34k | default: break |
224 | 7.24k | } |
225 | 6.40k | } |
226 | 6.40k | } |
227 | | |
228 | 0 | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
229 | 0 | if self.value != 0 { |
230 | 0 | try visitor.visitSingularDoubleField(value: self.value, fieldNumber: 1) |
231 | 0 | } |
232 | 0 | try unknownFields.traverse(visitor: &visitor) |
233 | 0 | } |
234 | | |
235 | 0 | public static func ==(lhs: Google_Protobuf_DoubleValue, rhs: Google_Protobuf_DoubleValue) -> Bool { |
236 | 0 | if lhs.value != rhs.value {return false} |
237 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
238 | 0 | return true |
239 | 0 | } |
240 | | } |
241 | | |
242 | | extension Google_Protobuf_FloatValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
243 | | public static let protoMessageName: String = _protobuf_package + ".FloatValue" |
244 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
245 | | 1: .same(proto: "value"), |
246 | | ] |
247 | | |
248 | 4.49k | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
249 | 3.98k | while let fieldNumber = try decoder.nextFieldNumber() { |
250 | 3.98k | // The use of inline closures is to circumvent an issue where the compiler |
251 | 3.98k | // allocates stack space for every case branch when no optimizations are |
252 | 3.98k | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
253 | 3.98k | switch fieldNumber { |
254 | 1.71k | case 1: try { try decoder.decodeSingularFloatField(value: &self.value) }() |
255 | 2.26k | default: break |
256 | 3.98k | } |
257 | 4.49k | } |
258 | 4.49k | } |
259 | | |
260 | 0 | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
261 | 0 | if self.value != 0 { |
262 | 0 | try visitor.visitSingularFloatField(value: self.value, fieldNumber: 1) |
263 | 0 | } |
264 | 0 | try unknownFields.traverse(visitor: &visitor) |
265 | 0 | } |
266 | | |
267 | 0 | public static func ==(lhs: Google_Protobuf_FloatValue, rhs: Google_Protobuf_FloatValue) -> Bool { |
268 | 0 | if lhs.value != rhs.value {return false} |
269 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
270 | 0 | return true |
271 | 0 | } |
272 | | } |
273 | | |
274 | | extension Google_Protobuf_Int64Value: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
275 | | public static let protoMessageName: String = _protobuf_package + ".Int64Value" |
276 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
277 | | 1: .same(proto: "value"), |
278 | | ] |
279 | | |
280 | 7.13k | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
281 | 3.25k | while let fieldNumber = try decoder.nextFieldNumber() { |
282 | 3.25k | // The use of inline closures is to circumvent an issue where the compiler |
283 | 3.25k | // allocates stack space for every case branch when no optimizations are |
284 | 3.25k | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
285 | 3.25k | switch fieldNumber { |
286 | 1.25k | case 1: try { try decoder.decodeSingularInt64Field(value: &self.value) }() |
287 | 2.00k | default: break |
288 | 3.25k | } |
289 | 7.13k | } |
290 | 7.13k | } |
291 | | |
292 | 0 | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
293 | 0 | if self.value != 0 { |
294 | 0 | try visitor.visitSingularInt64Field(value: self.value, fieldNumber: 1) |
295 | 0 | } |
296 | 0 | try unknownFields.traverse(visitor: &visitor) |
297 | 0 | } |
298 | | |
299 | 0 | public static func ==(lhs: Google_Protobuf_Int64Value, rhs: Google_Protobuf_Int64Value) -> Bool { |
300 | 0 | if lhs.value != rhs.value {return false} |
301 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
302 | 0 | return true |
303 | 0 | } |
304 | | } |
305 | | |
306 | | extension Google_Protobuf_UInt64Value: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
307 | | public static let protoMessageName: String = _protobuf_package + ".UInt64Value" |
308 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
309 | | 1: .same(proto: "value"), |
310 | | ] |
311 | | |
312 | 14.6k | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
313 | 30.2k | while let fieldNumber = try decoder.nextFieldNumber() { |
314 | 30.2k | // The use of inline closures is to circumvent an issue where the compiler |
315 | 30.2k | // allocates stack space for every case branch when no optimizations are |
316 | 30.2k | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
317 | 30.2k | switch fieldNumber { |
318 | 1.53k | case 1: try { try decoder.decodeSingularUInt64Field(value: &self.value) }() |
319 | 28.7k | default: break |
320 | 30.2k | } |
321 | 14.6k | } |
322 | 14.6k | } |
323 | | |
324 | 0 | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
325 | 0 | if self.value != 0 { |
326 | 0 | try visitor.visitSingularUInt64Field(value: self.value, fieldNumber: 1) |
327 | 0 | } |
328 | 0 | try unknownFields.traverse(visitor: &visitor) |
329 | 0 | } |
330 | | |
331 | 0 | public static func ==(lhs: Google_Protobuf_UInt64Value, rhs: Google_Protobuf_UInt64Value) -> Bool { |
332 | 0 | if lhs.value != rhs.value {return false} |
333 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
334 | 0 | return true |
335 | 0 | } |
336 | | } |
337 | | |
338 | | extension Google_Protobuf_Int32Value: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
339 | | public static let protoMessageName: String = _protobuf_package + ".Int32Value" |
340 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
341 | | 1: .same(proto: "value"), |
342 | | ] |
343 | | |
344 | 4.49k | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
345 | 8.69k | while let fieldNumber = try decoder.nextFieldNumber() { |
346 | 8.69k | // The use of inline closures is to circumvent an issue where the compiler |
347 | 8.69k | // allocates stack space for every case branch when no optimizations are |
348 | 8.69k | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
349 | 8.69k | switch fieldNumber { |
350 | 880 | case 1: try { try decoder.decodeSingularInt32Field(value: &self.value) }() |
351 | 7.81k | default: break |
352 | 8.69k | } |
353 | 4.49k | } |
354 | 4.49k | } |
355 | | |
356 | 0 | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
357 | 0 | if self.value != 0 { |
358 | 0 | try visitor.visitSingularInt32Field(value: self.value, fieldNumber: 1) |
359 | 0 | } |
360 | 0 | try unknownFields.traverse(visitor: &visitor) |
361 | 0 | } |
362 | | |
363 | 0 | public static func ==(lhs: Google_Protobuf_Int32Value, rhs: Google_Protobuf_Int32Value) -> Bool { |
364 | 0 | if lhs.value != rhs.value {return false} |
365 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
366 | 0 | return true |
367 | 0 | } |
368 | | } |
369 | | |
370 | | extension Google_Protobuf_UInt32Value: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
371 | | public static let protoMessageName: String = _protobuf_package + ".UInt32Value" |
372 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
373 | | 1: .same(proto: "value"), |
374 | | ] |
375 | | |
376 | 6.09k | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
377 | 4.78k | while let fieldNumber = try decoder.nextFieldNumber() { |
378 | 4.78k | // The use of inline closures is to circumvent an issue where the compiler |
379 | 4.78k | // allocates stack space for every case branch when no optimizations are |
380 | 4.78k | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
381 | 4.78k | switch fieldNumber { |
382 | 1.24k | case 1: try { try decoder.decodeSingularUInt32Field(value: &self.value) }() |
383 | 3.54k | default: break |
384 | 4.78k | } |
385 | 6.09k | } |
386 | 6.09k | } |
387 | | |
388 | 0 | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
389 | 0 | if self.value != 0 { |
390 | 0 | try visitor.visitSingularUInt32Field(value: self.value, fieldNumber: 1) |
391 | 0 | } |
392 | 0 | try unknownFields.traverse(visitor: &visitor) |
393 | 0 | } |
394 | | |
395 | 0 | public static func ==(lhs: Google_Protobuf_UInt32Value, rhs: Google_Protobuf_UInt32Value) -> Bool { |
396 | 0 | if lhs.value != rhs.value {return false} |
397 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
398 | 0 | return true |
399 | 0 | } |
400 | | } |
401 | | |
402 | | extension Google_Protobuf_BoolValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
403 | | public static let protoMessageName: String = _protobuf_package + ".BoolValue" |
404 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
405 | | 1: .same(proto: "value"), |
406 | | ] |
407 | | |
408 | 9.12k | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
409 | 21.9k | while let fieldNumber = try decoder.nextFieldNumber() { |
410 | 21.9k | // The use of inline closures is to circumvent an issue where the compiler |
411 | 21.9k | // allocates stack space for every case branch when no optimizations are |
412 | 21.9k | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
413 | 21.9k | switch fieldNumber { |
414 | 5.51k | case 1: try { try decoder.decodeSingularBoolField(value: &self.value) }() |
415 | 16.4k | default: break |
416 | 21.9k | } |
417 | 9.12k | } |
418 | 9.12k | } |
419 | | |
420 | 0 | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
421 | 0 | if self.value != false { |
422 | 0 | try visitor.visitSingularBoolField(value: self.value, fieldNumber: 1) |
423 | 0 | } |
424 | 0 | try unknownFields.traverse(visitor: &visitor) |
425 | 0 | } |
426 | | |
427 | 0 | public static func ==(lhs: Google_Protobuf_BoolValue, rhs: Google_Protobuf_BoolValue) -> Bool { |
428 | 0 | if lhs.value != rhs.value {return false} |
429 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
430 | 0 | return true |
431 | 0 | } |
432 | | } |
433 | | |
434 | | extension Google_Protobuf_StringValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
435 | | public static let protoMessageName: String = _protobuf_package + ".StringValue" |
436 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
437 | | 1: .same(proto: "value"), |
438 | | ] |
439 | | |
440 | 6.51k | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
441 | 5.86k | while let fieldNumber = try decoder.nextFieldNumber() { |
442 | 5.86k | // The use of inline closures is to circumvent an issue where the compiler |
443 | 5.86k | // allocates stack space for every case branch when no optimizations are |
444 | 5.86k | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
445 | 5.86k | switch fieldNumber { |
446 | 2.15k | case 1: try { try decoder.decodeSingularStringField(value: &self.value) }() |
447 | 3.71k | default: break |
448 | 5.86k | } |
449 | 6.51k | } |
450 | 6.51k | } |
451 | | |
452 | 0 | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
453 | 0 | if !self.value.isEmpty { |
454 | 0 | try visitor.visitSingularStringField(value: self.value, fieldNumber: 1) |
455 | 0 | } |
456 | 0 | try unknownFields.traverse(visitor: &visitor) |
457 | 0 | } |
458 | | |
459 | 0 | public static func ==(lhs: Google_Protobuf_StringValue, rhs: Google_Protobuf_StringValue) -> Bool { |
460 | 0 | if lhs.value != rhs.value {return false} |
461 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
462 | 0 | return true |
463 | 0 | } |
464 | | } |
465 | | |
466 | | extension Google_Protobuf_BytesValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { |
467 | | public static let protoMessageName: String = _protobuf_package + ".BytesValue" |
468 | | public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ |
469 | | 1: .same(proto: "value"), |
470 | | ] |
471 | | |
472 | 4.37k | public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws { |
473 | 3.79k | while let fieldNumber = try decoder.nextFieldNumber() { |
474 | 3.79k | // The use of inline closures is to circumvent an issue where the compiler |
475 | 3.79k | // allocates stack space for every case branch when no optimizations are |
476 | 3.79k | // enabled. https://github.com/apple/swift-protobuf/issues/1034 |
477 | 3.79k | switch fieldNumber { |
478 | 2.58k | case 1: try { try decoder.decodeSingularBytesField(value: &self.value) }() |
479 | 1.21k | default: break |
480 | 3.79k | } |
481 | 4.37k | } |
482 | 4.37k | } |
483 | | |
484 | 0 | public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws { |
485 | 0 | if !self.value.isEmpty { |
486 | 0 | try visitor.visitSingularBytesField(value: self.value, fieldNumber: 1) |
487 | 0 | } |
488 | 0 | try unknownFields.traverse(visitor: &visitor) |
489 | 0 | } |
490 | | |
491 | 0 | public static func ==(lhs: Google_Protobuf_BytesValue, rhs: Google_Protobuf_BytesValue) -> Bool { |
492 | 0 | if lhs.value != rhs.value {return false} |
493 | 0 | if lhs.unknownFields != rhs.unknownFields {return false} |
494 | 0 | return true |
495 | 0 | } |
496 | | } |