aws-sdk-connect 1.167.0

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

/// <p>Information about a prompt.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Prompt {
    /// <p>The Amazon Resource Name (ARN) of the prompt.</p>
    pub prompt_arn: ::std::option::Option<::std::string::String>,
    /// <p>A unique identifier for the prompt.</p>
    pub prompt_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the prompt.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the prompt.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The timestamp when this resource was last modified.</p>
    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The Amazon Web Services Region where this resource was last modified.</p>
    pub last_modified_region: ::std::option::Option<::std::string::String>,
}
impl Prompt {
    /// <p>The Amazon Resource Name (ARN) of the prompt.</p>
    pub fn prompt_arn(&self) -> ::std::option::Option<&str> {
        self.prompt_arn.as_deref()
    }
    /// <p>A unique identifier for the prompt.</p>
    pub fn prompt_id(&self) -> ::std::option::Option<&str> {
        self.prompt_id.as_deref()
    }
    /// <p>The name of the prompt.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the prompt.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The timestamp when this resource was last modified.</p>
    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_modified_time.as_ref()
    }
    /// <p>The Amazon Web Services Region where this resource was last modified.</p>
    pub fn last_modified_region(&self) -> ::std::option::Option<&str> {
        self.last_modified_region.as_deref()
    }
}
impl Prompt {
    /// Creates a new builder-style object to manufacture [`Prompt`](crate::types::Prompt).
    pub fn builder() -> crate::types::builders::PromptBuilder {
        crate::types::builders::PromptBuilder::default()
    }
}

/// A builder for [`Prompt`](crate::types::Prompt).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PromptBuilder {
    pub(crate) prompt_arn: ::std::option::Option<::std::string::String>,
    pub(crate) prompt_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) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_modified_region: ::std::option::Option<::std::string::String>,
}
impl PromptBuilder {
    /// <p>The Amazon Resource Name (ARN) of the prompt.</p>
    pub fn prompt_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.prompt_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the prompt.</p>
    pub fn set_prompt_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.prompt_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the prompt.</p>
    pub fn get_prompt_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.prompt_arn
    }
    /// <p>A unique identifier for the prompt.</p>
    pub fn prompt_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.prompt_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the prompt.</p>
    pub fn set_prompt_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.prompt_id = input;
        self
    }
    /// <p>A unique identifier for the prompt.</p>
    pub fn get_prompt_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.prompt_id
    }
    /// <p>The name of the prompt.</p>
    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 prompt.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the prompt.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the prompt.</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 prompt.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the prompt.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    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
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>The timestamp when this resource was last modified.</p>
    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when this resource was last modified.</p>
    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified_time = input;
        self
    }
    /// <p>The timestamp when this resource was last modified.</p>
    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified_time
    }
    /// <p>The Amazon Web Services Region where this resource was last modified.</p>
    pub fn last_modified_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_modified_region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services Region where this resource was last modified.</p>
    pub fn set_last_modified_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_modified_region = input;
        self
    }
    /// <p>The Amazon Web Services Region where this resource was last modified.</p>
    pub fn get_last_modified_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_modified_region
    }
    /// Consumes the builder and constructs a [`Prompt`](crate::types::Prompt).
    pub fn build(self) -> crate::types::Prompt {
        crate::types::Prompt {
            prompt_arn: self.prompt_arn,
            prompt_id: self.prompt_id,
            name: self.name,
            description: self.description,
            tags: self.tags,
            last_modified_time: self.last_modified_time,
            last_modified_region: self.last_modified_region,
        }
    }
}