2
0

messages.pb.swift 37 KB

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