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)]
pub struct UpdateAssessmentControlInput {
    /// <p>The unique identifier for the assessment.</p>
    pub assessment_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier for the control set.</p>
    pub control_set_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier for the control.</p>
    pub control_id: ::std::option::Option<::std::string::String>,
    /// <p>The status of the control.</p>
    pub control_status: ::std::option::Option<crate::types::ControlStatus>,
    /// <p>The comment body text for the control.</p>
    pub comment_body: ::std::option::Option<::std::string::String>,
}
impl UpdateAssessmentControlInput {
    /// <p>The unique identifier for the assessment.</p>
    pub fn assessment_id(&self) -> ::std::option::Option<&str> {
        self.assessment_id.as_deref()
    }
    /// <p>The unique identifier for the control set.</p>
    pub fn control_set_id(&self) -> ::std::option::Option<&str> {
        self.control_set_id.as_deref()
    }
    /// <p>The unique identifier for the control.</p>
    pub fn control_id(&self) -> ::std::option::Option<&str> {
        self.control_id.as_deref()
    }
    /// <p>The status of the control.</p>
    pub fn control_status(&self) -> ::std::option::Option<&crate::types::ControlStatus> {
        self.control_status.as_ref()
    }
    /// <p>The comment body text for the control.</p>
    pub fn comment_body(&self) -> ::std::option::Option<&str> {
        self.comment_body.as_deref()
    }
}
impl ::std::fmt::Debug for UpdateAssessmentControlInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateAssessmentControlInput");
        formatter.field("assessment_id", &self.assessment_id);
        formatter.field("control_set_id", &self.control_set_id);
        formatter.field("control_id", &self.control_id);
        formatter.field("control_status", &self.control_status);
        formatter.field("comment_body", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl UpdateAssessmentControlInput {
    /// Creates a new builder-style object to manufacture [`UpdateAssessmentControlInput`](crate::operation::update_assessment_control::UpdateAssessmentControlInput).
    pub fn builder() -> crate::operation::update_assessment_control::builders::UpdateAssessmentControlInputBuilder {
        crate::operation::update_assessment_control::builders::UpdateAssessmentControlInputBuilder::default()
    }
}

/// A builder for [`UpdateAssessmentControlInput`](crate::operation::update_assessment_control::UpdateAssessmentControlInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateAssessmentControlInputBuilder {
    pub(crate) assessment_id: ::std::option::Option<::std::string::String>,
    pub(crate) control_set_id: ::std::option::Option<::std::string::String>,
    pub(crate) control_id: ::std::option::Option<::std::string::String>,
    pub(crate) control_status: ::std::option::Option<crate::types::ControlStatus>,
    pub(crate) comment_body: ::std::option::Option<::std::string::String>,
}
impl UpdateAssessmentControlInputBuilder {
    /// <p>The unique identifier for the assessment.</p>
    /// This field is required.
    pub fn assessment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.assessment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the assessment.</p>
    pub fn set_assessment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.assessment_id = input;
        self
    }
    /// <p>The unique identifier for the assessment.</p>
    pub fn get_assessment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.assessment_id
    }
    /// <p>The unique identifier for the control set.</p>
    /// This field is required.
    pub fn control_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.control_set_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the control set.</p>
    pub fn set_control_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.control_set_id = input;
        self
    }
    /// <p>The unique identifier for the control set.</p>
    pub fn get_control_set_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.control_set_id
    }
    /// <p>The unique identifier for the control.</p>
    /// This field is required.
    pub fn control_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.control_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the control.</p>
    pub fn set_control_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.control_id = input;
        self
    }
    /// <p>The unique identifier for the control.</p>
    pub fn get_control_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.control_id
    }
    /// <p>The status of the control.</p>
    pub fn control_status(mut self, input: crate::types::ControlStatus) -> Self {
        self.control_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the control.</p>
    pub fn set_control_status(mut self, input: ::std::option::Option<crate::types::ControlStatus>) -> Self {
        self.control_status = input;
        self
    }
    /// <p>The status of the control.</p>
    pub fn get_control_status(&self) -> &::std::option::Option<crate::types::ControlStatus> {
        &self.control_status
    }
    /// <p>The comment body text for the control.</p>
    pub fn comment_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.comment_body = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The comment body text for the control.</p>
    pub fn set_comment_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.comment_body = input;
        self
    }
    /// <p>The comment body text for the control.</p>
    pub fn get_comment_body(&self) -> &::std::option::Option<::std::string::String> {
        &self.comment_body
    }
    /// Consumes the builder and constructs a [`UpdateAssessmentControlInput`](crate::operation::update_assessment_control::UpdateAssessmentControlInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_assessment_control::UpdateAssessmentControlInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_assessment_control::UpdateAssessmentControlInput {
            assessment_id: self.assessment_id,
            control_set_id: self.control_set_id,
            control_id: self.control_id,
            control_status: self.control_status,
            comment_body: self.comment_body,
        })
    }
}
impl ::std::fmt::Debug for UpdateAssessmentControlInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateAssessmentControlInputBuilder");
        formatter.field("assessment_id", &self.assessment_id);
        formatter.field("control_set_id", &self.control_set_id);
        formatter.field("control_id", &self.control_id);
        formatter.field("control_status", &self.control_status);
        formatter.field("comment_body", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}