grpc_testing_messages.pb.swift 89 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. //
  4. // Generated by the Swift generator plugin for the protocol buffer compiler.
  5. // Source: 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. enum Grpc_Testing_PayloadType: SwiftProtobuf.Enum {
  36. typealias RawValue = Int
  37. /// Compressable text format.
  38. case compressable // = 0
  39. case UNRECOGNIZED(Int)
  40. init() {
  41. self = .compressable
  42. }
  43. init?(rawValue: Int) {
  44. switch rawValue {
  45. case 0: self = .compressable
  46. default: self = .UNRECOGNIZED(rawValue)
  47. }
  48. }
  49. 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. static let allCases: [Grpc_Testing_PayloadType] = [
  60. .compressable,
  61. ]
  62. }
  63. #endif // swift(>=4.2)
  64. /// The type of route that a client took to reach a server w.r.t. gRPCLB.
  65. /// The server must fill in "fallback" if it detects that the RPC reached
  66. /// the server via the "gRPCLB fallback" path, and "backend" if it detects
  67. /// that the RPC reached the server via "gRPCLB backend" path (i.e. if it got
  68. /// the address of this server from the gRPCLB server BalanceLoad RPC). Exactly
  69. /// how this detection is done is context and server dependent.
  70. enum Grpc_Testing_GrpclbRouteType: SwiftProtobuf.Enum {
  71. typealias RawValue = Int
  72. /// Server didn't detect the route that a client took to reach it.
  73. case unknown // = 0
  74. /// Indicates that a client reached a server via gRPCLB fallback.
  75. case fallback // = 1
  76. /// Indicates that a client reached a server as a gRPCLB-given backend.
  77. case backend // = 2
  78. case UNRECOGNIZED(Int)
  79. init() {
  80. self = .unknown
  81. }
  82. init?(rawValue: Int) {
  83. switch rawValue {
  84. case 0: self = .unknown
  85. case 1: self = .fallback
  86. case 2: self = .backend
  87. default: self = .UNRECOGNIZED(rawValue)
  88. }
  89. }
  90. var rawValue: Int {
  91. switch self {
  92. case .unknown: return 0
  93. case .fallback: return 1
  94. case .backend: return 2
  95. case .UNRECOGNIZED(let i): return i
  96. }
  97. }
  98. }
  99. #if swift(>=4.2)
  100. extension Grpc_Testing_GrpclbRouteType: CaseIterable {
  101. // The compiler won't synthesize support with the UNRECOGNIZED case.
  102. static let allCases: [Grpc_Testing_GrpclbRouteType] = [
  103. .unknown,
  104. .fallback,
  105. .backend,
  106. ]
  107. }
  108. #endif // swift(>=4.2)
  109. /// TODO(dgq): Go back to using well-known types once
  110. /// https://github.com/grpc/grpc/issues/6980 has been fixed.
  111. /// import "google/protobuf/wrappers.proto";
  112. struct Grpc_Testing_BoolValue {
  113. // SwiftProtobuf.Message conformance is added in an extension below. See the
  114. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  115. // methods supported on all messages.
  116. /// The bool value.
  117. var value: Bool = false
  118. var unknownFields = SwiftProtobuf.UnknownStorage()
  119. init() {}
  120. }
  121. /// A block of data, to simply increase gRPC message size.
  122. struct Grpc_Testing_Payload {
  123. // SwiftProtobuf.Message conformance is added in an extension below. See the
  124. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  125. // methods supported on all messages.
  126. /// The type of data in body.
  127. var type: Grpc_Testing_PayloadType = .compressable
  128. /// Primary contents of payload.
  129. var body: Data = Data()
  130. var unknownFields = SwiftProtobuf.UnknownStorage()
  131. init() {}
  132. }
  133. /// A protobuf representation for grpc status. This is used by test
  134. /// clients to specify a status that the server should attempt to return.
  135. struct Grpc_Testing_EchoStatus {
  136. // SwiftProtobuf.Message conformance is added in an extension below. See the
  137. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  138. // methods supported on all messages.
  139. var code: Int32 = 0
  140. var message: String = String()
  141. var unknownFields = SwiftProtobuf.UnknownStorage()
  142. init() {}
  143. }
  144. /// Unary request.
  145. struct Grpc_Testing_SimpleRequest {
  146. // SwiftProtobuf.Message conformance is added in an extension below. See the
  147. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  148. // methods supported on all messages.
  149. /// Desired payload type in the response from the server.
  150. /// If response_type is RANDOM, server randomly chooses one from other formats.
  151. var responseType: Grpc_Testing_PayloadType = .compressable
  152. /// Desired payload size in the response from the server.
  153. var responseSize: Int32 = 0
  154. /// Optional input payload sent along with the request.
  155. var payload: Grpc_Testing_Payload {
  156. get {return _payload ?? Grpc_Testing_Payload()}
  157. set {_payload = newValue}
  158. }
  159. /// Returns true if `payload` has been explicitly set.
  160. var hasPayload: Bool {return self._payload != nil}
  161. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  162. mutating func clearPayload() {self._payload = nil}
  163. /// Whether SimpleResponse should include username.
  164. var fillUsername: Bool = false
  165. /// Whether SimpleResponse should include OAuth scope.
  166. var fillOauthScope: Bool = false
  167. /// Whether to request the server to compress the response. This field is
  168. /// "nullable" in order to interoperate seamlessly with clients not able to
  169. /// implement the full compression tests by introspecting the call to verify
  170. /// the response's compression status.
  171. var responseCompressed: Grpc_Testing_BoolValue {
  172. get {return _responseCompressed ?? Grpc_Testing_BoolValue()}
  173. set {_responseCompressed = newValue}
  174. }
  175. /// Returns true if `responseCompressed` has been explicitly set.
  176. var hasResponseCompressed: Bool {return self._responseCompressed != nil}
  177. /// Clears the value of `responseCompressed`. Subsequent reads from it will return its default value.
  178. mutating func clearResponseCompressed() {self._responseCompressed = nil}
  179. /// Whether server should return a given status
  180. var responseStatus: Grpc_Testing_EchoStatus {
  181. get {return _responseStatus ?? Grpc_Testing_EchoStatus()}
  182. set {_responseStatus = newValue}
  183. }
  184. /// Returns true if `responseStatus` has been explicitly set.
  185. var hasResponseStatus: Bool {return self._responseStatus != nil}
  186. /// Clears the value of `responseStatus`. Subsequent reads from it will return its default value.
  187. mutating func clearResponseStatus() {self._responseStatus = nil}
  188. /// Whether the server should expect this request to be compressed.
  189. var expectCompressed: Grpc_Testing_BoolValue {
  190. get {return _expectCompressed ?? Grpc_Testing_BoolValue()}
  191. set {_expectCompressed = newValue}
  192. }
  193. /// Returns true if `expectCompressed` has been explicitly set.
  194. var hasExpectCompressed: Bool {return self._expectCompressed != nil}
  195. /// Clears the value of `expectCompressed`. Subsequent reads from it will return its default value.
  196. mutating func clearExpectCompressed() {self._expectCompressed = nil}
  197. /// Whether SimpleResponse should include server_id.
  198. var fillServerID: Bool = false
  199. /// Whether SimpleResponse should include grpclb_route_type.
  200. var fillGrpclbRouteType: Bool = false
  201. /// If set the server should record this metrics report data for the current RPC.
  202. var orcaPerQueryReport: Grpc_Testing_TestOrcaReport {
  203. get {return _orcaPerQueryReport ?? Grpc_Testing_TestOrcaReport()}
  204. set {_orcaPerQueryReport = newValue}
  205. }
  206. /// Returns true if `orcaPerQueryReport` has been explicitly set.
  207. var hasOrcaPerQueryReport: Bool {return self._orcaPerQueryReport != nil}
  208. /// Clears the value of `orcaPerQueryReport`. Subsequent reads from it will return its default value.
  209. mutating func clearOrcaPerQueryReport() {self._orcaPerQueryReport = nil}
  210. var unknownFields = SwiftProtobuf.UnknownStorage()
  211. init() {}
  212. fileprivate var _payload: Grpc_Testing_Payload? = nil
  213. fileprivate var _responseCompressed: Grpc_Testing_BoolValue? = nil
  214. fileprivate var _responseStatus: Grpc_Testing_EchoStatus? = nil
  215. fileprivate var _expectCompressed: Grpc_Testing_BoolValue? = nil
  216. fileprivate var _orcaPerQueryReport: Grpc_Testing_TestOrcaReport? = nil
  217. }
  218. /// Unary response, as configured by the request.
  219. struct Grpc_Testing_SimpleResponse {
  220. // SwiftProtobuf.Message conformance is added in an extension below. See the
  221. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  222. // methods supported on all messages.
  223. /// Payload to increase message size.
  224. var payload: Grpc_Testing_Payload {
  225. get {return _payload ?? Grpc_Testing_Payload()}
  226. set {_payload = newValue}
  227. }
  228. /// Returns true if `payload` has been explicitly set.
  229. var hasPayload: Bool {return self._payload != nil}
  230. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  231. mutating func clearPayload() {self._payload = nil}
  232. /// The user the request came from, for verifying authentication was
  233. /// successful when the client expected it.
  234. var username: String = String()
  235. /// OAuth scope.
  236. var oauthScope: String = String()
  237. /// Server ID. This must be unique among different server instances,
  238. /// but the same across all RPC's made to a particular server instance.
  239. var serverID: String = String()
  240. /// gRPCLB Path.
  241. var grpclbRouteType: Grpc_Testing_GrpclbRouteType = .unknown
  242. /// Server hostname.
  243. var hostname: String = String()
  244. var unknownFields = SwiftProtobuf.UnknownStorage()
  245. init() {}
  246. fileprivate var _payload: Grpc_Testing_Payload? = nil
  247. }
  248. /// Client-streaming request.
  249. struct Grpc_Testing_StreamingInputCallRequest {
  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. /// Optional input payload sent along with the request.
  254. var payload: Grpc_Testing_Payload {
  255. get {return _payload ?? Grpc_Testing_Payload()}
  256. set {_payload = newValue}
  257. }
  258. /// Returns true if `payload` has been explicitly set.
  259. var hasPayload: Bool {return self._payload != nil}
  260. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  261. mutating func clearPayload() {self._payload = nil}
  262. /// Whether the server should expect this request to be compressed. This field
  263. /// is "nullable" in order to interoperate seamlessly with servers not able to
  264. /// implement the full compression tests by introspecting the call to verify
  265. /// the request's compression status.
  266. var expectCompressed: Grpc_Testing_BoolValue {
  267. get {return _expectCompressed ?? Grpc_Testing_BoolValue()}
  268. set {_expectCompressed = newValue}
  269. }
  270. /// Returns true if `expectCompressed` has been explicitly set.
  271. var hasExpectCompressed: Bool {return self._expectCompressed != nil}
  272. /// Clears the value of `expectCompressed`. Subsequent reads from it will return its default value.
  273. mutating func clearExpectCompressed() {self._expectCompressed = nil}
  274. var unknownFields = SwiftProtobuf.UnknownStorage()
  275. init() {}
  276. fileprivate var _payload: Grpc_Testing_Payload? = nil
  277. fileprivate var _expectCompressed: Grpc_Testing_BoolValue? = nil
  278. }
  279. /// Client-streaming response.
  280. struct Grpc_Testing_StreamingInputCallResponse {
  281. // SwiftProtobuf.Message conformance is added in an extension below. See the
  282. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  283. // methods supported on all messages.
  284. /// Aggregated size of payloads received from the client.
  285. var aggregatedPayloadSize: Int32 = 0
  286. var unknownFields = SwiftProtobuf.UnknownStorage()
  287. init() {}
  288. }
  289. /// Configuration for a particular response.
  290. struct Grpc_Testing_ResponseParameters {
  291. // SwiftProtobuf.Message conformance is added in an extension below. See the
  292. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  293. // methods supported on all messages.
  294. /// Desired payload sizes in responses from the server.
  295. var size: Int32 = 0
  296. /// Desired interval between consecutive responses in the response stream in
  297. /// microseconds.
  298. var intervalUs: Int32 = 0
  299. /// Whether to request the server to compress the response. This field is
  300. /// "nullable" in order to interoperate seamlessly with clients not able to
  301. /// implement the full compression tests by introspecting the call to verify
  302. /// the response's compression status.
  303. var compressed: Grpc_Testing_BoolValue {
  304. get {return _compressed ?? Grpc_Testing_BoolValue()}
  305. set {_compressed = newValue}
  306. }
  307. /// Returns true if `compressed` has been explicitly set.
  308. var hasCompressed: Bool {return self._compressed != nil}
  309. /// Clears the value of `compressed`. Subsequent reads from it will return its default value.
  310. mutating func clearCompressed() {self._compressed = nil}
  311. var unknownFields = SwiftProtobuf.UnknownStorage()
  312. init() {}
  313. fileprivate var _compressed: Grpc_Testing_BoolValue? = nil
  314. }
  315. /// Server-streaming request.
  316. struct Grpc_Testing_StreamingOutputCallRequest {
  317. // SwiftProtobuf.Message conformance is added in an extension below. See the
  318. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  319. // methods supported on all messages.
  320. /// Desired payload type in the response from the server.
  321. /// If response_type is RANDOM, the payload from each response in the stream
  322. /// might be of different types. This is to simulate a mixed type of payload
  323. /// stream.
  324. var responseType: Grpc_Testing_PayloadType = .compressable
  325. /// Configuration for each expected response message.
  326. var responseParameters: [Grpc_Testing_ResponseParameters] = []
  327. /// Optional input payload sent along with the request.
  328. var payload: Grpc_Testing_Payload {
  329. get {return _payload ?? Grpc_Testing_Payload()}
  330. set {_payload = newValue}
  331. }
  332. /// Returns true if `payload` has been explicitly set.
  333. var hasPayload: Bool {return self._payload != nil}
  334. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  335. mutating func clearPayload() {self._payload = nil}
  336. /// Whether server should return a given status
  337. var responseStatus: Grpc_Testing_EchoStatus {
  338. get {return _responseStatus ?? Grpc_Testing_EchoStatus()}
  339. set {_responseStatus = newValue}
  340. }
  341. /// Returns true if `responseStatus` has been explicitly set.
  342. var hasResponseStatus: Bool {return self._responseStatus != nil}
  343. /// Clears the value of `responseStatus`. Subsequent reads from it will return its default value.
  344. mutating func clearResponseStatus() {self._responseStatus = nil}
  345. /// If set the server should update this metrics report data at the OOB server.
  346. var orcaOobReport: Grpc_Testing_TestOrcaReport {
  347. get {return _orcaOobReport ?? Grpc_Testing_TestOrcaReport()}
  348. set {_orcaOobReport = newValue}
  349. }
  350. /// Returns true if `orcaOobReport` has been explicitly set.
  351. var hasOrcaOobReport: Bool {return self._orcaOobReport != nil}
  352. /// Clears the value of `orcaOobReport`. Subsequent reads from it will return its default value.
  353. mutating func clearOrcaOobReport() {self._orcaOobReport = nil}
  354. var unknownFields = SwiftProtobuf.UnknownStorage()
  355. init() {}
  356. fileprivate var _payload: Grpc_Testing_Payload? = nil
  357. fileprivate var _responseStatus: Grpc_Testing_EchoStatus? = nil
  358. fileprivate var _orcaOobReport: Grpc_Testing_TestOrcaReport? = nil
  359. }
  360. /// Server-streaming response, as configured by the request and parameters.
  361. struct Grpc_Testing_StreamingOutputCallResponse {
  362. // SwiftProtobuf.Message conformance is added in an extension below. See the
  363. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  364. // methods supported on all messages.
  365. /// Payload to increase response size.
  366. var payload: Grpc_Testing_Payload {
  367. get {return _payload ?? Grpc_Testing_Payload()}
  368. set {_payload = newValue}
  369. }
  370. /// Returns true if `payload` has been explicitly set.
  371. var hasPayload: Bool {return self._payload != nil}
  372. /// Clears the value of `payload`. Subsequent reads from it will return its default value.
  373. mutating func clearPayload() {self._payload = nil}
  374. var unknownFields = SwiftProtobuf.UnknownStorage()
  375. init() {}
  376. fileprivate var _payload: Grpc_Testing_Payload? = nil
  377. }
  378. /// For reconnect interop test only.
  379. /// Client tells server what reconnection parameters it used.
  380. struct Grpc_Testing_ReconnectParams {
  381. // SwiftProtobuf.Message conformance is added in an extension below. See the
  382. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  383. // methods supported on all messages.
  384. var maxReconnectBackoffMs: Int32 = 0
  385. var unknownFields = SwiftProtobuf.UnknownStorage()
  386. init() {}
  387. }
  388. /// For reconnect interop test only.
  389. /// Server tells client whether its reconnects are following the spec and the
  390. /// reconnect backoffs it saw.
  391. struct Grpc_Testing_ReconnectInfo {
  392. // SwiftProtobuf.Message conformance is added in an extension below. See the
  393. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  394. // methods supported on all messages.
  395. var passed: Bool = false
  396. var backoffMs: [Int32] = []
  397. var unknownFields = SwiftProtobuf.UnknownStorage()
  398. init() {}
  399. }
  400. struct Grpc_Testing_LoadBalancerStatsRequest {
  401. // SwiftProtobuf.Message conformance is added in an extension below. See the
  402. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  403. // methods supported on all messages.
  404. /// Request stats for the next num_rpcs sent by client.
  405. var numRpcs: Int32 = 0
  406. /// If num_rpcs have not completed within timeout_sec, return partial results.
  407. var timeoutSec: Int32 = 0
  408. /// Response header + trailer metadata entries we want the values of.
  409. /// Matching of the keys is case-insensitive as per rfc7540#section-8.1.2
  410. /// * (asterisk) is a special value that will return all metadata entries
  411. var metadataKeys: [String] = []
  412. var unknownFields = SwiftProtobuf.UnknownStorage()
  413. init() {}
  414. }
  415. struct Grpc_Testing_LoadBalancerStatsResponse {
  416. // SwiftProtobuf.Message conformance is added in an extension below. See the
  417. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  418. // methods supported on all messages.
  419. /// The number of completed RPCs for each peer.
  420. var rpcsByPeer: Dictionary<String,Int32> = [:]
  421. /// The number of RPCs that failed to record a remote peer.
  422. var numFailures: Int32 = 0
  423. var rpcsByMethod: Dictionary<String,Grpc_Testing_LoadBalancerStatsResponse.RpcsByPeer> = [:]
  424. /// All the metadata of all RPCs for each peer.
  425. var metadatasByPeer: Dictionary<String,Grpc_Testing_LoadBalancerStatsResponse.MetadataByPeer> = [:]
  426. var unknownFields = SwiftProtobuf.UnknownStorage()
  427. enum MetadataType: SwiftProtobuf.Enum {
  428. typealias RawValue = Int
  429. case unknown // = 0
  430. case initial // = 1
  431. case trailing // = 2
  432. case UNRECOGNIZED(Int)
  433. init() {
  434. self = .unknown
  435. }
  436. init?(rawValue: Int) {
  437. switch rawValue {
  438. case 0: self = .unknown
  439. case 1: self = .initial
  440. case 2: self = .trailing
  441. default: self = .UNRECOGNIZED(rawValue)
  442. }
  443. }
  444. var rawValue: Int {
  445. switch self {
  446. case .unknown: return 0
  447. case .initial: return 1
  448. case .trailing: return 2
  449. case .UNRECOGNIZED(let i): return i
  450. }
  451. }
  452. }
  453. struct MetadataEntry {
  454. // SwiftProtobuf.Message conformance is added in an extension below. See the
  455. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  456. // methods supported on all messages.
  457. /// Key, exactly as received from the server. Case may be different from what
  458. /// was requested in the LoadBalancerStatsRequest)
  459. var key: String = String()
  460. /// Value, exactly as received from the server.
  461. var value: String = String()
  462. /// Metadata type
  463. var type: Grpc_Testing_LoadBalancerStatsResponse.MetadataType = .unknown
  464. var unknownFields = SwiftProtobuf.UnknownStorage()
  465. init() {}
  466. }
  467. struct RpcMetadata {
  468. // SwiftProtobuf.Message conformance is added in an extension below. See the
  469. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  470. // methods supported on all messages.
  471. /// metadata values for each rpc for the keys specified in
  472. /// LoadBalancerStatsRequest.metadata_keys.
  473. var metadata: [Grpc_Testing_LoadBalancerStatsResponse.MetadataEntry] = []
  474. var unknownFields = SwiftProtobuf.UnknownStorage()
  475. init() {}
  476. }
  477. struct MetadataByPeer {
  478. // SwiftProtobuf.Message conformance is added in an extension below. See the
  479. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  480. // methods supported on all messages.
  481. /// List of RpcMetadata in for each RPC with a given peer
  482. var rpcMetadata: [Grpc_Testing_LoadBalancerStatsResponse.RpcMetadata] = []
  483. var unknownFields = SwiftProtobuf.UnknownStorage()
  484. init() {}
  485. }
  486. struct RpcsByPeer {
  487. // SwiftProtobuf.Message conformance is added in an extension below. See the
  488. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  489. // methods supported on all messages.
  490. /// The number of completed RPCs for each peer.
  491. var rpcsByPeer: Dictionary<String,Int32> = [:]
  492. var unknownFields = SwiftProtobuf.UnknownStorage()
  493. init() {}
  494. }
  495. init() {}
  496. }
  497. #if swift(>=4.2)
  498. extension Grpc_Testing_LoadBalancerStatsResponse.MetadataType: CaseIterable {
  499. // The compiler won't synthesize support with the UNRECOGNIZED case.
  500. static let allCases: [Grpc_Testing_LoadBalancerStatsResponse.MetadataType] = [
  501. .unknown,
  502. .initial,
  503. .trailing,
  504. ]
  505. }
  506. #endif // swift(>=4.2)
  507. /// Request for retrieving a test client's accumulated stats.
  508. struct Grpc_Testing_LoadBalancerAccumulatedStatsRequest {
  509. // SwiftProtobuf.Message conformance is added in an extension below. See the
  510. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  511. // methods supported on all messages.
  512. var unknownFields = SwiftProtobuf.UnknownStorage()
  513. init() {}
  514. }
  515. /// Accumulated stats for RPCs sent by a test client.
  516. struct Grpc_Testing_LoadBalancerAccumulatedStatsResponse {
  517. // SwiftProtobuf.Message conformance is added in an extension below. See the
  518. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  519. // methods supported on all messages.
  520. /// The total number of RPCs have ever issued for each type.
  521. /// Deprecated: use stats_per_method.rpcs_started instead.
  522. var numRpcsStartedByMethod: Dictionary<String,Int32> = [:]
  523. /// The total number of RPCs have ever completed successfully for each type.
  524. /// Deprecated: use stats_per_method.result instead.
  525. var numRpcsSucceededByMethod: Dictionary<String,Int32> = [:]
  526. /// The total number of RPCs have ever failed for each type.
  527. /// Deprecated: use stats_per_method.result instead.
  528. var numRpcsFailedByMethod: Dictionary<String,Int32> = [:]
  529. /// Per-method RPC statistics. The key is the RpcType in string form; e.g.
  530. /// 'EMPTY_CALL' or 'UNARY_CALL'
  531. var statsPerMethod: Dictionary<String,Grpc_Testing_LoadBalancerAccumulatedStatsResponse.MethodStats> = [:]
  532. var unknownFields = SwiftProtobuf.UnknownStorage()
  533. struct MethodStats {
  534. // SwiftProtobuf.Message conformance is added in an extension below. See the
  535. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  536. // methods supported on all messages.
  537. /// The number of RPCs that were started for this method.
  538. var rpcsStarted: Int32 = 0
  539. /// The number of RPCs that completed with each status for this method. The
  540. /// key is the integral value of a google.rpc.Code; the value is the count.
  541. var result: Dictionary<Int32,Int32> = [:]
  542. var unknownFields = SwiftProtobuf.UnknownStorage()
  543. init() {}
  544. }
  545. init() {}
  546. }
  547. /// Configurations for a test client.
  548. struct Grpc_Testing_ClientConfigureRequest {
  549. // SwiftProtobuf.Message conformance is added in an extension below. See the
  550. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  551. // methods supported on all messages.
  552. /// The types of RPCs the client sends.
  553. var types: [Grpc_Testing_ClientConfigureRequest.RpcType] = []
  554. /// The collection of custom metadata to be attached to RPCs sent by the client.
  555. var metadata: [Grpc_Testing_ClientConfigureRequest.Metadata] = []
  556. /// The deadline to use, in seconds, for all RPCs. If unset or zero, the
  557. /// client will use the default from the command-line.
  558. var timeoutSec: Int32 = 0
  559. var unknownFields = SwiftProtobuf.UnknownStorage()
  560. /// Type of RPCs to send.
  561. enum RpcType: SwiftProtobuf.Enum {
  562. typealias RawValue = Int
  563. case emptyCall // = 0
  564. case unaryCall // = 1
  565. case UNRECOGNIZED(Int)
  566. init() {
  567. self = .emptyCall
  568. }
  569. init?(rawValue: Int) {
  570. switch rawValue {
  571. case 0: self = .emptyCall
  572. case 1: self = .unaryCall
  573. default: self = .UNRECOGNIZED(rawValue)
  574. }
  575. }
  576. var rawValue: Int {
  577. switch self {
  578. case .emptyCall: return 0
  579. case .unaryCall: return 1
  580. case .UNRECOGNIZED(let i): return i
  581. }
  582. }
  583. }
  584. /// Metadata to be attached for the given type of RPCs.
  585. struct Metadata {
  586. // SwiftProtobuf.Message conformance is added in an extension below. See the
  587. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  588. // methods supported on all messages.
  589. var type: Grpc_Testing_ClientConfigureRequest.RpcType = .emptyCall
  590. var key: String = String()
  591. var value: String = String()
  592. var unknownFields = SwiftProtobuf.UnknownStorage()
  593. init() {}
  594. }
  595. init() {}
  596. }
  597. #if swift(>=4.2)
  598. extension Grpc_Testing_ClientConfigureRequest.RpcType: CaseIterable {
  599. // The compiler won't synthesize support with the UNRECOGNIZED case.
  600. static let allCases: [Grpc_Testing_ClientConfigureRequest.RpcType] = [
  601. .emptyCall,
  602. .unaryCall,
  603. ]
  604. }
  605. #endif // swift(>=4.2)
  606. /// Response for updating a test client's configuration.
  607. struct Grpc_Testing_ClientConfigureResponse {
  608. // SwiftProtobuf.Message conformance is added in an extension below. See the
  609. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  610. // methods supported on all messages.
  611. var unknownFields = SwiftProtobuf.UnknownStorage()
  612. init() {}
  613. }
  614. struct Grpc_Testing_MemorySize {
  615. // SwiftProtobuf.Message conformance is added in an extension below. See the
  616. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  617. // methods supported on all messages.
  618. var rss: Int64 = 0
  619. var unknownFields = SwiftProtobuf.UnknownStorage()
  620. init() {}
  621. }
  622. /// Metrics data the server will update and send to the client. It mirrors orca load report
  623. /// https://github.com/cncf/xds/blob/eded343319d09f30032952beda9840bbd3dcf7ac/xds/data/orca/v3/orca_load_report.proto#L15,
  624. /// but avoids orca dependency. Used by both per-query and out-of-band reporting tests.
  625. struct Grpc_Testing_TestOrcaReport {
  626. // SwiftProtobuf.Message conformance is added in an extension below. See the
  627. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  628. // methods supported on all messages.
  629. var cpuUtilization: Double = 0
  630. var memoryUtilization: Double = 0
  631. var requestCost: Dictionary<String,Double> = [:]
  632. var utilization: Dictionary<String,Double> = [:]
  633. var unknownFields = SwiftProtobuf.UnknownStorage()
  634. init() {}
  635. }
  636. /// Status that will be return to callers of the Hook method
  637. struct Grpc_Testing_SetReturnStatusRequest {
  638. // SwiftProtobuf.Message conformance is added in an extension below. See the
  639. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  640. // methods supported on all messages.
  641. var grpcCodeToReturn: Int32 = 0
  642. var grpcStatusDescription: String = String()
  643. var unknownFields = SwiftProtobuf.UnknownStorage()
  644. init() {}
  645. }
  646. struct Grpc_Testing_HookRequest {
  647. // SwiftProtobuf.Message conformance is added in an extension below. See the
  648. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  649. // methods supported on all messages.
  650. var command: Grpc_Testing_HookRequest.HookRequestCommand = .unspecified
  651. var grpcCodeToReturn: Int32 = 0
  652. var grpcStatusDescription: String = String()
  653. /// Server port to listen to
  654. var serverPort: Int32 = 0
  655. var unknownFields = SwiftProtobuf.UnknownStorage()
  656. enum HookRequestCommand: SwiftProtobuf.Enum {
  657. typealias RawValue = Int
  658. /// Default value
  659. case unspecified // = 0
  660. /// Start the HTTP endpoint
  661. case start // = 1
  662. /// Stop
  663. case stop // = 2
  664. /// Return from HTTP GET/POST
  665. case `return` // = 3
  666. case UNRECOGNIZED(Int)
  667. init() {
  668. self = .unspecified
  669. }
  670. init?(rawValue: Int) {
  671. switch rawValue {
  672. case 0: self = .unspecified
  673. case 1: self = .start
  674. case 2: self = .stop
  675. case 3: self = .return
  676. default: self = .UNRECOGNIZED(rawValue)
  677. }
  678. }
  679. var rawValue: Int {
  680. switch self {
  681. case .unspecified: return 0
  682. case .start: return 1
  683. case .stop: return 2
  684. case .return: return 3
  685. case .UNRECOGNIZED(let i): return i
  686. }
  687. }
  688. }
  689. init() {}
  690. }
  691. #if swift(>=4.2)
  692. extension Grpc_Testing_HookRequest.HookRequestCommand: CaseIterable {
  693. // The compiler won't synthesize support with the UNRECOGNIZED case.
  694. static let allCases: [Grpc_Testing_HookRequest.HookRequestCommand] = [
  695. .unspecified,
  696. .start,
  697. .stop,
  698. .return,
  699. ]
  700. }
  701. #endif // swift(>=4.2)
  702. struct Grpc_Testing_HookResponse {
  703. // SwiftProtobuf.Message conformance is added in an extension below. See the
  704. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  705. // methods supported on all messages.
  706. var unknownFields = SwiftProtobuf.UnknownStorage()
  707. init() {}
  708. }
  709. #if swift(>=5.5) && canImport(_Concurrency)
  710. extension Grpc_Testing_PayloadType: @unchecked Sendable {}
  711. extension Grpc_Testing_GrpclbRouteType: @unchecked Sendable {}
  712. extension Grpc_Testing_BoolValue: @unchecked Sendable {}
  713. extension Grpc_Testing_Payload: @unchecked Sendable {}
  714. extension Grpc_Testing_EchoStatus: @unchecked Sendable {}
  715. extension Grpc_Testing_SimpleRequest: @unchecked Sendable {}
  716. extension Grpc_Testing_SimpleResponse: @unchecked Sendable {}
  717. extension Grpc_Testing_StreamingInputCallRequest: @unchecked Sendable {}
  718. extension Grpc_Testing_StreamingInputCallResponse: @unchecked Sendable {}
  719. extension Grpc_Testing_ResponseParameters: @unchecked Sendable {}
  720. extension Grpc_Testing_StreamingOutputCallRequest: @unchecked Sendable {}
  721. extension Grpc_Testing_StreamingOutputCallResponse: @unchecked Sendable {}
  722. extension Grpc_Testing_ReconnectParams: @unchecked Sendable {}
  723. extension Grpc_Testing_ReconnectInfo: @unchecked Sendable {}
  724. extension Grpc_Testing_LoadBalancerStatsRequest: @unchecked Sendable {}
  725. extension Grpc_Testing_LoadBalancerStatsResponse: @unchecked Sendable {}
  726. extension Grpc_Testing_LoadBalancerStatsResponse.MetadataType: @unchecked Sendable {}
  727. extension Grpc_Testing_LoadBalancerStatsResponse.MetadataEntry: @unchecked Sendable {}
  728. extension Grpc_Testing_LoadBalancerStatsResponse.RpcMetadata: @unchecked Sendable {}
  729. extension Grpc_Testing_LoadBalancerStatsResponse.MetadataByPeer: @unchecked Sendable {}
  730. extension Grpc_Testing_LoadBalancerStatsResponse.RpcsByPeer: @unchecked Sendable {}
  731. extension Grpc_Testing_LoadBalancerAccumulatedStatsRequest: @unchecked Sendable {}
  732. extension Grpc_Testing_LoadBalancerAccumulatedStatsResponse: @unchecked Sendable {}
  733. extension Grpc_Testing_LoadBalancerAccumulatedStatsResponse.MethodStats: @unchecked Sendable {}
  734. extension Grpc_Testing_ClientConfigureRequest: @unchecked Sendable {}
  735. extension Grpc_Testing_ClientConfigureRequest.RpcType: @unchecked Sendable {}
  736. extension Grpc_Testing_ClientConfigureRequest.Metadata: @unchecked Sendable {}
  737. extension Grpc_Testing_ClientConfigureResponse: @unchecked Sendable {}
  738. extension Grpc_Testing_MemorySize: @unchecked Sendable {}
  739. extension Grpc_Testing_TestOrcaReport: @unchecked Sendable {}
  740. extension Grpc_Testing_SetReturnStatusRequest: @unchecked Sendable {}
  741. extension Grpc_Testing_HookRequest: @unchecked Sendable {}
  742. extension Grpc_Testing_HookRequest.HookRequestCommand: @unchecked Sendable {}
  743. extension Grpc_Testing_HookResponse: @unchecked Sendable {}
  744. #endif // swift(>=5.5) && canImport(_Concurrency)
  745. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  746. fileprivate let _protobuf_package = "grpc.testing"
  747. extension Grpc_Testing_PayloadType: SwiftProtobuf._ProtoNameProviding {
  748. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  749. 0: .same(proto: "COMPRESSABLE"),
  750. ]
  751. }
  752. extension Grpc_Testing_GrpclbRouteType: SwiftProtobuf._ProtoNameProviding {
  753. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  754. 0: .same(proto: "GRPCLB_ROUTE_TYPE_UNKNOWN"),
  755. 1: .same(proto: "GRPCLB_ROUTE_TYPE_FALLBACK"),
  756. 2: .same(proto: "GRPCLB_ROUTE_TYPE_BACKEND"),
  757. ]
  758. }
  759. extension Grpc_Testing_BoolValue: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  760. static let protoMessageName: String = _protobuf_package + ".BoolValue"
  761. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  762. 1: .same(proto: "value"),
  763. ]
  764. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  765. while let fieldNumber = try decoder.nextFieldNumber() {
  766. // The use of inline closures is to circumvent an issue where the compiler
  767. // allocates stack space for every case branch when no optimizations are
  768. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  769. switch fieldNumber {
  770. case 1: try { try decoder.decodeSingularBoolField(value: &self.value) }()
  771. default: break
  772. }
  773. }
  774. }
  775. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  776. if self.value != false {
  777. try visitor.visitSingularBoolField(value: self.value, fieldNumber: 1)
  778. }
  779. try unknownFields.traverse(visitor: &visitor)
  780. }
  781. static func ==(lhs: Grpc_Testing_BoolValue, rhs: Grpc_Testing_BoolValue) -> Bool {
  782. if lhs.value != rhs.value {return false}
  783. if lhs.unknownFields != rhs.unknownFields {return false}
  784. return true
  785. }
  786. }
  787. extension Grpc_Testing_Payload: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  788. static let protoMessageName: String = _protobuf_package + ".Payload"
  789. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  790. 1: .same(proto: "type"),
  791. 2: .same(proto: "body"),
  792. ]
  793. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  794. while let fieldNumber = try decoder.nextFieldNumber() {
  795. // The use of inline closures is to circumvent an issue where the compiler
  796. // allocates stack space for every case branch when no optimizations are
  797. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  798. switch fieldNumber {
  799. case 1: try { try decoder.decodeSingularEnumField(value: &self.type) }()
  800. case 2: try { try decoder.decodeSingularBytesField(value: &self.body) }()
  801. default: break
  802. }
  803. }
  804. }
  805. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  806. if self.type != .compressable {
  807. try visitor.visitSingularEnumField(value: self.type, fieldNumber: 1)
  808. }
  809. if !self.body.isEmpty {
  810. try visitor.visitSingularBytesField(value: self.body, fieldNumber: 2)
  811. }
  812. try unknownFields.traverse(visitor: &visitor)
  813. }
  814. static func ==(lhs: Grpc_Testing_Payload, rhs: Grpc_Testing_Payload) -> Bool {
  815. if lhs.type != rhs.type {return false}
  816. if lhs.body != rhs.body {return false}
  817. if lhs.unknownFields != rhs.unknownFields {return false}
  818. return true
  819. }
  820. }
  821. extension Grpc_Testing_EchoStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  822. static let protoMessageName: String = _protobuf_package + ".EchoStatus"
  823. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  824. 1: .same(proto: "code"),
  825. 2: .same(proto: "message"),
  826. ]
  827. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  828. while let fieldNumber = try decoder.nextFieldNumber() {
  829. // The use of inline closures is to circumvent an issue where the compiler
  830. // allocates stack space for every case branch when no optimizations are
  831. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  832. switch fieldNumber {
  833. case 1: try { try decoder.decodeSingularInt32Field(value: &self.code) }()
  834. case 2: try { try decoder.decodeSingularStringField(value: &self.message) }()
  835. default: break
  836. }
  837. }
  838. }
  839. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  840. if self.code != 0 {
  841. try visitor.visitSingularInt32Field(value: self.code, fieldNumber: 1)
  842. }
  843. if !self.message.isEmpty {
  844. try visitor.visitSingularStringField(value: self.message, fieldNumber: 2)
  845. }
  846. try unknownFields.traverse(visitor: &visitor)
  847. }
  848. static func ==(lhs: Grpc_Testing_EchoStatus, rhs: Grpc_Testing_EchoStatus) -> Bool {
  849. if lhs.code != rhs.code {return false}
  850. if lhs.message != rhs.message {return false}
  851. if lhs.unknownFields != rhs.unknownFields {return false}
  852. return true
  853. }
  854. }
  855. extension Grpc_Testing_SimpleRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  856. static let protoMessageName: String = _protobuf_package + ".SimpleRequest"
  857. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  858. 1: .standard(proto: "response_type"),
  859. 2: .standard(proto: "response_size"),
  860. 3: .same(proto: "payload"),
  861. 4: .standard(proto: "fill_username"),
  862. 5: .standard(proto: "fill_oauth_scope"),
  863. 6: .standard(proto: "response_compressed"),
  864. 7: .standard(proto: "response_status"),
  865. 8: .standard(proto: "expect_compressed"),
  866. 9: .standard(proto: "fill_server_id"),
  867. 10: .standard(proto: "fill_grpclb_route_type"),
  868. 11: .standard(proto: "orca_per_query_report"),
  869. ]
  870. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  871. while let fieldNumber = try decoder.nextFieldNumber() {
  872. // The use of inline closures is to circumvent an issue where the compiler
  873. // allocates stack space for every case branch when no optimizations are
  874. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  875. switch fieldNumber {
  876. case 1: try { try decoder.decodeSingularEnumField(value: &self.responseType) }()
  877. case 2: try { try decoder.decodeSingularInt32Field(value: &self.responseSize) }()
  878. case 3: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  879. case 4: try { try decoder.decodeSingularBoolField(value: &self.fillUsername) }()
  880. case 5: try { try decoder.decodeSingularBoolField(value: &self.fillOauthScope) }()
  881. case 6: try { try decoder.decodeSingularMessageField(value: &self._responseCompressed) }()
  882. case 7: try { try decoder.decodeSingularMessageField(value: &self._responseStatus) }()
  883. case 8: try { try decoder.decodeSingularMessageField(value: &self._expectCompressed) }()
  884. case 9: try { try decoder.decodeSingularBoolField(value: &self.fillServerID) }()
  885. case 10: try { try decoder.decodeSingularBoolField(value: &self.fillGrpclbRouteType) }()
  886. case 11: try { try decoder.decodeSingularMessageField(value: &self._orcaPerQueryReport) }()
  887. default: break
  888. }
  889. }
  890. }
  891. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  892. // The use of inline closures is to circumvent an issue where the compiler
  893. // allocates stack space for every if/case branch local when no optimizations
  894. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  895. // https://github.com/apple/swift-protobuf/issues/1182
  896. if self.responseType != .compressable {
  897. try visitor.visitSingularEnumField(value: self.responseType, fieldNumber: 1)
  898. }
  899. if self.responseSize != 0 {
  900. try visitor.visitSingularInt32Field(value: self.responseSize, fieldNumber: 2)
  901. }
  902. try { if let v = self._payload {
  903. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  904. } }()
  905. if self.fillUsername != false {
  906. try visitor.visitSingularBoolField(value: self.fillUsername, fieldNumber: 4)
  907. }
  908. if self.fillOauthScope != false {
  909. try visitor.visitSingularBoolField(value: self.fillOauthScope, fieldNumber: 5)
  910. }
  911. try { if let v = self._responseCompressed {
  912. try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
  913. } }()
  914. try { if let v = self._responseStatus {
  915. try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
  916. } }()
  917. try { if let v = self._expectCompressed {
  918. try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
  919. } }()
  920. if self.fillServerID != false {
  921. try visitor.visitSingularBoolField(value: self.fillServerID, fieldNumber: 9)
  922. }
  923. if self.fillGrpclbRouteType != false {
  924. try visitor.visitSingularBoolField(value: self.fillGrpclbRouteType, fieldNumber: 10)
  925. }
  926. try { if let v = self._orcaPerQueryReport {
  927. try visitor.visitSingularMessageField(value: v, fieldNumber: 11)
  928. } }()
  929. try unknownFields.traverse(visitor: &visitor)
  930. }
  931. static func ==(lhs: Grpc_Testing_SimpleRequest, rhs: Grpc_Testing_SimpleRequest) -> Bool {
  932. if lhs.responseType != rhs.responseType {return false}
  933. if lhs.responseSize != rhs.responseSize {return false}
  934. if lhs._payload != rhs._payload {return false}
  935. if lhs.fillUsername != rhs.fillUsername {return false}
  936. if lhs.fillOauthScope != rhs.fillOauthScope {return false}
  937. if lhs._responseCompressed != rhs._responseCompressed {return false}
  938. if lhs._responseStatus != rhs._responseStatus {return false}
  939. if lhs._expectCompressed != rhs._expectCompressed {return false}
  940. if lhs.fillServerID != rhs.fillServerID {return false}
  941. if lhs.fillGrpclbRouteType != rhs.fillGrpclbRouteType {return false}
  942. if lhs._orcaPerQueryReport != rhs._orcaPerQueryReport {return false}
  943. if lhs.unknownFields != rhs.unknownFields {return false}
  944. return true
  945. }
  946. }
  947. extension Grpc_Testing_SimpleResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  948. static let protoMessageName: String = _protobuf_package + ".SimpleResponse"
  949. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  950. 1: .same(proto: "payload"),
  951. 2: .same(proto: "username"),
  952. 3: .standard(proto: "oauth_scope"),
  953. 4: .standard(proto: "server_id"),
  954. 5: .standard(proto: "grpclb_route_type"),
  955. 6: .same(proto: "hostname"),
  956. ]
  957. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  958. while let fieldNumber = try decoder.nextFieldNumber() {
  959. // The use of inline closures is to circumvent an issue where the compiler
  960. // allocates stack space for every case branch when no optimizations are
  961. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  962. switch fieldNumber {
  963. case 1: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  964. case 2: try { try decoder.decodeSingularStringField(value: &self.username) }()
  965. case 3: try { try decoder.decodeSingularStringField(value: &self.oauthScope) }()
  966. case 4: try { try decoder.decodeSingularStringField(value: &self.serverID) }()
  967. case 5: try { try decoder.decodeSingularEnumField(value: &self.grpclbRouteType) }()
  968. case 6: try { try decoder.decodeSingularStringField(value: &self.hostname) }()
  969. default: break
  970. }
  971. }
  972. }
  973. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  974. // The use of inline closures is to circumvent an issue where the compiler
  975. // allocates stack space for every if/case branch local when no optimizations
  976. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  977. // https://github.com/apple/swift-protobuf/issues/1182
  978. try { if let v = self._payload {
  979. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  980. } }()
  981. if !self.username.isEmpty {
  982. try visitor.visitSingularStringField(value: self.username, fieldNumber: 2)
  983. }
  984. if !self.oauthScope.isEmpty {
  985. try visitor.visitSingularStringField(value: self.oauthScope, fieldNumber: 3)
  986. }
  987. if !self.serverID.isEmpty {
  988. try visitor.visitSingularStringField(value: self.serverID, fieldNumber: 4)
  989. }
  990. if self.grpclbRouteType != .unknown {
  991. try visitor.visitSingularEnumField(value: self.grpclbRouteType, fieldNumber: 5)
  992. }
  993. if !self.hostname.isEmpty {
  994. try visitor.visitSingularStringField(value: self.hostname, fieldNumber: 6)
  995. }
  996. try unknownFields.traverse(visitor: &visitor)
  997. }
  998. static func ==(lhs: Grpc_Testing_SimpleResponse, rhs: Grpc_Testing_SimpleResponse) -> Bool {
  999. if lhs._payload != rhs._payload {return false}
  1000. if lhs.username != rhs.username {return false}
  1001. if lhs.oauthScope != rhs.oauthScope {return false}
  1002. if lhs.serverID != rhs.serverID {return false}
  1003. if lhs.grpclbRouteType != rhs.grpclbRouteType {return false}
  1004. if lhs.hostname != rhs.hostname {return false}
  1005. if lhs.unknownFields != rhs.unknownFields {return false}
  1006. return true
  1007. }
  1008. }
  1009. extension Grpc_Testing_StreamingInputCallRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1010. static let protoMessageName: String = _protobuf_package + ".StreamingInputCallRequest"
  1011. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1012. 1: .same(proto: "payload"),
  1013. 2: .standard(proto: "expect_compressed"),
  1014. ]
  1015. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1016. while let fieldNumber = try decoder.nextFieldNumber() {
  1017. // The use of inline closures is to circumvent an issue where the compiler
  1018. // allocates stack space for every case branch when no optimizations are
  1019. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1020. switch fieldNumber {
  1021. case 1: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  1022. case 2: try { try decoder.decodeSingularMessageField(value: &self._expectCompressed) }()
  1023. default: break
  1024. }
  1025. }
  1026. }
  1027. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1028. // The use of inline closures is to circumvent an issue where the compiler
  1029. // allocates stack space for every if/case branch local when no optimizations
  1030. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1031. // https://github.com/apple/swift-protobuf/issues/1182
  1032. try { if let v = self._payload {
  1033. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  1034. } }()
  1035. try { if let v = self._expectCompressed {
  1036. try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
  1037. } }()
  1038. try unknownFields.traverse(visitor: &visitor)
  1039. }
  1040. static func ==(lhs: Grpc_Testing_StreamingInputCallRequest, rhs: Grpc_Testing_StreamingInputCallRequest) -> Bool {
  1041. if lhs._payload != rhs._payload {return false}
  1042. if lhs._expectCompressed != rhs._expectCompressed {return false}
  1043. if lhs.unknownFields != rhs.unknownFields {return false}
  1044. return true
  1045. }
  1046. }
  1047. extension Grpc_Testing_StreamingInputCallResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1048. static let protoMessageName: String = _protobuf_package + ".StreamingInputCallResponse"
  1049. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1050. 1: .standard(proto: "aggregated_payload_size"),
  1051. ]
  1052. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1053. while let fieldNumber = try decoder.nextFieldNumber() {
  1054. // The use of inline closures is to circumvent an issue where the compiler
  1055. // allocates stack space for every case branch when no optimizations are
  1056. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1057. switch fieldNumber {
  1058. case 1: try { try decoder.decodeSingularInt32Field(value: &self.aggregatedPayloadSize) }()
  1059. default: break
  1060. }
  1061. }
  1062. }
  1063. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1064. if self.aggregatedPayloadSize != 0 {
  1065. try visitor.visitSingularInt32Field(value: self.aggregatedPayloadSize, fieldNumber: 1)
  1066. }
  1067. try unknownFields.traverse(visitor: &visitor)
  1068. }
  1069. static func ==(lhs: Grpc_Testing_StreamingInputCallResponse, rhs: Grpc_Testing_StreamingInputCallResponse) -> Bool {
  1070. if lhs.aggregatedPayloadSize != rhs.aggregatedPayloadSize {return false}
  1071. if lhs.unknownFields != rhs.unknownFields {return false}
  1072. return true
  1073. }
  1074. }
  1075. extension Grpc_Testing_ResponseParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1076. static let protoMessageName: String = _protobuf_package + ".ResponseParameters"
  1077. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1078. 1: .same(proto: "size"),
  1079. 2: .standard(proto: "interval_us"),
  1080. 3: .same(proto: "compressed"),
  1081. ]
  1082. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1083. while let fieldNumber = try decoder.nextFieldNumber() {
  1084. // The use of inline closures is to circumvent an issue where the compiler
  1085. // allocates stack space for every case branch when no optimizations are
  1086. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1087. switch fieldNumber {
  1088. case 1: try { try decoder.decodeSingularInt32Field(value: &self.size) }()
  1089. case 2: try { try decoder.decodeSingularInt32Field(value: &self.intervalUs) }()
  1090. case 3: try { try decoder.decodeSingularMessageField(value: &self._compressed) }()
  1091. default: break
  1092. }
  1093. }
  1094. }
  1095. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1096. // The use of inline closures is to circumvent an issue where the compiler
  1097. // allocates stack space for every if/case branch local when no optimizations
  1098. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1099. // https://github.com/apple/swift-protobuf/issues/1182
  1100. if self.size != 0 {
  1101. try visitor.visitSingularInt32Field(value: self.size, fieldNumber: 1)
  1102. }
  1103. if self.intervalUs != 0 {
  1104. try visitor.visitSingularInt32Field(value: self.intervalUs, fieldNumber: 2)
  1105. }
  1106. try { if let v = self._compressed {
  1107. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  1108. } }()
  1109. try unknownFields.traverse(visitor: &visitor)
  1110. }
  1111. static func ==(lhs: Grpc_Testing_ResponseParameters, rhs: Grpc_Testing_ResponseParameters) -> Bool {
  1112. if lhs.size != rhs.size {return false}
  1113. if lhs.intervalUs != rhs.intervalUs {return false}
  1114. if lhs._compressed != rhs._compressed {return false}
  1115. if lhs.unknownFields != rhs.unknownFields {return false}
  1116. return true
  1117. }
  1118. }
  1119. extension Grpc_Testing_StreamingOutputCallRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1120. static let protoMessageName: String = _protobuf_package + ".StreamingOutputCallRequest"
  1121. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1122. 1: .standard(proto: "response_type"),
  1123. 2: .standard(proto: "response_parameters"),
  1124. 3: .same(proto: "payload"),
  1125. 7: .standard(proto: "response_status"),
  1126. 8: .standard(proto: "orca_oob_report"),
  1127. ]
  1128. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1129. while let fieldNumber = try decoder.nextFieldNumber() {
  1130. // The use of inline closures is to circumvent an issue where the compiler
  1131. // allocates stack space for every case branch when no optimizations are
  1132. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1133. switch fieldNumber {
  1134. case 1: try { try decoder.decodeSingularEnumField(value: &self.responseType) }()
  1135. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.responseParameters) }()
  1136. case 3: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  1137. case 7: try { try decoder.decodeSingularMessageField(value: &self._responseStatus) }()
  1138. case 8: try { try decoder.decodeSingularMessageField(value: &self._orcaOobReport) }()
  1139. default: break
  1140. }
  1141. }
  1142. }
  1143. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1144. // The use of inline closures is to circumvent an issue where the compiler
  1145. // allocates stack space for every if/case branch local when no optimizations
  1146. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1147. // https://github.com/apple/swift-protobuf/issues/1182
  1148. if self.responseType != .compressable {
  1149. try visitor.visitSingularEnumField(value: self.responseType, fieldNumber: 1)
  1150. }
  1151. if !self.responseParameters.isEmpty {
  1152. try visitor.visitRepeatedMessageField(value: self.responseParameters, fieldNumber: 2)
  1153. }
  1154. try { if let v = self._payload {
  1155. try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
  1156. } }()
  1157. try { if let v = self._responseStatus {
  1158. try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
  1159. } }()
  1160. try { if let v = self._orcaOobReport {
  1161. try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
  1162. } }()
  1163. try unknownFields.traverse(visitor: &visitor)
  1164. }
  1165. static func ==(lhs: Grpc_Testing_StreamingOutputCallRequest, rhs: Grpc_Testing_StreamingOutputCallRequest) -> Bool {
  1166. if lhs.responseType != rhs.responseType {return false}
  1167. if lhs.responseParameters != rhs.responseParameters {return false}
  1168. if lhs._payload != rhs._payload {return false}
  1169. if lhs._responseStatus != rhs._responseStatus {return false}
  1170. if lhs._orcaOobReport != rhs._orcaOobReport {return false}
  1171. if lhs.unknownFields != rhs.unknownFields {return false}
  1172. return true
  1173. }
  1174. }
  1175. extension Grpc_Testing_StreamingOutputCallResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1176. static let protoMessageName: String = _protobuf_package + ".StreamingOutputCallResponse"
  1177. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1178. 1: .same(proto: "payload"),
  1179. ]
  1180. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1181. while let fieldNumber = try decoder.nextFieldNumber() {
  1182. // The use of inline closures is to circumvent an issue where the compiler
  1183. // allocates stack space for every case branch when no optimizations are
  1184. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1185. switch fieldNumber {
  1186. case 1: try { try decoder.decodeSingularMessageField(value: &self._payload) }()
  1187. default: break
  1188. }
  1189. }
  1190. }
  1191. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1192. // The use of inline closures is to circumvent an issue where the compiler
  1193. // allocates stack space for every if/case branch local when no optimizations
  1194. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  1195. // https://github.com/apple/swift-protobuf/issues/1182
  1196. try { if let v = self._payload {
  1197. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  1198. } }()
  1199. try unknownFields.traverse(visitor: &visitor)
  1200. }
  1201. static func ==(lhs: Grpc_Testing_StreamingOutputCallResponse, rhs: Grpc_Testing_StreamingOutputCallResponse) -> Bool {
  1202. if lhs._payload != rhs._payload {return false}
  1203. if lhs.unknownFields != rhs.unknownFields {return false}
  1204. return true
  1205. }
  1206. }
  1207. extension Grpc_Testing_ReconnectParams: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1208. static let protoMessageName: String = _protobuf_package + ".ReconnectParams"
  1209. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1210. 1: .standard(proto: "max_reconnect_backoff_ms"),
  1211. ]
  1212. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1213. while let fieldNumber = try decoder.nextFieldNumber() {
  1214. // The use of inline closures is to circumvent an issue where the compiler
  1215. // allocates stack space for every case branch when no optimizations are
  1216. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1217. switch fieldNumber {
  1218. case 1: try { try decoder.decodeSingularInt32Field(value: &self.maxReconnectBackoffMs) }()
  1219. default: break
  1220. }
  1221. }
  1222. }
  1223. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1224. if self.maxReconnectBackoffMs != 0 {
  1225. try visitor.visitSingularInt32Field(value: self.maxReconnectBackoffMs, fieldNumber: 1)
  1226. }
  1227. try unknownFields.traverse(visitor: &visitor)
  1228. }
  1229. static func ==(lhs: Grpc_Testing_ReconnectParams, rhs: Grpc_Testing_ReconnectParams) -> Bool {
  1230. if lhs.maxReconnectBackoffMs != rhs.maxReconnectBackoffMs {return false}
  1231. if lhs.unknownFields != rhs.unknownFields {return false}
  1232. return true
  1233. }
  1234. }
  1235. extension Grpc_Testing_ReconnectInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1236. static let protoMessageName: String = _protobuf_package + ".ReconnectInfo"
  1237. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1238. 1: .same(proto: "passed"),
  1239. 2: .standard(proto: "backoff_ms"),
  1240. ]
  1241. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1242. while let fieldNumber = try decoder.nextFieldNumber() {
  1243. // The use of inline closures is to circumvent an issue where the compiler
  1244. // allocates stack space for every case branch when no optimizations are
  1245. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1246. switch fieldNumber {
  1247. case 1: try { try decoder.decodeSingularBoolField(value: &self.passed) }()
  1248. case 2: try { try decoder.decodeRepeatedInt32Field(value: &self.backoffMs) }()
  1249. default: break
  1250. }
  1251. }
  1252. }
  1253. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1254. if self.passed != false {
  1255. try visitor.visitSingularBoolField(value: self.passed, fieldNumber: 1)
  1256. }
  1257. if !self.backoffMs.isEmpty {
  1258. try visitor.visitPackedInt32Field(value: self.backoffMs, fieldNumber: 2)
  1259. }
  1260. try unknownFields.traverse(visitor: &visitor)
  1261. }
  1262. static func ==(lhs: Grpc_Testing_ReconnectInfo, rhs: Grpc_Testing_ReconnectInfo) -> Bool {
  1263. if lhs.passed != rhs.passed {return false}
  1264. if lhs.backoffMs != rhs.backoffMs {return false}
  1265. if lhs.unknownFields != rhs.unknownFields {return false}
  1266. return true
  1267. }
  1268. }
  1269. extension Grpc_Testing_LoadBalancerStatsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1270. static let protoMessageName: String = _protobuf_package + ".LoadBalancerStatsRequest"
  1271. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1272. 1: .standard(proto: "num_rpcs"),
  1273. 2: .standard(proto: "timeout_sec"),
  1274. 3: .standard(proto: "metadata_keys"),
  1275. ]
  1276. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1277. while let fieldNumber = try decoder.nextFieldNumber() {
  1278. // The use of inline closures is to circumvent an issue where the compiler
  1279. // allocates stack space for every case branch when no optimizations are
  1280. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1281. switch fieldNumber {
  1282. case 1: try { try decoder.decodeSingularInt32Field(value: &self.numRpcs) }()
  1283. case 2: try { try decoder.decodeSingularInt32Field(value: &self.timeoutSec) }()
  1284. case 3: try { try decoder.decodeRepeatedStringField(value: &self.metadataKeys) }()
  1285. default: break
  1286. }
  1287. }
  1288. }
  1289. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1290. if self.numRpcs != 0 {
  1291. try visitor.visitSingularInt32Field(value: self.numRpcs, fieldNumber: 1)
  1292. }
  1293. if self.timeoutSec != 0 {
  1294. try visitor.visitSingularInt32Field(value: self.timeoutSec, fieldNumber: 2)
  1295. }
  1296. if !self.metadataKeys.isEmpty {
  1297. try visitor.visitRepeatedStringField(value: self.metadataKeys, fieldNumber: 3)
  1298. }
  1299. try unknownFields.traverse(visitor: &visitor)
  1300. }
  1301. static func ==(lhs: Grpc_Testing_LoadBalancerStatsRequest, rhs: Grpc_Testing_LoadBalancerStatsRequest) -> Bool {
  1302. if lhs.numRpcs != rhs.numRpcs {return false}
  1303. if lhs.timeoutSec != rhs.timeoutSec {return false}
  1304. if lhs.metadataKeys != rhs.metadataKeys {return false}
  1305. if lhs.unknownFields != rhs.unknownFields {return false}
  1306. return true
  1307. }
  1308. }
  1309. extension Grpc_Testing_LoadBalancerStatsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1310. static let protoMessageName: String = _protobuf_package + ".LoadBalancerStatsResponse"
  1311. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1312. 1: .standard(proto: "rpcs_by_peer"),
  1313. 2: .standard(proto: "num_failures"),
  1314. 3: .standard(proto: "rpcs_by_method"),
  1315. 4: .standard(proto: "metadatas_by_peer"),
  1316. ]
  1317. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1318. while let fieldNumber = try decoder.nextFieldNumber() {
  1319. // The use of inline closures is to circumvent an issue where the compiler
  1320. // allocates stack space for every case branch when no optimizations are
  1321. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1322. switch fieldNumber {
  1323. case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufInt32>.self, value: &self.rpcsByPeer) }()
  1324. case 2: try { try decoder.decodeSingularInt32Field(value: &self.numFailures) }()
  1325. case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,Grpc_Testing_LoadBalancerStatsResponse.RpcsByPeer>.self, value: &self.rpcsByMethod) }()
  1326. case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,Grpc_Testing_LoadBalancerStatsResponse.MetadataByPeer>.self, value: &self.metadatasByPeer) }()
  1327. default: break
  1328. }
  1329. }
  1330. }
  1331. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1332. if !self.rpcsByPeer.isEmpty {
  1333. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufInt32>.self, value: self.rpcsByPeer, fieldNumber: 1)
  1334. }
  1335. if self.numFailures != 0 {
  1336. try visitor.visitSingularInt32Field(value: self.numFailures, fieldNumber: 2)
  1337. }
  1338. if !self.rpcsByMethod.isEmpty {
  1339. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,Grpc_Testing_LoadBalancerStatsResponse.RpcsByPeer>.self, value: self.rpcsByMethod, fieldNumber: 3)
  1340. }
  1341. if !self.metadatasByPeer.isEmpty {
  1342. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,Grpc_Testing_LoadBalancerStatsResponse.MetadataByPeer>.self, value: self.metadatasByPeer, fieldNumber: 4)
  1343. }
  1344. try unknownFields.traverse(visitor: &visitor)
  1345. }
  1346. static func ==(lhs: Grpc_Testing_LoadBalancerStatsResponse, rhs: Grpc_Testing_LoadBalancerStatsResponse) -> Bool {
  1347. if lhs.rpcsByPeer != rhs.rpcsByPeer {return false}
  1348. if lhs.numFailures != rhs.numFailures {return false}
  1349. if lhs.rpcsByMethod != rhs.rpcsByMethod {return false}
  1350. if lhs.metadatasByPeer != rhs.metadatasByPeer {return false}
  1351. if lhs.unknownFields != rhs.unknownFields {return false}
  1352. return true
  1353. }
  1354. }
  1355. extension Grpc_Testing_LoadBalancerStatsResponse.MetadataType: SwiftProtobuf._ProtoNameProviding {
  1356. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1357. 0: .same(proto: "UNKNOWN"),
  1358. 1: .same(proto: "INITIAL"),
  1359. 2: .same(proto: "TRAILING"),
  1360. ]
  1361. }
  1362. extension Grpc_Testing_LoadBalancerStatsResponse.MetadataEntry: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1363. static let protoMessageName: String = Grpc_Testing_LoadBalancerStatsResponse.protoMessageName + ".MetadataEntry"
  1364. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1365. 1: .same(proto: "key"),
  1366. 2: .same(proto: "value"),
  1367. 3: .same(proto: "type"),
  1368. ]
  1369. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1370. while let fieldNumber = try decoder.nextFieldNumber() {
  1371. // The use of inline closures is to circumvent an issue where the compiler
  1372. // allocates stack space for every case branch when no optimizations are
  1373. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1374. switch fieldNumber {
  1375. case 1: try { try decoder.decodeSingularStringField(value: &self.key) }()
  1376. case 2: try { try decoder.decodeSingularStringField(value: &self.value) }()
  1377. case 3: try { try decoder.decodeSingularEnumField(value: &self.type) }()
  1378. default: break
  1379. }
  1380. }
  1381. }
  1382. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1383. if !self.key.isEmpty {
  1384. try visitor.visitSingularStringField(value: self.key, fieldNumber: 1)
  1385. }
  1386. if !self.value.isEmpty {
  1387. try visitor.visitSingularStringField(value: self.value, fieldNumber: 2)
  1388. }
  1389. if self.type != .unknown {
  1390. try visitor.visitSingularEnumField(value: self.type, fieldNumber: 3)
  1391. }
  1392. try unknownFields.traverse(visitor: &visitor)
  1393. }
  1394. static func ==(lhs: Grpc_Testing_LoadBalancerStatsResponse.MetadataEntry, rhs: Grpc_Testing_LoadBalancerStatsResponse.MetadataEntry) -> Bool {
  1395. if lhs.key != rhs.key {return false}
  1396. if lhs.value != rhs.value {return false}
  1397. if lhs.type != rhs.type {return false}
  1398. if lhs.unknownFields != rhs.unknownFields {return false}
  1399. return true
  1400. }
  1401. }
  1402. extension Grpc_Testing_LoadBalancerStatsResponse.RpcMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1403. static let protoMessageName: String = Grpc_Testing_LoadBalancerStatsResponse.protoMessageName + ".RpcMetadata"
  1404. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1405. 1: .same(proto: "metadata"),
  1406. ]
  1407. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1408. while let fieldNumber = try decoder.nextFieldNumber() {
  1409. // The use of inline closures is to circumvent an issue where the compiler
  1410. // allocates stack space for every case branch when no optimizations are
  1411. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1412. switch fieldNumber {
  1413. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.metadata) }()
  1414. default: break
  1415. }
  1416. }
  1417. }
  1418. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1419. if !self.metadata.isEmpty {
  1420. try visitor.visitRepeatedMessageField(value: self.metadata, fieldNumber: 1)
  1421. }
  1422. try unknownFields.traverse(visitor: &visitor)
  1423. }
  1424. static func ==(lhs: Grpc_Testing_LoadBalancerStatsResponse.RpcMetadata, rhs: Grpc_Testing_LoadBalancerStatsResponse.RpcMetadata) -> Bool {
  1425. if lhs.metadata != rhs.metadata {return false}
  1426. if lhs.unknownFields != rhs.unknownFields {return false}
  1427. return true
  1428. }
  1429. }
  1430. extension Grpc_Testing_LoadBalancerStatsResponse.MetadataByPeer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1431. static let protoMessageName: String = Grpc_Testing_LoadBalancerStatsResponse.protoMessageName + ".MetadataByPeer"
  1432. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1433. 1: .standard(proto: "rpc_metadata"),
  1434. ]
  1435. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1436. while let fieldNumber = try decoder.nextFieldNumber() {
  1437. // The use of inline closures is to circumvent an issue where the compiler
  1438. // allocates stack space for every case branch when no optimizations are
  1439. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1440. switch fieldNumber {
  1441. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.rpcMetadata) }()
  1442. default: break
  1443. }
  1444. }
  1445. }
  1446. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1447. if !self.rpcMetadata.isEmpty {
  1448. try visitor.visitRepeatedMessageField(value: self.rpcMetadata, fieldNumber: 1)
  1449. }
  1450. try unknownFields.traverse(visitor: &visitor)
  1451. }
  1452. static func ==(lhs: Grpc_Testing_LoadBalancerStatsResponse.MetadataByPeer, rhs: Grpc_Testing_LoadBalancerStatsResponse.MetadataByPeer) -> Bool {
  1453. if lhs.rpcMetadata != rhs.rpcMetadata {return false}
  1454. if lhs.unknownFields != rhs.unknownFields {return false}
  1455. return true
  1456. }
  1457. }
  1458. extension Grpc_Testing_LoadBalancerStatsResponse.RpcsByPeer: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1459. static let protoMessageName: String = Grpc_Testing_LoadBalancerStatsResponse.protoMessageName + ".RpcsByPeer"
  1460. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1461. 1: .standard(proto: "rpcs_by_peer"),
  1462. ]
  1463. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1464. while let fieldNumber = try decoder.nextFieldNumber() {
  1465. // The use of inline closures is to circumvent an issue where the compiler
  1466. // allocates stack space for every case branch when no optimizations are
  1467. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1468. switch fieldNumber {
  1469. case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufInt32>.self, value: &self.rpcsByPeer) }()
  1470. default: break
  1471. }
  1472. }
  1473. }
  1474. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1475. if !self.rpcsByPeer.isEmpty {
  1476. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufInt32>.self, value: self.rpcsByPeer, fieldNumber: 1)
  1477. }
  1478. try unknownFields.traverse(visitor: &visitor)
  1479. }
  1480. static func ==(lhs: Grpc_Testing_LoadBalancerStatsResponse.RpcsByPeer, rhs: Grpc_Testing_LoadBalancerStatsResponse.RpcsByPeer) -> Bool {
  1481. if lhs.rpcsByPeer != rhs.rpcsByPeer {return false}
  1482. if lhs.unknownFields != rhs.unknownFields {return false}
  1483. return true
  1484. }
  1485. }
  1486. extension Grpc_Testing_LoadBalancerAccumulatedStatsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1487. static let protoMessageName: String = _protobuf_package + ".LoadBalancerAccumulatedStatsRequest"
  1488. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  1489. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1490. while let _ = try decoder.nextFieldNumber() {
  1491. }
  1492. }
  1493. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1494. try unknownFields.traverse(visitor: &visitor)
  1495. }
  1496. static func ==(lhs: Grpc_Testing_LoadBalancerAccumulatedStatsRequest, rhs: Grpc_Testing_LoadBalancerAccumulatedStatsRequest) -> Bool {
  1497. if lhs.unknownFields != rhs.unknownFields {return false}
  1498. return true
  1499. }
  1500. }
  1501. extension Grpc_Testing_LoadBalancerAccumulatedStatsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1502. static let protoMessageName: String = _protobuf_package + ".LoadBalancerAccumulatedStatsResponse"
  1503. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1504. 1: .standard(proto: "num_rpcs_started_by_method"),
  1505. 2: .standard(proto: "num_rpcs_succeeded_by_method"),
  1506. 3: .standard(proto: "num_rpcs_failed_by_method"),
  1507. 4: .standard(proto: "stats_per_method"),
  1508. ]
  1509. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1510. while let fieldNumber = try decoder.nextFieldNumber() {
  1511. // The use of inline closures is to circumvent an issue where the compiler
  1512. // allocates stack space for every case branch when no optimizations are
  1513. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1514. switch fieldNumber {
  1515. case 1: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufInt32>.self, value: &self.numRpcsStartedByMethod) }()
  1516. case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufInt32>.self, value: &self.numRpcsSucceededByMethod) }()
  1517. case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufInt32>.self, value: &self.numRpcsFailedByMethod) }()
  1518. case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,Grpc_Testing_LoadBalancerAccumulatedStatsResponse.MethodStats>.self, value: &self.statsPerMethod) }()
  1519. default: break
  1520. }
  1521. }
  1522. }
  1523. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1524. if !self.numRpcsStartedByMethod.isEmpty {
  1525. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufInt32>.self, value: self.numRpcsStartedByMethod, fieldNumber: 1)
  1526. }
  1527. if !self.numRpcsSucceededByMethod.isEmpty {
  1528. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufInt32>.self, value: self.numRpcsSucceededByMethod, fieldNumber: 2)
  1529. }
  1530. if !self.numRpcsFailedByMethod.isEmpty {
  1531. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufInt32>.self, value: self.numRpcsFailedByMethod, fieldNumber: 3)
  1532. }
  1533. if !self.statsPerMethod.isEmpty {
  1534. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap<SwiftProtobuf.ProtobufString,Grpc_Testing_LoadBalancerAccumulatedStatsResponse.MethodStats>.self, value: self.statsPerMethod, fieldNumber: 4)
  1535. }
  1536. try unknownFields.traverse(visitor: &visitor)
  1537. }
  1538. static func ==(lhs: Grpc_Testing_LoadBalancerAccumulatedStatsResponse, rhs: Grpc_Testing_LoadBalancerAccumulatedStatsResponse) -> Bool {
  1539. if lhs.numRpcsStartedByMethod != rhs.numRpcsStartedByMethod {return false}
  1540. if lhs.numRpcsSucceededByMethod != rhs.numRpcsSucceededByMethod {return false}
  1541. if lhs.numRpcsFailedByMethod != rhs.numRpcsFailedByMethod {return false}
  1542. if lhs.statsPerMethod != rhs.statsPerMethod {return false}
  1543. if lhs.unknownFields != rhs.unknownFields {return false}
  1544. return true
  1545. }
  1546. }
  1547. extension Grpc_Testing_LoadBalancerAccumulatedStatsResponse.MethodStats: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1548. static let protoMessageName: String = Grpc_Testing_LoadBalancerAccumulatedStatsResponse.protoMessageName + ".MethodStats"
  1549. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1550. 1: .standard(proto: "rpcs_started"),
  1551. 2: .same(proto: "result"),
  1552. ]
  1553. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1554. while let fieldNumber = try decoder.nextFieldNumber() {
  1555. // The use of inline closures is to circumvent an issue where the compiler
  1556. // allocates stack space for every case branch when no optimizations are
  1557. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1558. switch fieldNumber {
  1559. case 1: try { try decoder.decodeSingularInt32Field(value: &self.rpcsStarted) }()
  1560. case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: &self.result) }()
  1561. default: break
  1562. }
  1563. }
  1564. }
  1565. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1566. if self.rpcsStarted != 0 {
  1567. try visitor.visitSingularInt32Field(value: self.rpcsStarted, fieldNumber: 1)
  1568. }
  1569. if !self.result.isEmpty {
  1570. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufInt32,SwiftProtobuf.ProtobufInt32>.self, value: self.result, fieldNumber: 2)
  1571. }
  1572. try unknownFields.traverse(visitor: &visitor)
  1573. }
  1574. static func ==(lhs: Grpc_Testing_LoadBalancerAccumulatedStatsResponse.MethodStats, rhs: Grpc_Testing_LoadBalancerAccumulatedStatsResponse.MethodStats) -> Bool {
  1575. if lhs.rpcsStarted != rhs.rpcsStarted {return false}
  1576. if lhs.result != rhs.result {return false}
  1577. if lhs.unknownFields != rhs.unknownFields {return false}
  1578. return true
  1579. }
  1580. }
  1581. extension Grpc_Testing_ClientConfigureRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1582. static let protoMessageName: String = _protobuf_package + ".ClientConfigureRequest"
  1583. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1584. 1: .same(proto: "types"),
  1585. 2: .same(proto: "metadata"),
  1586. 3: .standard(proto: "timeout_sec"),
  1587. ]
  1588. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1589. while let fieldNumber = try decoder.nextFieldNumber() {
  1590. // The use of inline closures is to circumvent an issue where the compiler
  1591. // allocates stack space for every case branch when no optimizations are
  1592. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1593. switch fieldNumber {
  1594. case 1: try { try decoder.decodeRepeatedEnumField(value: &self.types) }()
  1595. case 2: try { try decoder.decodeRepeatedMessageField(value: &self.metadata) }()
  1596. case 3: try { try decoder.decodeSingularInt32Field(value: &self.timeoutSec) }()
  1597. default: break
  1598. }
  1599. }
  1600. }
  1601. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1602. if !self.types.isEmpty {
  1603. try visitor.visitPackedEnumField(value: self.types, fieldNumber: 1)
  1604. }
  1605. if !self.metadata.isEmpty {
  1606. try visitor.visitRepeatedMessageField(value: self.metadata, fieldNumber: 2)
  1607. }
  1608. if self.timeoutSec != 0 {
  1609. try visitor.visitSingularInt32Field(value: self.timeoutSec, fieldNumber: 3)
  1610. }
  1611. try unknownFields.traverse(visitor: &visitor)
  1612. }
  1613. static func ==(lhs: Grpc_Testing_ClientConfigureRequest, rhs: Grpc_Testing_ClientConfigureRequest) -> Bool {
  1614. if lhs.types != rhs.types {return false}
  1615. if lhs.metadata != rhs.metadata {return false}
  1616. if lhs.timeoutSec != rhs.timeoutSec {return false}
  1617. if lhs.unknownFields != rhs.unknownFields {return false}
  1618. return true
  1619. }
  1620. }
  1621. extension Grpc_Testing_ClientConfigureRequest.RpcType: SwiftProtobuf._ProtoNameProviding {
  1622. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1623. 0: .same(proto: "EMPTY_CALL"),
  1624. 1: .same(proto: "UNARY_CALL"),
  1625. ]
  1626. }
  1627. extension Grpc_Testing_ClientConfigureRequest.Metadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1628. static let protoMessageName: String = Grpc_Testing_ClientConfigureRequest.protoMessageName + ".Metadata"
  1629. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1630. 1: .same(proto: "type"),
  1631. 2: .same(proto: "key"),
  1632. 3: .same(proto: "value"),
  1633. ]
  1634. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1635. while let fieldNumber = try decoder.nextFieldNumber() {
  1636. // The use of inline closures is to circumvent an issue where the compiler
  1637. // allocates stack space for every case branch when no optimizations are
  1638. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1639. switch fieldNumber {
  1640. case 1: try { try decoder.decodeSingularEnumField(value: &self.type) }()
  1641. case 2: try { try decoder.decodeSingularStringField(value: &self.key) }()
  1642. case 3: try { try decoder.decodeSingularStringField(value: &self.value) }()
  1643. default: break
  1644. }
  1645. }
  1646. }
  1647. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1648. if self.type != .emptyCall {
  1649. try visitor.visitSingularEnumField(value: self.type, fieldNumber: 1)
  1650. }
  1651. if !self.key.isEmpty {
  1652. try visitor.visitSingularStringField(value: self.key, fieldNumber: 2)
  1653. }
  1654. if !self.value.isEmpty {
  1655. try visitor.visitSingularStringField(value: self.value, fieldNumber: 3)
  1656. }
  1657. try unknownFields.traverse(visitor: &visitor)
  1658. }
  1659. static func ==(lhs: Grpc_Testing_ClientConfigureRequest.Metadata, rhs: Grpc_Testing_ClientConfigureRequest.Metadata) -> Bool {
  1660. if lhs.type != rhs.type {return false}
  1661. if lhs.key != rhs.key {return false}
  1662. if lhs.value != rhs.value {return false}
  1663. if lhs.unknownFields != rhs.unknownFields {return false}
  1664. return true
  1665. }
  1666. }
  1667. extension Grpc_Testing_ClientConfigureResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1668. static let protoMessageName: String = _protobuf_package + ".ClientConfigureResponse"
  1669. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  1670. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1671. while let _ = try decoder.nextFieldNumber() {
  1672. }
  1673. }
  1674. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1675. try unknownFields.traverse(visitor: &visitor)
  1676. }
  1677. static func ==(lhs: Grpc_Testing_ClientConfigureResponse, rhs: Grpc_Testing_ClientConfigureResponse) -> Bool {
  1678. if lhs.unknownFields != rhs.unknownFields {return false}
  1679. return true
  1680. }
  1681. }
  1682. extension Grpc_Testing_MemorySize: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1683. static let protoMessageName: String = _protobuf_package + ".MemorySize"
  1684. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1685. 1: .same(proto: "rss"),
  1686. ]
  1687. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1688. while let fieldNumber = try decoder.nextFieldNumber() {
  1689. // The use of inline closures is to circumvent an issue where the compiler
  1690. // allocates stack space for every case branch when no optimizations are
  1691. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1692. switch fieldNumber {
  1693. case 1: try { try decoder.decodeSingularInt64Field(value: &self.rss) }()
  1694. default: break
  1695. }
  1696. }
  1697. }
  1698. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1699. if self.rss != 0 {
  1700. try visitor.visitSingularInt64Field(value: self.rss, fieldNumber: 1)
  1701. }
  1702. try unknownFields.traverse(visitor: &visitor)
  1703. }
  1704. static func ==(lhs: Grpc_Testing_MemorySize, rhs: Grpc_Testing_MemorySize) -> Bool {
  1705. if lhs.rss != rhs.rss {return false}
  1706. if lhs.unknownFields != rhs.unknownFields {return false}
  1707. return true
  1708. }
  1709. }
  1710. extension Grpc_Testing_TestOrcaReport: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1711. static let protoMessageName: String = _protobuf_package + ".TestOrcaReport"
  1712. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1713. 1: .standard(proto: "cpu_utilization"),
  1714. 2: .standard(proto: "memory_utilization"),
  1715. 3: .standard(proto: "request_cost"),
  1716. 4: .same(proto: "utilization"),
  1717. ]
  1718. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1719. while let fieldNumber = try decoder.nextFieldNumber() {
  1720. // The use of inline closures is to circumvent an issue where the compiler
  1721. // allocates stack space for every case branch when no optimizations are
  1722. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1723. switch fieldNumber {
  1724. case 1: try { try decoder.decodeSingularDoubleField(value: &self.cpuUtilization) }()
  1725. case 2: try { try decoder.decodeSingularDoubleField(value: &self.memoryUtilization) }()
  1726. case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: &self.requestCost) }()
  1727. case 4: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: &self.utilization) }()
  1728. default: break
  1729. }
  1730. }
  1731. }
  1732. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1733. if self.cpuUtilization != 0 {
  1734. try visitor.visitSingularDoubleField(value: self.cpuUtilization, fieldNumber: 1)
  1735. }
  1736. if self.memoryUtilization != 0 {
  1737. try visitor.visitSingularDoubleField(value: self.memoryUtilization, fieldNumber: 2)
  1738. }
  1739. if !self.requestCost.isEmpty {
  1740. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: self.requestCost, fieldNumber: 3)
  1741. }
  1742. if !self.utilization.isEmpty {
  1743. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: self.utilization, fieldNumber: 4)
  1744. }
  1745. try unknownFields.traverse(visitor: &visitor)
  1746. }
  1747. static func ==(lhs: Grpc_Testing_TestOrcaReport, rhs: Grpc_Testing_TestOrcaReport) -> Bool {
  1748. if lhs.cpuUtilization != rhs.cpuUtilization {return false}
  1749. if lhs.memoryUtilization != rhs.memoryUtilization {return false}
  1750. if lhs.requestCost != rhs.requestCost {return false}
  1751. if lhs.utilization != rhs.utilization {return false}
  1752. if lhs.unknownFields != rhs.unknownFields {return false}
  1753. return true
  1754. }
  1755. }
  1756. extension Grpc_Testing_SetReturnStatusRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1757. static let protoMessageName: String = _protobuf_package + ".SetReturnStatusRequest"
  1758. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1759. 1: .standard(proto: "grpc_code_to_return"),
  1760. 2: .standard(proto: "grpc_status_description"),
  1761. ]
  1762. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1763. while let fieldNumber = try decoder.nextFieldNumber() {
  1764. // The use of inline closures is to circumvent an issue where the compiler
  1765. // allocates stack space for every case branch when no optimizations are
  1766. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1767. switch fieldNumber {
  1768. case 1: try { try decoder.decodeSingularInt32Field(value: &self.grpcCodeToReturn) }()
  1769. case 2: try { try decoder.decodeSingularStringField(value: &self.grpcStatusDescription) }()
  1770. default: break
  1771. }
  1772. }
  1773. }
  1774. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1775. if self.grpcCodeToReturn != 0 {
  1776. try visitor.visitSingularInt32Field(value: self.grpcCodeToReturn, fieldNumber: 1)
  1777. }
  1778. if !self.grpcStatusDescription.isEmpty {
  1779. try visitor.visitSingularStringField(value: self.grpcStatusDescription, fieldNumber: 2)
  1780. }
  1781. try unknownFields.traverse(visitor: &visitor)
  1782. }
  1783. static func ==(lhs: Grpc_Testing_SetReturnStatusRequest, rhs: Grpc_Testing_SetReturnStatusRequest) -> Bool {
  1784. if lhs.grpcCodeToReturn != rhs.grpcCodeToReturn {return false}
  1785. if lhs.grpcStatusDescription != rhs.grpcStatusDescription {return false}
  1786. if lhs.unknownFields != rhs.unknownFields {return false}
  1787. return true
  1788. }
  1789. }
  1790. extension Grpc_Testing_HookRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1791. static let protoMessageName: String = _protobuf_package + ".HookRequest"
  1792. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1793. 1: .same(proto: "command"),
  1794. 2: .standard(proto: "grpc_code_to_return"),
  1795. 3: .standard(proto: "grpc_status_description"),
  1796. 4: .standard(proto: "server_port"),
  1797. ]
  1798. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1799. while let fieldNumber = try decoder.nextFieldNumber() {
  1800. // The use of inline closures is to circumvent an issue where the compiler
  1801. // allocates stack space for every case branch when no optimizations are
  1802. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  1803. switch fieldNumber {
  1804. case 1: try { try decoder.decodeSingularEnumField(value: &self.command) }()
  1805. case 2: try { try decoder.decodeSingularInt32Field(value: &self.grpcCodeToReturn) }()
  1806. case 3: try { try decoder.decodeSingularStringField(value: &self.grpcStatusDescription) }()
  1807. case 4: try { try decoder.decodeSingularInt32Field(value: &self.serverPort) }()
  1808. default: break
  1809. }
  1810. }
  1811. }
  1812. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1813. if self.command != .unspecified {
  1814. try visitor.visitSingularEnumField(value: self.command, fieldNumber: 1)
  1815. }
  1816. if self.grpcCodeToReturn != 0 {
  1817. try visitor.visitSingularInt32Field(value: self.grpcCodeToReturn, fieldNumber: 2)
  1818. }
  1819. if !self.grpcStatusDescription.isEmpty {
  1820. try visitor.visitSingularStringField(value: self.grpcStatusDescription, fieldNumber: 3)
  1821. }
  1822. if self.serverPort != 0 {
  1823. try visitor.visitSingularInt32Field(value: self.serverPort, fieldNumber: 4)
  1824. }
  1825. try unknownFields.traverse(visitor: &visitor)
  1826. }
  1827. static func ==(lhs: Grpc_Testing_HookRequest, rhs: Grpc_Testing_HookRequest) -> Bool {
  1828. if lhs.command != rhs.command {return false}
  1829. if lhs.grpcCodeToReturn != rhs.grpcCodeToReturn {return false}
  1830. if lhs.grpcStatusDescription != rhs.grpcStatusDescription {return false}
  1831. if lhs.serverPort != rhs.serverPort {return false}
  1832. if lhs.unknownFields != rhs.unknownFields {return false}
  1833. return true
  1834. }
  1835. }
  1836. extension Grpc_Testing_HookRequest.HookRequestCommand: SwiftProtobuf._ProtoNameProviding {
  1837. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  1838. 0: .same(proto: "UNSPECIFIED"),
  1839. 1: .same(proto: "START"),
  1840. 2: .same(proto: "STOP"),
  1841. 3: .same(proto: "RETURN"),
  1842. ]
  1843. }
  1844. extension Grpc_Testing_HookResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  1845. static let protoMessageName: String = _protobuf_package + ".HookResponse"
  1846. static let _protobuf_nameMap = SwiftProtobuf._NameMap()
  1847. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  1848. while let _ = try decoder.nextFieldNumber() {
  1849. }
  1850. }
  1851. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  1852. try unknownFields.traverse(visitor: &visitor)
  1853. }
  1854. static func ==(lhs: Grpc_Testing_HookResponse, rhs: Grpc_Testing_HookResponse) -> Bool {
  1855. if lhs.unknownFields != rhs.unknownFields {return false}
  1856. return true
  1857. }
  1858. }