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 PutStudioMembersInput {
    /// <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 ID of the identity store.</p>
    pub identity_store_id: ::std::option::Option<::std::string::String>,
    /// <p>A list of members.</p>
    pub members: ::std::option::Option<::std::vec::Vec<crate::types::NewStudioMember>>,
    /// <p>The studio ID.</p>
    pub studio_id: ::std::option::Option<::std::string::String>,
}
impl PutStudioMembersInput {
    /// <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 ID of the identity store.</p>
    pub fn identity_store_id(&self) -> ::std::option::Option<&str> {
        self.identity_store_id.as_deref()
    }
    /// <p>A list of members.</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 `.members.is_none()`.
    pub fn members(&self) -> &[crate::types::NewStudioMember] {
        self.members.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 PutStudioMembersInput {
    /// Creates a new builder-style object to manufacture [`PutStudioMembersInput`](crate::operation::put_studio_members::PutStudioMembersInput).
    pub fn builder() -> crate::operation::put_studio_members::builders::PutStudioMembersInputBuilder {
        crate::operation::put_studio_members::builders::PutStudioMembersInputBuilder::default()
    }
}

/// A builder for [`PutStudioMembersInput`](crate::operation::put_studio_members::PutStudioMembersInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutStudioMembersInputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) identity_store_id: ::std::option::Option<::std::string::String>,
    pub(crate) members: ::std::option::Option<::std::vec::Vec<crate::types::NewStudioMember>>,
    pub(crate) studio_id: ::std::option::Option<::std::string::String>,
}
impl PutStudioMembersInputBuilder {
    /// <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
    }
    /// <p>The ID of the identity store.</p>
    /// This field is required.
    pub fn identity_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identity_store_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the identity store.</p>
    pub fn set_identity_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identity_store_id = input;
        self
    }
    /// <p>The ID of the identity store.</p>
    pub fn get_identity_store_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.identity_store_id
    }
    /// Appends an item to `members`.
    ///
    /// To override the contents of this collection use [`set_members`](Self::set_members).
    ///
    /// <p>A list of members.</p>
    pub fn members(mut self, input: crate::types::NewStudioMember) -> Self {
        let mut v = self.members.unwrap_or_default();
        v.push(input);
        self.members = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of members.</p>
    pub fn set_members(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NewStudioMember>>) -> Self {
        self.members = input;
        self
    }
    /// <p>A list of members.</p>
    pub fn get_members(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NewStudioMember>> {
        &self.members
    }
    /// <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 [`PutStudioMembersInput`](crate::operation::put_studio_members::PutStudioMembersInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::put_studio_members::PutStudioMembersInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::put_studio_members::PutStudioMembersInput {
            client_token: self.client_token,
            identity_store_id: self.identity_store_id,
            members: self.members,
            studio_id: self.studio_id,
        })
    }
}