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.

/// Output for the UpdatePentest operation
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdatePentestOutput {
    /// Unique identifier of the updated pentest
    pub pentest_id: ::std::option::Option<::std::string::String>,
    /// Title of the updated pentest
    pub title: ::std::option::Option<::std::string::String>,
    /// Timestamp when the pentest was created
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// Timestamp when the pentest was last updated
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// Assets to be tested in the updated pentest
    pub assets: ::std::option::Option<crate::types::Assets>,
    /// A list of risk types excluded from the pentest execution
    pub exclude_risk_types: ::std::option::Option<::std::vec::Vec<crate::types::RiskType>>,
    /// Service role ARN for accessing customer resources
    pub service_role: ::std::option::Option<::std::string::String>,
    /// CloudWatch log group and stream prefix where pentest execution logs are stored
    pub log_config: ::std::option::Option<crate::types::CloudWatchLog>,
    /// ID of the agent space where the pentest exists
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl UpdatePentestOutput {
    /// Unique identifier of the updated pentest
    pub fn pentest_id(&self) -> ::std::option::Option<&str> {
        self.pentest_id.as_deref()
    }
    /// Title of the updated pentest
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// Timestamp when the pentest was created
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// Timestamp when the pentest was last updated
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// Assets to be tested in the updated pentest
    pub fn assets(&self) -> ::std::option::Option<&crate::types::Assets> {
        self.assets.as_ref()
    }
    /// A list of risk types excluded from the pentest execution
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.exclude_risk_types.is_none()`.
    pub fn exclude_risk_types(&self) -> &[crate::types::RiskType] {
        self.exclude_risk_types.as_deref().unwrap_or_default()
    }
    /// Service role ARN for accessing customer resources
    pub fn service_role(&self) -> ::std::option::Option<&str> {
        self.service_role.as_deref()
    }
    /// CloudWatch log group and stream prefix where pentest execution logs are stored
    pub fn log_config(&self) -> ::std::option::Option<&crate::types::CloudWatchLog> {
        self.log_config.as_ref()
    }
    /// ID of the agent space where the pentest exists
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for UpdatePentestOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdatePentestOutput {
    /// Creates a new builder-style object to manufacture [`UpdatePentestOutput`](crate::operation::update_pentest::UpdatePentestOutput).
    pub fn builder() -> crate::operation::update_pentest::builders::UpdatePentestOutputBuilder {
        crate::operation::update_pentest::builders::UpdatePentestOutputBuilder::default()
    }
}

/// A builder for [`UpdatePentestOutput`](crate::operation::update_pentest::UpdatePentestOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdatePentestOutputBuilder {
    pub(crate) pentest_id: ::std::option::Option<::std::string::String>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) assets: ::std::option::Option<crate::types::Assets>,
    pub(crate) exclude_risk_types: ::std::option::Option<::std::vec::Vec<crate::types::RiskType>>,
    pub(crate) service_role: ::std::option::Option<::std::string::String>,
    pub(crate) log_config: ::std::option::Option<crate::types::CloudWatchLog>,
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl UpdatePentestOutputBuilder {
    /// Unique identifier of the updated pentest
    pub fn pentest_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pentest_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Unique identifier of the updated pentest
    pub fn set_pentest_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pentest_id = input;
        self
    }
    /// Unique identifier of the updated pentest
    pub fn get_pentest_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.pentest_id
    }
    /// Title of the updated pentest
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// Title of the updated pentest
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// Title of the updated pentest
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// Timestamp when the pentest was created
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// Timestamp when the pentest was created
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// Timestamp when the pentest was created
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// Timestamp when the pentest was last updated
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// Timestamp when the pentest was last updated
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// Timestamp when the pentest was last updated
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// Assets to be tested in the updated pentest
    pub fn assets(mut self, input: crate::types::Assets) -> Self {
        self.assets = ::std::option::Option::Some(input);
        self
    }
    /// Assets to be tested in the updated pentest
    pub fn set_assets(mut self, input: ::std::option::Option<crate::types::Assets>) -> Self {
        self.assets = input;
        self
    }
    /// Assets to be tested in the updated pentest
    pub fn get_assets(&self) -> &::std::option::Option<crate::types::Assets> {
        &self.assets
    }
    /// Appends an item to `exclude_risk_types`.
    ///
    /// To override the contents of this collection use [`set_exclude_risk_types`](Self::set_exclude_risk_types).
    ///
    /// A list of risk types excluded from the pentest execution
    pub fn exclude_risk_types(mut self, input: crate::types::RiskType) -> Self {
        let mut v = self.exclude_risk_types.unwrap_or_default();
        v.push(input);
        self.exclude_risk_types = ::std::option::Option::Some(v);
        self
    }
    /// A list of risk types excluded from the pentest execution
    pub fn set_exclude_risk_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RiskType>>) -> Self {
        self.exclude_risk_types = input;
        self
    }
    /// A list of risk types excluded from the pentest execution
    pub fn get_exclude_risk_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RiskType>> {
        &self.exclude_risk_types
    }
    /// Service role ARN for accessing customer resources
    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
    }
    /// Service role ARN for accessing customer resources
    pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_role = input;
        self
    }
    /// Service role ARN for accessing customer resources
    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_role
    }
    /// CloudWatch log group and stream prefix where pentest execution logs are stored
    pub fn log_config(mut self, input: crate::types::CloudWatchLog) -> Self {
        self.log_config = ::std::option::Option::Some(input);
        self
    }
    /// CloudWatch log group and stream prefix where pentest execution logs are stored
    pub fn set_log_config(mut self, input: ::std::option::Option<crate::types::CloudWatchLog>) -> Self {
        self.log_config = input;
        self
    }
    /// CloudWatch log group and stream prefix where pentest execution logs are stored
    pub fn get_log_config(&self) -> &::std::option::Option<crate::types::CloudWatchLog> {
        &self.log_config
    }
    /// ID of the agent space where the pentest exists
    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 pentest 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 pentest exists
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`UpdatePentestOutput`](crate::operation::update_pentest::UpdatePentestOutput).
    pub fn build(self) -> crate::operation::update_pentest::UpdatePentestOutput {
        crate::operation::update_pentest::UpdatePentestOutput {
            pentest_id: self.pentest_id,
            title: self.title,
            created_at: self.created_at,
            updated_at: self.updated_at,
            assets: self.assets,
            exclude_risk_types: self.exclude_risk_types,
            service_role: self.service_role,
            log_config: self.log_config,
            agent_space_id: self.agent_space_id,
            _request_id: self._request_id,
        }
    }
}