messages.pb.swift 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934
  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. // The use of inline closures is to circumvent an issue where the compiler
  459. // allocates stack space for every if/case branch local when no optimizations
  460. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  461. // https://github.com/apple/swift-protobuf/issues/1182
  462. if self.responseType != .compressable {
  463. try visitor.visitSingularEnumField(value: self.responseType, fieldNumber: 1)
  464. }
  465. if self.responseSize != 0 {
  466. try visitor.visitSingularInt32Field(value: self.responseSize, fieldNumber: 2)
  467. }
  468. try { if let v = self._payload {
  469. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  470. } }()
  471. if self.fillUsername != false {
  472. try visitor.visitSingularBoolField(value: self.fillUsername, fieldNumber: 4)
  473. }
  474. if self.fillOauthScope != false {
  475. try visitor.visitSingularBoolField(value: self.fillOauthScope, fieldNumber: 5)
  476. }
  477. try { if let v = self._responseCompressed {
  478. try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
  479. } }()
  480. try { if let v = self._responseStatus {
  481. try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
  482. } }()
  483. try { if let v = self._expectCompressed {
  484. try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
  485. } }()
  486. try unknownFields.traverse(visitor: &visitor)
  487. }
  488. public static func ==(lhs: Grpc_Testing_SimpleRequest, rhs: Grpc_Testing_SimpleRequest) -> Bool {
  489. if lhs.responseType != rhs.responseType {return false}
  490. if lhs.responseSize != rhs.responseSize {return false}
  491. if lhs._payload != rhs._payload {return false}
  492. if lhs.fillUsername != rhs.fillUsername {return false}
  493. if lhs.fillOauthScope != rhs.fillOauthScope {return false}
  494. if lhs._responseCompressed != rhs._responseCompressed {return false}
  495. if lhs._responseStatus != rhs._responseStatus {return false}
  496. if lhs._expectCompressed != rhs._expectCompressed {return false}
  497. if lhs.unknownFields != rhs.unknownFields {return false}
  498. return true
  499. }
  500. }
  501. extension Grpc_Testing_SimpleResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  502. public static let protoMessageName: String = _protobuf_package + ".SimpleResponse"
  503. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  504. 1: .same(proto: "payload"),
  505. 2: .same(proto: "username"),
  506. 3: .standard(proto: "oauth_scope"),
  507. ]
  508. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  509. while let fieldNumber = try decoder.nextFieldNumber() {
  510. // The use of inline closures is to circumvent an issue where the compiler
  511. // allocates stack space for every case branch when no optimizations are
  512. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  513. switch fieldNumber {
  514. case 1: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  515. case 2: try { try decoder.decodeSingularStringField(value: &self.username) }()
  516. case 3: try { try decoder.decodeSingularStringField(value: &self.oauthScope) }()
  517. default: break
  518. }
  519. }
  520. }
  521. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  522. // The use of inline closures is to circumvent an issue where the compiler
  523. // allocates stack space for every if/case branch local when no optimizations
  524. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  525. // https://github.com/apple/swift-protobuf/issues/1182
  526. try { if let v = self._payload {
  527. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  528. } }()
  529. if !self.username.isEmpty {
  530. try visitor.visitSingularStringField(value: self.username, fieldNumber: 2)
  531. }
  532. if !self.oauthScope.isEmpty {
  533. try visitor.visitSingularStringField(value: self.oauthScope, fieldNumber: 3)
  534. }
  535. try unknownFields.traverse(visitor: &visitor)
  536. }
  537. public static func ==(lhs: Grpc_Testing_SimpleResponse, rhs: Grpc_Testing_SimpleResponse) -> Bool {
  538. if lhs._payload != rhs._payload {return false}
  539. if lhs.username != rhs.username {return false}
  540. if lhs.oauthScope != rhs.oauthScope {return false}
  541. if lhs.unknownFields != rhs.unknownFields {return false}
  542. return true
  543. }
  544. }
  545. extension Grpc_Testing_StreamingInputCallRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  546. public static let protoMessageName: String = _protobuf_package + ".StreamingInputCallRequest"
  547. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  548. 1: .same(proto: "payload"),
  549. 2: .standard(proto: "expect_compressed"),
  550. ]
  551. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  552. while let fieldNumber = try decoder.nextFieldNumber() {
  553. // The use of inline closures is to circumvent an issue where the compiler
  554. // allocates stack space for every case branch when no optimizations are
  555. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  556. switch fieldNumber {
  557. case 1: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  558. case 2: try { try decoder.decodeSingularMessageField(value: &self._expectCompressed) }()
  559. default: break
  560. }
  561. }
  562. }
  563. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  564. // The use of inline closures is to circumvent an issue where the compiler
  565. // allocates stack space for every if/case branch local when no optimizations
  566. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  567. // https://github.com/apple/swift-protobuf/issues/1182
  568. try { if let v = self._payload {
  569. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  570. } }()
  571. try { if let v = self._expectCompressed {
  572. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  573. } }()
  574. try unknownFields.traverse(visitor: &visitor)
  575. }
  576. public static func ==(lhs: Grpc_Testing_StreamingInputCallRequest, rhs: Grpc_Testing_StreamingInputCallRequest) -> Bool {
  577. if lhs._payload != rhs._payload {return false}
  578. if lhs._expectCompressed != rhs._expectCompressed {return false}
  579. if lhs.unknownFields != rhs.unknownFields {return false}
  580. return true
  581. }
  582. }
  583. extension Grpc_Testing_StreamingInputCallResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  584. public static let protoMessageName: String = _protobuf_package + ".StreamingInputCallResponse"
  585. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  586. 1: .standard(proto: "aggregated_payload_size"),
  587. ]
  588. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  589. while let fieldNumber = try decoder.nextFieldNumber() {
  590. // The use of inline closures is to circumvent an issue where the compiler
  591. // allocates stack space for every case branch when no optimizations are
  592. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  593. switch fieldNumber {
  594. case 1: try { try decoder.decodeSingularInt32Field(value: &self.aggregatedPayloadSize) }()
  595. default: break
  596. }
  597. }
  598. }
  599. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  600. if self.aggregatedPayloadSize != 0 {
  601. try visitor.visitSingularInt32Field(value: self.aggregatedPayloadSize, fieldNumber: 1)
  602. }
  603. try unknownFields.traverse(visitor: &visitor)
  604. }
  605. public static func ==(lhs: Grpc_Testing_StreamingInputCallResponse, rhs: Grpc_Testing_StreamingInputCallResponse) -> Bool {
  606. if lhs.aggregatedPayloadSize != rhs.aggregatedPayloadSize {return false}
  607. if lhs.unknownFields != rhs.unknownFields {return false}
  608. return true
  609. }
  610. }
  611. extension Grpc_Testing_ResponseParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  612. public static let protoMessageName: String = _protobuf_package + ".ResponseParameters"
  613. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  614. 1: .same(proto: "size"),
  615. 2: .standard(proto: "interval_us"),
  616. 3: .same(proto: "compressed"),
  617. ]
  618. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  619. while let fieldNumber = try decoder.nextFieldNumber() {
  620. // The use of inline closures is to circumvent an issue where the compiler
  621. // allocates stack space for every case branch when no optimizations are
  622. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  623. switch fieldNumber {
  624. case 1: try { try decoder.decodeSingularInt32Field(value: &self.size) }()
  625. case 2: try { try decoder.decodeSingularInt32Field(value: &self.intervalUs) }()
  626. case 3: try { try decoder.decodeSingularMessageField(value: &self._compressed) }()
  627. default: break
  628. }
  629. }
  630. }
  631. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  632. // The use of inline closures is to circumvent an issue where the compiler
  633. // allocates stack space for every if/case branch local when no optimizations
  634. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  635. // https://github.com/apple/swift-protobuf/issues/1182
  636. if self.size != 0 {
  637. try visitor.visitSingularInt32Field(value: self.size, fieldNumber: 1)
  638. }
  639. if self.intervalUs != 0 {
  640. try visitor.visitSingularInt32Field(value: self.intervalUs, fieldNumber: 2)
  641. }
  642. try { if let v = self._compressed {
  643. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  644. } }()
  645. try unknownFields.traverse(visitor: &visitor)
  646. }
  647. public static func ==(lhs: Grpc_Testing_ResponseParameters, rhs: Grpc_Testing_ResponseParameters) -> Bool {
  648. if lhs.size != rhs.size {return false}
  649. if lhs.intervalUs != rhs.intervalUs {return false}
  650. if lhs._compressed != rhs._compressed {return false}
  651. if lhs.unknownFields != rhs.unknownFields {return false}
  652. return true
  653. }
  654. }
  655. extension Grpc_Testing_StreamingOutputCallRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  656. public static let protoMessageName: String = _protobuf_package + ".StreamingOutputCallRequest"
  657. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  658. 1: .standard(proto: "response_type"),
  659. 2: .standard(proto: "response_parameters"),
  660. 3: .same(proto: "payload"),
  661. 7: .standard(proto: "response_status"),
  662. ]
  663. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  664. while let fieldNumber = try decoder.nextFieldNumber() {
  665. // The use of inline closures is to circumvent an issue where the compiler
  666. // allocates stack space for every case branch when no optimizations are
  667. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  668. switch fieldNumber {
  669. case 1: try { try decoder.decodeSingularEnumField(value: &self.responseType) }()
  670. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.responseParameters) }()
  671. case 3: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  672. case 7: try { try decoder.decodeSingularMessageField(value: &self._responseStatus) }()
  673. default: break
  674. }
  675. }
  676. }
  677. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  678. // The use of inline closures is to circumvent an issue where the compiler
  679. // allocates stack space for every if/case branch local when no optimizations
  680. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  681. // https://github.com/apple/swift-protobuf/issues/1182
  682. if self.responseType != .compressable {
  683. try visitor.visitSingularEnumField(value: self.responseType, fieldNumber: 1)
  684. }
  685. if !self.responseParameters.isEmpty {
  686. try visitor.visitRepeatedMessageField(value: self.responseParameters, fieldNumber: 2)
  687. }
  688. try { if let v = self._payload {
  689. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  690. } }()
  691. try { if let v = self._responseStatus {
  692. try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
  693. } }()
  694. try unknownFields.traverse(visitor: &visitor)
  695. }
  696. public static func ==(lhs: Grpc_Testing_StreamingOutputCallRequest, rhs: Grpc_Testing_StreamingOutputCallRequest) -> Bool {
  697. if lhs.responseType != rhs.responseType {return false}
  698. if lhs.responseParameters != rhs.responseParameters {return false}
  699. if lhs._payload != rhs._payload {return false}
  700. if lhs._responseStatus != rhs._responseStatus {return false}
  701. if lhs.unknownFields != rhs.unknownFields {return false}
  702. return true
  703. }
  704. }
  705. extension Grpc_Testing_StreamingOutputCallResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  706. public static let protoMessageName: String = _protobuf_package + ".StreamingOutputCallResponse"
  707. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  708. 1: .same(proto: "payload"),
  709. ]
  710. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  711. while let fieldNumber = try decoder.nextFieldNumber() {
  712. // The use of inline closures is to circumvent an issue where the compiler
  713. // allocates stack space for every case branch when no optimizations are
  714. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  715. switch fieldNumber {
  716. case 1: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  717. default: break
  718. }
  719. }
  720. }
  721. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  722. // The use of inline closures is to circumvent an issue where the compiler
  723. // allocates stack space for every if/case branch local when no optimizations
  724. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  725. // https://github.com/apple/swift-protobuf/issues/1182
  726. try { if let v = self._payload {
  727. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  728. } }()
  729. try unknownFields.traverse(visitor: &visitor)
  730. }
  731. public static func ==(lhs: Grpc_Testing_StreamingOutputCallResponse, rhs: Grpc_Testing_StreamingOutputCallResponse) -> Bool {
  732. if lhs._payload != rhs._payload {return false}
  733. if lhs.unknownFields != rhs.unknownFields {return false}
  734. return true
  735. }
  736. }
  737. extension Grpc_Testing_ReconnectParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  738. public static let protoMessageName: String = _protobuf_package + ".ReconnectParams"
  739. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  740. 1: .standard(proto: "max_reconnect_backoff_ms"),
  741. ]
  742. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  743. while let fieldNumber = try decoder.nextFieldNumber() {
  744. // The use of inline closures is to circumvent an issue where the compiler
  745. // allocates stack space for every case branch when no optimizations are
  746. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  747. switch fieldNumber {
  748. case 1: try { try decoder.decodeSingularInt32Field(value: &self.maxReconnectBackoffMs) }()
  749. default: break
  750. }
  751. }
  752. }
  753. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  754. if self.maxReconnectBackoffMs != 0 {
  755. try visitor.visitSingularInt32Field(value: self.maxReconnectBackoffMs, fieldNumber: 1)
  756. }
  757. try unknownFields.traverse(visitor: &visitor)
  758. }
  759. public static func ==(lhs: Grpc_Testing_ReconnectParams, rhs: Grpc_Testing_ReconnectParams) -> Bool {
  760. if lhs.maxReconnectBackoffMs != rhs.maxReconnectBackoffMs {return false}
  761. if lhs.unknownFields != rhs.unknownFields {return false}
  762. return true
  763. }
  764. }
  765. extension Grpc_Testing_ReconnectInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  766. public static let protoMessageName: String = _protobuf_package + ".ReconnectInfo"
  767. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  768. 1: .same(proto: "passed"),
  769. 2: .standard(proto: "backoff_ms"),
  770. ]
  771. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  772. while let fieldNumber = try decoder.nextFieldNumber() {
  773. // The use of inline closures is to circumvent an issue where the compiler
  774. // allocates stack space for every case branch when no optimizations are
  775. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  776. switch fieldNumber {
  777. case 1: try { try decoder.decodeSingularBoolField(value: &self.passed) }()
  778. case 2: try { try decoder.decodeRepeatedInt32Field(value: &self.backoffMs) }()
  779. default: break
  780. }
  781. }
  782. }
  783. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  784. if self.passed != false {
  785. try visitor.visitSingularBoolField(value: self.passed, fieldNumber: 1)
  786. }
  787. if !self.backoffMs.isEmpty {
  788. try visitor.visitPackedInt32Field(value: self.backoffMs, fieldNumber: 2)
  789. }
  790. try unknownFields.traverse(visitor: &visitor)
  791. }
  792. public static func ==(lhs: Grpc_Testing_ReconnectInfo, rhs: Grpc_Testing_ReconnectInfo) -> Bool {
  793. if lhs.passed != rhs.passed {return false}
  794. if lhs.backoffMs != rhs.backoffMs {return false}
  795. if lhs.unknownFields != rhs.unknownFields {return false}
  796. return true
  797. }
  798. }