#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Status {
#[prost(int32, tag="1")]
pub code: i32,
#[prost(string, tag="2")]
pub message: ::prost::alloc::string::String,
#[prost(message, repeated, tag="3")]
pub details: ::prost::alloc::vec::Vec<::prost_types::Any>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Code {
Ok = 0,
Cancelled = 1,
Unknown = 2,
InvalidArgument = 3,
DeadlineExceeded = 4,
NotFound = 5,
AlreadyExists = 6,
PermissionDenied = 7,
Unauthenticated = 16,
ResourceExhausted = 8,
FailedPrecondition = 9,
Aborted = 10,
OutOfRange = 11,
Unimplemented = 12,
Internal = 13,
Unavailable = 14,
DataLoss = 15,
}
impl Code {
pub fn as_str_name(&self) -> &'static str {
match self {
Code::Ok => "OK",
Code::Cancelled => "CANCELLED",
Code::Unknown => "UNKNOWN",
Code::InvalidArgument => "INVALID_ARGUMENT",
Code::DeadlineExceeded => "DEADLINE_EXCEEDED",
Code::NotFound => "NOT_FOUND",
Code::AlreadyExists => "ALREADY_EXISTS",
Code::PermissionDenied => "PERMISSION_DENIED",
Code::Unauthenticated => "UNAUTHENTICATED",
Code::ResourceExhausted => "RESOURCE_EXHAUSTED",
Code::FailedPrecondition => "FAILED_PRECONDITION",
Code::Aborted => "ABORTED",
Code::OutOfRange => "OUT_OF_RANGE",
Code::Unimplemented => "UNIMPLEMENTED",
Code::Internal => "INTERNAL",
Code::Unavailable => "UNAVAILABLE",
Code::DataLoss => "DATA_LOSS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OK" => Some(Self::Ok),
"CANCELLED" => Some(Self::Cancelled),
"UNKNOWN" => Some(Self::Unknown),
"INVALID_ARGUMENT" => Some(Self::InvalidArgument),
"DEADLINE_EXCEEDED" => Some(Self::DeadlineExceeded),
"NOT_FOUND" => Some(Self::NotFound),
"ALREADY_EXISTS" => Some(Self::AlreadyExists),
"PERMISSION_DENIED" => Some(Self::PermissionDenied),
"UNAUTHENTICATED" => Some(Self::Unauthenticated),
"RESOURCE_EXHAUSTED" => Some(Self::ResourceExhausted),
"FAILED_PRECONDITION" => Some(Self::FailedPrecondition),
"ABORTED" => Some(Self::Aborted),
"OUT_OF_RANGE" => Some(Self::OutOfRange),
"UNIMPLEMENTED" => Some(Self::Unimplemented),
"INTERNAL" => Some(Self::Internal),
"UNAVAILABLE" => Some(Self::Unavailable),
"DATA_LOSS" => Some(Self::DataLoss),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ErrorInfo {
#[prost(string, tag="1")]
pub reason: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub domain: ::prost::alloc::string::String,
#[prost(map="string, string", tag="3")]
pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetryInfo {
#[prost(message, optional, tag="1")]
pub retry_delay: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DebugInfo {
#[prost(string, repeated, tag="1")]
pub stack_entries: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag="2")]
pub detail: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuotaFailure {
#[prost(message, repeated, tag="1")]
pub violations: ::prost::alloc::vec::Vec<quota_failure::Violation>,
}
pub mod quota_failure {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Violation {
#[prost(string, tag="1")]
pub subject: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub api_service: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub quota_metric: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub quota_id: ::prost::alloc::string::String,
#[prost(map="string, string", tag="6")]
pub quota_dimensions: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(int64, tag="7")]
pub quota_value: i64,
#[prost(int64, optional, tag="8")]
pub future_quota_value: ::core::option::Option<i64>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreconditionFailure {
#[prost(message, repeated, tag="1")]
pub violations: ::prost::alloc::vec::Vec<precondition_failure::Violation>,
}
pub mod precondition_failure {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Violation {
#[prost(string, tag="1")]
pub r#type: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub subject: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub description: ::prost::alloc::string::String,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BadRequest {
#[prost(message, repeated, tag="1")]
pub field_violations: ::prost::alloc::vec::Vec<bad_request::FieldViolation>,
}
pub mod bad_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldViolation {
#[prost(string, tag="1")]
pub field: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub reason: ::prost::alloc::string::String,
#[prost(message, optional, tag="4")]
pub localized_message: ::core::option::Option<super::LocalizedMessage>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestInfo {
#[prost(string, tag="1")]
pub request_id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub serving_data: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceInfo {
#[prost(string, tag="1")]
pub resource_type: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub resource_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub owner: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub description: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Help {
#[prost(message, repeated, tag="1")]
pub links: ::prost::alloc::vec::Vec<help::Link>,
}
pub mod help {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Link {
#[prost(string, tag="1")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub url: ::prost::alloc::string::String,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalizedMessage {
#[prost(string, tag="1")]
pub locale: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub message: ::prost::alloc::string::String,
}