aws-sdk-nimble 1.46.0

AWS SDK for AmazonNimbleStudio
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AcceptEulasInput {
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The EULA ID.</p>
    pub eula_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The studio ID.</p>
    pub studio_id: ::std::option::Option<::std::string::String>,
}
impl AcceptEulasInput {
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The EULA ID.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.eula_ids.is_none()`.
    pub fn eula_ids(&self) -> &[::std::string::String] {
        self.eula_ids.as_deref().unwrap_or_default()
    }
    /// <p>The studio ID.</p>
    pub fn studio_id(&self) -> ::std::option::Option<&str> {
        self.studio_id.as_deref()
    }
}
impl AcceptEulasInput {
    /// Creates a new builder-style object to manufacture [`AcceptEulasInput`](crate::operation::accept_eulas::AcceptEulasInput).
    pub fn builder() -> crate::operation::accept_eulas::builders::AcceptEulasInputBuilder {
        crate::operation::accept_eulas::builders::AcceptEulasInputBuilder::default()
    }
}

/// A builder for [`AcceptEulasInput`](crate::operation::accept_eulas::AcceptEulasInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AcceptEulasInputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) eula_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) studio_id: ::std::option::Option<::std::string::String>,
}
impl AcceptEulasInputBuilder {
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Appends an item to `eula_ids`.
    ///
    /// To override the contents of this collection use [`set_eula_ids`](Self::set_eula_ids).
    ///
    /// <p>The EULA ID.</p>
    pub fn eula_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.eula_ids.unwrap_or_default();
        v.push(input.into());
        self.eula_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The EULA ID.</p>
    pub fn set_eula_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.eula_ids = input;
        self
    }
    /// <p>The EULA ID.</p>
    pub fn get_eula_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.eula_ids
    }
    /// <p>The studio ID.</p>
    /// This field is required.
    pub fn studio_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.studio_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The studio ID.</p>
    pub fn set_studio_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.studio_id = input;
        self
    }
    /// <p>The studio ID.</p>
    pub fn get_studio_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.studio_id
    }
    /// Consumes the builder and constructs a [`AcceptEulasInput`](crate::operation::accept_eulas::AcceptEulasInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::accept_eulas::AcceptEulasInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::accept_eulas::AcceptEulasInput {
            client_token: self.client_token,
            eula_ids: self.eula_ids,
            studio_id: self.studio_id,
        })
    }
}