aws-sdk-securityagent 1.2.0

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

/// <p>Output for the UpdateAgentSpace operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateAgentSpaceOutput {
    /// <p>The unique identifier of the updated agent space.</p>
    pub agent_space_id: ::std::string::String,
    /// <p>The name of the agent space.</p>
    pub name: ::std::string::String,
    /// <p>The description of the agent space.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The AWS resources associated with the agent space.</p>
    pub aws_resources: ::std::option::Option<crate::types::AwsResources>,
    /// <p>The list of target domain identifiers associated with the agent space.</p>
    pub target_domain_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The code review settings for the agent space.</p>
    pub code_review_settings: ::std::option::Option<crate::types::CodeReviewSettings>,
    /// <p>The date and time the agent space was created, in UTC format.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time the agent space was last updated, in UTC format.</p>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdateAgentSpaceOutput {
    /// <p>The unique identifier of the updated agent space.</p>
    pub fn agent_space_id(&self) -> &str {
        use std::ops::Deref;
        self.agent_space_id.deref()
    }
    /// <p>The name of the agent space.</p>
    pub fn name(&self) -> &str {
        use std::ops::Deref;
        self.name.deref()
    }
    /// <p>The description of the agent space.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The AWS resources associated with the agent space.</p>
    pub fn aws_resources(&self) -> ::std::option::Option<&crate::types::AwsResources> {
        self.aws_resources.as_ref()
    }
    /// <p>The list of target domain identifiers associated with the agent space.</p>
    ///
    /// 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()
    }
    /// <p>The code review settings for the agent space.</p>
    pub fn code_review_settings(&self) -> ::std::option::Option<&crate::types::CodeReviewSettings> {
        self.code_review_settings.as_ref()
    }
    /// <p>The date and time the agent space was created, in UTC format.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The date and time the agent space was last updated, in UTC format.</p>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateAgentSpaceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateAgentSpaceOutput {
    /// Creates a new builder-style object to manufacture [`UpdateAgentSpaceOutput`](crate::operation::update_agent_space::UpdateAgentSpaceOutput).
    pub fn builder() -> crate::operation::update_agent_space::builders::UpdateAgentSpaceOutputBuilder {
        crate::operation::update_agent_space::builders::UpdateAgentSpaceOutputBuilder::default()
    }
}

/// A builder for [`UpdateAgentSpaceOutput`](crate::operation::update_agent_space::UpdateAgentSpaceOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAgentSpaceOutputBuilder {
    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>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdateAgentSpaceOutputBuilder {
    /// <p>The unique identifier of the updated agent space.</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 updated agent space.</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 updated agent space.</p>
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// <p>The name of the agent space.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the agent space.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the agent space.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the agent space.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the agent space.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the agent space.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The AWS resources associated with the agent space.</p>
    pub fn aws_resources(mut self, input: crate::types::AwsResources) -> Self {
        self.aws_resources = ::std::option::Option::Some(input);
        self
    }
    /// <p>The AWS resources associated with the agent space.</p>
    pub fn set_aws_resources(mut self, input: ::std::option::Option<crate::types::AwsResources>) -> Self {
        self.aws_resources = input;
        self
    }
    /// <p>The AWS resources associated with the agent space.</p>
    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).
    ///
    /// <p>The list of target domain identifiers associated with the agent space.</p>
    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
    }
    /// <p>The list of target domain identifiers associated with the agent space.</p>
    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
    }
    /// <p>The list of target domain identifiers associated with the agent space.</p>
    pub fn get_target_domain_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.target_domain_ids
    }
    /// <p>The code review settings for the agent space.</p>
    pub fn code_review_settings(mut self, input: crate::types::CodeReviewSettings) -> Self {
        self.code_review_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>The code review settings for the agent space.</p>
    pub fn set_code_review_settings(mut self, input: ::std::option::Option<crate::types::CodeReviewSettings>) -> Self {
        self.code_review_settings = input;
        self
    }
    /// <p>The code review settings for the agent space.</p>
    pub fn get_code_review_settings(&self) -> &::std::option::Option<crate::types::CodeReviewSettings> {
        &self.code_review_settings
    }
    /// <p>The date and time the agent space was created, in UTC format.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the agent space was created, in UTC format.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date and time the agent space was created, in UTC format.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The date and time the agent space was last updated, in UTC format.</p>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the agent space was last updated, in UTC format.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>The date and time the agent space was last updated, in UTC format.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    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 [`UpdateAgentSpaceOutput`](crate::operation::update_agent_space::UpdateAgentSpaceOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`agent_space_id`](crate::operation::update_agent_space::builders::UpdateAgentSpaceOutputBuilder::agent_space_id)
    /// - [`name`](crate::operation::update_agent_space::builders::UpdateAgentSpaceOutputBuilder::name)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_agent_space::UpdateAgentSpaceOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_agent_space::UpdateAgentSpaceOutput {
            agent_space_id: self.agent_space_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "agent_space_id",
                    "agent_space_id was not specified but it is required when building UpdateAgentSpaceOutput",
                )
            })?,
            name: self.name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "name",
                    "name was not specified but it is required when building UpdateAgentSpaceOutput",
                )
            })?,
            description: self.description,
            aws_resources: self.aws_resources,
            target_domain_ids: self.target_domain_ids,
            code_review_settings: self.code_review_settings,
            created_at: self.created_at,
            updated_at: self.updated_at,
            _request_id: self._request_id,
        })
    }
}