aws-sdk-mpa 1.30.0

AWS SDK for AWS Multi-party Approval
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)]
pub struct CreateIdentitySourceInput {
    /// <p>A <code> IdentitySourceParameters</code> object. Contains details for the resource that provides identities to the identity source. For example, an IAM Identity Center instance.</p>
    pub identity_source_parameters: ::std::option::Option<crate::types::IdentitySourceParameters>,
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services populates this field.</p><note>
    /// <p><b>What is idempotency?</b></p>
    /// <p>When you make a mutating API request, the request typically returns a result before the operation's asynchronous workflows have completed. Operations might also time out or encounter other server issues before they complete, even though the request has already returned a result. This could make it difficult to determine whether the request succeeded or not, and could lead to multiple retries to ensure that the operation completes successfully. However, if the original request and the subsequent retries are successful, the operation is completed multiple times. This means that you might create more resources than you intended.</p>
    /// <p><i>Idempotency</i> ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.</p>
    /// </note>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>Tag you want to attach to the identity source.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateIdentitySourceInput {
    /// <p>A <code> IdentitySourceParameters</code> object. Contains details for the resource that provides identities to the identity source. For example, an IAM Identity Center instance.</p>
    pub fn identity_source_parameters(&self) -> ::std::option::Option<&crate::types::IdentitySourceParameters> {
        self.identity_source_parameters.as_ref()
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services populates this field.</p><note>
    /// <p><b>What is idempotency?</b></p>
    /// <p>When you make a mutating API request, the request typically returns a result before the operation's asynchronous workflows have completed. Operations might also time out or encounter other server issues before they complete, even though the request has already returned a result. This could make it difficult to determine whether the request succeeded or not, and could lead to multiple retries to ensure that the operation completes successfully. However, if the original request and the subsequent retries are successful, the operation is completed multiple times. This means that you might create more resources than you intended.</p>
    /// <p><i>Idempotency</i> ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.</p>
    /// </note>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>Tag you want to attach to the identity source.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::std::fmt::Debug for CreateIdentitySourceInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateIdentitySourceInput");
        formatter.field("identity_source_parameters", &self.identity_source_parameters);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CreateIdentitySourceInput {
    /// Creates a new builder-style object to manufacture [`CreateIdentitySourceInput`](crate::operation::create_identity_source::CreateIdentitySourceInput).
    pub fn builder() -> crate::operation::create_identity_source::builders::CreateIdentitySourceInputBuilder {
        crate::operation::create_identity_source::builders::CreateIdentitySourceInputBuilder::default()
    }
}

/// A builder for [`CreateIdentitySourceInput`](crate::operation::create_identity_source::CreateIdentitySourceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateIdentitySourceInputBuilder {
    pub(crate) identity_source_parameters: ::std::option::Option<crate::types::IdentitySourceParameters>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateIdentitySourceInputBuilder {
    /// <p>A <code> IdentitySourceParameters</code> object. Contains details for the resource that provides identities to the identity source. For example, an IAM Identity Center instance.</p>
    /// This field is required.
    pub fn identity_source_parameters(mut self, input: crate::types::IdentitySourceParameters) -> Self {
        self.identity_source_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>A <code> IdentitySourceParameters</code> object. Contains details for the resource that provides identities to the identity source. For example, an IAM Identity Center instance.</p>
    pub fn set_identity_source_parameters(mut self, input: ::std::option::Option<crate::types::IdentitySourceParameters>) -> Self {
        self.identity_source_parameters = input;
        self
    }
    /// <p>A <code> IdentitySourceParameters</code> object. Contains details for the resource that provides identities to the identity source. For example, an IAM Identity Center instance.</p>
    pub fn get_identity_source_parameters(&self) -> &::std::option::Option<crate::types::IdentitySourceParameters> {
        &self.identity_source_parameters
    }
    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services populates this field.</p><note>
    /// <p><b>What is idempotency?</b></p>
    /// <p>When you make a mutating API request, the request typically returns a result before the operation's asynchronous workflows have completed. Operations might also time out or encounter other server issues before they complete, even though the request has already returned a result. This could make it difficult to determine whether the request succeeded or not, and could lead to multiple retries to ensure that the operation completes successfully. However, if the original request and the subsequent retries are successful, the operation is completed multiple times. This means that you might create more resources than you intended.</p>
    /// <p><i>Idempotency</i> ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.</p>
    /// </note>
    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 not provided, the Amazon Web Services populates this field.</p><note>
    /// <p><b>What is idempotency?</b></p>
    /// <p>When you make a mutating API request, the request typically returns a result before the operation's asynchronous workflows have completed. Operations might also time out or encounter other server issues before they complete, even though the request has already returned a result. This could make it difficult to determine whether the request succeeded or not, and could lead to multiple retries to ensure that the operation completes successfully. However, if the original request and the subsequent retries are successful, the operation is completed multiple times. This means that you might create more resources than you intended.</p>
    /// <p><i>Idempotency</i> ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.</p>
    /// </note>
    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 not provided, the Amazon Web Services populates this field.</p><note>
    /// <p><b>What is idempotency?</b></p>
    /// <p>When you make a mutating API request, the request typically returns a result before the operation's asynchronous workflows have completed. Operations might also time out or encounter other server issues before they complete, even though the request has already returned a result. This could make it difficult to determine whether the request succeeded or not, and could lead to multiple retries to ensure that the operation completes successfully. However, if the original request and the subsequent retries are successful, the operation is completed multiple times. This means that you might create more resources than you intended.</p>
    /// <p><i>Idempotency</i> ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries complete successfully without performing any further actions.</p>
    /// </note>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Tag you want to attach to the identity source.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Tag you want to attach to the identity source.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Tag you want to attach to the identity source.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateIdentitySourceInput`](crate::operation::create_identity_source::CreateIdentitySourceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_identity_source::CreateIdentitySourceInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_identity_source::CreateIdentitySourceInput {
            identity_source_parameters: self.identity_source_parameters,
            client_token: self.client_token,
            tags: self.tags,
        })
    }
}
impl ::std::fmt::Debug for CreateIdentitySourceInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateIdentitySourceInputBuilder");
        formatter.field("identity_source_parameters", &self.identity_source_parameters);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}