messages.pb.swift 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929
  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: src/proto/grpc/testing/messages.proto
  7. //
  8. // For information on using the generated types, please see the documentation:
  9. // https://github.com/apple/swift-protobuf/
  10. // Copyright 2015-2016 gRPC authors.
  11. //
  12. // Licensed under the Apache License, Version 2.0 (the "License");
  13. // you may not use this file except in compliance with the License.
  14. // You may obtain a copy of the License at
  15. //
  16. // http://www.apache.org/licenses/LICENSE-2.0
  17. //
  18. // Unless required by applicable law or agreed to in writing, software
  19. // distributed under the License is distributed on an "AS IS" BASIS,
  20. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21. // See the License for the specific language governing permissions and
  22. // limitations under the License.
  23. // Message definitions to be used by integration test service definitions.
  24. import Foundation
  25. import SwiftProtobuf
  26. // If the compiler emits an error on this type, it is because this file
  27. // was generated by a version of the `protoc` Swift plug-in that is
  28. // incompatible with the version of SwiftProtobuf to which you are linking.
  29. // Please ensure that you are building against the same version of the API
  30. // that was used to generate this file.
  31. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  32. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  33. typealias Version = _2
  34. }
  35. /// The type of payload that should be returned.
  36. public enum Grpc_Testing_PayloadType: SwiftProtobuf.Enum, Swift.CaseIterable {
  37. public typealias RawValue = Int
  38. /// Compressable text format.
  39. case compressable // = 0
  40. case UNRECOGNIZED(Int)
  41. public init() {
  42. self = .compressable
  43. }
  44. public init?(rawValue: Int) {
  45. switch rawValue {
  46. case 0: self = .compressable
  47. default: self = .UNRECOGNIZED(rawValue)
  48. }
  49. }
  50. public var rawValue: Int {
  51. switch self {
  52. case .compressable: return 0
  53. case .UNRECOGNIZED(let i): return i
  54. }
  55. }
  56. // The compiler won't synthesize support with the UNRECOGNIZED case.
  57. public static let allCases: [Grpc_Testing_PayloadType] = [
  58. .compressable,
  59. ]
  60. }
  61. /// TODO(dgq): Go back to using well-known types once
  62. /// https://github.com/grpc/grpc/issues/6980 has been fixed.
  63. /// import "google/protobuf/wrappers.proto";
  64. public struct Grpc_Testing_BoolValue: Sendable {
  65. // SwiftProtobuf.Message conformance is added in an extension below. See the
  66. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  67. // methods supported on all messages.
  68. /// The bool value.
  69. public var value: Bool = false
  70. public var unknownFields = SwiftProtobuf.UnknownStorage()
  71. public init() {}
  72. }
  73. /// A block of data, to simply increase gRPC message size.
  74. public struct Grpc_Testing_Payload: @unchecked Sendable {
  75. // SwiftProtobuf.Message conformance is added in an extension below. See the
  76. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  77. // methods supported on all messages.
  78. /// The type of data in body.
  79. public var type: Grpc_Testing_PayloadType = .compressable
  80. /// Primary contents of payload.
  81. public var body: Data = Data()
  82. public var unknownFields = SwiftProtobuf.UnknownStorage()
  83. public init() {}
  84. }
  85. /// A protobuf representation for grpc status. This is used by test
  86. /// clients to specify a status that the server should attempt to return.
  87. public struct Grpc_Testing_EchoStatus: Sendable {
  88. // SwiftProtobuf.Message conformance is added in an extension below. See the
  89. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  90. // methods supported on all messages.
  91. public var code: Int32 = 0
  92. public var message: String = String()
  93. public var unknownFields = SwiftProtobuf.UnknownStorage()
  94. public init() {}
  95. }
  96. /// Unary request.
  97. public struct Grpc_Testing_SimpleRequest: Sendable {
  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. /// Desired payload type in the response from the server.
  102. /// If response_type is RANDOM, server randomly chooses one from other formats.
  103. public var responseType: Grpc_Testing_PayloadType = .compressable
  104. /// Desired payload size in the response from the server.
  105. public var responseSize: Int32 = 0
  106. /// Optional input payload sent along with the request.
  107. public var payload: Grpc_Testing_Payload {
  108. get {return _payload ?? Grpc_Testing_Payload()}
  109. set {_payload = newValue}
  110. }
  111. /// Returns true if `payload` has been explicitly set.
  112. public var hasPayload: Bool {return self._payload != nil}
  113. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  114. public mutating func clearPayload() {self._payload = nil}
  115. /// Whether SimpleResponse should include username.
  116. public var fillUsername: Bool = false
  117. /// Whether SimpleResponse should include OAuth scope.
  118. public var fillOauthScope: Bool = false
  119. /// Whether to request the server to compress the response. This field is
  120. /// "nullable" in order to interoperate seamlessly with clients not able to
  121. /// implement the full compression tests by introspecting the call to verify
  122. /// the response's compression status.
  123. public var responseCompressed: Grpc_Testing_BoolValue {
  124. get {return _responseCompressed ?? Grpc_Testing_BoolValue()}
  125. set {_responseCompressed = newValue}
  126. }
  127. /// Returns true if `responseCompressed` has been explicitly set.
  128. public var hasResponseCompressed: Bool {return self._responseCompressed != nil}
  129. /// Clears the value of `responseCompressed`. Subsequent reads from it will return its default value.
  130. public mutating func clearResponseCompressed() {self._responseCompressed = nil}
  131. /// Whether server should return a given status
  132. public var responseStatus: Grpc_Testing_EchoStatus {
  133. get {return _responseStatus ?? Grpc_Testing_EchoStatus()}
  134. set {_responseStatus = newValue}
  135. }
  136. /// Returns true if `responseStatus` has been explicitly set.
  137. public var hasResponseStatus: Bool {return self._responseStatus != nil}
  138. /// Clears the value of `responseStatus`. Subsequent reads from it will return its default value.
  139. public mutating func clearResponseStatus() {self._responseStatus = nil}
  140. /// Whether the server should expect this request to be compressed.
  141. public var expectCompressed: Grpc_Testing_BoolValue {
  142. get {return _expectCompressed ?? Grpc_Testing_BoolValue()}
  143. set {_expectCompressed = newValue}
  144. }
  145. /// Returns true if `expectCompressed` has been explicitly set.
  146. public var hasExpectCompressed: Bool {return self._expectCompressed != nil}
  147. /// Clears the value of `expectCompressed`. Subsequent reads from it will return its default value.
  148. public mutating func clearExpectCompressed() {self._expectCompressed = nil}
  149. public var unknownFields = SwiftProtobuf.UnknownStorage()
  150. public init() {}
  151. fileprivate var _payload: Grpc_Testing_Payload? = nil
  152. fileprivate var _responseCompressed: Grpc_Testing_BoolValue? = nil
  153. fileprivate var _responseStatus: Grpc_Testing_EchoStatus? = nil
  154. fileprivate var _expectCompressed: Grpc_Testing_BoolValue? = nil
  155. }
  156. /// Unary response, as configured by the request.
  157. public struct Grpc_Testing_SimpleResponse: Sendable {
  158. // SwiftProtobuf.Message conformance is added in an extension below. See the
  159. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  160. // methods supported on all messages.
  161. /// Payload to increase message size.
  162. public var payload: Grpc_Testing_Payload {
  163. get {return _payload ?? Grpc_Testing_Payload()}
  164. set {_payload = newValue}
  165. }
  166. /// Returns true if `payload` has been explicitly set.
  167. public var hasPayload: Bool {return self._payload != nil}
  168. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  169. public mutating func clearPayload() {self._payload = nil}
  170. /// The user the request came from, for verifying authentication was
  171. /// successful when the client expected it.
  172. public var username: String = String()
  173. /// OAuth scope.
  174. public var oauthScope: String = String()
  175. public var unknownFields = SwiftProtobuf.UnknownStorage()
  176. public init() {}
  177. fileprivate var _payload: Grpc_Testing_Payload? = nil
  178. }
  179. /// Client-streaming request.
  180. public struct Grpc_Testing_StreamingInputCallRequest: Sendable {
  181. // SwiftProtobuf.Message conformance is added in an extension below. See the
  182. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  183. // methods supported on all messages.
  184. /// Optional input payload sent along with the request.
  185. public var payload: Grpc_Testing_Payload {
  186. get {return _payload ?? Grpc_Testing_Payload()}
  187. set {_payload = newValue}
  188. }
  189. /// Returns true if `payload` has been explicitly set.
  190. public var hasPayload: Bool {return self._payload != nil}
  191. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  192. public mutating func clearPayload() {self._payload = nil}
  193. /// Whether the server should expect this request to be compressed. This field
  194. /// is "nullable" in order to interoperate seamlessly with servers not able to
  195. /// implement the full compression tests by introspecting the call to verify
  196. /// the request's compression status.
  197. public var expectCompressed: Grpc_Testing_BoolValue {
  198. get {return _expectCompressed ?? Grpc_Testing_BoolValue()}
  199. set {_expectCompressed = newValue}
  200. }
  201. /// Returns true if `expectCompressed` has been explicitly set.
  202. public var hasExpectCompressed: Bool {return self._expectCompressed != nil}
  203. /// Clears the value of `expectCompressed`. Subsequent reads from it will return its default value.
  204. public mutating func clearExpectCompressed() {self._expectCompressed = nil}
  205. public var unknownFields = SwiftProtobuf.UnknownStorage()
  206. public init() {}
  207. fileprivate var _payload: Grpc_Testing_Payload? = nil
  208. fileprivate var _expectCompressed: Grpc_Testing_BoolValue? = nil
  209. }
  210. /// Client-streaming response.
  211. public struct Grpc_Testing_StreamingInputCallResponse: Sendable {
  212. // SwiftProtobuf.Message conformance is added in an extension below. See the
  213. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  214. // methods supported on all messages.
  215. /// Aggregated size of payloads received from the client.
  216. public var aggregatedPayloadSize: Int32 = 0
  217. public var unknownFields = SwiftProtobuf.UnknownStorage()
  218. public init() {}
  219. }
  220. /// Configuration for a particular response.
  221. public struct Grpc_Testing_ResponseParameters: Sendable {
  222. // SwiftProtobuf.Message conformance is added in an extension below. See the
  223. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  224. // methods supported on all messages.
  225. /// Desired payload sizes in responses from the server.
  226. public var size: Int32 = 0
  227. /// Desired interval between consecutive responses in the response stream in
  228. /// microseconds.
  229. public var intervalUs: Int32 = 0
  230. /// Whether to request the server to compress the response. This field is
  231. /// "nullable" in order to interoperate seamlessly with clients not able to
  232. /// implement the full compression tests by introspecting the call to verify
  233. /// the response's compression status.
  234. public var compressed: Grpc_Testing_BoolValue {
  235. get {return _compressed ?? Grpc_Testing_BoolValue()}
  236. set {_compressed = newValue}
  237. }
  238. /// Returns true if `compressed` has been explicitly set.
  239. public var hasCompressed: Bool {return self._compressed != nil}
  240. /// Clears the value of `compressed`. Subsequent reads from it will return its default value.
  241. public mutating func clearCompressed() {self._compressed = nil}
  242. public var unknownFields = SwiftProtobuf.UnknownStorage()
  243. public init() {}
  244. fileprivate var _compressed: Grpc_Testing_BoolValue? = nil
  245. }
  246. /// Server-streaming request.
  247. public struct Grpc_Testing_StreamingOutputCallRequest: Sendable {
  248. // SwiftProtobuf.Message conformance is added in an extension below. See the
  249. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  250. // methods supported on all messages.
  251. /// Desired payload type in the response from the server.
  252. /// If response_type is RANDOM, the payload from each response in the stream
  253. /// might be of different types. This is to simulate a mixed type of payload
  254. /// stream.
  255. public var responseType: Grpc_Testing_PayloadType = .compressable
  256. /// Configuration for each expected response message.
  257. public var responseParameters: [Grpc_Testing_ResponseParameters] = []
  258. /// Optional input payload sent along with the request.
  259. public var payload: Grpc_Testing_Payload {
  260. get {return _payload ?? Grpc_Testing_Payload()}
  261. set {_payload = newValue}
  262. }
  263. /// Returns true if `payload` has been explicitly set.
  264. public var hasPayload: Bool {return self._payload != nil}
  265. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  266. public mutating func clearPayload() {self._payload = nil}
  267. /// Whether server should return a given status
  268. public var responseStatus: Grpc_Testing_EchoStatus {
  269. get {return _responseStatus ?? Grpc_Testing_EchoStatus()}
  270. set {_responseStatus = newValue}
  271. }
  272. /// Returns true if `responseStatus` has been explicitly set.
  273. public var hasResponseStatus: Bool {return self._responseStatus != nil}
  274. /// Clears the value of `responseStatus`. Subsequent reads from it will return its default value.
  275. public mutating func clearResponseStatus() {self._responseStatus = nil}
  276. public var unknownFields = SwiftProtobuf.UnknownStorage()
  277. public init() {}
  278. fileprivate var _payload: Grpc_Testing_Payload? = nil
  279. fileprivate var _responseStatus: Grpc_Testing_EchoStatus? = nil
  280. }
  281. /// Server-streaming response, as configured by the request and parameters.
  282. public struct Grpc_Testing_StreamingOutputCallResponse: Sendable {
  283. // SwiftProtobuf.Message conformance is added in an extension below. See the
  284. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  285. // methods supported on all messages.
  286. /// Payload to increase response size.
  287. public var payload: Grpc_Testing_Payload {
  288. get {return _payload ?? Grpc_Testing_Payload()}
  289. set {_payload = newValue}
  290. }
  291. /// Returns true if `payload` has been explicitly set.
  292. public var hasPayload: Bool {return self._payload != nil}
  293. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  294. public mutating func clearPayload() {self._payload = nil}
  295. public var unknownFields = SwiftProtobuf.UnknownStorage()
  296. public init() {}
  297. fileprivate var _payload: Grpc_Testing_Payload? = nil
  298. }
  299. /// For reconnect interop test only.
  300. /// Client tells server what reconnection parameters it used.
  301. public struct Grpc_Testing_ReconnectParams: Sendable {
  302. // SwiftProtobuf.Message conformance is added in an extension below. See the
  303. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  304. // methods supported on all messages.
  305. public var maxReconnectBackoffMs: Int32 = 0
  306. public var unknownFields = SwiftProtobuf.UnknownStorage()
  307. public init() {}
  308. }
  309. /// For reconnect interop test only.
  310. /// Server tells client whether its reconnects are following the spec and the
  311. /// reconnect backoffs it saw.
  312. public struct Grpc_Testing_ReconnectInfo: Sendable {
  313. // SwiftProtobuf.Message conformance is added in an extension below. See the
  314. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  315. // methods supported on all messages.
  316. public var passed: Bool = false
  317. public var backoffMs: [Int32] = []
  318. public var unknownFields = SwiftProtobuf.UnknownStorage()
  319. public init() {}
  320. }
  321. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  322. fileprivate let _protobuf_package = "grpc.testing"
  323. extension Grpc_Testing_PayloadType: SwiftProtobuf._ProtoNameProviding {
  324. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  325. 0: .same(proto: "COMPRESSABLE"),
  326. ]
  327. }
  328. extension Grpc_Testing_BoolValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  329. public static let protoMessageName: String = _protobuf_package + ".BoolValue"
  330. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  331. 1: .same(proto: "value"),
  332. ]
  333. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  334. while let fieldNumber = try decoder.nextFieldNumber() {
  335. // The use of inline closures is to circumvent an issue where the compiler
  336. // allocates stack space for every case branch when no optimizations are
  337. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  338. switch fieldNumber {
  339. case 1: try { try decoder.decodeSingularBoolField(value: &self.value) }()
  340. default: break
  341. }
  342. }
  343. }
  344. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  345. if self.value != false {
  346. try visitor.visitSingularBoolField(value: self.value, fieldNumber: 1)
  347. }
  348. try unknownFields.traverse(visitor: &visitor)
  349. }
  350. public static func ==(lhs: Grpc_Testing_BoolValue, rhs: Grpc_Testing_BoolValue) -> Bool {
  351. if lhs.value != rhs.value {return false}
  352. if lhs.unknownFields != rhs.unknownFields {return false}
  353. return true
  354. }
  355. }
  356. extension Grpc_Testing_Payload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  357. public static let protoMessageName: String = _protobuf_package + ".Payload"
  358. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  359. 1: .same(proto: "type"),
  360. 2: .same(proto: "body"),
  361. ]
  362. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  363. while let fieldNumber = try decoder.nextFieldNumber() {
  364. // The use of inline closures is to circumvent an issue where the compiler
  365. // allocates stack space for every case branch when no optimizations are
  366. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  367. switch fieldNumber {
  368. case 1: try { try decoder.decodeSingularEnumField(value: &self.type) }()
  369. case 2: try { try decoder.decodeSingularBytesField(value: &self.body) }()
  370. default: break
  371. }
  372. }
  373. }
  374. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  375. if self.type != .compressable {
  376. try visitor.visitSingularEnumField(value: self.type, fieldNumber: 1)
  377. }
  378. if !self.body.isEmpty {
  379. try visitor.visitSingularBytesField(value: self.body, fieldNumber: 2)
  380. }
  381. try unknownFields.traverse(visitor: &visitor)
  382. }
  383. public static func ==(lhs: Grpc_Testing_Payload, rhs: Grpc_Testing_Payload) -> Bool {
  384. if lhs.type != rhs.type {return false}
  385. if lhs.body != rhs.body {return false}
  386. if lhs.unknownFields != rhs.unknownFields {return false}
  387. return true
  388. }
  389. }
  390. extension Grpc_Testing_EchoStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  391. public static let protoMessageName: String = _protobuf_package + ".EchoStatus"
  392. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  393. 1: .same(proto: "code"),
  394. 2: .same(proto: "message"),
  395. ]
  396. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  397. while let fieldNumber = try decoder.nextFieldNumber() {
  398. // The use of inline closures is to circumvent an issue where the compiler
  399. // allocates stack space for every case branch when no optimizations are
  400. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  401. switch fieldNumber {
  402. case 1: try { try decoder.decodeSingularInt32Field(value: &self.code) }()
  403. case 2: try { try decoder.decodeSingularStringField(value: &self.message) }()
  404. default: break
  405. }
  406. }
  407. }
  408. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  409. if self.code != 0 {
  410. try visitor.visitSingularInt32Field(value: self.code, fieldNumber: 1)
  411. }
  412. if !self.message.isEmpty {
  413. try visitor.visitSingularStringField(value: self.message, fieldNumber: 2)
  414. }
  415. try unknownFields.traverse(visitor: &visitor)
  416. }
  417. public static func ==(lhs: Grpc_Testing_EchoStatus, rhs: Grpc_Testing_EchoStatus) -> Bool {
  418. if lhs.code != rhs.code {return false}
  419. if lhs.message != rhs.message {return false}
  420. if lhs.unknownFields != rhs.unknownFields {return false}
  421. return true
  422. }
  423. }
  424. extension Grpc_Testing_SimpleRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  425. public static let protoMessageName: String = _protobuf_package + ".SimpleRequest"
  426. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  427. 1: .standard(proto: "response_type"),
  428. 2: .standard(proto: "response_size"),
  429. 3: .same(proto: "payload"),
  430. 4: .standard(proto: "fill_username"),
  431. 5: .standard(proto: "fill_oauth_scope"),
  432. 6: .standard(proto: "response_compressed"),
  433. 7: .standard(proto: "response_status"),
  434. 8: .standard(proto: "expect_compressed"),
  435. ]
  436. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  437. while let fieldNumber = try decoder.nextFieldNumber() {
  438. // The use of inline closures is to circumvent an issue where the compiler
  439. // allocates stack space for every case branch when no optimizations are
  440. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  441. switch fieldNumber {
  442. case 1: try { try decoder.decodeSingularEnumField(value: &self.responseType) }()
  443. case 2: try { try decoder.decodeSingularInt32Field(value: &self.responseSize) }()
  444. case 3: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  445. case 4: try { try decoder.decodeSingularBoolField(value: &self.fillUsername) }()
  446. case 5: try { try decoder.decodeSingularBoolField(value: &self.fillOauthScope) }()
  447. case 6: try { try decoder.decodeSingularMessageField(value: &self._responseCompressed) }()
  448. case 7: try { try decoder.decodeSingularMessageField(value: &self._responseStatus) }()
  449. case 8: try { try decoder.decodeSingularMessageField(value: &self._expectCompressed) }()
  450. default: break
  451. }
  452. }
  453. }
  454. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  455. // The use of inline closures is to circumvent an issue where the compiler
  456. // allocates stack space for every if/case branch local when no optimizations
  457. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  458. // https://github.com/apple/swift-protobuf/issues/1182
  459. if self.responseType != .compressable {
  460. try visitor.visitSingularEnumField(value: self.responseType, fieldNumber: 1)
  461. }
  462. if self.responseSize != 0 {
  463. try visitor.visitSingularInt32Field(value: self.responseSize, fieldNumber: 2)
  464. }
  465. try { if let v = self._payload {
  466. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  467. } }()
  468. if self.fillUsername != false {
  469. try visitor.visitSingularBoolField(value: self.fillUsername, fieldNumber: 4)
  470. }
  471. if self.fillOauthScope != false {
  472. try visitor.visitSingularBoolField(value: self.fillOauthScope, fieldNumber: 5)
  473. }
  474. try { if let v = self._responseCompressed {
  475. try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
  476. } }()
  477. try { if let v = self._responseStatus {
  478. try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
  479. } }()
  480. try { if let v = self._expectCompressed {
  481. try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
  482. } }()
  483. try unknownFields.traverse(visitor: &visitor)
  484. }
  485. public static func ==(lhs: Grpc_Testing_SimpleRequest, rhs: Grpc_Testing_SimpleRequest) -> Bool {
  486. if lhs.responseType != rhs.responseType {return false}
  487. if lhs.responseSize != rhs.responseSize {return false}
  488. if lhs._payload != rhs._payload {return false}
  489. if lhs.fillUsername != rhs.fillUsername {return false}
  490. if lhs.fillOauthScope != rhs.fillOauthScope {return false}
  491. if lhs._responseCompressed != rhs._responseCompressed {return false}
  492. if lhs._responseStatus != rhs._responseStatus {return false}
  493. if lhs._expectCompressed != rhs._expectCompressed {return false}
  494. if lhs.unknownFields != rhs.unknownFields {return false}
  495. return true
  496. }
  497. }
  498. extension Grpc_Testing_SimpleResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  499. public static let protoMessageName: String = _protobuf_package + ".SimpleResponse"
  500. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  501. 1: .same(proto: "payload"),
  502. 2: .same(proto: "username"),
  503. 3: .standard(proto: "oauth_scope"),
  504. ]
  505. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  506. while let fieldNumber = try decoder.nextFieldNumber() {
  507. // The use of inline closures is to circumvent an issue where the compiler
  508. // allocates stack space for every case branch when no optimizations are
  509. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  510. switch fieldNumber {
  511. case 1: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  512. case 2: try { try decoder.decodeSingularStringField(value: &self.username) }()
  513. case 3: try { try decoder.decodeSingularStringField(value: &self.oauthScope) }()
  514. default: break
  515. }
  516. }
  517. }
  518. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  519. // The use of inline closures is to circumvent an issue where the compiler
  520. // allocates stack space for every if/case branch local when no optimizations
  521. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  522. // https://github.com/apple/swift-protobuf/issues/1182
  523. try { if let v = self._payload {
  524. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  525. } }()
  526. if !self.username.isEmpty {
  527. try visitor.visitSingularStringField(value: self.username, fieldNumber: 2)
  528. }
  529. if !self.oauthScope.isEmpty {
  530. try visitor.visitSingularStringField(value: self.oauthScope, fieldNumber: 3)
  531. }
  532. try unknownFields.traverse(visitor: &visitor)
  533. }
  534. public static func ==(lhs: Grpc_Testing_SimpleResponse, rhs: Grpc_Testing_SimpleResponse) -> Bool {
  535. if lhs._payload != rhs._payload {return false}
  536. if lhs.username != rhs.username {return false}
  537. if lhs.oauthScope != rhs.oauthScope {return false}
  538. if lhs.unknownFields != rhs.unknownFields {return false}
  539. return true
  540. }
  541. }
  542. extension Grpc_Testing_StreamingInputCallRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  543. public static let protoMessageName: String = _protobuf_package + ".StreamingInputCallRequest"
  544. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  545. 1: .same(proto: "payload"),
  546. 2: .standard(proto: "expect_compressed"),
  547. ]
  548. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  549. while let fieldNumber = try decoder.nextFieldNumber() {
  550. // The use of inline closures is to circumvent an issue where the compiler
  551. // allocates stack space for every case branch when no optimizations are
  552. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  553. switch fieldNumber {
  554. case 1: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  555. case 2: try { try decoder.decodeSingularMessageField(value: &self._expectCompressed) }()
  556. default: break
  557. }
  558. }
  559. }
  560. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  561. // The use of inline closures is to circumvent an issue where the compiler
  562. // allocates stack space for every if/case branch local when no optimizations
  563. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  564. // https://github.com/apple/swift-protobuf/issues/1182
  565. try { if let v = self._payload {
  566. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  567. } }()
  568. try { if let v = self._expectCompressed {
  569. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  570. } }()
  571. try unknownFields.traverse(visitor: &visitor)
  572. }
  573. public static func ==(lhs: Grpc_Testing_StreamingInputCallRequest, rhs: Grpc_Testing_StreamingInputCallRequest) -> Bool {
  574. if lhs._payload != rhs._payload {return false}
  575. if lhs._expectCompressed != rhs._expectCompressed {return false}
  576. if lhs.unknownFields != rhs.unknownFields {return false}
  577. return true
  578. }
  579. }
  580. extension Grpc_Testing_StreamingInputCallResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  581. public static let protoMessageName: String = _protobuf_package + ".StreamingInputCallResponse"
  582. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  583. 1: .standard(proto: "aggregated_payload_size"),
  584. ]
  585. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  586. while let fieldNumber = try decoder.nextFieldNumber() {
  587. // The use of inline closures is to circumvent an issue where the compiler
  588. // allocates stack space for every case branch when no optimizations are
  589. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  590. switch fieldNumber {
  591. case 1: try { try decoder.decodeSingularInt32Field(value: &self.aggregatedPayloadSize) }()
  592. default: break
  593. }
  594. }
  595. }
  596. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  597. if self.aggregatedPayloadSize != 0 {
  598. try visitor.visitSingularInt32Field(value: self.aggregatedPayloadSize, fieldNumber: 1)
  599. }
  600. try unknownFields.traverse(visitor: &visitor)
  601. }
  602. public static func ==(lhs: Grpc_Testing_StreamingInputCallResponse, rhs: Grpc_Testing_StreamingInputCallResponse) -> Bool {
  603. if lhs.aggregatedPayloadSize != rhs.aggregatedPayloadSize {return false}
  604. if lhs.unknownFields != rhs.unknownFields {return false}
  605. return true
  606. }
  607. }
  608. extension Grpc_Testing_ResponseParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  609. public static let protoMessageName: String = _protobuf_package + ".ResponseParameters"
  610. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  611. 1: .same(proto: "size"),
  612. 2: .standard(proto: "interval_us"),
  613. 3: .same(proto: "compressed"),
  614. ]
  615. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  616. while let fieldNumber = try decoder.nextFieldNumber() {
  617. // The use of inline closures is to circumvent an issue where the compiler
  618. // allocates stack space for every case branch when no optimizations are
  619. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  620. switch fieldNumber {
  621. case 1: try { try decoder.decodeSingularInt32Field(value: &self.size) }()
  622. case 2: try { try decoder.decodeSingularInt32Field(value: &self.intervalUs) }()
  623. case 3: try { try decoder.decodeSingularMessageField(value: &self._compressed) }()
  624. default: break
  625. }
  626. }
  627. }
  628. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  629. // The use of inline closures is to circumvent an issue where the compiler
  630. // allocates stack space for every if/case branch local when no optimizations
  631. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  632. // https://github.com/apple/swift-protobuf/issues/1182
  633. if self.size != 0 {
  634. try visitor.visitSingularInt32Field(value: self.size, fieldNumber: 1)
  635. }
  636. if self.intervalUs != 0 {
  637. try visitor.visitSingularInt32Field(value: self.intervalUs, fieldNumber: 2)
  638. }
  639. try { if let v = self._compressed {
  640. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  641. } }()
  642. try unknownFields.traverse(visitor: &visitor)
  643. }
  644. public static func ==(lhs: Grpc_Testing_ResponseParameters, rhs: Grpc_Testing_ResponseParameters) -> Bool {
  645. if lhs.size != rhs.size {return false}
  646. if lhs.intervalUs != rhs.intervalUs {return false}
  647. if lhs._compressed != rhs._compressed {return false}
  648. if lhs.unknownFields != rhs.unknownFields {return false}
  649. return true
  650. }
  651. }
  652. extension Grpc_Testing_StreamingOutputCallRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  653. public static let protoMessageName: String = _protobuf_package + ".StreamingOutputCallRequest"
  654. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  655. 1: .standard(proto: "response_type"),
  656. 2: .standard(proto: "response_parameters"),
  657. 3: .same(proto: "payload"),
  658. 7: .standard(proto: "response_status"),
  659. ]
  660. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  661. while let fieldNumber = try decoder.nextFieldNumber() {
  662. // The use of inline closures is to circumvent an issue where the compiler
  663. // allocates stack space for every case branch when no optimizations are
  664. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  665. switch fieldNumber {
  666. case 1: try { try decoder.decodeSingularEnumField(value: &self.responseType) }()
  667. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.responseParameters) }()
  668. case 3: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  669. case 7: try { try decoder.decodeSingularMessageField(value: &self._responseStatus) }()
  670. default: break
  671. }
  672. }
  673. }
  674. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  675. // The use of inline closures is to circumvent an issue where the compiler
  676. // allocates stack space for every if/case branch local when no optimizations
  677. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  678. // https://github.com/apple/swift-protobuf/issues/1182
  679. if self.responseType != .compressable {
  680. try visitor.visitSingularEnumField(value: self.responseType, fieldNumber: 1)
  681. }
  682. if !self.responseParameters.isEmpty {
  683. try visitor.visitRepeatedMessageField(value: self.responseParameters, fieldNumber: 2)
  684. }
  685. try { if let v = self._payload {
  686. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  687. } }()
  688. try { if let v = self._responseStatus {
  689. try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
  690. } }()
  691. try unknownFields.traverse(visitor: &visitor)
  692. }
  693. public static func ==(lhs: Grpc_Testing_StreamingOutputCallRequest, rhs: Grpc_Testing_StreamingOutputCallRequest) -> Bool {
  694. if lhs.responseType != rhs.responseType {return false}
  695. if lhs.responseParameters != rhs.responseParameters {return false}
  696. if lhs._payload != rhs._payload {return false}
  697. if lhs._responseStatus != rhs._responseStatus {return false}
  698. if lhs.unknownFields != rhs.unknownFields {return false}
  699. return true
  700. }
  701. }
  702. extension Grpc_Testing_StreamingOutputCallResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  703. public static let protoMessageName: String = _protobuf_package + ".StreamingOutputCallResponse"
  704. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  705. 1: .same(proto: "payload"),
  706. ]
  707. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  708. while let fieldNumber = try decoder.nextFieldNumber() {
  709. // The use of inline closures is to circumvent an issue where the compiler
  710. // allocates stack space for every case branch when no optimizations are
  711. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  712. switch fieldNumber {
  713. case 1: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  714. default: break
  715. }
  716. }
  717. }
  718. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  719. // The use of inline closures is to circumvent an issue where the compiler
  720. // allocates stack space for every if/case branch local when no optimizations
  721. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  722. // https://github.com/apple/swift-protobuf/issues/1182
  723. try { if let v = self._payload {
  724. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  725. } }()
  726. try unknownFields.traverse(visitor: &visitor)
  727. }
  728. public static func ==(lhs: Grpc_Testing_StreamingOutputCallResponse, rhs: Grpc_Testing_StreamingOutputCallResponse) -> Bool {
  729. if lhs._payload != rhs._payload {return false}
  730. if lhs.unknownFields != rhs.unknownFields {return false}
  731. return true
  732. }
  733. }
  734. extension Grpc_Testing_ReconnectParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  735. public static let protoMessageName: String = _protobuf_package + ".ReconnectParams"
  736. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  737. 1: .standard(proto: "max_reconnect_backoff_ms"),
  738. ]
  739. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  740. while let fieldNumber = try decoder.nextFieldNumber() {
  741. // The use of inline closures is to circumvent an issue where the compiler
  742. // allocates stack space for every case branch when no optimizations are
  743. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  744. switch fieldNumber {
  745. case 1: try { try decoder.decodeSingularInt32Field(value: &self.maxReconnectBackoffMs) }()
  746. default: break
  747. }
  748. }
  749. }
  750. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  751. if self.maxReconnectBackoffMs != 0 {
  752. try visitor.visitSingularInt32Field(value: self.maxReconnectBackoffMs, fieldNumber: 1)
  753. }
  754. try unknownFields.traverse(visitor: &visitor)
  755. }
  756. public static func ==(lhs: Grpc_Testing_ReconnectParams, rhs: Grpc_Testing_ReconnectParams) -> Bool {
  757. if lhs.maxReconnectBackoffMs != rhs.maxReconnectBackoffMs {return false}
  758. if lhs.unknownFields != rhs.unknownFields {return false}
  759. return true
  760. }
  761. }
  762. extension Grpc_Testing_ReconnectInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  763. public static let protoMessageName: String = _protobuf_package + ".ReconnectInfo"
  764. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  765. 1: .same(proto: "passed"),
  766. 2: .standard(proto: "backoff_ms"),
  767. ]
  768. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  769. while let fieldNumber = try decoder.nextFieldNumber() {
  770. // The use of inline closures is to circumvent an issue where the compiler
  771. // allocates stack space for every case branch when no optimizations are
  772. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  773. switch fieldNumber {
  774. case 1: try { try decoder.decodeSingularBoolField(value: &self.passed) }()
  775. case 2: try { try decoder.decodeRepeatedInt32Field(value: &self.backoffMs) }()
  776. default: break
  777. }
  778. }
  779. }
  780. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  781. if self.passed != false {
  782. try visitor.visitSingularBoolField(value: self.passed, fieldNumber: 1)
  783. }
  784. if !self.backoffMs.isEmpty {
  785. try visitor.visitPackedInt32Field(value: self.backoffMs, fieldNumber: 2)
  786. }
  787. try unknownFields.traverse(visitor: &visitor)
  788. }
  789. public static func ==(lhs: Grpc_Testing_ReconnectInfo, rhs: Grpc_Testing_ReconnectInfo) -> Bool {
  790. if lhs.passed != rhs.passed {return false}
  791. if lhs.backoffMs != rhs.backoffMs {return false}
  792. if lhs.unknownFields != rhs.unknownFields {return false}
  793. return true
  794. }
  795. }