aws_sdk_datazone/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, ::std::fmt::Debug)]
5pub struct CreateDomainInput {
6    /// <p>The name of the Amazon DataZone domain.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The description of the Amazon DataZone domain.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The single-sign on configuration of the Amazon DataZone domain.</p>
11    pub single_sign_on: ::std::option::Option<crate::types::SingleSignOn>,
12    /// <p>The domain execution role that is created when an Amazon DataZone domain is created. The domain execution role is created in the Amazon Web Services account that houses the Amazon DataZone domain.</p>
13    pub domain_execution_role: ::std::option::Option<::std::string::String>,
14    /// <p>The identifier of the Amazon Web Services Key Management Service (KMS) key that is used to encrypt the Amazon DataZone domain, metadata, and reporting data.</p>
15    pub kms_key_identifier: ::std::option::Option<::std::string::String>,
16    /// <p>The tags specified for the Amazon DataZone domain.</p>
17    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18    /// <p>The version of the domain that is created.</p>
19    pub domain_version: ::std::option::Option<crate::types::DomainVersion>,
20    /// <p>The service role of the domain that is created.</p>
21    pub service_role: ::std::option::Option<::std::string::String>,
22    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
23    pub client_token: ::std::option::Option<::std::string::String>,
24}
25impl CreateDomainInput {
26    /// <p>The name of the Amazon DataZone domain.</p>
27    pub fn name(&self) -> ::std::option::Option<&str> {
28        self.name.as_deref()
29    }
30    /// <p>The description of the Amazon DataZone domain.</p>
31    pub fn description(&self) -> ::std::option::Option<&str> {
32        self.description.as_deref()
33    }
34    /// <p>The single-sign on configuration of the Amazon DataZone domain.</p>
35    pub fn single_sign_on(&self) -> ::std::option::Option<&crate::types::SingleSignOn> {
36        self.single_sign_on.as_ref()
37    }
38    /// <p>The domain execution role that is created when an Amazon DataZone domain is created. The domain execution role is created in the Amazon Web Services account that houses the Amazon DataZone domain.</p>
39    pub fn domain_execution_role(&self) -> ::std::option::Option<&str> {
40        self.domain_execution_role.as_deref()
41    }
42    /// <p>The identifier of the Amazon Web Services Key Management Service (KMS) key that is used to encrypt the Amazon DataZone domain, metadata, and reporting data.</p>
43    pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
44        self.kms_key_identifier.as_deref()
45    }
46    /// <p>The tags specified for the Amazon DataZone domain.</p>
47    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
48        self.tags.as_ref()
49    }
50    /// <p>The version of the domain that is created.</p>
51    pub fn domain_version(&self) -> ::std::option::Option<&crate::types::DomainVersion> {
52        self.domain_version.as_ref()
53    }
54    /// <p>The service role of the domain that is created.</p>
55    pub fn service_role(&self) -> ::std::option::Option<&str> {
56        self.service_role.as_deref()
57    }
58    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
59    pub fn client_token(&self) -> ::std::option::Option<&str> {
60        self.client_token.as_deref()
61    }
62}
63impl CreateDomainInput {
64    /// Creates a new builder-style object to manufacture [`CreateDomainInput`](crate::operation::create_domain::CreateDomainInput).
65    pub fn builder() -> crate::operation::create_domain::builders::CreateDomainInputBuilder {
66        crate::operation::create_domain::builders::CreateDomainInputBuilder::default()
67    }
68}
69
70/// A builder for [`CreateDomainInput`](crate::operation::create_domain::CreateDomainInput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct CreateDomainInputBuilder {
74    pub(crate) name: ::std::option::Option<::std::string::String>,
75    pub(crate) description: ::std::option::Option<::std::string::String>,
76    pub(crate) single_sign_on: ::std::option::Option<crate::types::SingleSignOn>,
77    pub(crate) domain_execution_role: ::std::option::Option<::std::string::String>,
78    pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
79    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
80    pub(crate) domain_version: ::std::option::Option<crate::types::DomainVersion>,
81    pub(crate) service_role: ::std::option::Option<::std::string::String>,
82    pub(crate) client_token: ::std::option::Option<::std::string::String>,
83}
84impl CreateDomainInputBuilder {
85    /// <p>The name of the Amazon DataZone domain.</p>
86    /// This field is required.
87    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.name = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The name of the Amazon DataZone domain.</p>
92    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.name = input;
94        self
95    }
96    /// <p>The name of the Amazon DataZone domain.</p>
97    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
98        &self.name
99    }
100    /// <p>The description of the Amazon DataZone domain.</p>
101    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.description = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The description of the Amazon DataZone domain.</p>
106    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.description = input;
108        self
109    }
110    /// <p>The description of the Amazon DataZone domain.</p>
111    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
112        &self.description
113    }
114    /// <p>The single-sign on configuration of the Amazon DataZone domain.</p>
115    pub fn single_sign_on(mut self, input: crate::types::SingleSignOn) -> Self {
116        self.single_sign_on = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>The single-sign on configuration of the Amazon DataZone domain.</p>
120    pub fn set_single_sign_on(mut self, input: ::std::option::Option<crate::types::SingleSignOn>) -> Self {
121        self.single_sign_on = input;
122        self
123    }
124    /// <p>The single-sign on configuration of the Amazon DataZone domain.</p>
125    pub fn get_single_sign_on(&self) -> &::std::option::Option<crate::types::SingleSignOn> {
126        &self.single_sign_on
127    }
128    /// <p>The domain execution role that is created when an Amazon DataZone domain is created. The domain execution role is created in the Amazon Web Services account that houses the Amazon DataZone domain.</p>
129    /// This field is required.
130    pub fn domain_execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.domain_execution_role = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>The domain execution role that is created when an Amazon DataZone domain is created. The domain execution role is created in the Amazon Web Services account that houses the Amazon DataZone domain.</p>
135    pub fn set_domain_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.domain_execution_role = input;
137        self
138    }
139    /// <p>The domain execution role that is created when an Amazon DataZone domain is created. The domain execution role is created in the Amazon Web Services account that houses the Amazon DataZone domain.</p>
140    pub fn get_domain_execution_role(&self) -> &::std::option::Option<::std::string::String> {
141        &self.domain_execution_role
142    }
143    /// <p>The identifier of the Amazon Web Services Key Management Service (KMS) key that is used to encrypt the Amazon DataZone domain, metadata, and reporting data.</p>
144    pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.kms_key_identifier = ::std::option::Option::Some(input.into());
146        self
147    }
148    /// <p>The identifier of the Amazon Web Services Key Management Service (KMS) key that is used to encrypt the Amazon DataZone domain, metadata, and reporting data.</p>
149    pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.kms_key_identifier = input;
151        self
152    }
153    /// <p>The identifier of the Amazon Web Services Key Management Service (KMS) key that is used to encrypt the Amazon DataZone domain, metadata, and reporting data.</p>
154    pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
155        &self.kms_key_identifier
156    }
157    /// Adds a key-value pair to `tags`.
158    ///
159    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
160    ///
161    /// <p>The tags specified for the Amazon DataZone domain.</p>
162    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
163        let mut hash_map = self.tags.unwrap_or_default();
164        hash_map.insert(k.into(), v.into());
165        self.tags = ::std::option::Option::Some(hash_map);
166        self
167    }
168    /// <p>The tags specified for the Amazon DataZone domain.</p>
169    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
170        self.tags = input;
171        self
172    }
173    /// <p>The tags specified for the Amazon DataZone domain.</p>
174    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
175        &self.tags
176    }
177    /// <p>The version of the domain that is created.</p>
178    pub fn domain_version(mut self, input: crate::types::DomainVersion) -> Self {
179        self.domain_version = ::std::option::Option::Some(input);
180        self
181    }
182    /// <p>The version of the domain that is created.</p>
183    pub fn set_domain_version(mut self, input: ::std::option::Option<crate::types::DomainVersion>) -> Self {
184        self.domain_version = input;
185        self
186    }
187    /// <p>The version of the domain that is created.</p>
188    pub fn get_domain_version(&self) -> &::std::option::Option<crate::types::DomainVersion> {
189        &self.domain_version
190    }
191    /// <p>The service role of the domain that is created.</p>
192    pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193        self.service_role = ::std::option::Option::Some(input.into());
194        self
195    }
196    /// <p>The service role of the domain that is created.</p>
197    pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198        self.service_role = input;
199        self
200    }
201    /// <p>The service role of the domain that is created.</p>
202    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
203        &self.service_role
204    }
205    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
206    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207        self.client_token = ::std::option::Option::Some(input.into());
208        self
209    }
210    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
211    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212        self.client_token = input;
213        self
214    }
215    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
216    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
217        &self.client_token
218    }
219    /// Consumes the builder and constructs a [`CreateDomainInput`](crate::operation::create_domain::CreateDomainInput).
220    pub fn build(
221        self,
222    ) -> ::std::result::Result<crate::operation::create_domain::CreateDomainInput, ::aws_smithy_types::error::operation::BuildError> {
223        ::std::result::Result::Ok(crate::operation::create_domain::CreateDomainInput {
224            name: self.name,
225            description: self.description,
226            single_sign_on: self.single_sign_on,
227            domain_execution_role: self.domain_execution_role,
228            kms_key_identifier: self.kms_key_identifier,
229            tags: self.tags,
230            domain_version: self.domain_version,
231            service_role: self.service_role,
232            client_token: self.client_token,
233        })
234    }
235}