aws-sdk-auditmanager 1.102.0

AWS SDK for AWS Audit Manager
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 RegisterAccountInput {
    /// <p>The KMS key details.</p>
    pub kms_key: ::std::option::Option<::std::string::String>,
    /// <p>The delegated administrator account for Audit Manager.</p>
    pub delegated_admin_account: ::std::option::Option<::std::string::String>,
}
impl RegisterAccountInput {
    /// <p>The KMS key details.</p>
    pub fn kms_key(&self) -> ::std::option::Option<&str> {
        self.kms_key.as_deref()
    }
    /// <p>The delegated administrator account for Audit Manager.</p>
    pub fn delegated_admin_account(&self) -> ::std::option::Option<&str> {
        self.delegated_admin_account.as_deref()
    }
}
impl RegisterAccountInput {
    /// Creates a new builder-style object to manufacture [`RegisterAccountInput`](crate::operation::register_account::RegisterAccountInput).
    pub fn builder() -> crate::operation::register_account::builders::RegisterAccountInputBuilder {
        crate::operation::register_account::builders::RegisterAccountInputBuilder::default()
    }
}

/// A builder for [`RegisterAccountInput`](crate::operation::register_account::RegisterAccountInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RegisterAccountInputBuilder {
    pub(crate) kms_key: ::std::option::Option<::std::string::String>,
    pub(crate) delegated_admin_account: ::std::option::Option<::std::string::String>,
}
impl RegisterAccountInputBuilder {
    /// <p>The KMS key details.</p>
    pub fn kms_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The KMS key details.</p>
    pub fn set_kms_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key = input;
        self
    }
    /// <p>The KMS key details.</p>
    pub fn get_kms_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key
    }
    /// <p>The delegated administrator account for Audit Manager.</p>
    pub fn delegated_admin_account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.delegated_admin_account = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The delegated administrator account for Audit Manager.</p>
    pub fn set_delegated_admin_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.delegated_admin_account = input;
        self
    }
    /// <p>The delegated administrator account for Audit Manager.</p>
    pub fn get_delegated_admin_account(&self) -> &::std::option::Option<::std::string::String> {
        &self.delegated_admin_account
    }
    /// Consumes the builder and constructs a [`RegisterAccountInput`](crate::operation::register_account::RegisterAccountInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::register_account::RegisterAccountInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::register_account::RegisterAccountInput {
            kms_key: self.kms_key,
            delegated_admin_account: self.delegated_admin_account,
        })
    }
}