aws-sdk-devopsagent 1.4.0

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

/// Input for creating a new AgentSpace.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateAgentSpaceInput {
    /// The name of the AgentSpace.
    pub name: ::std::option::Option<::std::string::String>,
    /// The description of the AgentSpace.
    pub description: ::std::option::Option<::std::string::String>,
    /// The locale for the AgentSpace, which determines the language used in agent responses.
    pub locale: ::std::option::Option<::std::string::String>,
    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
    pub kms_key_arn: ::std::option::Option<::std::string::String>,
    /// Client-provided token to ensure request idempotency. When the same token is provided in subsequent calls, the same response is returned within a 8-hour window.
    pub client_token: ::std::option::Option<::std::string::String>,
    /// Tags to add to the AgentSpace at creation time.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateAgentSpaceInput {
    /// The name of the AgentSpace.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// The description of the AgentSpace.
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// The locale for the AgentSpace, which determines the language used in agent responses.
    pub fn locale(&self) -> ::std::option::Option<&str> {
        self.locale.as_deref()
    }
    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
    pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
        self.kms_key_arn.as_deref()
    }
    /// Client-provided token to ensure request idempotency. When the same token is provided in subsequent calls, the same response is returned within a 8-hour window.
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// Tags to add to the AgentSpace at creation time.
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::std::fmt::Debug for CreateAgentSpaceInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAgentSpaceInput");
        formatter.field("name", &self.name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("locale", &self.locale);
        formatter.field("kms_key_arn", &self.kms_key_arn);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}
impl CreateAgentSpaceInput {
    /// Creates a new builder-style object to manufacture [`CreateAgentSpaceInput`](crate::operation::create_agent_space::CreateAgentSpaceInput).
    pub fn builder() -> crate::operation::create_agent_space::builders::CreateAgentSpaceInputBuilder {
        crate::operation::create_agent_space::builders::CreateAgentSpaceInputBuilder::default()
    }
}

/// A builder for [`CreateAgentSpaceInput`](crate::operation::create_agent_space::CreateAgentSpaceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateAgentSpaceInputBuilder {
    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>,
    pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateAgentSpaceInputBuilder {
    /// The name of the AgentSpace.
    /// 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
    }
    /// The name of the AgentSpace.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The name of the AgentSpace.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// The 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 description of the AgentSpace.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// The description of the AgentSpace.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// The 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 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 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
    }
    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_arn = input;
        self
    }
    /// The ARN of the AWS Key Management Service (AWS KMS) customer managed key that's used to encrypt resources.
    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_arn
    }
    /// Client-provided token to ensure request idempotency. When the same token is provided in subsequent calls, the same response is returned within a 8-hour window.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// Client-provided token to ensure request idempotency. When the same token is provided in subsequent calls, the same response is returned within a 8-hour window.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// Client-provided token to ensure request idempotency. When the same token is provided in subsequent calls, the same response is returned within a 8-hour window.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// Tags to add to the AgentSpace at creation time.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// Tags to add to the AgentSpace at creation time.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// Tags to add to the AgentSpace at creation time.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateAgentSpaceInput`](crate::operation::create_agent_space::CreateAgentSpaceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_agent_space::CreateAgentSpaceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_agent_space::CreateAgentSpaceInput {
            name: self.name,
            description: self.description,
            locale: self.locale,
            kms_key_arn: self.kms_key_arn,
            client_token: self.client_token,
            tags: self.tags,
        })
    }
}
impl ::std::fmt::Debug for CreateAgentSpaceInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAgentSpaceInputBuilder");
        formatter.field("name", &self.name);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("locale", &self.locale);
        formatter.field("kms_key_arn", &self.kms_key_arn);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}