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