aws-sdk-accountaccess 1.4.0

AWS SDK for Account Access
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 CreateApplicationInput {
    /// <p>Specifies the identity source for the application. The identity source defines the IAM Identity Center instance that provides principals for entitlements.</p>
    pub identity_source: ::std::option::Option<crate::types::IdentitySource>,
    /// <p>Specifies the tags to assign to the application.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateApplicationInput {
    /// <p>Specifies the identity source for the application. The identity source defines the IAM Identity Center instance that provides principals for entitlements.</p>
    pub fn identity_source(&self) -> ::std::option::Option<&crate::types::IdentitySource> {
        self.identity_source.as_ref()
    }
    /// <p>Specifies the tags to assign to the application.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateApplicationInput {
    /// Creates a new builder-style object to manufacture [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
    pub fn builder() -> crate::operation::create_application::builders::CreateApplicationInputBuilder {
        crate::operation::create_application::builders::CreateApplicationInputBuilder::default()
    }
}

/// A builder for [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateApplicationInputBuilder {
    pub(crate) identity_source: ::std::option::Option<crate::types::IdentitySource>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateApplicationInputBuilder {
    /// <p>Specifies the identity source for the application. The identity source defines the IAM Identity Center instance that provides principals for entitlements.</p>
    /// This field is required.
    pub fn identity_source(mut self, input: crate::types::IdentitySource) -> Self {
        self.identity_source = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the identity source for the application. The identity source defines the IAM Identity Center instance that provides principals for entitlements.</p>
    pub fn set_identity_source(mut self, input: ::std::option::Option<crate::types::IdentitySource>) -> Self {
        self.identity_source = input;
        self
    }
    /// <p>Specifies the identity source for the application. The identity source defines the IAM Identity Center instance that provides principals for entitlements.</p>
    pub fn get_identity_source(&self) -> &::std::option::Option<crate::types::IdentitySource> {
        &self.identity_source
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Specifies the tags to assign to the application.</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>Specifies the tags to assign to the application.</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>Specifies the tags to assign to the application.</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 [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_application::CreateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_application::CreateApplicationInput {
            identity_source: self.identity_source,
            tags: self.tags,
        })
    }
}