aws-sdk-securityhub 1.109.0

AWS SDK for AWS SecurityHub
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Provides information about a specific security standard.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Standard {
    /// <p>The ARN of the standard.</p>
    pub standards_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the standard.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the standard.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default.</p>
    /// <p>When Security Hub CSPM is enabled using the <code>EnableSecurityHub</code> API operation, the standard is enabled by default unless <code>EnableDefaultStandards</code> is set to <code>false</code>.</p>
    pub enabled_by_default: ::std::option::Option<bool>,
    /// <p>Provides details about the management of a standard.</p>
    pub standards_managed_by: ::std::option::Option<crate::types::StandardsManagedBy>,
}
impl Standard {
    /// <p>The ARN of the standard.</p>
    pub fn standards_arn(&self) -> ::std::option::Option<&str> {
        self.standards_arn.as_deref()
    }
    /// <p>The name of the standard.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description of the standard.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default.</p>
    /// <p>When Security Hub CSPM is enabled using the <code>EnableSecurityHub</code> API operation, the standard is enabled by default unless <code>EnableDefaultStandards</code> is set to <code>false</code>.</p>
    pub fn enabled_by_default(&self) -> ::std::option::Option<bool> {
        self.enabled_by_default
    }
    /// <p>Provides details about the management of a standard.</p>
    pub fn standards_managed_by(&self) -> ::std::option::Option<&crate::types::StandardsManagedBy> {
        self.standards_managed_by.as_ref()
    }
}
impl Standard {
    /// Creates a new builder-style object to manufacture [`Standard`](crate::types::Standard).
    pub fn builder() -> crate::types::builders::StandardBuilder {
        crate::types::builders::StandardBuilder::default()
    }
}

/// A builder for [`Standard`](crate::types::Standard).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StandardBuilder {
    pub(crate) standards_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) enabled_by_default: ::std::option::Option<bool>,
    pub(crate) standards_managed_by: ::std::option::Option<crate::types::StandardsManagedBy>,
}
impl StandardBuilder {
    /// <p>The ARN of the standard.</p>
    pub fn standards_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.standards_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the standard.</p>
    pub fn set_standards_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.standards_arn = input;
        self
    }
    /// <p>The ARN of the standard.</p>
    pub fn get_standards_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.standards_arn
    }
    /// <p>The name of the standard.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the standard.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the standard.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A description of the standard.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the standard.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the standard.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default.</p>
    /// <p>When Security Hub CSPM is enabled using the <code>EnableSecurityHub</code> API operation, the standard is enabled by default unless <code>EnableDefaultStandards</code> is set to <code>false</code>.</p>
    pub fn enabled_by_default(mut self, input: bool) -> Self {
        self.enabled_by_default = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default.</p>
    /// <p>When Security Hub CSPM is enabled using the <code>EnableSecurityHub</code> API operation, the standard is enabled by default unless <code>EnableDefaultStandards</code> is set to <code>false</code>.</p>
    pub fn set_enabled_by_default(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enabled_by_default = input;
        self
    }
    /// <p>Whether the standard is enabled by default. When Security Hub CSPM is enabled from the console, if a standard is enabled by default, the check box for that standard is selected by default.</p>
    /// <p>When Security Hub CSPM is enabled using the <code>EnableSecurityHub</code> API operation, the standard is enabled by default unless <code>EnableDefaultStandards</code> is set to <code>false</code>.</p>
    pub fn get_enabled_by_default(&self) -> &::std::option::Option<bool> {
        &self.enabled_by_default
    }
    /// <p>Provides details about the management of a standard.</p>
    pub fn standards_managed_by(mut self, input: crate::types::StandardsManagedBy) -> Self {
        self.standards_managed_by = ::std::option::Option::Some(input);
        self
    }
    /// <p>Provides details about the management of a standard.</p>
    pub fn set_standards_managed_by(mut self, input: ::std::option::Option<crate::types::StandardsManagedBy>) -> Self {
        self.standards_managed_by = input;
        self
    }
    /// <p>Provides details about the management of a standard.</p>
    pub fn get_standards_managed_by(&self) -> &::std::option::Option<crate::types::StandardsManagedBy> {
        &self.standards_managed_by
    }
    /// Consumes the builder and constructs a [`Standard`](crate::types::Standard).
    pub fn build(self) -> crate::types::Standard {
        crate::types::Standard {
            standards_arn: self.standards_arn,
            name: self.name,
            description: self.description,
            enabled_by_default: self.enabled_by_default,
            standards_managed_by: self.standards_managed_by,
        }
    }
}