yandex-cloud 2025.4.14

Generated gRPC clients for the Yandex Cloud API
Documentation
/// Claims representation, see <https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims> for details.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubjectClaims {
    /// Subject - Identifier for the End-User at the Issuer.
    #[prost(string, tag = "1")]
    pub sub: ::prost::alloc::string::String,
    /// End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.
    #[prost(string, tag = "3")]
    pub given_name: ::prost::alloc::string::String,
    /// Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.
    #[prost(string, tag = "4")]
    pub family_name: ::prost::alloc::string::String,
    /// Shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe.
    /// This value MAY be any valid JSON string including special characters such as @, /, or whitespace. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.
    #[prost(string, tag = "7")]
    pub preferred_username: ::prost::alloc::string::String,
    /// URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file),
    /// rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.
    #[prost(string, tag = "9")]
    pub picture: ::prost::alloc::string::String,
    /// End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 \[RFC5322\] addr-spec syntax.
    /// The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.
    #[prost(string, tag = "11")]
    pub email: ::prost::alloc::string::String,
    /// String from zoneinfo \[zoneinfo\] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.
    #[prost(string, tag = "15")]
    pub zoneinfo: ::prost::alloc::string::String,
    /// End-User's locale, represented as a BCP47 \[RFC5646\] language tag. This is typically an ISO 639-1 Alpha-2 \[ISO639-1\] language code in lowercase and an ISO 3166-1 Alpha-2 \[ISO3166-1\] country code in uppercase, separated by a dash.
    /// For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.
    #[prost(string, tag = "16")]
    pub locale: ::prost::alloc::string::String,
    /// End-User's preferred telephone number. E.164 \[E.164\] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400.
    /// If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 \[RFC3966\] extension syntax, for example, +1 (604) 555-1234;ext=5678.
    #[prost(string, tag = "17")]
    pub phone_number: ::prost::alloc::string::String,
    /// Subject type.
    #[prost(enumeration = "SubjectType", tag = "99")]
    pub sub_type: i32,
    /// User federation, non-empty only for federated users.
    #[prost(message, optional, tag = "100")]
    pub federation: ::core::option::Option<Federation>,
    /// Last time the access token was created. Filled only for federated users (not for global users).
    #[prost(message, optional, tag = "105")]
    pub last_authenticated_at: ::core::option::Option<::prost_types::Timestamp>,
}
/// Minimalistic analog of yandex.cloud.organizationmanager.v1.saml.Federation
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Federation {
    /// ID of the federation.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Name of the federation. The name is unique within the cloud or organization
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SubjectType {
    Unspecified = 0,
    UserAccount = 1,
    ServiceAccount = 2,
    Group = 3,
    Invitee = 4,
}
impl SubjectType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            SubjectType::Unspecified => "SUBJECT_TYPE_UNSPECIFIED",
            SubjectType::UserAccount => "USER_ACCOUNT",
            SubjectType::ServiceAccount => "SERVICE_ACCOUNT",
            SubjectType::Group => "GROUP",
            SubjectType::Invitee => "INVITEE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SUBJECT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "USER_ACCOUNT" => Some(Self::UserAccount),
            "SERVICE_ACCOUNT" => Some(Self::ServiceAccount),
            "GROUP" => Some(Self::Group),
            "INVITEE" => Some(Self::Invitee),
            _ => None,
        }
    }
}