aws-sdk-devopsagent 1.3.0

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

/// Input for updating an existing AgentSpace's properties. All fields except agentSpaceId are optional for partial updates.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UpdateAgentSpaceInput {
    /// The unique identifier of the AgentSpace
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// The updated name of the AgentSpace.
    pub name: ::std::option::Option<::std::string::String>,
    /// The updated description of the AgentSpace.
    pub description: ::std::option::Option<::std::string::String>,
    /// The updated locale for the AgentSpace, which determines the language used in agent responses.
    pub locale: ::std::option::Option<::std::string::String>,
}
impl UpdateAgentSpaceInput {
    /// The unique identifier of the AgentSpace
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// The updated name of the AgentSpace.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// The updated description of the AgentSpace.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// The updated locale for the AgentSpace, which determines the language used in agent responses.
    pub fn locale(&self) -> ::std::option::Option<&str> {
        self.locale.as_deref()
    }
}
impl ::std::fmt::Debug for UpdateAgentSpaceInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateAgentSpaceInput");
        formatter.field("agent_space_id", &self.agent_space_id);
        formatter.field("name", &self.name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("locale", &self.locale);
        formatter.finish()
    }
}
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)]
#[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) locale: ::std::option::Option<::std::string::String>,
}
impl UpdateAgentSpaceInputBuilder {
    /// The unique identifier of the AgentSpace
    /// 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
    }
    /// The unique identifier of the AgentSpace
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// The unique identifier of the AgentSpace
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// The updated name of the AgentSpace.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// The updated name of the AgentSpace.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The updated name of the AgentSpace.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// The updated description of the AgentSpace.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// The updated description of the AgentSpace.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// The updated description of the AgentSpace.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// The updated locale for the AgentSpace, which determines the language used in agent responses.
    pub fn locale(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.locale = ::std::option::Option::Some(input.into());
        self
    }
    /// The updated locale for the AgentSpace, which determines the language used in agent responses.
    pub fn set_locale(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.locale = input;
        self
    }
    /// The updated locale for the AgentSpace, which determines the language used in agent responses.
    pub fn get_locale(&self) -> &::std::option::Option<::std::string::String> {
        &self.locale
    }
    /// 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,
            locale: self.locale,
        })
    }
}
impl ::std::fmt::Debug for UpdateAgentSpaceInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateAgentSpaceInputBuilder");
        formatter.field("agent_space_id", &self.agent_space_id);
        formatter.field("name", &self.name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("locale", &self.locale);
        formatter.finish()
    }
}