googleapis_tonic_google_rpc/vec_u8_hash_map/
google.rpc.rs

1// This file is @generated by prost-build.
2/// The `Status` type defines a logical error model that is suitable for
3/// different programming environments, including REST APIs and RPC APIs. It is
4/// used by [gRPC](<https://github.com/grpc>). Each `Status` message contains
5/// three pieces of data: error code, error message, and error details.
6///
7/// You can find out more about this error model and how to work with it in the
8/// [API Design Guide](<https://cloud.google.com/apis/design/errors>).
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct Status {
11    /// The status code, which should be an enum value of
12    /// [google.rpc.Code][google.rpc.Code].
13    #[prost(int32, tag = "1")]
14    pub code: i32,
15    /// A developer-facing error message, which should be in English. Any
16    /// user-facing error message should be localized and sent in the
17    /// [google.rpc.Status.details][google.rpc.Status.details] field, or localized
18    /// by the client.
19    #[prost(string, tag = "2")]
20    pub message: ::prost::alloc::string::String,
21    /// A list of messages that carry the error details.  There is a common set of
22    /// message types for APIs to use.
23    #[prost(message, repeated, tag = "3")]
24    pub details: ::prost::alloc::vec::Vec<::prost_types::Any>,
25}
26/// The canonical error codes for gRPC APIs.
27///
28///
29/// Sometimes multiple error codes may apply.  Services should return
30/// the most specific error code that applies.  For example, prefer
31/// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
32/// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
33#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
34#[repr(i32)]
35pub enum Code {
36    /// Not an error; returned on success.
37    ///
38    /// HTTP Mapping: 200 OK
39    Ok = 0,
40    /// The operation was cancelled, typically by the caller.
41    ///
42    /// HTTP Mapping: 499 Client Closed Request
43    Cancelled = 1,
44    /// Unknown error.  For example, this error may be returned when
45    /// a `Status` value received from another address space belongs to
46    /// an error space that is not known in this address space.  Also
47    /// errors raised by APIs that do not return enough error information
48    /// may be converted to this error.
49    ///
50    /// HTTP Mapping: 500 Internal Server Error
51    Unknown = 2,
52    /// The client specified an invalid argument.  Note that this differs
53    /// from `FAILED_PRECONDITION`.  `INVALID_ARGUMENT` indicates arguments
54    /// that are problematic regardless of the state of the system
55    /// (e.g., a malformed file name).
56    ///
57    /// HTTP Mapping: 400 Bad Request
58    InvalidArgument = 3,
59    /// The deadline expired before the operation could complete. For operations
60    /// that change the state of the system, this error may be returned
61    /// even if the operation has completed successfully.  For example, a
62    /// successful response from a server could have been delayed long
63    /// enough for the deadline to expire.
64    ///
65    /// HTTP Mapping: 504 Gateway Timeout
66    DeadlineExceeded = 4,
67    /// Some requested entity (e.g., file or directory) was not found.
68    ///
69    /// Note to server developers: if a request is denied for an entire class
70    /// of users, such as gradual feature rollout or undocumented allowlist,
71    /// `NOT_FOUND` may be used. If a request is denied for some users within
72    /// a class of users, such as user-based access control, `PERMISSION_DENIED`
73    /// must be used.
74    ///
75    /// HTTP Mapping: 404 Not Found
76    NotFound = 5,
77    /// The entity that a client attempted to create (e.g., file or directory)
78    /// already exists.
79    ///
80    /// HTTP Mapping: 409 Conflict
81    AlreadyExists = 6,
82    /// The caller does not have permission to execute the specified
83    /// operation. `PERMISSION_DENIED` must not be used for rejections
84    /// caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
85    /// instead for those errors). `PERMISSION_DENIED` must not be
86    /// used if the caller can not be identified (use `UNAUTHENTICATED`
87    /// instead for those errors). This error code does not imply the
88    /// request is valid or the requested entity exists or satisfies
89    /// other pre-conditions.
90    ///
91    /// HTTP Mapping: 403 Forbidden
92    PermissionDenied = 7,
93    /// The request does not have valid authentication credentials for the
94    /// operation.
95    ///
96    /// HTTP Mapping: 401 Unauthorized
97    Unauthenticated = 16,
98    /// Some resource has been exhausted, perhaps a per-user quota, or
99    /// perhaps the entire file system is out of space.
100    ///
101    /// HTTP Mapping: 429 Too Many Requests
102    ResourceExhausted = 8,
103    /// The operation was rejected because the system is not in a state
104    /// required for the operation's execution.  For example, the directory
105    /// to be deleted is non-empty, an rmdir operation is applied to
106    /// a non-directory, etc.
107    ///
108    /// Service implementors can use the following guidelines to decide
109    /// between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
110    ///   (a) Use `UNAVAILABLE` if the client can retry just the failing call.
111    ///   (b) Use `ABORTED` if the client should retry at a higher level. For
112    ///       example, when a client-specified test-and-set fails, indicating the
113    ///       client should restart a read-modify-write sequence.
114    ///   (c) Use `FAILED_PRECONDITION` if the client should not retry until
115    ///       the system state has been explicitly fixed. For example, if an "rmdir"
116    ///       fails because the directory is non-empty, `FAILED_PRECONDITION`
117    ///       should be returned since the client should not retry unless
118    ///       the files are deleted from the directory.
119    ///
120    /// HTTP Mapping: 400 Bad Request
121    FailedPrecondition = 9,
122    /// The operation was aborted, typically due to a concurrency issue such as
123    /// a sequencer check failure or transaction abort.
124    ///
125    /// See the guidelines above for deciding between `FAILED_PRECONDITION`,
126    /// `ABORTED`, and `UNAVAILABLE`.
127    ///
128    /// HTTP Mapping: 409 Conflict
129    Aborted = 10,
130    /// The operation was attempted past the valid range.  E.g., seeking or
131    /// reading past end-of-file.
132    ///
133    /// Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
134    /// be fixed if the system state changes. For example, a 32-bit file
135    /// system will generate `INVALID_ARGUMENT` if asked to read at an
136    /// offset that is not in the range \[0,2^32-1\], but it will generate
137    /// `OUT_OF_RANGE` if asked to read from an offset past the current
138    /// file size.
139    ///
140    /// There is a fair bit of overlap between `FAILED_PRECONDITION` and
141    /// `OUT_OF_RANGE`.  We recommend using `OUT_OF_RANGE` (the more specific
142    /// error) when it applies so that callers who are iterating through
143    /// a space can easily look for an `OUT_OF_RANGE` error to detect when
144    /// they are done.
145    ///
146    /// HTTP Mapping: 400 Bad Request
147    OutOfRange = 11,
148    /// The operation is not implemented or is not supported/enabled in this
149    /// service.
150    ///
151    /// HTTP Mapping: 501 Not Implemented
152    Unimplemented = 12,
153    /// Internal errors.  This means that some invariants expected by the
154    /// underlying system have been broken.  This error code is reserved
155    /// for serious errors.
156    ///
157    /// HTTP Mapping: 500 Internal Server Error
158    Internal = 13,
159    /// The service is currently unavailable.  This is most likely a
160    /// transient condition, which can be corrected by retrying with
161    /// a backoff. Note that it is not always safe to retry
162    /// non-idempotent operations.
163    ///
164    /// See the guidelines above for deciding between `FAILED_PRECONDITION`,
165    /// `ABORTED`, and `UNAVAILABLE`.
166    ///
167    /// HTTP Mapping: 503 Service Unavailable
168    Unavailable = 14,
169    /// Unrecoverable data loss or corruption.
170    ///
171    /// HTTP Mapping: 500 Internal Server Error
172    DataLoss = 15,
173}
174impl Code {
175    /// String value of the enum field names used in the ProtoBuf definition.
176    ///
177    /// The values are not transformed in any way and thus are considered stable
178    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
179    pub fn as_str_name(&self) -> &'static str {
180        match self {
181            Self::Ok => "OK",
182            Self::Cancelled => "CANCELLED",
183            Self::Unknown => "UNKNOWN",
184            Self::InvalidArgument => "INVALID_ARGUMENT",
185            Self::DeadlineExceeded => "DEADLINE_EXCEEDED",
186            Self::NotFound => "NOT_FOUND",
187            Self::AlreadyExists => "ALREADY_EXISTS",
188            Self::PermissionDenied => "PERMISSION_DENIED",
189            Self::Unauthenticated => "UNAUTHENTICATED",
190            Self::ResourceExhausted => "RESOURCE_EXHAUSTED",
191            Self::FailedPrecondition => "FAILED_PRECONDITION",
192            Self::Aborted => "ABORTED",
193            Self::OutOfRange => "OUT_OF_RANGE",
194            Self::Unimplemented => "UNIMPLEMENTED",
195            Self::Internal => "INTERNAL",
196            Self::Unavailable => "UNAVAILABLE",
197            Self::DataLoss => "DATA_LOSS",
198        }
199    }
200    /// Creates an enum from field names used in the ProtoBuf definition.
201    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
202        match value {
203            "OK" => Some(Self::Ok),
204            "CANCELLED" => Some(Self::Cancelled),
205            "UNKNOWN" => Some(Self::Unknown),
206            "INVALID_ARGUMENT" => Some(Self::InvalidArgument),
207            "DEADLINE_EXCEEDED" => Some(Self::DeadlineExceeded),
208            "NOT_FOUND" => Some(Self::NotFound),
209            "ALREADY_EXISTS" => Some(Self::AlreadyExists),
210            "PERMISSION_DENIED" => Some(Self::PermissionDenied),
211            "UNAUTHENTICATED" => Some(Self::Unauthenticated),
212            "RESOURCE_EXHAUSTED" => Some(Self::ResourceExhausted),
213            "FAILED_PRECONDITION" => Some(Self::FailedPrecondition),
214            "ABORTED" => Some(Self::Aborted),
215            "OUT_OF_RANGE" => Some(Self::OutOfRange),
216            "UNIMPLEMENTED" => Some(Self::Unimplemented),
217            "INTERNAL" => Some(Self::Internal),
218            "UNAVAILABLE" => Some(Self::Unavailable),
219            "DATA_LOSS" => Some(Self::DataLoss),
220            _ => None,
221        }
222    }
223}
224/// Describes the cause of the error with structured details.
225///
226/// Example of an error when contacting the "pubsub.googleapis.com" API when it
227/// is not enabled:
228///
229///      { "reason": "API_DISABLED"
230///        "domain": "googleapis.com"
231///        "metadata": {
232///          "resource": "projects/123",
233///          "service": "pubsub.googleapis.com"
234///        }
235///      }
236///
237/// This response indicates that the pubsub.googleapis.com API is not enabled.
238///
239/// Example of an error that is returned when attempting to create a Spanner
240/// instance in a region that is out of stock:
241///
242///      { "reason": "STOCKOUT"
243///        "domain": "spanner.googleapis.com",
244///        "metadata": {
245///          "availableRegions": "us-central1,us-east2"
246///        }
247///      }
248#[derive(Clone, PartialEq, ::prost::Message)]
249pub struct ErrorInfo {
250    /// The reason of the error. This is a constant value that identifies the
251    /// proximate cause of the error. Error reasons are unique within a particular
252    /// domain of errors. This should be at most 63 characters and match a
253    /// regular expression of `[A-Z][A-Z0-9_]+\[A-Z0-9\]`, which represents
254    /// UPPER_SNAKE_CASE.
255    #[prost(string, tag = "1")]
256    pub reason: ::prost::alloc::string::String,
257    /// The logical grouping to which the "reason" belongs. The error domain
258    /// is typically the registered service name of the tool or product that
259    /// generates the error. Example: "pubsub.googleapis.com". If the error is
260    /// generated by some common infrastructure, the error domain must be a
261    /// globally unique value that identifies the infrastructure. For Google API
262    /// infrastructure, the error domain is "googleapis.com".
263    #[prost(string, tag = "2")]
264    pub domain: ::prost::alloc::string::String,
265    /// Additional structured details about this error.
266    ///
267    /// Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should
268    /// ideally be lowerCamelCase. Also, they must be limited to 64 characters in
269    /// length. When identifying the current value of an exceeded limit, the units
270    /// should be contained in the key, not the value.  For example, rather than
271    /// `{"instanceLimit": "100/request"}`, should be returned as,
272    /// `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
273    /// instances that can be created in a single (batch) request.
274    #[prost(map = "string, string", tag = "3")]
275    pub metadata: ::std::collections::HashMap<
276        ::prost::alloc::string::String,
277        ::prost::alloc::string::String,
278    >,
279}
280/// Describes when the clients can retry a failed request. Clients could ignore
281/// the recommendation here or retry when this information is missing from error
282/// responses.
283///
284/// It's always recommended that clients should use exponential backoff when
285/// retrying.
286///
287/// Clients should wait until `retry_delay` amount of time has passed since
288/// receiving the error response before retrying.  If retrying requests also
289/// fail, clients should use an exponential backoff scheme to gradually increase
290/// the delay between retries based on `retry_delay`, until either a maximum
291/// number of retries have been reached or a maximum retry delay cap has been
292/// reached.
293#[derive(Clone, Copy, PartialEq, ::prost::Message)]
294pub struct RetryInfo {
295    /// Clients should wait at least this long between retrying the same request.
296    #[prost(message, optional, tag = "1")]
297    pub retry_delay: ::core::option::Option<::prost_types::Duration>,
298}
299/// Describes additional debugging info.
300#[derive(Clone, PartialEq, ::prost::Message)]
301pub struct DebugInfo {
302    /// The stack trace entries indicating where the error occurred.
303    #[prost(string, repeated, tag = "1")]
304    pub stack_entries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
305    /// Additional debugging information provided by the server.
306    #[prost(string, tag = "2")]
307    pub detail: ::prost::alloc::string::String,
308}
309/// Describes how a quota check failed.
310///
311/// For example if a daily limit was exceeded for the calling project,
312/// a service could respond with a QuotaFailure detail containing the project
313/// id and the description of the quota limit that was exceeded.  If the
314/// calling project hasn't enabled the service in the developer console, then
315/// a service could respond with the project id and set `service_disabled`
316/// to true.
317///
318/// Also see RetryInfo and Help types for other details about handling a
319/// quota failure.
320#[derive(Clone, PartialEq, ::prost::Message)]
321pub struct QuotaFailure {
322    /// Describes all quota violations.
323    #[prost(message, repeated, tag = "1")]
324    pub violations: ::prost::alloc::vec::Vec<quota_failure::Violation>,
325}
326/// Nested message and enum types in `QuotaFailure`.
327pub mod quota_failure {
328    /// A message type used to describe a single quota violation.  For example, a
329    /// daily quota or a custom quota that was exceeded.
330    #[derive(Clone, PartialEq, ::prost::Message)]
331    pub struct Violation {
332        /// The subject on which the quota check failed.
333        /// For example, "clientip:<ip address of client>" or "project:<Google
334        /// developer project id>".
335        #[prost(string, tag = "1")]
336        pub subject: ::prost::alloc::string::String,
337        /// A description of how the quota check failed. Clients can use this
338        /// description to find more about the quota configuration in the service's
339        /// public documentation, or find the relevant quota limit to adjust through
340        /// developer console.
341        ///
342        /// For example: "Service disabled" or "Daily Limit for read operations
343        /// exceeded".
344        #[prost(string, tag = "2")]
345        pub description: ::prost::alloc::string::String,
346        /// The API Service from which the `QuotaFailure.Violation` orginates. In
347        /// some cases, Quota issues originate from an API Service other than the one
348        /// that was called. In other words, a dependency of the called API Service
349        /// could be the cause of the `QuotaFailure`, and this field would have the
350        /// dependency API service name.
351        ///
352        /// For example, if the called API is Kubernetes Engine API
353        /// (container.googleapis.com), and a quota violation occurs in the
354        /// Kubernetes Engine API itself, this field would be
355        /// "container.googleapis.com". On the other hand, if the quota violation
356        /// occurs when the Kubernetes Engine API creates VMs in the Compute Engine
357        /// API (compute.googleapis.com), this field would be
358        /// "compute.googleapis.com".
359        #[prost(string, tag = "3")]
360        pub api_service: ::prost::alloc::string::String,
361        /// The metric of the violated quota. A quota metric is a named counter to
362        /// measure usage, such as API requests or CPUs. When an activity occurs in a
363        /// service, such as Virtual Machine allocation, one or more quota metrics
364        /// may be affected.
365        ///
366        /// For example, "compute.googleapis.com/cpus_per_vm_family",
367        /// "storage.googleapis.com/internet_egress_bandwidth".
368        #[prost(string, tag = "4")]
369        pub quota_metric: ::prost::alloc::string::String,
370        /// The id of the violated quota. Also know as "limit name", this is the
371        /// unique identifier of a quota in the context of an API service.
372        ///
373        /// For example, "CPUS-PER-VM-FAMILY-per-project-region".
374        #[prost(string, tag = "5")]
375        pub quota_id: ::prost::alloc::string::String,
376        /// The dimensions of the violated quota. Every non-global quota is enforced
377        /// on a set of dimensions. While quota metric defines what to count, the
378        /// dimensions specify for what aspects the counter should be increased.
379        ///
380        /// For example, the quota "CPUs per region per VM family" enforces a limit
381        /// on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
382        /// "region" and "vm_family". And if the violation occurred in region
383        /// "us-central1" and for VM family "n1", the quota_dimensions would be,
384        ///
385        /// {
386        ///    "region": "us-central1",
387        ///    "vm_family": "n1",
388        /// }
389        ///
390        /// When a quota is enforced globally, the quota_dimensions would always be
391        /// empty.
392        #[prost(map = "string, string", tag = "6")]
393        pub quota_dimensions: ::std::collections::HashMap<
394            ::prost::alloc::string::String,
395            ::prost::alloc::string::String,
396        >,
397        /// The enforced quota value at the time of the `QuotaFailure`.
398        ///
399        /// For example, if the enforced quota value at the time of the
400        /// `QuotaFailure` on the number of CPUs is "10", then the value of this
401        /// field would reflect this quantity.
402        #[prost(int64, tag = "7")]
403        pub quota_value: i64,
404        /// The new quota value being rolled out at the time of the violation. At the
405        /// completion of the rollout, this value will be enforced in place of
406        /// quota_value. If no rollout is in progress at the time of the violation,
407        /// this field is not set.
408        ///
409        /// For example, if at the time of the violation a rollout is in progress
410        /// changing the number of CPUs quota from 10 to 20, 20 would be the value of
411        /// this field.
412        #[prost(int64, optional, tag = "8")]
413        pub future_quota_value: ::core::option::Option<i64>,
414    }
415}
416/// Describes what preconditions have failed.
417///
418/// For example, if an RPC failed because it required the Terms of Service to be
419/// acknowledged, it could list the terms of service violation in the
420/// PreconditionFailure message.
421#[derive(Clone, PartialEq, ::prost::Message)]
422pub struct PreconditionFailure {
423    /// Describes all precondition violations.
424    #[prost(message, repeated, tag = "1")]
425    pub violations: ::prost::alloc::vec::Vec<precondition_failure::Violation>,
426}
427/// Nested message and enum types in `PreconditionFailure`.
428pub mod precondition_failure {
429    /// A message type used to describe a single precondition failure.
430    #[derive(Clone, PartialEq, ::prost::Message)]
431    pub struct Violation {
432        /// The type of PreconditionFailure. We recommend using a service-specific
433        /// enum type to define the supported precondition violation subjects. For
434        /// example, "TOS" for "Terms of Service violation".
435        #[prost(string, tag = "1")]
436        pub r#type: ::prost::alloc::string::String,
437        /// The subject, relative to the type, that failed.
438        /// For example, "google.com/cloud" relative to the "TOS" type would indicate
439        /// which terms of service is being referenced.
440        #[prost(string, tag = "2")]
441        pub subject: ::prost::alloc::string::String,
442        /// A description of how the precondition failed. Developers can use this
443        /// description to understand how to fix the failure.
444        ///
445        /// For example: "Terms of service not accepted".
446        #[prost(string, tag = "3")]
447        pub description: ::prost::alloc::string::String,
448    }
449}
450/// Describes violations in a client request. This error type focuses on the
451/// syntactic aspects of the request.
452#[derive(Clone, PartialEq, ::prost::Message)]
453pub struct BadRequest {
454    /// Describes all violations in a client request.
455    #[prost(message, repeated, tag = "1")]
456    pub field_violations: ::prost::alloc::vec::Vec<bad_request::FieldViolation>,
457}
458/// Nested message and enum types in `BadRequest`.
459pub mod bad_request {
460    /// A message type used to describe a single bad request field.
461    #[derive(Clone, PartialEq, ::prost::Message)]
462    pub struct FieldViolation {
463        /// A path that leads to a field in the request body. The value will be a
464        /// sequence of dot-separated identifiers that identify a protocol buffer
465        /// field.
466        ///
467        /// Consider the following:
468        ///
469        ///      message CreateContactRequest {
470        ///        message EmailAddress {
471        ///          enum Type {
472        ///            TYPE_UNSPECIFIED = 0;
473        ///            HOME = 1;
474        ///            WORK = 2;
475        ///          }
476        ///
477        ///          optional string email = 1;
478        ///          repeated EmailType type = 2;
479        ///        }
480        ///
481        ///        string full_name = 1;
482        ///        repeated EmailAddress email_addresses = 2;
483        ///      }
484        ///
485        /// In this example, in proto `field` could take one of the following values:
486        ///
487        /// * `full_name` for a violation in the `full_name` value
488        /// * `email_addresses\[1\].email` for a violation in the `email` field of the
489        ///    first `email_addresses` message
490        /// * `email_addresses\[3\].type\[2\]` for a violation in the second `type`
491        ///    value in the third `email_addresses` message.
492        ///
493        /// In JSON, the same values are represented as:
494        ///
495        /// * `fullName` for a violation in the `fullName` value
496        /// * `emailAddresses\[1\].email` for a violation in the `email` field of the
497        ///    first `emailAddresses` message
498        /// * `emailAddresses\[3\].type\[2\]` for a violation in the second `type`
499        ///    value in the third `emailAddresses` message.
500        #[prost(string, tag = "1")]
501        pub field: ::prost::alloc::string::String,
502        /// A description of why the request element is bad.
503        #[prost(string, tag = "2")]
504        pub description: ::prost::alloc::string::String,
505        /// The reason of the field-level error. This is a constant value that
506        /// identifies the proximate cause of the field-level error. It should
507        /// uniquely identify the type of the FieldViolation within the scope of the
508        /// google.rpc.ErrorInfo.domain. This should be at most 63
509        /// characters and match a regular expression of `[A-Z][A-Z0-9_]+\[A-Z0-9\]`,
510        /// which represents UPPER_SNAKE_CASE.
511        #[prost(string, tag = "3")]
512        pub reason: ::prost::alloc::string::String,
513        /// Provides a localized error message for field-level errors that is safe to
514        /// return to the API consumer.
515        #[prost(message, optional, tag = "4")]
516        pub localized_message: ::core::option::Option<super::LocalizedMessage>,
517    }
518}
519/// Contains metadata about the request that clients can attach when filing a bug
520/// or providing other forms of feedback.
521#[derive(Clone, PartialEq, ::prost::Message)]
522pub struct RequestInfo {
523    /// An opaque string that should only be interpreted by the service generating
524    /// it. For example, it can be used to identify requests in the service's logs.
525    #[prost(string, tag = "1")]
526    pub request_id: ::prost::alloc::string::String,
527    /// Any data that was used to serve this request. For example, an encrypted
528    /// stack trace that can be sent back to the service provider for debugging.
529    #[prost(string, tag = "2")]
530    pub serving_data: ::prost::alloc::string::String,
531}
532/// Describes the resource that is being accessed.
533#[derive(Clone, PartialEq, ::prost::Message)]
534pub struct ResourceInfo {
535    /// A name for the type of resource being accessed, e.g. "sql table",
536    /// "cloud storage bucket", "file", "Google calendar"; or the type URL
537    /// of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
538    #[prost(string, tag = "1")]
539    pub resource_type: ::prost::alloc::string::String,
540    /// The name of the resource being accessed.  For example, a shared calendar
541    /// name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
542    /// error is
543    /// [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
544    #[prost(string, tag = "2")]
545    pub resource_name: ::prost::alloc::string::String,
546    /// The owner of the resource (optional).
547    /// For example, "user:<owner email>" or "project:<Google developer project
548    /// id>".
549    #[prost(string, tag = "3")]
550    pub owner: ::prost::alloc::string::String,
551    /// Describes what error is encountered when accessing this resource.
552    /// For example, updating a cloud project may require the `writer` permission
553    /// on the developer console project.
554    #[prost(string, tag = "4")]
555    pub description: ::prost::alloc::string::String,
556}
557/// Provides links to documentation or for performing an out of band action.
558///
559/// For example, if a quota check failed with an error indicating the calling
560/// project hasn't enabled the accessed service, this can contain a URL pointing
561/// directly to the right place in the developer console to flip the bit.
562#[derive(Clone, PartialEq, ::prost::Message)]
563pub struct Help {
564    /// URL(s) pointing to additional information on handling the current error.
565    #[prost(message, repeated, tag = "1")]
566    pub links: ::prost::alloc::vec::Vec<help::Link>,
567}
568/// Nested message and enum types in `Help`.
569pub mod help {
570    /// Describes a URL link.
571    #[derive(Clone, PartialEq, ::prost::Message)]
572    pub struct Link {
573        /// Describes what the link offers.
574        #[prost(string, tag = "1")]
575        pub description: ::prost::alloc::string::String,
576        /// The URL of the link.
577        #[prost(string, tag = "2")]
578        pub url: ::prost::alloc::string::String,
579    }
580}
581/// Provides a localized error message that is safe to return to the user
582/// which can be attached to an RPC error.
583#[derive(Clone, PartialEq, ::prost::Message)]
584pub struct LocalizedMessage {
585    /// The locale used following the specification defined at
586    /// <https://www.rfc-editor.org/rfc/bcp/bcp47.txt.>
587    /// Examples are: "en-US", "fr-CH", "es-MX"
588    #[prost(string, tag = "1")]
589    pub locale: ::prost::alloc::string::String,
590    /// The localized error message in the above locale.
591    #[prost(string, tag = "2")]
592    pub message: ::prost::alloc::string::String,
593}
594/// Represents an HTTP request.
595#[derive(Clone, PartialEq, ::prost::Message)]
596pub struct HttpRequest {
597    /// The HTTP request method.
598    #[prost(string, tag = "1")]
599    pub method: ::prost::alloc::string::String,
600    /// The HTTP request URI.
601    #[prost(string, tag = "2")]
602    pub uri: ::prost::alloc::string::String,
603    /// The HTTP request headers. The ordering of the headers is significant.
604    /// Multiple headers with the same key may present for the request.
605    #[prost(message, repeated, tag = "3")]
606    pub headers: ::prost::alloc::vec::Vec<HttpHeader>,
607    /// The HTTP request body. If the body is not expected, it should be empty.
608    #[prost(bytes = "vec", tag = "4")]
609    pub body: ::prost::alloc::vec::Vec<u8>,
610}
611/// Represents an HTTP response.
612#[derive(Clone, PartialEq, ::prost::Message)]
613pub struct HttpResponse {
614    /// The HTTP status code, such as 200 or 404.
615    #[prost(int32, tag = "1")]
616    pub status: i32,
617    /// The HTTP reason phrase, such as "OK" or "Not Found".
618    #[prost(string, tag = "2")]
619    pub reason: ::prost::alloc::string::String,
620    /// The HTTP response headers. The ordering of the headers is significant.
621    /// Multiple headers with the same key may present for the response.
622    #[prost(message, repeated, tag = "3")]
623    pub headers: ::prost::alloc::vec::Vec<HttpHeader>,
624    /// The HTTP response body. If the body is not expected, it should be empty.
625    #[prost(bytes = "vec", tag = "4")]
626    pub body: ::prost::alloc::vec::Vec<u8>,
627}
628/// Represents an HTTP header.
629#[derive(Clone, PartialEq, ::prost::Message)]
630pub struct HttpHeader {
631    /// The HTTP header key. It is case insensitive.
632    #[prost(string, tag = "1")]
633    pub key: ::prost::alloc::string::String,
634    /// The HTTP header value.
635    #[prost(string, tag = "2")]
636    pub value: ::prost::alloc::string::String,
637}