messages.pb.swift 39 KB

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