aws_sdk_voiceid/operation/update_domain/
_update_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 UpdateDomainInput {
6    /// <p>The identifier of the domain to be updated.</p>
7    pub domain_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the domain.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>A brief description about this domain.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Changing the domain's associated KMS key immediately triggers an asynchronous process to remove dependency on the old KMS key, such that the domain's data can only be accessed using the new KMS key. The domain's <code>ServerSideEncryptionUpdateDetails</code> contains the details for this process.</p>
13    pub server_side_encryption_configuration: ::std::option::Option<crate::types::ServerSideEncryptionConfiguration>,
14}
15impl UpdateDomainInput {
16    /// <p>The identifier of the domain to be updated.</p>
17    pub fn domain_id(&self) -> ::std::option::Option<&str> {
18        self.domain_id.as_deref()
19    }
20    /// <p>The name of the domain.</p>
21    pub fn name(&self) -> ::std::option::Option<&str> {
22        self.name.as_deref()
23    }
24    /// <p>A brief description about this domain.</p>
25    pub fn description(&self) -> ::std::option::Option<&str> {
26        self.description.as_deref()
27    }
28    /// <p>The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Changing the domain's associated KMS key immediately triggers an asynchronous process to remove dependency on the old KMS key, such that the domain's data can only be accessed using the new KMS key. The domain's <code>ServerSideEncryptionUpdateDetails</code> contains the details for this process.</p>
29    pub fn server_side_encryption_configuration(&self) -> ::std::option::Option<&crate::types::ServerSideEncryptionConfiguration> {
30        self.server_side_encryption_configuration.as_ref()
31    }
32}
33impl ::std::fmt::Debug for UpdateDomainInput {
34    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
35        let mut formatter = f.debug_struct("UpdateDomainInput");
36        formatter.field("domain_id", &self.domain_id);
37        formatter.field("name", &"*** Sensitive Data Redacted ***");
38        formatter.field("description", &"*** Sensitive Data Redacted ***");
39        formatter.field("server_side_encryption_configuration", &self.server_side_encryption_configuration);
40        formatter.finish()
41    }
42}
43impl UpdateDomainInput {
44    /// Creates a new builder-style object to manufacture [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
45    pub fn builder() -> crate::operation::update_domain::builders::UpdateDomainInputBuilder {
46        crate::operation::update_domain::builders::UpdateDomainInputBuilder::default()
47    }
48}
49
50/// A builder for [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
52#[non_exhaustive]
53pub struct UpdateDomainInputBuilder {
54    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
55    pub(crate) name: ::std::option::Option<::std::string::String>,
56    pub(crate) description: ::std::option::Option<::std::string::String>,
57    pub(crate) server_side_encryption_configuration: ::std::option::Option<crate::types::ServerSideEncryptionConfiguration>,
58}
59impl UpdateDomainInputBuilder {
60    /// <p>The identifier of the domain to be updated.</p>
61    /// This field is required.
62    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63        self.domain_id = ::std::option::Option::Some(input.into());
64        self
65    }
66    /// <p>The identifier of the domain to be updated.</p>
67    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68        self.domain_id = input;
69        self
70    }
71    /// <p>The identifier of the domain to be updated.</p>
72    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
73        &self.domain_id
74    }
75    /// <p>The name of the domain.</p>
76    /// This field is required.
77    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78        self.name = ::std::option::Option::Some(input.into());
79        self
80    }
81    /// <p>The name of the domain.</p>
82    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83        self.name = input;
84        self
85    }
86    /// <p>The name of the domain.</p>
87    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
88        &self.name
89    }
90    /// <p>A brief description about this domain.</p>
91    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92        self.description = ::std::option::Option::Some(input.into());
93        self
94    }
95    /// <p>A brief description about this domain.</p>
96    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97        self.description = input;
98        self
99    }
100    /// <p>A brief description about this domain.</p>
101    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
102        &self.description
103    }
104    /// <p>The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Changing the domain's associated KMS key immediately triggers an asynchronous process to remove dependency on the old KMS key, such that the domain's data can only be accessed using the new KMS key. The domain's <code>ServerSideEncryptionUpdateDetails</code> contains the details for this process.</p>
105    /// This field is required.
106    pub fn server_side_encryption_configuration(mut self, input: crate::types::ServerSideEncryptionConfiguration) -> Self {
107        self.server_side_encryption_configuration = ::std::option::Option::Some(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. Changing the domain's associated KMS key immediately triggers an asynchronous process to remove dependency on the old KMS key, such that the domain's data can only be accessed using the new KMS key. The domain's <code>ServerSideEncryptionUpdateDetails</code> contains the details for this process.</p>
111    pub fn set_server_side_encryption_configuration(mut self, input: ::std::option::Option<crate::types::ServerSideEncryptionConfiguration>) -> Self {
112        self.server_side_encryption_configuration = input;
113        self
114    }
115    /// <p>The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Changing the domain's associated KMS key immediately triggers an asynchronous process to remove dependency on the old KMS key, such that the domain's data can only be accessed using the new KMS key. The domain's <code>ServerSideEncryptionUpdateDetails</code> contains the details for this process.</p>
116    pub fn get_server_side_encryption_configuration(&self) -> &::std::option::Option<crate::types::ServerSideEncryptionConfiguration> {
117        &self.server_side_encryption_configuration
118    }
119    /// Consumes the builder and constructs a [`UpdateDomainInput`](crate::operation::update_domain::UpdateDomainInput).
120    pub fn build(
121        self,
122    ) -> ::std::result::Result<crate::operation::update_domain::UpdateDomainInput, ::aws_smithy_types::error::operation::BuildError> {
123        ::std::result::Result::Ok(crate::operation::update_domain::UpdateDomainInput {
124            domain_id: self.domain_id,
125            name: self.name,
126            description: self.description,
127            server_side_encryption_configuration: self.server_side_encryption_configuration,
128        })
129    }
130}
131impl ::std::fmt::Debug for UpdateDomainInputBuilder {
132    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
133        let mut formatter = f.debug_struct("UpdateDomainInputBuilder");
134        formatter.field("domain_id", &self.domain_id);
135        formatter.field("name", &"*** Sensitive Data Redacted ***");
136        formatter.field("description", &"*** Sensitive Data Redacted ***");
137        formatter.field("server_side_encryption_configuration", &self.server_side_encryption_configuration);
138        formatter.finish()
139    }
140}