messages.pb.swift 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874
  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 = SwiftProtobuf.Internal.emptyData
  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. switch fieldNumber {
  339. case 1: try decoder.decodeSingularBoolField(value: &self.value)
  340. default: break
  341. }
  342. }
  343. }
  344. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  345. if self.value != false {
  346. try visitor.visitSingularBoolField(value: self.value, fieldNumber: 1)
  347. }
  348. try unknownFields.traverse(visitor: &visitor)
  349. }
  350. public static func ==(lhs: Grpc_Testing_BoolValue, rhs: Grpc_Testing_BoolValue) -> Bool {
  351. if lhs.value != rhs.value {return false}
  352. if lhs.unknownFields != rhs.unknownFields {return false}
  353. return true
  354. }
  355. }
  356. extension Grpc_Testing_Payload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  357. public static let protoMessageName: String = _protobuf_package + ".Payload"
  358. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  359. 1: .same(proto: "type"),
  360. 2: .same(proto: "body"),
  361. ]
  362. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  363. while let fieldNumber = try decoder.nextFieldNumber() {
  364. switch fieldNumber {
  365. case 1: try decoder.decodeSingularEnumField(value: &self.type)
  366. case 2: try decoder.decodeSingularBytesField(value: &self.body)
  367. default: break
  368. }
  369. }
  370. }
  371. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  372. if self.type != .compressable {
  373. try visitor.visitSingularEnumField(value: self.type, fieldNumber: 1)
  374. }
  375. if !self.body.isEmpty {
  376. try visitor.visitSingularBytesField(value: self.body, fieldNumber: 2)
  377. }
  378. try unknownFields.traverse(visitor: &visitor)
  379. }
  380. public static func ==(lhs: Grpc_Testing_Payload, rhs: Grpc_Testing_Payload) -> Bool {
  381. if lhs.type != rhs.type {return false}
  382. if lhs.body != rhs.body {return false}
  383. if lhs.unknownFields != rhs.unknownFields {return false}
  384. return true
  385. }
  386. }
  387. extension Grpc_Testing_EchoStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  388. public static let protoMessageName: String = _protobuf_package + ".EchoStatus"
  389. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  390. 1: .same(proto: "code"),
  391. 2: .same(proto: "message"),
  392. ]
  393. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  394. while let fieldNumber = try decoder.nextFieldNumber() {
  395. switch fieldNumber {
  396. case 1: try decoder.decodeSingularInt32Field(value: &self.code)
  397. case 2: try decoder.decodeSingularStringField(value: &self.message)
  398. default: break
  399. }
  400. }
  401. }
  402. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  403. if self.code != 0 {
  404. try visitor.visitSingularInt32Field(value: self.code, fieldNumber: 1)
  405. }
  406. if !self.message.isEmpty {
  407. try visitor.visitSingularStringField(value: self.message, fieldNumber: 2)
  408. }
  409. try unknownFields.traverse(visitor: &visitor)
  410. }
  411. public static func ==(lhs: Grpc_Testing_EchoStatus, rhs: Grpc_Testing_EchoStatus) -> Bool {
  412. if lhs.code != rhs.code {return false}
  413. if lhs.message != rhs.message {return false}
  414. if lhs.unknownFields != rhs.unknownFields {return false}
  415. return true
  416. }
  417. }
  418. extension Grpc_Testing_SimpleRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  419. public static let protoMessageName: String = _protobuf_package + ".SimpleRequest"
  420. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  421. 1: .standard(proto: "response_type"),
  422. 2: .standard(proto: "response_size"),
  423. 3: .same(proto: "payload"),
  424. 4: .standard(proto: "fill_username"),
  425. 5: .standard(proto: "fill_oauth_scope"),
  426. 6: .standard(proto: "response_compressed"),
  427. 7: .standard(proto: "response_status"),
  428. 8: .standard(proto: "expect_compressed"),
  429. ]
  430. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  431. while let fieldNumber = try decoder.nextFieldNumber() {
  432. switch fieldNumber {
  433. case 1: try decoder.decodeSingularEnumField(value: &self.responseType)
  434. case 2: try decoder.decodeSingularInt32Field(value: &self.responseSize)
  435. case 3: try decoder.decodeSingularMessageField(value: &self._payload)
  436. case 4: try decoder.decodeSingularBoolField(value: &self.fillUsername)
  437. case 5: try decoder.decodeSingularBoolField(value: &self.fillOauthScope)
  438. case 6: try decoder.decodeSingularMessageField(value: &self._responseCompressed)
  439. case 7: try decoder.decodeSingularMessageField(value: &self._responseStatus)
  440. case 8: try decoder.decodeSingularMessageField(value: &self._expectCompressed)
  441. default: break
  442. }
  443. }
  444. }
  445. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  446. if self.responseType != .compressable {
  447. try visitor.visitSingularEnumField(value: self.responseType, fieldNumber: 1)
  448. }
  449. if self.responseSize != 0 {
  450. try visitor.visitSingularInt32Field(value: self.responseSize, fieldNumber: 2)
  451. }
  452. if let v = self._payload {
  453. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  454. }
  455. if self.fillUsername != false {
  456. try visitor.visitSingularBoolField(value: self.fillUsername, fieldNumber: 4)
  457. }
  458. if self.fillOauthScope != false {
  459. try visitor.visitSingularBoolField(value: self.fillOauthScope, fieldNumber: 5)
  460. }
  461. if let v = self._responseCompressed {
  462. try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
  463. }
  464. if let v = self._responseStatus {
  465. try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
  466. }
  467. if let v = self._expectCompressed {
  468. try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
  469. }
  470. try unknownFields.traverse(visitor: &visitor)
  471. }
  472. public static func ==(lhs: Grpc_Testing_SimpleRequest, rhs: Grpc_Testing_SimpleRequest) -> Bool {
  473. if lhs.responseType != rhs.responseType {return false}
  474. if lhs.responseSize != rhs.responseSize {return false}
  475. if lhs._payload != rhs._payload {return false}
  476. if lhs.fillUsername != rhs.fillUsername {return false}
  477. if lhs.fillOauthScope != rhs.fillOauthScope {return false}
  478. if lhs._responseCompressed != rhs._responseCompressed {return false}
  479. if lhs._responseStatus != rhs._responseStatus {return false}
  480. if lhs._expectCompressed != rhs._expectCompressed {return false}
  481. if lhs.unknownFields != rhs.unknownFields {return false}
  482. return true
  483. }
  484. }
  485. extension Grpc_Testing_SimpleResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  486. public static let protoMessageName: String = _protobuf_package + ".SimpleResponse"
  487. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  488. 1: .same(proto: "payload"),
  489. 2: .same(proto: "username"),
  490. 3: .standard(proto: "oauth_scope"),
  491. ]
  492. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  493. while let fieldNumber = try decoder.nextFieldNumber() {
  494. switch fieldNumber {
  495. case 1: try decoder.decodeSingularMessageField(value: &self._payload)
  496. case 2: try decoder.decodeSingularStringField(value: &self.username)
  497. case 3: try decoder.decodeSingularStringField(value: &self.oauthScope)
  498. default: break
  499. }
  500. }
  501. }
  502. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  503. if let v = self._payload {
  504. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  505. }
  506. if !self.username.isEmpty {
  507. try visitor.visitSingularStringField(value: self.username, fieldNumber: 2)
  508. }
  509. if !self.oauthScope.isEmpty {
  510. try visitor.visitSingularStringField(value: self.oauthScope, fieldNumber: 3)
  511. }
  512. try unknownFields.traverse(visitor: &visitor)
  513. }
  514. public static func ==(lhs: Grpc_Testing_SimpleResponse, rhs: Grpc_Testing_SimpleResponse) -> Bool {
  515. if lhs._payload != rhs._payload {return false}
  516. if lhs.username != rhs.username {return false}
  517. if lhs.oauthScope != rhs.oauthScope {return false}
  518. if lhs.unknownFields != rhs.unknownFields {return false}
  519. return true
  520. }
  521. }
  522. extension Grpc_Testing_StreamingInputCallRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  523. public static let protoMessageName: String = _protobuf_package + ".StreamingInputCallRequest"
  524. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  525. 1: .same(proto: "payload"),
  526. 2: .standard(proto: "expect_compressed"),
  527. ]
  528. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  529. while let fieldNumber = try decoder.nextFieldNumber() {
  530. switch fieldNumber {
  531. case 1: try decoder.decodeSingularMessageField(value: &self._payload)
  532. case 2: try decoder.decodeSingularMessageField(value: &self._expectCompressed)
  533. default: break
  534. }
  535. }
  536. }
  537. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  538. if let v = self._payload {
  539. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  540. }
  541. if let v = self._expectCompressed {
  542. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  543. }
  544. try unknownFields.traverse(visitor: &visitor)
  545. }
  546. public static func ==(lhs: Grpc_Testing_StreamingInputCallRequest, rhs: Grpc_Testing_StreamingInputCallRequest) -> Bool {
  547. if lhs._payload != rhs._payload {return false}
  548. if lhs._expectCompressed != rhs._expectCompressed {return false}
  549. if lhs.unknownFields != rhs.unknownFields {return false}
  550. return true
  551. }
  552. }
  553. extension Grpc_Testing_StreamingInputCallResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  554. public static let protoMessageName: String = _protobuf_package + ".StreamingInputCallResponse"
  555. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  556. 1: .standard(proto: "aggregated_payload_size"),
  557. ]
  558. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  559. while let fieldNumber = try decoder.nextFieldNumber() {
  560. switch fieldNumber {
  561. case 1: try decoder.decodeSingularInt32Field(value: &self.aggregatedPayloadSize)
  562. default: break
  563. }
  564. }
  565. }
  566. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  567. if self.aggregatedPayloadSize != 0 {
  568. try visitor.visitSingularInt32Field(value: self.aggregatedPayloadSize, fieldNumber: 1)
  569. }
  570. try unknownFields.traverse(visitor: &visitor)
  571. }
  572. public static func ==(lhs: Grpc_Testing_StreamingInputCallResponse, rhs: Grpc_Testing_StreamingInputCallResponse) -> Bool {
  573. if lhs.aggregatedPayloadSize != rhs.aggregatedPayloadSize {return false}
  574. if lhs.unknownFields != rhs.unknownFields {return false}
  575. return true
  576. }
  577. }
  578. extension Grpc_Testing_ResponseParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  579. public static let protoMessageName: String = _protobuf_package + ".ResponseParameters"
  580. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  581. 1: .same(proto: "size"),
  582. 2: .standard(proto: "interval_us"),
  583. 3: .same(proto: "compressed"),
  584. ]
  585. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  586. while let fieldNumber = try decoder.nextFieldNumber() {
  587. switch fieldNumber {
  588. case 1: try decoder.decodeSingularInt32Field(value: &self.size)
  589. case 2: try decoder.decodeSingularInt32Field(value: &self.intervalUs)
  590. case 3: try decoder.decodeSingularMessageField(value: &self._compressed)
  591. default: break
  592. }
  593. }
  594. }
  595. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  596. if self.size != 0 {
  597. try visitor.visitSingularInt32Field(value: self.size, fieldNumber: 1)
  598. }
  599. if self.intervalUs != 0 {
  600. try visitor.visitSingularInt32Field(value: self.intervalUs, fieldNumber: 2)
  601. }
  602. if let v = self._compressed {
  603. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  604. }
  605. try unknownFields.traverse(visitor: &visitor)
  606. }
  607. public static func ==(lhs: Grpc_Testing_ResponseParameters, rhs: Grpc_Testing_ResponseParameters) -> Bool {
  608. if lhs.size != rhs.size {return false}
  609. if lhs.intervalUs != rhs.intervalUs {return false}
  610. if lhs._compressed != rhs._compressed {return false}
  611. if lhs.unknownFields != rhs.unknownFields {return false}
  612. return true
  613. }
  614. }
  615. extension Grpc_Testing_StreamingOutputCallRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  616. public static let protoMessageName: String = _protobuf_package + ".StreamingOutputCallRequest"
  617. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  618. 1: .standard(proto: "response_type"),
  619. 2: .standard(proto: "response_parameters"),
  620. 3: .same(proto: "payload"),
  621. 7: .standard(proto: "response_status"),
  622. ]
  623. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  624. while let fieldNumber = try decoder.nextFieldNumber() {
  625. switch fieldNumber {
  626. case 1: try decoder.decodeSingularEnumField(value: &self.responseType)
  627. case 2: try decoder.decodeRepeatedMessageField(value: &self.responseParameters)
  628. case 3: try decoder.decodeSingularMessageField(value: &self._payload)
  629. case 7: try decoder.decodeSingularMessageField(value: &self._responseStatus)
  630. default: break
  631. }
  632. }
  633. }
  634. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  635. if self.responseType != .compressable {
  636. try visitor.visitSingularEnumField(value: self.responseType, fieldNumber: 1)
  637. }
  638. if !self.responseParameters.isEmpty {
  639. try visitor.visitRepeatedMessageField(value: self.responseParameters, fieldNumber: 2)
  640. }
  641. if let v = self._payload {
  642. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  643. }
  644. if let v = self._responseStatus {
  645. try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
  646. }
  647. try unknownFields.traverse(visitor: &visitor)
  648. }
  649. public static func ==(lhs: Grpc_Testing_StreamingOutputCallRequest, rhs: Grpc_Testing_StreamingOutputCallRequest) -> Bool {
  650. if lhs.responseType != rhs.responseType {return false}
  651. if lhs.responseParameters != rhs.responseParameters {return false}
  652. if lhs._payload != rhs._payload {return false}
  653. if lhs._responseStatus != rhs._responseStatus {return false}
  654. if lhs.unknownFields != rhs.unknownFields {return false}
  655. return true
  656. }
  657. }
  658. extension Grpc_Testing_StreamingOutputCallResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  659. public static let protoMessageName: String = _protobuf_package + ".StreamingOutputCallResponse"
  660. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  661. 1: .same(proto: "payload"),
  662. ]
  663. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  664. while let fieldNumber = try decoder.nextFieldNumber() {
  665. switch fieldNumber {
  666. case 1: try decoder.decodeSingularMessageField(value: &self._payload)
  667. default: break
  668. }
  669. }
  670. }
  671. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  672. if let v = self._payload {
  673. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  674. }
  675. try unknownFields.traverse(visitor: &visitor)
  676. }
  677. public static func ==(lhs: Grpc_Testing_StreamingOutputCallResponse, rhs: Grpc_Testing_StreamingOutputCallResponse) -> Bool {
  678. if lhs._payload != rhs._payload {return false}
  679. if lhs.unknownFields != rhs.unknownFields {return false}
  680. return true
  681. }
  682. }
  683. extension Grpc_Testing_ReconnectParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  684. public static let protoMessageName: String = _protobuf_package + ".ReconnectParams"
  685. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  686. 1: .standard(proto: "max_reconnect_backoff_ms"),
  687. ]
  688. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  689. while let fieldNumber = try decoder.nextFieldNumber() {
  690. switch fieldNumber {
  691. case 1: try decoder.decodeSingularInt32Field(value: &self.maxReconnectBackoffMs)
  692. default: break
  693. }
  694. }
  695. }
  696. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  697. if self.maxReconnectBackoffMs != 0 {
  698. try visitor.visitSingularInt32Field(value: self.maxReconnectBackoffMs, fieldNumber: 1)
  699. }
  700. try unknownFields.traverse(visitor: &visitor)
  701. }
  702. public static func ==(lhs: Grpc_Testing_ReconnectParams, rhs: Grpc_Testing_ReconnectParams) -> Bool {
  703. if lhs.maxReconnectBackoffMs != rhs.maxReconnectBackoffMs {return false}
  704. if lhs.unknownFields != rhs.unknownFields {return false}
  705. return true
  706. }
  707. }
  708. extension Grpc_Testing_ReconnectInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  709. public static let protoMessageName: String = _protobuf_package + ".ReconnectInfo"
  710. public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  711. 1: .same(proto: "passed"),
  712. 2: .standard(proto: "backoff_ms"),
  713. ]
  714. public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  715. while let fieldNumber = try decoder.nextFieldNumber() {
  716. switch fieldNumber {
  717. case 1: try decoder.decodeSingularBoolField(value: &self.passed)
  718. case 2: try decoder.decodeRepeatedInt32Field(value: &self.backoffMs)
  719. default: break
  720. }
  721. }
  722. }
  723. public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  724. if self.passed != false {
  725. try visitor.visitSingularBoolField(value: self.passed, fieldNumber: 1)
  726. }
  727. if !self.backoffMs.isEmpty {
  728. try visitor.visitPackedInt32Field(value: self.backoffMs, fieldNumber: 2)
  729. }
  730. try unknownFields.traverse(visitor: &visitor)
  731. }
  732. public static func ==(lhs: Grpc_Testing_ReconnectInfo, rhs: Grpc_Testing_ReconnectInfo) -> Bool {
  733. if lhs.passed != rhs.passed {return false}
  734. if lhs.backoffMs != rhs.backoffMs {return false}
  735. if lhs.unknownFields != rhs.unknownFields {return false}
  736. return true
  737. }
  738. }