#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Key {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub details: ::core::option::Option<super::super::v1::ObjectDetails>,
#[prost(enumeration="KeyType", tag="3")]
pub r#type: i32,
#[prost(message, optional, tag="4")]
pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum KeyType {
Unspecified = 0,
Json = 1,
}
impl KeyType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "KEY_TYPE_UNSPECIFIED",
Self::Json => "KEY_TYPE_JSON",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KEY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"KEY_TYPE_JSON" => Some(Self::Json),
_ => None,
}
}
}