nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct CreateApiKeyRequest {
    #[builder(into)]
    #[serde(rename = "apiKeyName")]
    api_key_name: String,
    #[builder(default, into)]
    #[serde(
        rename = "expiresAfterDays",
        skip_serializing_if = "Option::is_none",
        default
    )]
    expires_after_days: Option<conjure_object::SafeLong>,
}
impl CreateApiKeyRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(api_key_name: impl Into<String>) -> Self {
        Self::builder().api_key_name(api_key_name).build()
    }
    /// The name of the API key to create.
    #[inline]
    pub fn api_key_name(&self) -> &str {
        &*self.api_key_name
    }
    /// The number of days after which the API key will expire.
    /// If omitted, the API key will not expire.
    #[inline]
    pub fn expires_after_days(&self) -> Option<conjure_object::SafeLong> {
        self.expires_after_days.as_ref().map(|o| *o)
    }
}