aws-sdk-securityagent 1.1.0

AWS SDK for AWS Security Agent
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 {
    /// ARN of the IAM Identity Center instance used for user authentication. Optional for non-IdC applications
    pub idc_instance_arn: ::std::option::Option<::std::string::String>,
    /// ARN of the IAM role that the application uses to access AWS resources on your behalf
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// Default KMS key identifier used to encrypt application data
    pub default_kms_key_id: ::std::option::Option<::std::string::String>,
    /// Tags to associate with the application
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateApplicationInput {
    /// ARN of the IAM Identity Center instance used for user authentication. Optional for non-IdC applications
    pub fn idc_instance_arn(&self) -> ::std::option::Option<&str> {
        self.idc_instance_arn.as_deref()
    }
    /// ARN of the IAM role that the application uses to access AWS resources on your behalf
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// Default KMS key identifier used to encrypt application data
    pub fn default_kms_key_id(&self) -> ::std::option::Option<&str> {
        self.default_kms_key_id.as_deref()
    }
    /// Tags to associate with the application
    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) idc_instance_arn: ::std::option::Option<::std::string::String>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) default_kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateApplicationInputBuilder {
    /// ARN of the IAM Identity Center instance used for user authentication. Optional for non-IdC applications
    pub fn idc_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.idc_instance_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// ARN of the IAM Identity Center instance used for user authentication. Optional for non-IdC applications
    pub fn set_idc_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.idc_instance_arn = input;
        self
    }
    /// ARN of the IAM Identity Center instance used for user authentication. Optional for non-IdC applications
    pub fn get_idc_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.idc_instance_arn
    }
    /// ARN of the IAM role that the application uses to access AWS resources on your behalf
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// ARN of the IAM role that the application uses to access AWS resources on your behalf
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// ARN of the IAM role that the application uses to access AWS resources on your behalf
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// Default KMS key identifier used to encrypt application data
    pub fn default_kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.default_kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Default KMS key identifier used to encrypt application data
    pub fn set_default_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.default_kms_key_id = input;
        self
    }
    /// Default KMS key identifier used to encrypt application data
    pub fn get_default_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.default_kms_key_id
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// Tags to associate with the application
    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
    }
    /// Tags to associate with the application
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// Tags to associate with the application
    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 {
            idc_instance_arn: self.idc_instance_arn,
            role_arn: self.role_arn,
            default_kms_key_id: self.default_kms_key_id,
            tags: self.tags,
        })
    }
}