aws_sdk_voiceid/operation/create_domain/
_create_domain_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateDomainInput {
6    /// <p>The name of the domain.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>A brief description of this domain.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Refer to <a href="https://docs.aws.amazon.com/connect/latest/adminguide/encryption-at-rest.html#encryption-at-rest-voiceid"> Amazon Connect Voice ID encryption at rest</a> for more details on how the KMS key is used.</p>
11    pub server_side_encryption_configuration: ::std::option::Option<crate::types::ServerSideEncryptionConfiguration>,
12    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
13    pub client_token: ::std::option::Option<::std::string::String>,
14    /// <p>A list of tags you want added to the domain.</p>
15    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
16}
17impl CreateDomainInput {
18    /// <p>The name of the domain.</p>
19    pub fn name(&self) -> ::std::option::Option<&str> {
20        self.name.as_deref()
21    }
22    /// <p>A brief description of this domain.</p>
23    pub fn description(&self) -> ::std::option::Option<&str> {
24        self.description.as_deref()
25    }
26    /// <p>The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Refer to <a href="https://docs.aws.amazon.com/connect/latest/adminguide/encryption-at-rest.html#encryption-at-rest-voiceid"> Amazon Connect Voice ID encryption at rest</a> for more details on how the KMS key is used.</p>
27    pub fn server_side_encryption_configuration(&self) -> ::std::option::Option<&crate::types::ServerSideEncryptionConfiguration> {
28        self.server_side_encryption_configuration.as_ref()
29    }
30    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
31    pub fn client_token(&self) -> ::std::option::Option<&str> {
32        self.client_token.as_deref()
33    }
34    /// <p>A list of tags you want added to the domain.</p>
35    ///
36    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
37    pub fn tags(&self) -> &[crate::types::Tag] {
38        self.tags.as_deref().unwrap_or_default()
39    }
40}
41impl ::std::fmt::Debug for CreateDomainInput {
42    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
43        let mut formatter = f.debug_struct("CreateDomainInput");
44        formatter.field("name", &"*** Sensitive Data Redacted ***");
45        formatter.field("description", &"*** Sensitive Data Redacted ***");
46        formatter.field("server_side_encryption_configuration", &self.server_side_encryption_configuration);
47        formatter.field("client_token", &self.client_token);
48        formatter.field("tags", &self.tags);
49        formatter.finish()
50    }
51}
52impl CreateDomainInput {
53    /// Creates a new builder-style object to manufacture [`CreateDomainInput`](crate::operation::create_domain::CreateDomainInput).
54    pub fn builder() -> crate::operation::create_domain::builders::CreateDomainInputBuilder {
55        crate::operation::create_domain::builders::CreateDomainInputBuilder::default()
56    }
57}
58
59/// A builder for [`CreateDomainInput`](crate::operation::create_domain::CreateDomainInput).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
61#[non_exhaustive]
62pub struct CreateDomainInputBuilder {
63    pub(crate) name: ::std::option::Option<::std::string::String>,
64    pub(crate) description: ::std::option::Option<::std::string::String>,
65    pub(crate) server_side_encryption_configuration: ::std::option::Option<crate::types::ServerSideEncryptionConfiguration>,
66    pub(crate) client_token: ::std::option::Option<::std::string::String>,
67    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
68}
69impl CreateDomainInputBuilder {
70    /// <p>The name of the domain.</p>
71    /// This field is required.
72    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.name = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The name of the domain.</p>
77    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.name = input;
79        self
80    }
81    /// <p>The name of the domain.</p>
82    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
83        &self.name
84    }
85    /// <p>A brief description of this domain.</p>
86    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.description = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>A brief description of this domain.</p>
91    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.description = input;
93        self
94    }
95    /// <p>A brief description of this domain.</p>
96    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
97        &self.description
98    }
99    /// <p>The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Refer to <a href="https://docs.aws.amazon.com/connect/latest/adminguide/encryption-at-rest.html#encryption-at-rest-voiceid"> Amazon Connect Voice ID encryption at rest</a> for more details on how the KMS key is used.</p>
100    /// This field is required.
101    pub fn server_side_encryption_configuration(mut self, input: crate::types::ServerSideEncryptionConfiguration) -> Self {
102        self.server_side_encryption_configuration = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Refer to <a href="https://docs.aws.amazon.com/connect/latest/adminguide/encryption-at-rest.html#encryption-at-rest-voiceid"> Amazon Connect Voice ID encryption at rest</a> for more details on how the KMS key is used.</p>
106    pub fn set_server_side_encryption_configuration(mut self, input: ::std::option::Option<crate::types::ServerSideEncryptionConfiguration>) -> Self {
107        self.server_side_encryption_configuration = input;
108        self
109    }
110    /// <p>The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Refer to <a href="https://docs.aws.amazon.com/connect/latest/adminguide/encryption-at-rest.html#encryption-at-rest-voiceid"> Amazon Connect Voice ID encryption at rest</a> for more details on how the KMS key is used.</p>
111    pub fn get_server_side_encryption_configuration(&self) -> &::std::option::Option<crate::types::ServerSideEncryptionConfiguration> {
112        &self.server_side_encryption_configuration
113    }
114    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
115    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.client_token = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
120    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.client_token = input;
122        self
123    }
124    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
125    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
126        &self.client_token
127    }
128    /// Appends an item to `tags`.
129    ///
130    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
131    ///
132    /// <p>A list of tags you want added to the domain.</p>
133    pub fn tags(mut self, input: crate::types::Tag) -> Self {
134        let mut v = self.tags.unwrap_or_default();
135        v.push(input);
136        self.tags = ::std::option::Option::Some(v);
137        self
138    }
139    /// <p>A list of tags you want added to the domain.</p>
140    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
141        self.tags = input;
142        self
143    }
144    /// <p>A list of tags you want added to the domain.</p>
145    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
146        &self.tags
147    }
148    /// Consumes the builder and constructs a [`CreateDomainInput`](crate::operation::create_domain::CreateDomainInput).
149    pub fn build(
150        self,
151    ) -> ::std::result::Result<crate::operation::create_domain::CreateDomainInput, ::aws_smithy_types::error::operation::BuildError> {
152        ::std::result::Result::Ok(crate::operation::create_domain::CreateDomainInput {
153            name: self.name,
154            description: self.description,
155            server_side_encryption_configuration: self.server_side_encryption_configuration,
156            client_token: self.client_token,
157            tags: self.tags,
158        })
159    }
160}
161impl ::std::fmt::Debug for CreateDomainInputBuilder {
162    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
163        let mut formatter = f.debug_struct("CreateDomainInputBuilder");
164        formatter.field("name", &"*** Sensitive Data Redacted ***");
165        formatter.field("description", &"*** Sensitive Data Redacted ***");
166        formatter.field("server_side_encryption_configuration", &self.server_side_encryption_configuration);
167        formatter.field("client_token", &self.client_token);
168        formatter.field("tags", &self.tags);
169        formatter.finish()
170    }
171}