error_details.pb.swift 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950
  1. // DO NOT EDIT.
  2. // swift-format-ignore-file
  3. // swiftlint:disable all
  4. //
  5. // Generated by the Swift generator plugin for the protocol buffer compiler.
  6. // Source: error_details.proto
  7. //
  8. // For information on using the generated types, please see the documentation:
  9. // https://github.com/apple/swift-protobuf/
  10. // Copyright 2024 Google LLC
  11. //
  12. // Licensed under the Apache License, Version 2.0 (the "License");
  13. // you may not use this file except in compliance with the License.
  14. // You may obtain a copy of the License at
  15. //
  16. // http://www.apache.org/licenses/LICENSE-2.0
  17. //
  18. // Unless required by applicable law or agreed to in writing, software
  19. // distributed under the License is distributed on an "AS IS" BASIS,
  20. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21. // See the License for the specific language governing permissions and
  22. // limitations under the License.
  23. internal import SwiftProtobuf
  24. // If the compiler emits an error on this type, it is because this file
  25. // was generated by a version of the `protoc` Swift plug-in that is
  26. // incompatible with the version of SwiftProtobuf to which you are linking.
  27. // Please ensure that you are building against the same version of the API
  28. // that was used to generate this file.
  29. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  30. struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  31. typealias Version = _2
  32. }
  33. /// Describes the cause of the error with structured details.
  34. ///
  35. /// Example of an error when contacting the "pubsub.googleapis.com" API when it
  36. /// is not enabled:
  37. ///
  38. /// { "reason": "API_DISABLED"
  39. /// "domain": "googleapis.com"
  40. /// "metadata": {
  41. /// "resource": "projects/123",
  42. /// "service": "pubsub.googleapis.com"
  43. /// }
  44. /// }
  45. ///
  46. /// This response indicates that the pubsub.googleapis.com API is not enabled.
  47. ///
  48. /// Example of an error that is returned when attempting to create a Spanner
  49. /// instance in a region that is out of stock:
  50. ///
  51. /// { "reason": "STOCKOUT"
  52. /// "domain": "spanner.googleapis.com",
  53. /// "metadata": {
  54. /// "availableRegions": "us-central1,us-east2"
  55. /// }
  56. /// }
  57. struct Google_Rpc_ErrorInfo: Sendable {
  58. // SwiftProtobuf.Message conformance is added in an extension below. See the
  59. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  60. // methods supported on all messages.
  61. /// The reason of the error. This is a constant value that identifies the
  62. /// proximate cause of the error. Error reasons are unique within a particular
  63. /// domain of errors. This should be at most 63 characters and match a
  64. /// regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents
  65. /// UPPER_SNAKE_CASE.
  66. var reason: String = String()
  67. /// The logical grouping to which the "reason" belongs. The error domain
  68. /// is typically the registered service name of the tool or product that
  69. /// generates the error. Example: "pubsub.googleapis.com". If the error is
  70. /// generated by some common infrastructure, the error domain must be a
  71. /// globally unique value that identifies the infrastructure. For Google API
  72. /// infrastructure, the error domain is "googleapis.com".
  73. var domain: String = String()
  74. /// Additional structured details about this error.
  75. ///
  76. /// Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in
  77. /// length. When identifying the current value of an exceeded limit, the units
  78. /// should be contained in the key, not the value. For example, rather than
  79. /// {"instanceLimit": "100/request"}, should be returned as,
  80. /// {"instanceLimitPerRequest": "100"}, if the client exceeds the number of
  81. /// instances that can be created in a single (batch) request.
  82. var metadata: Dictionary<String,String> = [:]
  83. var unknownFields = SwiftProtobuf.UnknownStorage()
  84. init() {}
  85. }
  86. /// Describes when the clients can retry a failed request. Clients could ignore
  87. /// the recommendation here or retry when this information is missing from error
  88. /// responses.
  89. ///
  90. /// It's always recommended that clients should use exponential backoff when
  91. /// retrying.
  92. ///
  93. /// Clients should wait until `retry_delay` amount of time has passed since
  94. /// receiving the error response before retrying. If retrying requests also
  95. /// fail, clients should use an exponential backoff scheme to gradually increase
  96. /// the delay between retries based on `retry_delay`, until either a maximum
  97. /// number of retries have been reached or a maximum retry delay cap has been
  98. /// reached.
  99. struct Google_Rpc_RetryInfo: Sendable {
  100. // SwiftProtobuf.Message conformance is added in an extension below. See the
  101. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  102. // methods supported on all messages.
  103. /// Clients should wait at least this long between retrying the same request.
  104. var retryDelay: SwiftProtobuf.Google_Protobuf_Duration {
  105. get {return _retryDelay ?? SwiftProtobuf.Google_Protobuf_Duration()}
  106. set {_retryDelay = newValue}
  107. }
  108. /// Returns true if `retryDelay` has been explicitly set.
  109. var hasRetryDelay: Bool {return self._retryDelay != nil}
  110. /// Clears the value of `retryDelay`. Subsequent reads from it will return its default value.
  111. mutating func clearRetryDelay() {self._retryDelay = nil}
  112. var unknownFields = SwiftProtobuf.UnknownStorage()
  113. init() {}
  114. fileprivate var _retryDelay: SwiftProtobuf.Google_Protobuf_Duration? = nil
  115. }
  116. /// Describes additional debugging info.
  117. struct Google_Rpc_DebugInfo: Sendable {
  118. // SwiftProtobuf.Message conformance is added in an extension below. See the
  119. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  120. // methods supported on all messages.
  121. /// The stack trace entries indicating where the error occurred.
  122. var stackEntries: [String] = []
  123. /// Additional debugging information provided by the server.
  124. var detail: String = String()
  125. var unknownFields = SwiftProtobuf.UnknownStorage()
  126. init() {}
  127. }
  128. /// Describes how a quota check failed.
  129. ///
  130. /// For example if a daily limit was exceeded for the calling project,
  131. /// a service could respond with a QuotaFailure detail containing the project
  132. /// id and the description of the quota limit that was exceeded. If the
  133. /// calling project hasn't enabled the service in the developer console, then
  134. /// a service could respond with the project id and set `service_disabled`
  135. /// to true.
  136. ///
  137. /// Also see RetryInfo and Help types for other details about handling a
  138. /// quota failure.
  139. struct Google_Rpc_QuotaFailure: Sendable {
  140. // SwiftProtobuf.Message conformance is added in an extension below. See the
  141. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  142. // methods supported on all messages.
  143. /// Describes all quota violations.
  144. var violations: [Google_Rpc_QuotaFailure.Violation] = []
  145. var unknownFields = SwiftProtobuf.UnknownStorage()
  146. /// A message type used to describe a single quota violation. For example, a
  147. /// daily quota or a custom quota that was exceeded.
  148. struct Violation: Sendable {
  149. // SwiftProtobuf.Message conformance is added in an extension below. See the
  150. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  151. // methods supported on all messages.
  152. /// The subject on which the quota check failed.
  153. /// For example, "clientip:<ip address of client>" or "project:<Google
  154. /// developer project id>".
  155. var subject: String = String()
  156. /// A description of how the quota check failed. Clients can use this
  157. /// description to find more about the quota configuration in the service's
  158. /// public documentation, or find the relevant quota limit to adjust through
  159. /// developer console.
  160. ///
  161. /// For example: "Service disabled" or "Daily Limit for read operations
  162. /// exceeded".
  163. var description_p: String = String()
  164. var unknownFields = SwiftProtobuf.UnknownStorage()
  165. init() {}
  166. }
  167. init() {}
  168. }
  169. /// Describes what preconditions have failed.
  170. ///
  171. /// For example, if an RPC failed because it required the Terms of Service to be
  172. /// acknowledged, it could list the terms of service violation in the
  173. /// PreconditionFailure message.
  174. struct Google_Rpc_PreconditionFailure: Sendable {
  175. // SwiftProtobuf.Message conformance is added in an extension below. See the
  176. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  177. // methods supported on all messages.
  178. /// Describes all precondition violations.
  179. var violations: [Google_Rpc_PreconditionFailure.Violation] = []
  180. var unknownFields = SwiftProtobuf.UnknownStorage()
  181. /// A message type used to describe a single precondition failure.
  182. struct Violation: Sendable {
  183. // SwiftProtobuf.Message conformance is added in an extension below. See the
  184. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  185. // methods supported on all messages.
  186. /// The type of PreconditionFailure. We recommend using a service-specific
  187. /// enum type to define the supported precondition violation subjects. For
  188. /// example, "TOS" for "Terms of Service violation".
  189. var type: String = String()
  190. /// The subject, relative to the type, that failed.
  191. /// For example, "google.com/cloud" relative to the "TOS" type would indicate
  192. /// which terms of service is being referenced.
  193. var subject: String = String()
  194. /// A description of how the precondition failed. Developers can use this
  195. /// description to understand how to fix the failure.
  196. ///
  197. /// For example: "Terms of service not accepted".
  198. var description_p: String = String()
  199. var unknownFields = SwiftProtobuf.UnknownStorage()
  200. init() {}
  201. }
  202. init() {}
  203. }
  204. /// Describes violations in a client request. This error type focuses on the
  205. /// syntactic aspects of the request.
  206. struct Google_Rpc_BadRequest: Sendable {
  207. // SwiftProtobuf.Message conformance is added in an extension below. See the
  208. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  209. // methods supported on all messages.
  210. /// Describes all violations in a client request.
  211. var fieldViolations: [Google_Rpc_BadRequest.FieldViolation] = []
  212. var unknownFields = SwiftProtobuf.UnknownStorage()
  213. /// A message type used to describe a single bad request field.
  214. struct FieldViolation: Sendable {
  215. // SwiftProtobuf.Message conformance is added in an extension below. See the
  216. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  217. // methods supported on all messages.
  218. /// A path that leads to a field in the request body. The value will be a
  219. /// sequence of dot-separated identifiers that identify a protocol buffer
  220. /// field.
  221. ///
  222. /// Consider the following:
  223. ///
  224. /// message CreateContactRequest {
  225. /// message EmailAddress {
  226. /// enum Type {
  227. /// TYPE_UNSPECIFIED = 0;
  228. /// HOME = 1;
  229. /// WORK = 2;
  230. /// }
  231. ///
  232. /// optional string email = 1;
  233. /// repeated EmailType type = 2;
  234. /// }
  235. ///
  236. /// string full_name = 1;
  237. /// repeated EmailAddress email_addresses = 2;
  238. /// }
  239. ///
  240. /// In this example, in proto `field` could take one of the following values:
  241. ///
  242. /// * `full_name` for a violation in the `full_name` value
  243. /// * `email_addresses[1].email` for a violation in the `email` field of the
  244. /// first `email_addresses` message
  245. /// * `email_addresses[3].type[2]` for a violation in the second `type`
  246. /// value in the third `email_addresses` message.
  247. ///
  248. /// In JSON, the same values are represented as:
  249. ///
  250. /// * `fullName` for a violation in the `fullName` value
  251. /// * `emailAddresses[1].email` for a violation in the `email` field of the
  252. /// first `emailAddresses` message
  253. /// * `emailAddresses[3].type[2]` for a violation in the second `type`
  254. /// value in the third `emailAddresses` message.
  255. var field: String = String()
  256. /// A description of why the request element is bad.
  257. var description_p: String = String()
  258. var unknownFields = SwiftProtobuf.UnknownStorage()
  259. init() {}
  260. }
  261. init() {}
  262. }
  263. /// Contains metadata about the request that clients can attach when filing a bug
  264. /// or providing other forms of feedback.
  265. struct Google_Rpc_RequestInfo: Sendable {
  266. // SwiftProtobuf.Message conformance is added in an extension below. See the
  267. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  268. // methods supported on all messages.
  269. /// An opaque string that should only be interpreted by the service generating
  270. /// it. For example, it can be used to identify requests in the service's logs.
  271. var requestID: String = String()
  272. /// Any data that was used to serve this request. For example, an encrypted
  273. /// stack trace that can be sent back to the service provider for debugging.
  274. var servingData: String = String()
  275. var unknownFields = SwiftProtobuf.UnknownStorage()
  276. init() {}
  277. }
  278. /// Describes the resource that is being accessed.
  279. struct Google_Rpc_ResourceInfo: Sendable {
  280. // SwiftProtobuf.Message conformance is added in an extension below. See the
  281. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  282. // methods supported on all messages.
  283. /// A name for the type of resource being accessed, e.g. "sql table",
  284. /// "cloud storage bucket", "file", "Google calendar"; or the type URL
  285. /// of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
  286. var resourceType: String = String()
  287. /// The name of the resource being accessed. For example, a shared calendar
  288. /// name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
  289. /// error is
  290. /// [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
  291. var resourceName: String = String()
  292. /// The owner of the resource (optional).
  293. /// For example, "user:<owner email>" or "project:<Google developer project
  294. /// id>".
  295. var owner: String = String()
  296. /// Describes what error is encountered when accessing this resource.
  297. /// For example, updating a cloud project may require the `writer` permission
  298. /// on the developer console project.
  299. var description_p: String = String()
  300. var unknownFields = SwiftProtobuf.UnknownStorage()
  301. init() {}
  302. }
  303. /// Provides links to documentation or for performing an out of band action.
  304. ///
  305. /// For example, if a quota check failed with an error indicating the calling
  306. /// project hasn't enabled the accessed service, this can contain a URL pointing
  307. /// directly to the right place in the developer console to flip the bit.
  308. struct Google_Rpc_Help: Sendable {
  309. // SwiftProtobuf.Message conformance is added in an extension below. See the
  310. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  311. // methods supported on all messages.
  312. /// URL(s) pointing to additional information on handling the current error.
  313. var links: [Google_Rpc_Help.Link] = []
  314. var unknownFields = SwiftProtobuf.UnknownStorage()
  315. /// Describes a URL link.
  316. struct Link: Sendable {
  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. /// Describes what the link offers.
  321. var description_p: String = String()
  322. /// The URL of the link.
  323. var url: String = String()
  324. var unknownFields = SwiftProtobuf.UnknownStorage()
  325. init() {}
  326. }
  327. init() {}
  328. }
  329. /// Provides a localized error message that is safe to return to the user
  330. /// which can be attached to an RPC error.
  331. struct Google_Rpc_LocalizedMessage: Sendable {
  332. // SwiftProtobuf.Message conformance is added in an extension below. See the
  333. // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
  334. // methods supported on all messages.
  335. /// The locale used following the specification defined at
  336. /// https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
  337. /// Examples are: "en-US", "fr-CH", "es-MX"
  338. var locale: String = String()
  339. /// The localized error message in the above locale.
  340. var message: String = String()
  341. var unknownFields = SwiftProtobuf.UnknownStorage()
  342. init() {}
  343. }
  344. // MARK: - Code below here is support for the SwiftProtobuf runtime.
  345. fileprivate let _protobuf_package = "google.rpc"
  346. extension Google_Rpc_ErrorInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  347. static let protoMessageName: String = _protobuf_package + ".ErrorInfo"
  348. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  349. 1: .same(proto: "reason"),
  350. 2: .same(proto: "domain"),
  351. 3: .same(proto: "metadata"),
  352. ]
  353. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  354. while let fieldNumber = try decoder.nextFieldNumber() {
  355. // The use of inline closures is to circumvent an issue where the compiler
  356. // allocates stack space for every case branch when no optimizations are
  357. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  358. switch fieldNumber {
  359. case 1: try { try decoder.decodeSingularStringField(value: &self.reason) }()
  360. case 2: try { try decoder.decodeSingularStringField(value: &self.domain) }()
  361. case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: &self.metadata) }()
  362. default: break
  363. }
  364. }
  365. }
  366. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  367. if !self.reason.isEmpty {
  368. try visitor.visitSingularStringField(value: self.reason, fieldNumber: 1)
  369. }
  370. if !self.domain.isEmpty {
  371. try visitor.visitSingularStringField(value: self.domain, fieldNumber: 2)
  372. }
  373. if !self.metadata.isEmpty {
  374. try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufString>.self, value: self.metadata, fieldNumber: 3)
  375. }
  376. try unknownFields.traverse(visitor: &visitor)
  377. }
  378. static func ==(lhs: Google_Rpc_ErrorInfo, rhs: Google_Rpc_ErrorInfo) -> Bool {
  379. if lhs.reason != rhs.reason {return false}
  380. if lhs.domain != rhs.domain {return false}
  381. if lhs.metadata != rhs.metadata {return false}
  382. if lhs.unknownFields != rhs.unknownFields {return false}
  383. return true
  384. }
  385. }
  386. extension Google_Rpc_RetryInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  387. static let protoMessageName: String = _protobuf_package + ".RetryInfo"
  388. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  389. 1: .standard(proto: "retry_delay"),
  390. ]
  391. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  392. while let fieldNumber = try decoder.nextFieldNumber() {
  393. // The use of inline closures is to circumvent an issue where the compiler
  394. // allocates stack space for every case branch when no optimizations are
  395. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  396. switch fieldNumber {
  397. case 1: try { try decoder.decodeSingularMessageField(value: &self._retryDelay) }()
  398. default: break
  399. }
  400. }
  401. }
  402. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  403. // The use of inline closures is to circumvent an issue where the compiler
  404. // allocates stack space for every if/case branch local when no optimizations
  405. // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
  406. // https://github.com/apple/swift-protobuf/issues/1182
  407. try { if let v = self._retryDelay {
  408. try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
  409. } }()
  410. try unknownFields.traverse(visitor: &visitor)
  411. }
  412. static func ==(lhs: Google_Rpc_RetryInfo, rhs: Google_Rpc_RetryInfo) -> Bool {
  413. if lhs._retryDelay != rhs._retryDelay {return false}
  414. if lhs.unknownFields != rhs.unknownFields {return false}
  415. return true
  416. }
  417. }
  418. extension Google_Rpc_DebugInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  419. static let protoMessageName: String = _protobuf_package + ".DebugInfo"
  420. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  421. 1: .standard(proto: "stack_entries"),
  422. 2: .same(proto: "detail"),
  423. ]
  424. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  425. while let fieldNumber = try decoder.nextFieldNumber() {
  426. // The use of inline closures is to circumvent an issue where the compiler
  427. // allocates stack space for every case branch when no optimizations are
  428. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  429. switch fieldNumber {
  430. case 1: try { try decoder.decodeRepeatedStringField(value: &self.stackEntries) }()
  431. case 2: try { try decoder.decodeSingularStringField(value: &self.detail) }()
  432. default: break
  433. }
  434. }
  435. }
  436. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  437. if !self.stackEntries.isEmpty {
  438. try visitor.visitRepeatedStringField(value: self.stackEntries, fieldNumber: 1)
  439. }
  440. if !self.detail.isEmpty {
  441. try visitor.visitSingularStringField(value: self.detail, fieldNumber: 2)
  442. }
  443. try unknownFields.traverse(visitor: &visitor)
  444. }
  445. static func ==(lhs: Google_Rpc_DebugInfo, rhs: Google_Rpc_DebugInfo) -> Bool {
  446. if lhs.stackEntries != rhs.stackEntries {return false}
  447. if lhs.detail != rhs.detail {return false}
  448. if lhs.unknownFields != rhs.unknownFields {return false}
  449. return true
  450. }
  451. }
  452. extension Google_Rpc_QuotaFailure: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  453. static let protoMessageName: String = _protobuf_package + ".QuotaFailure"
  454. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  455. 1: .same(proto: "violations"),
  456. ]
  457. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  458. while let fieldNumber = try decoder.nextFieldNumber() {
  459. // The use of inline closures is to circumvent an issue where the compiler
  460. // allocates stack space for every case branch when no optimizations are
  461. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  462. switch fieldNumber {
  463. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.violations) }()
  464. default: break
  465. }
  466. }
  467. }
  468. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  469. if !self.violations.isEmpty {
  470. try visitor.visitRepeatedMessageField(value: self.violations, fieldNumber: 1)
  471. }
  472. try unknownFields.traverse(visitor: &visitor)
  473. }
  474. static func ==(lhs: Google_Rpc_QuotaFailure, rhs: Google_Rpc_QuotaFailure) -> Bool {
  475. if lhs.violations != rhs.violations {return false}
  476. if lhs.unknownFields != rhs.unknownFields {return false}
  477. return true
  478. }
  479. }
  480. extension Google_Rpc_QuotaFailure.Violation: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  481. static let protoMessageName: String = Google_Rpc_QuotaFailure.protoMessageName + ".Violation"
  482. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  483. 1: .same(proto: "subject"),
  484. 2: .same(proto: "description"),
  485. ]
  486. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  487. while let fieldNumber = try decoder.nextFieldNumber() {
  488. // The use of inline closures is to circumvent an issue where the compiler
  489. // allocates stack space for every case branch when no optimizations are
  490. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  491. switch fieldNumber {
  492. case 1: try { try decoder.decodeSingularStringField(value: &self.subject) }()
  493. case 2: try { try decoder.decodeSingularStringField(value: &self.description_p) }()
  494. default: break
  495. }
  496. }
  497. }
  498. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  499. if !self.subject.isEmpty {
  500. try visitor.visitSingularStringField(value: self.subject, fieldNumber: 1)
  501. }
  502. if !self.description_p.isEmpty {
  503. try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2)
  504. }
  505. try unknownFields.traverse(visitor: &visitor)
  506. }
  507. static func ==(lhs: Google_Rpc_QuotaFailure.Violation, rhs: Google_Rpc_QuotaFailure.Violation) -> Bool {
  508. if lhs.subject != rhs.subject {return false}
  509. if lhs.description_p != rhs.description_p {return false}
  510. if lhs.unknownFields != rhs.unknownFields {return false}
  511. return true
  512. }
  513. }
  514. extension Google_Rpc_PreconditionFailure: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  515. static let protoMessageName: String = _protobuf_package + ".PreconditionFailure"
  516. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  517. 1: .same(proto: "violations"),
  518. ]
  519. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  520. while let fieldNumber = try decoder.nextFieldNumber() {
  521. // The use of inline closures is to circumvent an issue where the compiler
  522. // allocates stack space for every case branch when no optimizations are
  523. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  524. switch fieldNumber {
  525. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.violations) }()
  526. default: break
  527. }
  528. }
  529. }
  530. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  531. if !self.violations.isEmpty {
  532. try visitor.visitRepeatedMessageField(value: self.violations, fieldNumber: 1)
  533. }
  534. try unknownFields.traverse(visitor: &visitor)
  535. }
  536. static func ==(lhs: Google_Rpc_PreconditionFailure, rhs: Google_Rpc_PreconditionFailure) -> Bool {
  537. if lhs.violations != rhs.violations {return false}
  538. if lhs.unknownFields != rhs.unknownFields {return false}
  539. return true
  540. }
  541. }
  542. extension Google_Rpc_PreconditionFailure.Violation: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  543. static let protoMessageName: String = Google_Rpc_PreconditionFailure.protoMessageName + ".Violation"
  544. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  545. 1: .same(proto: "type"),
  546. 2: .same(proto: "subject"),
  547. 3: .same(proto: "description"),
  548. ]
  549. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  550. while let fieldNumber = try decoder.nextFieldNumber() {
  551. // The use of inline closures is to circumvent an issue where the compiler
  552. // allocates stack space for every case branch when no optimizations are
  553. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  554. switch fieldNumber {
  555. case 1: try { try decoder.decodeSingularStringField(value: &self.type) }()
  556. case 2: try { try decoder.decodeSingularStringField(value: &self.subject) }()
  557. case 3: try { try decoder.decodeSingularStringField(value: &self.description_p) }()
  558. default: break
  559. }
  560. }
  561. }
  562. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  563. if !self.type.isEmpty {
  564. try visitor.visitSingularStringField(value: self.type, fieldNumber: 1)
  565. }
  566. if !self.subject.isEmpty {
  567. try visitor.visitSingularStringField(value: self.subject, fieldNumber: 2)
  568. }
  569. if !self.description_p.isEmpty {
  570. try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 3)
  571. }
  572. try unknownFields.traverse(visitor: &visitor)
  573. }
  574. static func ==(lhs: Google_Rpc_PreconditionFailure.Violation, rhs: Google_Rpc_PreconditionFailure.Violation) -> Bool {
  575. if lhs.type != rhs.type {return false}
  576. if lhs.subject != rhs.subject {return false}
  577. if lhs.description_p != rhs.description_p {return false}
  578. if lhs.unknownFields != rhs.unknownFields {return false}
  579. return true
  580. }
  581. }
  582. extension Google_Rpc_BadRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  583. static let protoMessageName: String = _protobuf_package + ".BadRequest"
  584. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  585. 1: .standard(proto: "field_violations"),
  586. ]
  587. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  588. while let fieldNumber = try decoder.nextFieldNumber() {
  589. // The use of inline closures is to circumvent an issue where the compiler
  590. // allocates stack space for every case branch when no optimizations are
  591. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  592. switch fieldNumber {
  593. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.fieldViolations) }()
  594. default: break
  595. }
  596. }
  597. }
  598. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  599. if !self.fieldViolations.isEmpty {
  600. try visitor.visitRepeatedMessageField(value: self.fieldViolations, fieldNumber: 1)
  601. }
  602. try unknownFields.traverse(visitor: &visitor)
  603. }
  604. static func ==(lhs: Google_Rpc_BadRequest, rhs: Google_Rpc_BadRequest) -> Bool {
  605. if lhs.fieldViolations != rhs.fieldViolations {return false}
  606. if lhs.unknownFields != rhs.unknownFields {return false}
  607. return true
  608. }
  609. }
  610. extension Google_Rpc_BadRequest.FieldViolation: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  611. static let protoMessageName: String = Google_Rpc_BadRequest.protoMessageName + ".FieldViolation"
  612. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  613. 1: .same(proto: "field"),
  614. 2: .same(proto: "description"),
  615. ]
  616. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  617. while let fieldNumber = try decoder.nextFieldNumber() {
  618. // The use of inline closures is to circumvent an issue where the compiler
  619. // allocates stack space for every case branch when no optimizations are
  620. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  621. switch fieldNumber {
  622. case 1: try { try decoder.decodeSingularStringField(value: &self.field) }()
  623. case 2: try { try decoder.decodeSingularStringField(value: &self.description_p) }()
  624. default: break
  625. }
  626. }
  627. }
  628. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  629. if !self.field.isEmpty {
  630. try visitor.visitSingularStringField(value: self.field, fieldNumber: 1)
  631. }
  632. if !self.description_p.isEmpty {
  633. try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2)
  634. }
  635. try unknownFields.traverse(visitor: &visitor)
  636. }
  637. static func ==(lhs: Google_Rpc_BadRequest.FieldViolation, rhs: Google_Rpc_BadRequest.FieldViolation) -> Bool {
  638. if lhs.field != rhs.field {return false}
  639. if lhs.description_p != rhs.description_p {return false}
  640. if lhs.unknownFields != rhs.unknownFields {return false}
  641. return true
  642. }
  643. }
  644. extension Google_Rpc_RequestInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  645. static let protoMessageName: String = _protobuf_package + ".RequestInfo"
  646. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  647. 1: .standard(proto: "request_id"),
  648. 2: .standard(proto: "serving_data"),
  649. ]
  650. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  651. while let fieldNumber = try decoder.nextFieldNumber() {
  652. // The use of inline closures is to circumvent an issue where the compiler
  653. // allocates stack space for every case branch when no optimizations are
  654. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  655. switch fieldNumber {
  656. case 1: try { try decoder.decodeSingularStringField(value: &self.requestID) }()
  657. case 2: try { try decoder.decodeSingularStringField(value: &self.servingData) }()
  658. default: break
  659. }
  660. }
  661. }
  662. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  663. if !self.requestID.isEmpty {
  664. try visitor.visitSingularStringField(value: self.requestID, fieldNumber: 1)
  665. }
  666. if !self.servingData.isEmpty {
  667. try visitor.visitSingularStringField(value: self.servingData, fieldNumber: 2)
  668. }
  669. try unknownFields.traverse(visitor: &visitor)
  670. }
  671. static func ==(lhs: Google_Rpc_RequestInfo, rhs: Google_Rpc_RequestInfo) -> Bool {
  672. if lhs.requestID != rhs.requestID {return false}
  673. if lhs.servingData != rhs.servingData {return false}
  674. if lhs.unknownFields != rhs.unknownFields {return false}
  675. return true
  676. }
  677. }
  678. extension Google_Rpc_ResourceInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  679. static let protoMessageName: String = _protobuf_package + ".ResourceInfo"
  680. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  681. 1: .standard(proto: "resource_type"),
  682. 2: .standard(proto: "resource_name"),
  683. 3: .same(proto: "owner"),
  684. 4: .same(proto: "description"),
  685. ]
  686. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  687. while let fieldNumber = try decoder.nextFieldNumber() {
  688. // The use of inline closures is to circumvent an issue where the compiler
  689. // allocates stack space for every case branch when no optimizations are
  690. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  691. switch fieldNumber {
  692. case 1: try { try decoder.decodeSingularStringField(value: &self.resourceType) }()
  693. case 2: try { try decoder.decodeSingularStringField(value: &self.resourceName) }()
  694. case 3: try { try decoder.decodeSingularStringField(value: &self.owner) }()
  695. case 4: try { try decoder.decodeSingularStringField(value: &self.description_p) }()
  696. default: break
  697. }
  698. }
  699. }
  700. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  701. if !self.resourceType.isEmpty {
  702. try visitor.visitSingularStringField(value: self.resourceType, fieldNumber: 1)
  703. }
  704. if !self.resourceName.isEmpty {
  705. try visitor.visitSingularStringField(value: self.resourceName, fieldNumber: 2)
  706. }
  707. if !self.owner.isEmpty {
  708. try visitor.visitSingularStringField(value: self.owner, fieldNumber: 3)
  709. }
  710. if !self.description_p.isEmpty {
  711. try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 4)
  712. }
  713. try unknownFields.traverse(visitor: &visitor)
  714. }
  715. static func ==(lhs: Google_Rpc_ResourceInfo, rhs: Google_Rpc_ResourceInfo) -> Bool {
  716. if lhs.resourceType != rhs.resourceType {return false}
  717. if lhs.resourceName != rhs.resourceName {return false}
  718. if lhs.owner != rhs.owner {return false}
  719. if lhs.description_p != rhs.description_p {return false}
  720. if lhs.unknownFields != rhs.unknownFields {return false}
  721. return true
  722. }
  723. }
  724. extension Google_Rpc_Help: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  725. static let protoMessageName: String = _protobuf_package + ".Help"
  726. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  727. 1: .same(proto: "links"),
  728. ]
  729. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  730. while let fieldNumber = try decoder.nextFieldNumber() {
  731. // The use of inline closures is to circumvent an issue where the compiler
  732. // allocates stack space for every case branch when no optimizations are
  733. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  734. switch fieldNumber {
  735. case 1: try { try decoder.decodeRepeatedMessageField(value: &self.links) }()
  736. default: break
  737. }
  738. }
  739. }
  740. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  741. if !self.links.isEmpty {
  742. try visitor.visitRepeatedMessageField(value: self.links, fieldNumber: 1)
  743. }
  744. try unknownFields.traverse(visitor: &visitor)
  745. }
  746. static func ==(lhs: Google_Rpc_Help, rhs: Google_Rpc_Help) -> Bool {
  747. if lhs.links != rhs.links {return false}
  748. if lhs.unknownFields != rhs.unknownFields {return false}
  749. return true
  750. }
  751. }
  752. extension Google_Rpc_Help.Link: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  753. static let protoMessageName: String = Google_Rpc_Help.protoMessageName + ".Link"
  754. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  755. 1: .same(proto: "description"),
  756. 2: .same(proto: "url"),
  757. ]
  758. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  759. while let fieldNumber = try decoder.nextFieldNumber() {
  760. // The use of inline closures is to circumvent an issue where the compiler
  761. // allocates stack space for every case branch when no optimizations are
  762. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  763. switch fieldNumber {
  764. case 1: try { try decoder.decodeSingularStringField(value: &self.description_p) }()
  765. case 2: try { try decoder.decodeSingularStringField(value: &self.url) }()
  766. default: break
  767. }
  768. }
  769. }
  770. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  771. if !self.description_p.isEmpty {
  772. try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 1)
  773. }
  774. if !self.url.isEmpty {
  775. try visitor.visitSingularStringField(value: self.url, fieldNumber: 2)
  776. }
  777. try unknownFields.traverse(visitor: &visitor)
  778. }
  779. static func ==(lhs: Google_Rpc_Help.Link, rhs: Google_Rpc_Help.Link) -> Bool {
  780. if lhs.description_p != rhs.description_p {return false}
  781. if lhs.url != rhs.url {return false}
  782. if lhs.unknownFields != rhs.unknownFields {return false}
  783. return true
  784. }
  785. }
  786. extension Google_Rpc_LocalizedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  787. static let protoMessageName: String = _protobuf_package + ".LocalizedMessage"
  788. static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
  789. 1: .same(proto: "locale"),
  790. 2: .same(proto: "message"),
  791. ]
  792. mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
  793. while let fieldNumber = try decoder.nextFieldNumber() {
  794. // The use of inline closures is to circumvent an issue where the compiler
  795. // allocates stack space for every case branch when no optimizations are
  796. // enabled. https://github.com/apple/swift-protobuf/issues/1034
  797. switch fieldNumber {
  798. case 1: try { try decoder.decodeSingularStringField(value: &self.locale) }()
  799. case 2: try { try decoder.decodeSingularStringField(value: &self.message) }()
  800. default: break
  801. }
  802. }
  803. }
  804. func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
  805. if !self.locale.isEmpty {
  806. try visitor.visitSingularStringField(value: self.locale, fieldNumber: 1)
  807. }
  808. if !self.message.isEmpty {
  809. try visitor.visitSingularStringField(value: self.message, fieldNumber: 2)
  810. }
  811. try unknownFields.traverse(visitor: &visitor)
  812. }
  813. static func ==(lhs: Google_Rpc_LocalizedMessage, rhs: Google_Rpc_LocalizedMessage) -> Bool {
  814. if lhs.locale != rhs.locale {return false}
  815. if lhs.message != rhs.message {return false}
  816. if lhs.unknownFields != rhs.unknownFields {return false}
  817. return true
  818. }
  819. }