nominal-api 0.1240.0

API bindings for the Nominal platform
Documentation
/// Request a short-lived bearer token for the sandbox workspace configured on
/// the gatekeeper service. Intended for in-cluster integration test runners.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    Copy
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct IssueSandboxTokenRequest {
    #[builder(default, into)]
    #[serde(
        rename = "requestedTtlSeconds",
        skip_serializing_if = "Option::is_none",
        default
    )]
    requested_ttl_seconds: Option<conjure_object::SafeLong>,
}
impl IssueSandboxTokenRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// Desired token lifetime in seconds. Capped server-side at 3600 (1h).
    /// Omit to use the server default (the cap). Non-positive values are
    /// rejected with SandboxTokenUnavailable rather than silently
    /// upgraded to the cap.
    #[inline]
    pub fn requested_ttl_seconds(&self) -> Option<conjure_object::SafeLong> {
        self.requested_ttl_seconds.as_ref().map(|o| *o)
    }
}