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.

/// <p>The wrapper that contains the Amazon Web Services accounts that are in scope for the assessment.</p><note>
/// <p>You no longer need to specify which Amazon Web Services services are in scope when you create or update an assessment. Audit Manager infers the services in scope by examining your assessment controls and their data sources, and then mapping this information to the relevant Amazon Web Services services.</p>
/// <p>If an underlying data source changes for your assessment, we automatically update the services scope as needed to reflect the correct Amazon Web Services services. This ensures that your assessment collects accurate and comprehensive evidence about all of the relevant services in your AWS environment.</p>
/// </note>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Scope {
    /// <p>The Amazon Web Services accounts that are included in the scope of the assessment.</p>
    pub aws_accounts: ::std::option::Option<::std::vec::Vec<crate::types::AwsAccount>>,
    /// <p>The Amazon Web Services services that are included in the scope of the assessment.</p><important>
    /// <p>This API parameter is no longer supported. If you use this parameter to specify one or more Amazon Web Services services, Audit Manager ignores this input. Instead, the value for <code>awsServices</code> will show as empty.</p>
    /// </important>
    #[deprecated(
        note = "You can't specify services in scope when creating/updating an assessment. If you use the parameter to specify one or more AWS services, Audit Manager ignores the input. Instead the value of the parameter will show as empty indicating that the services are defined and managed by Audit Manager."
    )]
    pub aws_services: ::std::option::Option<::std::vec::Vec<crate::types::AwsService>>,
}
impl Scope {
    /// <p>The Amazon Web Services accounts that are included in the scope of the assessment.</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 `.aws_accounts.is_none()`.
    pub fn aws_accounts(&self) -> &[crate::types::AwsAccount] {
        self.aws_accounts.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Web Services services that are included in the scope of the assessment.</p><important>
    /// <p>This API parameter is no longer supported. If you use this parameter to specify one or more Amazon Web Services services, Audit Manager ignores this input. Instead, the value for <code>awsServices</code> will show as empty.</p>
    /// </important>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.aws_services.is_none()`.
    #[deprecated(
        note = "You can't specify services in scope when creating/updating an assessment. If you use the parameter to specify one or more AWS services, Audit Manager ignores the input. Instead the value of the parameter will show as empty indicating that the services are defined and managed by Audit Manager."
    )]
    pub fn aws_services(&self) -> &[crate::types::AwsService] {
        self.aws_services.as_deref().unwrap_or_default()
    }
}
impl ::std::fmt::Debug for Scope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Scope");
        formatter.field("aws_accounts", &"*** Sensitive Data Redacted ***");
        formatter.field("aws_services", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl Scope {
    /// Creates a new builder-style object to manufacture [`Scope`](crate::types::Scope).
    pub fn builder() -> crate::types::builders::ScopeBuilder {
        crate::types::builders::ScopeBuilder::default()
    }
}

/// A builder for [`Scope`](crate::types::Scope).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ScopeBuilder {
    pub(crate) aws_accounts: ::std::option::Option<::std::vec::Vec<crate::types::AwsAccount>>,
    pub(crate) aws_services: ::std::option::Option<::std::vec::Vec<crate::types::AwsService>>,
}
impl ScopeBuilder {
    /// Appends an item to `aws_accounts`.
    ///
    /// To override the contents of this collection use [`set_aws_accounts`](Self::set_aws_accounts).
    ///
    /// <p>The Amazon Web Services accounts that are included in the scope of the assessment.</p>
    pub fn aws_accounts(mut self, input: crate::types::AwsAccount) -> Self {
        let mut v = self.aws_accounts.unwrap_or_default();
        v.push(input);
        self.aws_accounts = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon Web Services accounts that are included in the scope of the assessment.</p>
    pub fn set_aws_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AwsAccount>>) -> Self {
        self.aws_accounts = input;
        self
    }
    /// <p>The Amazon Web Services accounts that are included in the scope of the assessment.</p>
    pub fn get_aws_accounts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AwsAccount>> {
        &self.aws_accounts
    }
    /// Appends an item to `aws_services`.
    ///
    /// To override the contents of this collection use [`set_aws_services`](Self::set_aws_services).
    ///
    /// <p>The Amazon Web Services services that are included in the scope of the assessment.</p><important>
    /// <p>This API parameter is no longer supported. If you use this parameter to specify one or more Amazon Web Services services, Audit Manager ignores this input. Instead, the value for <code>awsServices</code> will show as empty.</p>
    /// </important>
    #[deprecated(
        note = "You can't specify services in scope when creating/updating an assessment. If you use the parameter to specify one or more AWS services, Audit Manager ignores the input. Instead the value of the parameter will show as empty indicating that the services are defined and managed by Audit Manager."
    )]
    pub fn aws_services(mut self, input: crate::types::AwsService) -> Self {
        let mut v = self.aws_services.unwrap_or_default();
        v.push(input);
        self.aws_services = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Amazon Web Services services that are included in the scope of the assessment.</p><important>
    /// <p>This API parameter is no longer supported. If you use this parameter to specify one or more Amazon Web Services services, Audit Manager ignores this input. Instead, the value for <code>awsServices</code> will show as empty.</p>
    /// </important>
    #[deprecated(
        note = "You can't specify services in scope when creating/updating an assessment. If you use the parameter to specify one or more AWS services, Audit Manager ignores the input. Instead the value of the parameter will show as empty indicating that the services are defined and managed by Audit Manager."
    )]
    pub fn set_aws_services(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AwsService>>) -> Self {
        self.aws_services = input;
        self
    }
    /// <p>The Amazon Web Services services that are included in the scope of the assessment.</p><important>
    /// <p>This API parameter is no longer supported. If you use this parameter to specify one or more Amazon Web Services services, Audit Manager ignores this input. Instead, the value for <code>awsServices</code> will show as empty.</p>
    /// </important>
    #[deprecated(
        note = "You can't specify services in scope when creating/updating an assessment. If you use the parameter to specify one or more AWS services, Audit Manager ignores the input. Instead the value of the parameter will show as empty indicating that the services are defined and managed by Audit Manager."
    )]
    pub fn get_aws_services(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AwsService>> {
        &self.aws_services
    }
    /// Consumes the builder and constructs a [`Scope`](crate::types::Scope).
    pub fn build(self) -> crate::types::Scope {
        crate::types::Scope {
            aws_accounts: self.aws_accounts,
            aws_services: self.aws_services,
        }
    }
}
impl ::std::fmt::Debug for ScopeBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ScopeBuilder");
        formatter.field("aws_accounts", &"*** Sensitive Data Redacted ***");
        formatter.field("aws_services", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}