messages.pb.swift 34 KB

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