// DO NOT EDIT. // swift-format-ignore-file // swiftlint:disable all // // Generated by the Swift generator plugin for the protocol buffer compiler. // Source: error_details.proto // // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ // Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. internal import SwiftProtobuf // If the compiler emits an error on this type, it is because this file // was generated by a version of the `protoc` Swift plug-in that is // incompatible with the version of SwiftProtobuf to which you are linking. // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} typealias Version = _2 } /// Describes the cause of the error with structured details. /// /// Example of an error when contacting the "pubsub.googleapis.com" API when it /// is not enabled: /// /// { "reason": "API_DISABLED" /// "domain": "googleapis.com" /// "metadata": { /// "resource": "projects/123", /// "service": "pubsub.googleapis.com" /// } /// } /// /// This response indicates that the pubsub.googleapis.com API is not enabled. /// /// Example of an error that is returned when attempting to create a Spanner /// instance in a region that is out of stock: /// /// { "reason": "STOCKOUT" /// "domain": "spanner.googleapis.com", /// "metadata": { /// "availableRegions": "us-central1,us-east2" /// } /// } struct Google_Rpc_ErrorInfo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// The reason of the error. This is a constant value that identifies the /// proximate cause of the error. Error reasons are unique within a particular /// domain of errors. This should be at most 63 characters and match a /// regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents /// UPPER_SNAKE_CASE. var reason: String = String() /// The logical grouping to which the "reason" belongs. The error domain /// is typically the registered service name of the tool or product that /// generates the error. Example: "pubsub.googleapis.com". If the error is /// generated by some common infrastructure, the error domain must be a /// globally unique value that identifies the infrastructure. For Google API /// infrastructure, the error domain is "googleapis.com". var domain: String = String() /// Additional structured details about this error. /// /// Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in /// length. When identifying the current value of an exceeded limit, the units /// should be contained in the key, not the value. For example, rather than /// {"instanceLimit": "100/request"}, should be returned as, /// {"instanceLimitPerRequest": "100"}, if the client exceeds the number of /// instances that can be created in a single (batch) request. var metadata: Dictionary = [:] var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } /// Describes when the clients can retry a failed request. Clients could ignore /// the recommendation here or retry when this information is missing from error /// responses. /// /// It's always recommended that clients should use exponential backoff when /// retrying. /// /// Clients should wait until `retry_delay` amount of time has passed since /// receiving the error response before retrying. If retrying requests also /// fail, clients should use an exponential backoff scheme to gradually increase /// the delay between retries based on `retry_delay`, until either a maximum /// number of retries have been reached or a maximum retry delay cap has been /// reached. struct Google_Rpc_RetryInfo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Clients should wait at least this long between retrying the same request. var retryDelay: SwiftProtobuf.Google_Protobuf_Duration { get {return _retryDelay ?? SwiftProtobuf.Google_Protobuf_Duration()} set {_retryDelay = newValue} } /// Returns true if `retryDelay` has been explicitly set. var hasRetryDelay: Bool {return self._retryDelay != nil} /// Clears the value of `retryDelay`. Subsequent reads from it will return its default value. mutating func clearRetryDelay() {self._retryDelay = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _retryDelay: SwiftProtobuf.Google_Protobuf_Duration? = nil } /// Describes additional debugging info. struct Google_Rpc_DebugInfo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// The stack trace entries indicating where the error occurred. var stackEntries: [String] = [] /// Additional debugging information provided by the server. var detail: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } /// Describes how a quota check failed. /// /// For example if a daily limit was exceeded for the calling project, /// a service could respond with a QuotaFailure detail containing the project /// id and the description of the quota limit that was exceeded. If the /// calling project hasn't enabled the service in the developer console, then /// a service could respond with the project id and set `service_disabled` /// to true. /// /// Also see RetryInfo and Help types for other details about handling a /// quota failure. struct Google_Rpc_QuotaFailure: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Describes all quota violations. var violations: [Google_Rpc_QuotaFailure.Violation] = [] var unknownFields = SwiftProtobuf.UnknownStorage() /// A message type used to describe a single quota violation. For example, a /// daily quota or a custom quota that was exceeded. struct Violation: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// The subject on which the quota check failed. /// For example, "clientip:" or "project:". var subject: String = String() /// A description of how the quota check failed. Clients can use this /// description to find more about the quota configuration in the service's /// public documentation, or find the relevant quota limit to adjust through /// developer console. /// /// For example: "Service disabled" or "Daily Limit for read operations /// exceeded". var description_p: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } init() {} } /// Describes what preconditions have failed. /// /// For example, if an RPC failed because it required the Terms of Service to be /// acknowledged, it could list the terms of service violation in the /// PreconditionFailure message. struct Google_Rpc_PreconditionFailure: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Describes all precondition violations. var violations: [Google_Rpc_PreconditionFailure.Violation] = [] var unknownFields = SwiftProtobuf.UnknownStorage() /// A message type used to describe a single precondition failure. struct Violation: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// The type of PreconditionFailure. We recommend using a service-specific /// enum type to define the supported precondition violation subjects. For /// example, "TOS" for "Terms of Service violation". var type: String = String() /// The subject, relative to the type, that failed. /// For example, "google.com/cloud" relative to the "TOS" type would indicate /// which terms of service is being referenced. var subject: String = String() /// A description of how the precondition failed. Developers can use this /// description to understand how to fix the failure. /// /// For example: "Terms of service not accepted". var description_p: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } init() {} } /// Describes violations in a client request. This error type focuses on the /// syntactic aspects of the request. struct Google_Rpc_BadRequest: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Describes all violations in a client request. var fieldViolations: [Google_Rpc_BadRequest.FieldViolation] = [] var unknownFields = SwiftProtobuf.UnknownStorage() /// A message type used to describe a single bad request field. struct FieldViolation: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// A path that leads to a field in the request body. The value will be a /// sequence of dot-separated identifiers that identify a protocol buffer /// field. /// /// Consider the following: /// /// message CreateContactRequest { /// message EmailAddress { /// enum Type { /// TYPE_UNSPECIFIED = 0; /// HOME = 1; /// WORK = 2; /// } /// /// optional string email = 1; /// repeated EmailType type = 2; /// } /// /// string full_name = 1; /// repeated EmailAddress email_addresses = 2; /// } /// /// In this example, in proto `field` could take one of the following values: /// /// * `full_name` for a violation in the `full_name` value /// * `email_addresses[1].email` for a violation in the `email` field of the /// first `email_addresses` message /// * `email_addresses[3].type[2]` for a violation in the second `type` /// value in the third `email_addresses` message. /// /// In JSON, the same values are represented as: /// /// * `fullName` for a violation in the `fullName` value /// * `emailAddresses[1].email` for a violation in the `email` field of the /// first `emailAddresses` message /// * `emailAddresses[3].type[2]` for a violation in the second `type` /// value in the third `emailAddresses` message. var field: String = String() /// A description of why the request element is bad. var description_p: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } init() {} } /// Contains metadata about the request that clients can attach when filing a bug /// or providing other forms of feedback. struct Google_Rpc_RequestInfo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// An opaque string that should only be interpreted by the service generating /// it. For example, it can be used to identify requests in the service's logs. var requestID: String = String() /// Any data that was used to serve this request. For example, an encrypted /// stack trace that can be sent back to the service provider for debugging. var servingData: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } /// Describes the resource that is being accessed. struct Google_Rpc_ResourceInfo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// A name for the type of resource being accessed, e.g. "sql table", /// "cloud storage bucket", "file", "Google calendar"; or the type URL /// of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". var resourceType: String = String() /// The name of the resource being accessed. For example, a shared calendar /// name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current /// error is /// [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. var resourceName: String = String() /// The owner of the resource (optional). /// For example, "user:" or "project:". var owner: String = String() /// Describes what error is encountered when accessing this resource. /// For example, updating a cloud project may require the `writer` permission /// on the developer console project. var description_p: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } /// Provides links to documentation or for performing an out of band action. /// /// For example, if a quota check failed with an error indicating the calling /// project hasn't enabled the accessed service, this can contain a URL pointing /// directly to the right place in the developer console to flip the bit. struct Google_Rpc_Help: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// URL(s) pointing to additional information on handling the current error. var links: [Google_Rpc_Help.Link] = [] var unknownFields = SwiftProtobuf.UnknownStorage() /// Describes a URL link. struct Link: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// Describes what the link offers. var description_p: String = String() /// The URL of the link. var url: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } init() {} } /// Provides a localized error message that is safe to return to the user /// which can be attached to an RPC error. struct Google_Rpc_LocalizedMessage: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// The locale used following the specification defined at /// https://www.rfc-editor.org/rfc/bcp/bcp47.txt. /// Examples are: "en-US", "fr-CH", "es-MX" var locale: String = String() /// The localized error message in the above locale. var message: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() init() {} } // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "google.rpc" extension Google_Rpc_ErrorInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ErrorInfo" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "reason"), 2: .same(proto: "domain"), 3: .same(proto: "metadata"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.reason) }() case 2: try { try decoder.decodeSingularStringField(value: &self.domain) }() case 3: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: &self.metadata) }() default: break } } } func traverse(visitor: inout V) throws { if !self.reason.isEmpty { try visitor.visitSingularStringField(value: self.reason, fieldNumber: 1) } if !self.domain.isEmpty { try visitor.visitSingularStringField(value: self.domain, fieldNumber: 2) } if !self.metadata.isEmpty { try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap.self, value: self.metadata, fieldNumber: 3) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_ErrorInfo, rhs: Google_Rpc_ErrorInfo) -> Bool { if lhs.reason != rhs.reason {return false} if lhs.domain != rhs.domain {return false} if lhs.metadata != rhs.metadata {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_RetryInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".RetryInfo" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "retry_delay"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularMessageField(value: &self._retryDelay) }() default: break } } } func traverse(visitor: inout V) throws { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 try { if let v = self._retryDelay { try visitor.visitSingularMessageField(value: v, fieldNumber: 1) } }() try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_RetryInfo, rhs: Google_Rpc_RetryInfo) -> Bool { if lhs._retryDelay != rhs._retryDelay {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_DebugInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".DebugInfo" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "stack_entries"), 2: .same(proto: "detail"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeRepeatedStringField(value: &self.stackEntries) }() case 2: try { try decoder.decodeSingularStringField(value: &self.detail) }() default: break } } } func traverse(visitor: inout V) throws { if !self.stackEntries.isEmpty { try visitor.visitRepeatedStringField(value: self.stackEntries, fieldNumber: 1) } if !self.detail.isEmpty { try visitor.visitSingularStringField(value: self.detail, fieldNumber: 2) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_DebugInfo, rhs: Google_Rpc_DebugInfo) -> Bool { if lhs.stackEntries != rhs.stackEntries {return false} if lhs.detail != rhs.detail {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_QuotaFailure: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".QuotaFailure" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "violations"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeRepeatedMessageField(value: &self.violations) }() default: break } } } func traverse(visitor: inout V) throws { if !self.violations.isEmpty { try visitor.visitRepeatedMessageField(value: self.violations, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_QuotaFailure, rhs: Google_Rpc_QuotaFailure) -> Bool { if lhs.violations != rhs.violations {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_QuotaFailure.Violation: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Google_Rpc_QuotaFailure.protoMessageName + ".Violation" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "subject"), 2: .same(proto: "description"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.subject) }() case 2: try { try decoder.decodeSingularStringField(value: &self.description_p) }() default: break } } } func traverse(visitor: inout V) throws { if !self.subject.isEmpty { try visitor.visitSingularStringField(value: self.subject, fieldNumber: 1) } if !self.description_p.isEmpty { try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_QuotaFailure.Violation, rhs: Google_Rpc_QuotaFailure.Violation) -> Bool { if lhs.subject != rhs.subject {return false} if lhs.description_p != rhs.description_p {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_PreconditionFailure: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".PreconditionFailure" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "violations"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeRepeatedMessageField(value: &self.violations) }() default: break } } } func traverse(visitor: inout V) throws { if !self.violations.isEmpty { try visitor.visitRepeatedMessageField(value: self.violations, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_PreconditionFailure, rhs: Google_Rpc_PreconditionFailure) -> Bool { if lhs.violations != rhs.violations {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_PreconditionFailure.Violation: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Google_Rpc_PreconditionFailure.protoMessageName + ".Violation" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "type"), 2: .same(proto: "subject"), 3: .same(proto: "description"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.type) }() case 2: try { try decoder.decodeSingularStringField(value: &self.subject) }() case 3: try { try decoder.decodeSingularStringField(value: &self.description_p) }() default: break } } } func traverse(visitor: inout V) throws { if !self.type.isEmpty { try visitor.visitSingularStringField(value: self.type, fieldNumber: 1) } if !self.subject.isEmpty { try visitor.visitSingularStringField(value: self.subject, fieldNumber: 2) } if !self.description_p.isEmpty { try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 3) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_PreconditionFailure.Violation, rhs: Google_Rpc_PreconditionFailure.Violation) -> Bool { if lhs.type != rhs.type {return false} if lhs.subject != rhs.subject {return false} if lhs.description_p != rhs.description_p {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_BadRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".BadRequest" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "field_violations"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeRepeatedMessageField(value: &self.fieldViolations) }() default: break } } } func traverse(visitor: inout V) throws { if !self.fieldViolations.isEmpty { try visitor.visitRepeatedMessageField(value: self.fieldViolations, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_BadRequest, rhs: Google_Rpc_BadRequest) -> Bool { if lhs.fieldViolations != rhs.fieldViolations {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_BadRequest.FieldViolation: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Google_Rpc_BadRequest.protoMessageName + ".FieldViolation" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "field"), 2: .same(proto: "description"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.field) }() case 2: try { try decoder.decodeSingularStringField(value: &self.description_p) }() default: break } } } func traverse(visitor: inout V) throws { if !self.field.isEmpty { try visitor.visitSingularStringField(value: self.field, fieldNumber: 1) } if !self.description_p.isEmpty { try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_BadRequest.FieldViolation, rhs: Google_Rpc_BadRequest.FieldViolation) -> Bool { if lhs.field != rhs.field {return false} if lhs.description_p != rhs.description_p {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_RequestInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".RequestInfo" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "request_id"), 2: .standard(proto: "serving_data"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.requestID) }() case 2: try { try decoder.decodeSingularStringField(value: &self.servingData) }() default: break } } } func traverse(visitor: inout V) throws { if !self.requestID.isEmpty { try visitor.visitSingularStringField(value: self.requestID, fieldNumber: 1) } if !self.servingData.isEmpty { try visitor.visitSingularStringField(value: self.servingData, fieldNumber: 2) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_RequestInfo, rhs: Google_Rpc_RequestInfo) -> Bool { if lhs.requestID != rhs.requestID {return false} if lhs.servingData != rhs.servingData {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_ResourceInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ResourceInfo" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "resource_type"), 2: .standard(proto: "resource_name"), 3: .same(proto: "owner"), 4: .same(proto: "description"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.resourceType) }() case 2: try { try decoder.decodeSingularStringField(value: &self.resourceName) }() case 3: try { try decoder.decodeSingularStringField(value: &self.owner) }() case 4: try { try decoder.decodeSingularStringField(value: &self.description_p) }() default: break } } } func traverse(visitor: inout V) throws { if !self.resourceType.isEmpty { try visitor.visitSingularStringField(value: self.resourceType, fieldNumber: 1) } if !self.resourceName.isEmpty { try visitor.visitSingularStringField(value: self.resourceName, fieldNumber: 2) } if !self.owner.isEmpty { try visitor.visitSingularStringField(value: self.owner, fieldNumber: 3) } if !self.description_p.isEmpty { try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 4) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_ResourceInfo, rhs: Google_Rpc_ResourceInfo) -> Bool { if lhs.resourceType != rhs.resourceType {return false} if lhs.resourceName != rhs.resourceName {return false} if lhs.owner != rhs.owner {return false} if lhs.description_p != rhs.description_p {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_Help: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Help" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "links"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeRepeatedMessageField(value: &self.links) }() default: break } } } func traverse(visitor: inout V) throws { if !self.links.isEmpty { try visitor.visitRepeatedMessageField(value: self.links, fieldNumber: 1) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_Help, rhs: Google_Rpc_Help) -> Bool { if lhs.links != rhs.links {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_Help.Link: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Google_Rpc_Help.protoMessageName + ".Link" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "description"), 2: .same(proto: "url"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.description_p) }() case 2: try { try decoder.decodeSingularStringField(value: &self.url) }() default: break } } } func traverse(visitor: inout V) throws { if !self.description_p.isEmpty { try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 1) } if !self.url.isEmpty { try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_Help.Link, rhs: Google_Rpc_Help.Link) -> Bool { if lhs.description_p != rhs.description_p {return false} if lhs.url != rhs.url {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } extension Google_Rpc_LocalizedMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".LocalizedMessage" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "locale"), 2: .same(proto: "message"), ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { // The use of inline closures is to circumvent an issue where the compiler // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.locale) }() case 2: try { try decoder.decodeSingularStringField(value: &self.message) }() default: break } } } func traverse(visitor: inout V) throws { if !self.locale.isEmpty { try visitor.visitSingularStringField(value: self.locale, fieldNumber: 1) } if !self.message.isEmpty { try visitor.visitSingularStringField(value: self.message, fieldNumber: 2) } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Google_Rpc_LocalizedMessage, rhs: Google_Rpc_LocalizedMessage) -> Bool { if lhs.locale != rhs.locale {return false} if lhs.message != rhs.message {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } }