viam_rust_utils/gen/google.rpc.rs
1// @generated
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#[allow(clippy::derive_partial_eq_without_eq)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct Status {
12 /// The status code, which should be an enum value of
13 /// \[google.rpc.Code][google.rpc.Code\].
14 #[prost(int32, tag="1")]
15 pub code: i32,
16 /// A developer-facing error message, which should be in English. Any
17 /// user-facing error message should be localized and sent in the
18 /// \[google.rpc.Status.details][google.rpc.Status.details\] field, or localized
19 /// by the client.
20 #[prost(string, tag="2")]
21 pub message: ::prost::alloc::string::String,
22 /// A list of messages that carry the error details. There is a common set of
23 /// message types for APIs to use.
24 #[prost(message, repeated, tag="3")]
25 pub details: ::prost::alloc::vec::Vec<::prost_types::Any>,
26}
27/// The canonical error codes for gRPC APIs.
28///
29///
30/// Sometimes multiple error codes may apply. Services should return
31/// the most specific error code that applies. For example, prefer
32/// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
33/// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
34#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
35#[repr(i32)]
36pub enum Code {
37 /// Not an error; returned on success.
38 ///
39 /// HTTP Mapping: 200 OK
40 Ok = 0,
41 /// The operation was cancelled, typically by the caller.
42 ///
43 /// HTTP Mapping: 499 Client Closed Request
44 Cancelled = 1,
45 /// Unknown error. For example, this error may be returned when
46 /// a `Status` value received from another address space belongs to
47 /// an error space that is not known in this address space. Also
48 /// errors raised by APIs that do not return enough error information
49 /// may be converted to this error.
50 ///
51 /// HTTP Mapping: 500 Internal Server Error
52 Unknown = 2,
53 /// The client specified an invalid argument. Note that this differs
54 /// from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
55 /// that are problematic regardless of the state of the system
56 /// (e.g., a malformed file name).
57 ///
58 /// HTTP Mapping: 400 Bad Request
59 InvalidArgument = 3,
60 /// The deadline expired before the operation could complete. For operations
61 /// that change the state of the system, this error may be returned
62 /// even if the operation has completed successfully. For example, a
63 /// successful response from a server could have been delayed long
64 /// enough for the deadline to expire.
65 ///
66 /// HTTP Mapping: 504 Gateway Timeout
67 DeadlineExceeded = 4,
68 /// Some requested entity (e.g., file or directory) was not found.
69 ///
70 /// Note to server developers: if a request is denied for an entire class
71 /// of users, such as gradual feature rollout or undocumented allowlist,
72 /// `NOT_FOUND` may be used. If a request is denied for some users within
73 /// a class of users, such as user-based access control, `PERMISSION_DENIED`
74 /// must be used.
75 ///
76 /// HTTP Mapping: 404 Not Found
77 NotFound = 5,
78 /// The entity that a client attempted to create (e.g., file or directory)
79 /// already exists.
80 ///
81 /// HTTP Mapping: 409 Conflict
82 AlreadyExists = 6,
83 /// The caller does not have permission to execute the specified
84 /// operation. `PERMISSION_DENIED` must not be used for rejections
85 /// caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
86 /// instead for those errors). `PERMISSION_DENIED` must not be
87 /// used if the caller can not be identified (use `UNAUTHENTICATED`
88 /// instead for those errors). This error code does not imply the
89 /// request is valid or the requested entity exists or satisfies
90 /// other pre-conditions.
91 ///
92 /// HTTP Mapping: 403 Forbidden
93 PermissionDenied = 7,
94 /// The request does not have valid authentication credentials for the
95 /// operation.
96 ///
97 /// HTTP Mapping: 401 Unauthorized
98 Unauthenticated = 16,
99 /// Some resource has been exhausted, perhaps a per-user quota, or
100 /// perhaps the entire file system is out of space.
101 ///
102 /// HTTP Mapping: 429 Too Many Requests
103 ResourceExhausted = 8,
104 /// The operation was rejected because the system is not in a state
105 /// required for the operation's execution. For example, the directory
106 /// to be deleted is non-empty, an rmdir operation is applied to
107 /// a non-directory, etc.
108 ///
109 /// Service implementors can use the following guidelines to decide
110 /// between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
111 /// (a) Use `UNAVAILABLE` if the client can retry just the failing call.
112 /// (b) Use `ABORTED` if the client should retry at a higher level. For
113 /// example, when a client-specified test-and-set fails, indicating the
114 /// client should restart a read-modify-write sequence.
115 /// (c) Use `FAILED_PRECONDITION` if the client should not retry until
116 /// the system state has been explicitly fixed. For example, if an "rmdir"
117 /// fails because the directory is non-empty, `FAILED_PRECONDITION`
118 /// should be returned since the client should not retry unless
119 /// the files are deleted from the directory.
120 ///
121 /// HTTP Mapping: 400 Bad Request
122 FailedPrecondition = 9,
123 /// The operation was aborted, typically due to a concurrency issue such as
124 /// a sequencer check failure or transaction abort.
125 ///
126 /// See the guidelines above for deciding between `FAILED_PRECONDITION`,
127 /// `ABORTED`, and `UNAVAILABLE`.
128 ///
129 /// HTTP Mapping: 409 Conflict
130 Aborted = 10,
131 /// The operation was attempted past the valid range. E.g., seeking or
132 /// reading past end-of-file.
133 ///
134 /// Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
135 /// be fixed if the system state changes. For example, a 32-bit file
136 /// system will generate `INVALID_ARGUMENT` if asked to read at an
137 /// offset that is not in the range \[0,2^32-1\], but it will generate
138 /// `OUT_OF_RANGE` if asked to read from an offset past the current
139 /// file size.
140 ///
141 /// There is a fair bit of overlap between `FAILED_PRECONDITION` and
142 /// `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
143 /// error) when it applies so that callers who are iterating through
144 /// a space can easily look for an `OUT_OF_RANGE` error to detect when
145 /// they are done.
146 ///
147 /// HTTP Mapping: 400 Bad Request
148 OutOfRange = 11,
149 /// The operation is not implemented or is not supported/enabled in this
150 /// service.
151 ///
152 /// HTTP Mapping: 501 Not Implemented
153 Unimplemented = 12,
154 /// Internal errors. This means that some invariants expected by the
155 /// underlying system have been broken. This error code is reserved
156 /// for serious errors.
157 ///
158 /// HTTP Mapping: 500 Internal Server Error
159 Internal = 13,
160 /// The service is currently unavailable. This is most likely a
161 /// transient condition, which can be corrected by retrying with
162 /// a backoff. Note that it is not always safe to retry
163 /// non-idempotent operations.
164 ///
165 /// See the guidelines above for deciding between `FAILED_PRECONDITION`,
166 /// `ABORTED`, and `UNAVAILABLE`.
167 ///
168 /// HTTP Mapping: 503 Service Unavailable
169 Unavailable = 14,
170 /// Unrecoverable data loss or corruption.
171 ///
172 /// HTTP Mapping: 500 Internal Server Error
173 DataLoss = 15,
174}
175impl Code {
176 /// String value of the enum field names used in the ProtoBuf definition.
177 ///
178 /// The values are not transformed in any way and thus are considered stable
179 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
180 pub fn as_str_name(&self) -> &'static str {
181 match self {
182 Code::Ok => "OK",
183 Code::Cancelled => "CANCELLED",
184 Code::Unknown => "UNKNOWN",
185 Code::InvalidArgument => "INVALID_ARGUMENT",
186 Code::DeadlineExceeded => "DEADLINE_EXCEEDED",
187 Code::NotFound => "NOT_FOUND",
188 Code::AlreadyExists => "ALREADY_EXISTS",
189 Code::PermissionDenied => "PERMISSION_DENIED",
190 Code::Unauthenticated => "UNAUTHENTICATED",
191 Code::ResourceExhausted => "RESOURCE_EXHAUSTED",
192 Code::FailedPrecondition => "FAILED_PRECONDITION",
193 Code::Aborted => "ABORTED",
194 Code::OutOfRange => "OUT_OF_RANGE",
195 Code::Unimplemented => "UNIMPLEMENTED",
196 Code::Internal => "INTERNAL",
197 Code::Unavailable => "UNAVAILABLE",
198 Code::DataLoss => "DATA_LOSS",
199 }
200 }
201 /// Creates an enum from field names used in the ProtoBuf definition.
202 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
203 match value {
204 "OK" => Some(Self::Ok),
205 "CANCELLED" => Some(Self::Cancelled),
206 "UNKNOWN" => Some(Self::Unknown),
207 "INVALID_ARGUMENT" => Some(Self::InvalidArgument),
208 "DEADLINE_EXCEEDED" => Some(Self::DeadlineExceeded),
209 "NOT_FOUND" => Some(Self::NotFound),
210 "ALREADY_EXISTS" => Some(Self::AlreadyExists),
211 "PERMISSION_DENIED" => Some(Self::PermissionDenied),
212 "UNAUTHENTICATED" => Some(Self::Unauthenticated),
213 "RESOURCE_EXHAUSTED" => Some(Self::ResourceExhausted),
214 "FAILED_PRECONDITION" => Some(Self::FailedPrecondition),
215 "ABORTED" => Some(Self::Aborted),
216 "OUT_OF_RANGE" => Some(Self::OutOfRange),
217 "UNIMPLEMENTED" => Some(Self::Unimplemented),
218 "INTERNAL" => Some(Self::Internal),
219 "UNAVAILABLE" => Some(Self::Unavailable),
220 "DATA_LOSS" => Some(Self::DataLoss),
221 _ => None,
222 }
223 }
224}
225/// Describes the cause of the error with structured details.
226///
227/// Example of an error when contacting the "pubsub.googleapis.com" API when it
228/// is not enabled:
229///
230/// { "reason": "API_DISABLED"
231/// "domain": "googleapis.com"
232/// "metadata": {
233/// "resource": "projects/123",
234/// "service": "pubsub.googleapis.com"
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/// { "reason": "STOCKOUT"
244/// "domain": "spanner.googleapis.com",
245/// "metadata": {
246/// "availableRegions": "us-central1,us-east2"
247/// }
248/// }
249#[allow(clippy::derive_partial_eq_without_eq)]
250#[derive(Clone, PartialEq, ::prost::Message)]
251pub struct ErrorInfo {
252 /// The reason of the error. This is a constant value that identifies the
253 /// proximate cause of the error. Error reasons are unique within a particular
254 /// domain of errors. This should be at most 63 characters and match a
255 /// regular expression of `\[A-Z][A-Z0-9_]+[A-Z0-9\]`, which represents
256 /// UPPER_SNAKE_CASE.
257 #[prost(string, tag="1")]
258 pub reason: ::prost::alloc::string::String,
259 /// The logical grouping to which the "reason" belongs. The error domain
260 /// is typically the registered service name of the tool or product that
261 /// generates the error. Example: "pubsub.googleapis.com". If the error is
262 /// generated by some common infrastructure, the error domain must be a
263 /// globally unique value that identifies the infrastructure. For Google API
264 /// infrastructure, the error domain is "googleapis.com".
265 #[prost(string, tag="2")]
266 pub domain: ::prost::alloc::string::String,
267 /// Additional structured details about this error.
268 ///
269 /// Keys must match a regular expression of `\[a-z][a-zA-Z0-9-_\]+` but should
270 /// ideally be lowerCamelCase. Also, they must be limited to 64 characters in
271 /// length. When identifying the current value of an exceeded limit, the units
272 /// should be contained in the key, not the value. For example, rather than
273 /// `{"instanceLimit": "100/request"}`, should be returned as,
274 /// `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
275 /// instances that can be created in a single (batch) request.
276 #[prost(map="string, string", tag="3")]
277 pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
278}
279/// Describes when the clients can retry a failed request. Clients could ignore
280/// the recommendation here or retry when this information is missing from error
281/// responses.
282///
283/// It's always recommended that clients should use exponential backoff when
284/// retrying.
285///
286/// Clients should wait until `retry_delay` amount of time has passed since
287/// receiving the error response before retrying. If retrying requests also
288/// fail, clients should use an exponential backoff scheme to gradually increase
289/// the delay between retries based on `retry_delay`, until either a maximum
290/// number of retries have been reached or a maximum retry delay cap has been
291/// reached.
292#[allow(clippy::derive_partial_eq_without_eq)]
293#[derive(Clone, 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#[allow(clippy::derive_partial_eq_without_eq)]
301#[derive(Clone, PartialEq, ::prost::Message)]
302pub struct DebugInfo {
303 /// The stack trace entries indicating where the error occurred.
304 #[prost(string, repeated, tag="1")]
305 pub stack_entries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
306 /// Additional debugging information provided by the server.
307 #[prost(string, tag="2")]
308 pub detail: ::prost::alloc::string::String,
309}
310/// Describes how a quota check failed.
311///
312/// For example if a daily limit was exceeded for the calling project,
313/// a service could respond with a QuotaFailure detail containing the project
314/// id and the description of the quota limit that was exceeded. If the
315/// calling project hasn't enabled the service in the developer console, then
316/// a service could respond with the project id and set `service_disabled`
317/// to true.
318///
319/// Also see RetryInfo and Help types for other details about handling a
320/// quota failure.
321#[allow(clippy::derive_partial_eq_without_eq)]
322#[derive(Clone, PartialEq, ::prost::Message)]
323pub struct QuotaFailure {
324 /// Describes all quota violations.
325 #[prost(message, repeated, tag="1")]
326 pub violations: ::prost::alloc::vec::Vec<quota_failure::Violation>,
327}
328/// Nested message and enum types in `QuotaFailure`.
329pub mod quota_failure {
330 /// A message type used to describe a single quota violation. For example, a
331 /// daily quota or a custom quota that was exceeded.
332 #[allow(clippy::derive_partial_eq_without_eq)]
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<::prost::alloc::string::String, ::prost::alloc::string::String>,
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#[allow(clippy::derive_partial_eq_without_eq)]
422#[derive(Clone, PartialEq, ::prost::Message)]
423pub struct PreconditionFailure {
424 /// Describes all precondition violations.
425 #[prost(message, repeated, tag="1")]
426 pub violations: ::prost::alloc::vec::Vec<precondition_failure::Violation>,
427}
428/// Nested message and enum types in `PreconditionFailure`.
429pub mod precondition_failure {
430 /// A message type used to describe a single precondition failure.
431 #[allow(clippy::derive_partial_eq_without_eq)]
432#[derive(Clone, PartialEq, ::prost::Message)]
433 pub struct Violation {
434 /// The type of PreconditionFailure. We recommend using a service-specific
435 /// enum type to define the supported precondition violation subjects. For
436 /// example, "TOS" for "Terms of Service violation".
437 #[prost(string, tag="1")]
438 pub r#type: ::prost::alloc::string::String,
439 /// The subject, relative to the type, that failed.
440 /// For example, "google.com/cloud" relative to the "TOS" type would indicate
441 /// which terms of service is being referenced.
442 #[prost(string, tag="2")]
443 pub subject: ::prost::alloc::string::String,
444 /// A description of how the precondition failed. Developers can use this
445 /// description to understand how to fix the failure.
446 ///
447 /// For example: "Terms of service not accepted".
448 #[prost(string, tag="3")]
449 pub description: ::prost::alloc::string::String,
450 }
451}
452/// Describes violations in a client request. This error type focuses on the
453/// syntactic aspects of the request.
454#[allow(clippy::derive_partial_eq_without_eq)]
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 #[allow(clippy::derive_partial_eq_without_eq)]
465#[derive(Clone, PartialEq, ::prost::Message)]
466 pub struct FieldViolation {
467 /// A path that leads to a field in the request body. The value will be a
468 /// sequence of dot-separated identifiers that identify a protocol buffer
469 /// field.
470 ///
471 /// Consider the following:
472 ///
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 /// In this example, in proto `field` could take one of the following values:
490 ///
491 /// * `full_name` for a violation in the `full_name` value
492 /// * `email_addresses\[1\].email` for a violation in the `email` field of the
493 /// first `email_addresses` message
494 /// * `email_addresses\[3].type[2\]` for a violation in the second `type`
495 /// value in the third `email_addresses` message.
496 ///
497 /// In JSON, the same values are represented as:
498 ///
499 /// * `fullName` for a violation in the `fullName` value
500 /// * `emailAddresses\[1\].email` for a violation in the `email` field of the
501 /// first `emailAddresses` message
502 /// * `emailAddresses\[3].type[2\]` for a violation in the second `type`
503 /// value in the third `emailAddresses` message.
504 #[prost(string, tag="1")]
505 pub field: ::prost::alloc::string::String,
506 /// A description of why the request element is bad.
507 #[prost(string, tag="2")]
508 pub description: ::prost::alloc::string::String,
509 /// The reason of the field-level error. This is a constant value that
510 /// identifies the proximate cause of the field-level error. It should
511 /// uniquely identify the type of the FieldViolation within the scope of the
512 /// google.rpc.ErrorInfo.domain. This should be at most 63
513 /// characters and match a regular expression of `\[A-Z][A-Z0-9_]+[A-Z0-9\]`,
514 /// which represents UPPER_SNAKE_CASE.
515 #[prost(string, tag="3")]
516 pub reason: ::prost::alloc::string::String,
517 /// Provides a localized error message for field-level errors that is safe to
518 /// return to the API consumer.
519 #[prost(message, optional, tag="4")]
520 pub localized_message: ::core::option::Option<super::LocalizedMessage>,
521 }
522}
523/// Contains metadata about the request that clients can attach when filing a bug
524/// or providing other forms of feedback.
525#[allow(clippy::derive_partial_eq_without_eq)]
526#[derive(Clone, PartialEq, ::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#[allow(clippy::derive_partial_eq_without_eq)]
539#[derive(Clone, PartialEq, ::prost::Message)]
540pub struct ResourceInfo {
541 /// A name for the type of resource being accessed, e.g. "sql table",
542 /// "cloud storage bucket", "file", "Google calendar"; or the type URL
543 /// of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
544 #[prost(string, tag="1")]
545 pub resource_type: ::prost::alloc::string::String,
546 /// The name of the resource being accessed. For example, a shared calendar
547 /// name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
548 /// error is
549 /// \[google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED\].
550 #[prost(string, tag="2")]
551 pub resource_name: ::prost::alloc::string::String,
552 /// The owner of the resource (optional).
553 /// For example, "user:<owner email>" or "project:<Google developer project
554 /// id>".
555 #[prost(string, tag="3")]
556 pub owner: ::prost::alloc::string::String,
557 /// Describes what error is encountered when accessing this resource.
558 /// For example, updating a cloud project may require the `writer` permission
559 /// on the developer console project.
560 #[prost(string, tag="4")]
561 pub description: ::prost::alloc::string::String,
562}
563/// Provides links to documentation or for performing an out of band action.
564///
565/// For example, if a quota check failed with an error indicating the calling
566/// project hasn't enabled the accessed service, this can contain a URL pointing
567/// directly to the right place in the developer console to flip the bit.
568#[allow(clippy::derive_partial_eq_without_eq)]
569#[derive(Clone, PartialEq, ::prost::Message)]
570pub struct Help {
571 /// URL(s) pointing to additional information on handling the current error.
572 #[prost(message, repeated, tag="1")]
573 pub links: ::prost::alloc::vec::Vec<help::Link>,
574}
575/// Nested message and enum types in `Help`.
576pub mod help {
577 /// Describes a URL link.
578 #[allow(clippy::derive_partial_eq_without_eq)]
579#[derive(Clone, PartialEq, ::prost::Message)]
580 pub struct Link {
581 /// Describes what the link offers.
582 #[prost(string, tag="1")]
583 pub description: ::prost::alloc::string::String,
584 /// The URL of the link.
585 #[prost(string, tag="2")]
586 pub url: ::prost::alloc::string::String,
587 }
588}
589/// Provides a localized error message that is safe to return to the user
590/// which can be attached to an RPC error.
591#[allow(clippy::derive_partial_eq_without_eq)]
592#[derive(Clone, PartialEq, ::prost::Message)]
593pub struct LocalizedMessage {
594 /// The locale used following the specification defined at
595 /// <https://www.rfc-editor.org/rfc/bcp/bcp47.txt.>
596 /// Examples are: "en-US", "fr-CH", "es-MX"
597 #[prost(string, tag="1")]
598 pub locale: ::prost::alloc::string::String,
599 /// The localized error message in the above locale.
600 #[prost(string, tag="2")]
601 pub message: ::prost::alloc::string::String,
602}
603// @@protoc_insertion_point(module)