aws-sdk-securityagent 1.1.0

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

/// Input for updating an existing security finding
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateFindingInput {
    /// Identifier of the finding to update
    pub finding_id: ::std::option::Option<::std::string::String>,
    /// ID of the agent space where the finding exists
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// Updated severity level of the identified risk
    pub risk_level: ::std::option::Option<crate::types::RiskLevel>,
    /// Updated status of the finding
    pub status: ::std::option::Option<crate::types::FindingStatus>,
}
impl UpdateFindingInput {
    /// Identifier of the finding to update
    pub fn finding_id(&self) -> ::std::option::Option<&str> {
        self.finding_id.as_deref()
    }
    /// ID of the agent space where the finding exists
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// Updated severity level of the identified risk
    pub fn risk_level(&self) -> ::std::option::Option<&crate::types::RiskLevel> {
        self.risk_level.as_ref()
    }
    /// Updated status of the finding
    pub fn status(&self) -> ::std::option::Option<&crate::types::FindingStatus> {
        self.status.as_ref()
    }
}
impl UpdateFindingInput {
    /// Creates a new builder-style object to manufacture [`UpdateFindingInput`](crate::operation::update_finding::UpdateFindingInput).
    pub fn builder() -> crate::operation::update_finding::builders::UpdateFindingInputBuilder {
        crate::operation::update_finding::builders::UpdateFindingInputBuilder::default()
    }
}

/// A builder for [`UpdateFindingInput`](crate::operation::update_finding::UpdateFindingInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFindingInputBuilder {
    pub(crate) finding_id: ::std::option::Option<::std::string::String>,
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) risk_level: ::std::option::Option<crate::types::RiskLevel>,
    pub(crate) status: ::std::option::Option<crate::types::FindingStatus>,
}
impl UpdateFindingInputBuilder {
    /// Identifier of the finding to update
    /// This field is required.
    pub fn finding_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.finding_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Identifier of the finding to update
    pub fn set_finding_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.finding_id = input;
        self
    }
    /// Identifier of the finding to update
    pub fn get_finding_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.finding_id
    }
    /// ID of the agent space where the finding exists
    /// 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
    }
    /// ID of the agent space where the finding exists
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// ID of the agent space where the finding exists
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// Updated severity level of the identified risk
    pub fn risk_level(mut self, input: crate::types::RiskLevel) -> Self {
        self.risk_level = ::std::option::Option::Some(input);
        self
    }
    /// Updated severity level of the identified risk
    pub fn set_risk_level(mut self, input: ::std::option::Option<crate::types::RiskLevel>) -> Self {
        self.risk_level = input;
        self
    }
    /// Updated severity level of the identified risk
    pub fn get_risk_level(&self) -> &::std::option::Option<crate::types::RiskLevel> {
        &self.risk_level
    }
    /// Updated status of the finding
    pub fn status(mut self, input: crate::types::FindingStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// Updated status of the finding
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::FindingStatus>) -> Self {
        self.status = input;
        self
    }
    /// Updated status of the finding
    pub fn get_status(&self) -> &::std::option::Option<crate::types::FindingStatus> {
        &self.status
    }
    /// Consumes the builder and constructs a [`UpdateFindingInput`](crate::operation::update_finding::UpdateFindingInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_finding::UpdateFindingInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_finding::UpdateFindingInput {
            finding_id: self.finding_id,
            agent_space_id: self.agent_space_id,
            risk_level: self.risk_level,
            status: self.status,
        })
    }
}