aws-sdk-securityhub 1.110.0

AWS SDK for AWS SecurityHub
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 UpdateStandardsControlInput {
    /// <p>The ARN of the security standard control to enable or disable.</p>
    pub standards_control_arn: ::std::option::Option<::std::string::String>,
    /// <p>The updated status of the security standard control.</p>
    pub control_status: ::std::option::Option<crate::types::ControlStatus>,
    /// <p>A description of the reason why you are disabling a security standard control. If you are disabling a control, then this is required.</p>
    pub disabled_reason: ::std::option::Option<::std::string::String>,
}
impl UpdateStandardsControlInput {
    /// <p>The ARN of the security standard control to enable or disable.</p>
    pub fn standards_control_arn(&self) -> ::std::option::Option<&str> {
        self.standards_control_arn.as_deref()
    }
    /// <p>The updated status of the security standard control.</p>
    pub fn control_status(&self) -> ::std::option::Option<&crate::types::ControlStatus> {
        self.control_status.as_ref()
    }
    /// <p>A description of the reason why you are disabling a security standard control. If you are disabling a control, then this is required.</p>
    pub fn disabled_reason(&self) -> ::std::option::Option<&str> {
        self.disabled_reason.as_deref()
    }
}
impl UpdateStandardsControlInput {
    /// Creates a new builder-style object to manufacture [`UpdateStandardsControlInput`](crate::operation::update_standards_control::UpdateStandardsControlInput).
    pub fn builder() -> crate::operation::update_standards_control::builders::UpdateStandardsControlInputBuilder {
        crate::operation::update_standards_control::builders::UpdateStandardsControlInputBuilder::default()
    }
}

/// A builder for [`UpdateStandardsControlInput`](crate::operation::update_standards_control::UpdateStandardsControlInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateStandardsControlInputBuilder {
    pub(crate) standards_control_arn: ::std::option::Option<::std::string::String>,
    pub(crate) control_status: ::std::option::Option<crate::types::ControlStatus>,
    pub(crate) disabled_reason: ::std::option::Option<::std::string::String>,
}
impl UpdateStandardsControlInputBuilder {
    /// <p>The ARN of the security standard control to enable or disable.</p>
    /// This field is required.
    pub fn standards_control_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.standards_control_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the security standard control to enable or disable.</p>
    pub fn set_standards_control_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.standards_control_arn = input;
        self
    }
    /// <p>The ARN of the security standard control to enable or disable.</p>
    pub fn get_standards_control_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.standards_control_arn
    }
    /// <p>The updated status of the security standard control.</p>
    pub fn control_status(mut self, input: crate::types::ControlStatus) -> Self {
        self.control_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated status of the security standard control.</p>
    pub fn set_control_status(mut self, input: ::std::option::Option<crate::types::ControlStatus>) -> Self {
        self.control_status = input;
        self
    }
    /// <p>The updated status of the security standard control.</p>
    pub fn get_control_status(&self) -> &::std::option::Option<crate::types::ControlStatus> {
        &self.control_status
    }
    /// <p>A description of the reason why you are disabling a security standard control. If you are disabling a control, then this is required.</p>
    pub fn disabled_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.disabled_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the reason why you are disabling a security standard control. If you are disabling a control, then this is required.</p>
    pub fn set_disabled_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.disabled_reason = input;
        self
    }
    /// <p>A description of the reason why you are disabling a security standard control. If you are disabling a control, then this is required.</p>
    pub fn get_disabled_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.disabled_reason
    }
    /// Consumes the builder and constructs a [`UpdateStandardsControlInput`](crate::operation::update_standards_control::UpdateStandardsControlInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_standards_control::UpdateStandardsControlInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_standards_control::UpdateStandardsControlInput {
            standards_control_arn: self.standards_control_arn,
            control_status: self.control_status,
            disabled_reason: self.disabled_reason,
        })
    }
}