#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetadataExchangeRequest {
#[prost(string, tag = "1")]
pub user_agent: ::prost::alloc::string::String,
#[prost(enumeration = "metadata_exchange_request::AuthType", tag = "2")]
pub auth_type: i32,
#[prost(string, tag = "3")]
pub oauth2_token: ::prost::alloc::string::String,
}
pub mod metadata_exchange_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum AuthType {
Unspecified = 0,
DbNative = 1,
AutoIam = 2,
}
impl AuthType {
pub fn as_str_name(&self) -> &'static str {
match self {
AuthType::Unspecified => "AUTH_TYPE_UNSPECIFIED",
AuthType::DbNative => "DB_NATIVE",
AuthType::AutoIam => "AUTO_IAM",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AUTH_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"DB_NATIVE" => Some(Self::DbNative),
"AUTO_IAM" => Some(Self::AutoIam),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetadataExchangeResponse {
#[prost(enumeration = "metadata_exchange_response::ResponseCode", tag = "1")]
pub response_code: i32,
#[prost(string, tag = "2")]
pub error: ::prost::alloc::string::String,
}
pub mod metadata_exchange_response {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ResponseCode {
Unspecified = 0,
Ok = 1,
Error = 2,
}
impl ResponseCode {
pub fn as_str_name(&self) -> &'static str {
match self {
ResponseCode::Unspecified => "RESPONSE_CODE_UNSPECIFIED",
ResponseCode::Ok => "OK",
ResponseCode::Error => "ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESPONSE_CODE_UNSPECIFIED" => Some(Self::Unspecified),
"OK" => Some(Self::Ok),
"ERROR" => Some(Self::Error),
_ => None,
}
}
}
}