aws-sdk-securityagent 1.4.0

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

/// <p>Input for updating an existing code review.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateCodeReviewInput {
    /// <p>The unique identifier of the code review to update.</p>
    pub code_review_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the agent space that contains the code review.</p>
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// <p>The updated title of the code review.</p>
    pub title: ::std::option::Option<::std::string::String>,
    /// <p>The updated assets for the code review.</p>
    pub assets: ::std::option::Option<crate::types::Assets>,
    /// <p>The updated IAM service role for the code review.</p>
    pub service_role: ::std::option::Option<::std::string::String>,
    /// <p>The updated CloudWatch Logs configuration for the code review.</p>
    pub log_config: ::std::option::Option<crate::types::CloudWatchLog>,
    /// <p>The updated code remediation strategy for the code review.</p>
    pub code_remediation_strategy: ::std::option::Option<crate::types::CodeRemediationStrategy>,
}
impl UpdateCodeReviewInput {
    /// <p>The unique identifier of the code review to update.</p>
    pub fn code_review_id(&self) -> ::std::option::Option<&str> {
        self.code_review_id.as_deref()
    }
    /// <p>The unique identifier of the agent space that contains the code review.</p>
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// <p>The updated title of the code review.</p>
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The updated assets for the code review.</p>
    pub fn assets(&self) -> ::std::option::Option<&crate::types::Assets> {
        self.assets.as_ref()
    }
    /// <p>The updated IAM service role for the code review.</p>
    pub fn service_role(&self) -> ::std::option::Option<&str> {
        self.service_role.as_deref()
    }
    /// <p>The updated CloudWatch Logs configuration for the code review.</p>
    pub fn log_config(&self) -> ::std::option::Option<&crate::types::CloudWatchLog> {
        self.log_config.as_ref()
    }
    /// <p>The updated code remediation strategy for the code review.</p>
    pub fn code_remediation_strategy(&self) -> ::std::option::Option<&crate::types::CodeRemediationStrategy> {
        self.code_remediation_strategy.as_ref()
    }
}
impl UpdateCodeReviewInput {
    /// Creates a new builder-style object to manufacture [`UpdateCodeReviewInput`](crate::operation::update_code_review::UpdateCodeReviewInput).
    pub fn builder() -> crate::operation::update_code_review::builders::UpdateCodeReviewInputBuilder {
        crate::operation::update_code_review::builders::UpdateCodeReviewInputBuilder::default()
    }
}

/// A builder for [`UpdateCodeReviewInput`](crate::operation::update_code_review::UpdateCodeReviewInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCodeReviewInputBuilder {
    pub(crate) code_review_id: ::std::option::Option<::std::string::String>,
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) assets: ::std::option::Option<crate::types::Assets>,
    pub(crate) service_role: ::std::option::Option<::std::string::String>,
    pub(crate) log_config: ::std::option::Option<crate::types::CloudWatchLog>,
    pub(crate) code_remediation_strategy: ::std::option::Option<crate::types::CodeRemediationStrategy>,
}
impl UpdateCodeReviewInputBuilder {
    /// <p>The unique identifier of the code review to update.</p>
    /// This field is required.
    pub fn code_review_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.code_review_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the code review to update.</p>
    pub fn set_code_review_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.code_review_id = input;
        self
    }
    /// <p>The unique identifier of the code review to update.</p>
    pub fn get_code_review_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.code_review_id
    }
    /// <p>The unique identifier of the agent space that contains the code review.</p>
    /// This field is required.
    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the agent space that contains the code review.</p>
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// <p>The unique identifier of the agent space that contains the code review.</p>
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// <p>The updated title of the code review.</p>
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The updated title of the code review.</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// <p>The updated title of the code review.</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// <p>The updated assets for the code review.</p>
    pub fn assets(mut self, input: crate::types::Assets) -> Self {
        self.assets = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated assets for the code review.</p>
    pub fn set_assets(mut self, input: ::std::option::Option<crate::types::Assets>) -> Self {
        self.assets = input;
        self
    }
    /// <p>The updated assets for the code review.</p>
    pub fn get_assets(&self) -> &::std::option::Option<crate::types::Assets> {
        &self.assets
    }
    /// <p>The updated IAM service role for the code review.</p>
    pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_role = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The updated IAM service role for the code review.</p>
    pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_role = input;
        self
    }
    /// <p>The updated IAM service role for the code review.</p>
    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_role
    }
    /// <p>The updated CloudWatch Logs configuration for the code review.</p>
    pub fn log_config(mut self, input: crate::types::CloudWatchLog) -> Self {
        self.log_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated CloudWatch Logs configuration for the code review.</p>
    pub fn set_log_config(mut self, input: ::std::option::Option<crate::types::CloudWatchLog>) -> Self {
        self.log_config = input;
        self
    }
    /// <p>The updated CloudWatch Logs configuration for the code review.</p>
    pub fn get_log_config(&self) -> &::std::option::Option<crate::types::CloudWatchLog> {
        &self.log_config
    }
    /// <p>The updated code remediation strategy for the code review.</p>
    pub fn code_remediation_strategy(mut self, input: crate::types::CodeRemediationStrategy) -> Self {
        self.code_remediation_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated code remediation strategy for the code review.</p>
    pub fn set_code_remediation_strategy(mut self, input: ::std::option::Option<crate::types::CodeRemediationStrategy>) -> Self {
        self.code_remediation_strategy = input;
        self
    }
    /// <p>The updated code remediation strategy for the code review.</p>
    pub fn get_code_remediation_strategy(&self) -> &::std::option::Option<crate::types::CodeRemediationStrategy> {
        &self.code_remediation_strategy
    }
    /// Consumes the builder and constructs a [`UpdateCodeReviewInput`](crate::operation::update_code_review::UpdateCodeReviewInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_code_review::UpdateCodeReviewInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_code_review::UpdateCodeReviewInput {
            code_review_id: self.code_review_id,
            agent_space_id: self.agent_space_id,
            title: self.title,
            assets: self.assets,
            service_role: self.service_role,
            log_config: self.log_config,
            code_remediation_strategy: self.code_remediation_strategy,
        })
    }
}