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 agent space
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateAgentSpaceInput {
    /// ID of the agent space to update
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// Name of the agent space
    pub name: ::std::option::Option<::std::string::String>,
    /// Description of the agent space
    pub description: ::std::option::Option<::std::string::String>,
    /// AWS resource configurations associated with the agent space
    pub aws_resources: ::std::option::Option<crate::types::AwsResources>,
    /// Target domain IDs to associate with the agent space
    pub target_domain_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// Configuration for code review analysis, including controls scanning and general purpose scanning settings
    pub code_review_settings: ::std::option::Option<crate::types::CodeReviewSettings>,
}
impl UpdateAgentSpaceInput {
    /// ID of the agent space to update
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// Name of the agent space
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Description of the agent space
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// AWS resource configurations associated with the agent space
    pub fn aws_resources(&self) -> ::std::option::Option<&crate::types::AwsResources> {
        self.aws_resources.as_ref()
    }
    /// Target domain IDs to associate with the agent space
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_domain_ids.is_none()`.
    pub fn target_domain_ids(&self) -> &[::std::string::String] {
        self.target_domain_ids.as_deref().unwrap_or_default()
    }
    /// Configuration for code review analysis, including controls scanning and general purpose scanning settings
    pub fn code_review_settings(&self) -> ::std::option::Option<&crate::types::CodeReviewSettings> {
        self.code_review_settings.as_ref()
    }
}
impl UpdateAgentSpaceInput {
    /// Creates a new builder-style object to manufacture [`UpdateAgentSpaceInput`](crate::operation::update_agent_space::UpdateAgentSpaceInput).
    pub fn builder() -> crate::operation::update_agent_space::builders::UpdateAgentSpaceInputBuilder {
        crate::operation::update_agent_space::builders::UpdateAgentSpaceInputBuilder::default()
    }
}

/// A builder for [`UpdateAgentSpaceInput`](crate::operation::update_agent_space::UpdateAgentSpaceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAgentSpaceInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) aws_resources: ::std::option::Option<crate::types::AwsResources>,
    pub(crate) target_domain_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) code_review_settings: ::std::option::Option<crate::types::CodeReviewSettings>,
}
impl UpdateAgentSpaceInputBuilder {
    /// ID of the agent space to update
    /// 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 to update
    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 to update
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// Name of the agent space
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// Name of the agent space
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// Name of the agent space
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Description of the agent space
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// Description of the agent space
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// Description of the agent space
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// AWS resource configurations associated with the agent space
    pub fn aws_resources(mut self, input: crate::types::AwsResources) -> Self {
        self.aws_resources = ::std::option::Option::Some(input);
        self
    }
    /// AWS resource configurations associated with the agent space
    pub fn set_aws_resources(mut self, input: ::std::option::Option<crate::types::AwsResources>) -> Self {
        self.aws_resources = input;
        self
    }
    /// AWS resource configurations associated with the agent space
    pub fn get_aws_resources(&self) -> &::std::option::Option<crate::types::AwsResources> {
        &self.aws_resources
    }
    /// Appends an item to `target_domain_ids`.
    ///
    /// To override the contents of this collection use [`set_target_domain_ids`](Self::set_target_domain_ids).
    ///
    /// Target domain IDs to associate with the agent space
    pub fn target_domain_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.target_domain_ids.unwrap_or_default();
        v.push(input.into());
        self.target_domain_ids = ::std::option::Option::Some(v);
        self
    }
    /// Target domain IDs to associate with the agent space
    pub fn set_target_domain_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.target_domain_ids = input;
        self
    }
    /// Target domain IDs to associate with the agent space
    pub fn get_target_domain_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.target_domain_ids
    }
    /// Configuration for code review analysis, including controls scanning and general purpose scanning settings
    pub fn code_review_settings(mut self, input: crate::types::CodeReviewSettings) -> Self {
        self.code_review_settings = ::std::option::Option::Some(input);
        self
    }
    /// Configuration for code review analysis, including controls scanning and general purpose scanning settings
    pub fn set_code_review_settings(mut self, input: ::std::option::Option<crate::types::CodeReviewSettings>) -> Self {
        self.code_review_settings = input;
        self
    }
    /// Configuration for code review analysis, including controls scanning and general purpose scanning settings
    pub fn get_code_review_settings(&self) -> &::std::option::Option<crate::types::CodeReviewSettings> {
        &self.code_review_settings
    }
    /// Consumes the builder and constructs a [`UpdateAgentSpaceInput`](crate::operation::update_agent_space::UpdateAgentSpaceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_agent_space::UpdateAgentSpaceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_agent_space::UpdateAgentSpaceInput {
            agent_space_id: self.agent_space_id,
            name: self.name,
            description: self.description,
            aws_resources: self.aws_resources,
            target_domain_ids: self.target_domain_ids,
            code_review_settings: self.code_review_settings,
        })
    }
}