#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NdsIdentity {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(enumeration="IdentityType", tag="2")]
pub r#type: i32,
#[prost(map="string, string", tag="3")]
pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(string, repeated, tag="10")]
pub attached_policy_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IdentityType {
Unspecified = 0,
Player = 1,
System = 2,
Ai = 3,
External = 4,
}
impl IdentityType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "IDENTITY_TYPE_UNSPECIFIED",
Self::Player => "IDENTITY_TYPE_PLAYER",
Self::System => "IDENTITY_TYPE_SYSTEM",
Self::Ai => "IDENTITY_TYPE_AI",
Self::External => "IDENTITY_TYPE_EXTERNAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"IDENTITY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"IDENTITY_TYPE_PLAYER" => Some(Self::Player),
"IDENTITY_TYPE_SYSTEM" => Some(Self::System),
"IDENTITY_TYPE_AI" => Some(Self::Ai),
"IDENTITY_TYPE_EXTERNAL" => Some(Self::External),
_ => None,
}
}
}