aws_sdk_datazone/operation/create_domain/
_create_domain_output.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 CreateDomainOutput {
6    /// <p>The identifier of the Amazon DataZone domain.</p>
7    pub id: ::std::string::String,
8    /// <p>The ID of the root domain unit.</p>
9    pub root_domain_unit_id: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the Amazon DataZone domain.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>The description of the Amazon DataZone domain.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The single-sign on configuration of the Amazon DataZone domain.</p>
15    pub single_sign_on: ::std::option::Option<crate::types::SingleSignOn>,
16    /// <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>
17    pub domain_execution_role: ::std::option::Option<::std::string::String>,
18    /// <p>The ARN of the Amazon DataZone domain.</p>
19    pub arn: ::std::option::Option<::std::string::String>,
20    /// <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>
21    pub kms_key_identifier: ::std::option::Option<::std::string::String>,
22    /// <p>The status of the Amazon DataZone domain.</p>
23    pub status: ::std::option::Option<crate::types::DomainStatus>,
24    /// <p>The URL of the data portal for this Amazon DataZone domain.</p>
25    pub portal_url: ::std::option::Option<::std::string::String>,
26    /// <p>The tags specified for the Amazon DataZone domain.</p>
27    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
28    /// <p>The version of the domain that is created.</p>
29    pub domain_version: ::std::option::Option<crate::types::DomainVersion>,
30    /// <p>Te service role of the domain that is created.</p>
31    pub service_role: ::std::option::Option<::std::string::String>,
32    _request_id: Option<String>,
33}
34impl CreateDomainOutput {
35    /// <p>The identifier of the Amazon DataZone domain.</p>
36    pub fn id(&self) -> &str {
37        use std::ops::Deref;
38        self.id.deref()
39    }
40    /// <p>The ID of the root domain unit.</p>
41    pub fn root_domain_unit_id(&self) -> ::std::option::Option<&str> {
42        self.root_domain_unit_id.as_deref()
43    }
44    /// <p>The name of the Amazon DataZone domain.</p>
45    pub fn name(&self) -> ::std::option::Option<&str> {
46        self.name.as_deref()
47    }
48    /// <p>The description of the Amazon DataZone domain.</p>
49    pub fn description(&self) -> ::std::option::Option<&str> {
50        self.description.as_deref()
51    }
52    /// <p>The single-sign on configuration of the Amazon DataZone domain.</p>
53    pub fn single_sign_on(&self) -> ::std::option::Option<&crate::types::SingleSignOn> {
54        self.single_sign_on.as_ref()
55    }
56    /// <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>
57    pub fn domain_execution_role(&self) -> ::std::option::Option<&str> {
58        self.domain_execution_role.as_deref()
59    }
60    /// <p>The ARN of the Amazon DataZone domain.</p>
61    pub fn arn(&self) -> ::std::option::Option<&str> {
62        self.arn.as_deref()
63    }
64    /// <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>
65    pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
66        self.kms_key_identifier.as_deref()
67    }
68    /// <p>The status of the Amazon DataZone domain.</p>
69    pub fn status(&self) -> ::std::option::Option<&crate::types::DomainStatus> {
70        self.status.as_ref()
71    }
72    /// <p>The URL of the data portal for this Amazon DataZone domain.</p>
73    pub fn portal_url(&self) -> ::std::option::Option<&str> {
74        self.portal_url.as_deref()
75    }
76    /// <p>The tags specified for the Amazon DataZone domain.</p>
77    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
78        self.tags.as_ref()
79    }
80    /// <p>The version of the domain that is created.</p>
81    pub fn domain_version(&self) -> ::std::option::Option<&crate::types::DomainVersion> {
82        self.domain_version.as_ref()
83    }
84    /// <p>Te service role of the domain that is created.</p>
85    pub fn service_role(&self) -> ::std::option::Option<&str> {
86        self.service_role.as_deref()
87    }
88}
89impl ::aws_types::request_id::RequestId for CreateDomainOutput {
90    fn request_id(&self) -> Option<&str> {
91        self._request_id.as_deref()
92    }
93}
94impl CreateDomainOutput {
95    /// Creates a new builder-style object to manufacture [`CreateDomainOutput`](crate::operation::create_domain::CreateDomainOutput).
96    pub fn builder() -> crate::operation::create_domain::builders::CreateDomainOutputBuilder {
97        crate::operation::create_domain::builders::CreateDomainOutputBuilder::default()
98    }
99}
100
101/// A builder for [`CreateDomainOutput`](crate::operation::create_domain::CreateDomainOutput).
102#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
103#[non_exhaustive]
104pub struct CreateDomainOutputBuilder {
105    pub(crate) id: ::std::option::Option<::std::string::String>,
106    pub(crate) root_domain_unit_id: ::std::option::Option<::std::string::String>,
107    pub(crate) name: ::std::option::Option<::std::string::String>,
108    pub(crate) description: ::std::option::Option<::std::string::String>,
109    pub(crate) single_sign_on: ::std::option::Option<crate::types::SingleSignOn>,
110    pub(crate) domain_execution_role: ::std::option::Option<::std::string::String>,
111    pub(crate) arn: ::std::option::Option<::std::string::String>,
112    pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
113    pub(crate) status: ::std::option::Option<crate::types::DomainStatus>,
114    pub(crate) portal_url: ::std::option::Option<::std::string::String>,
115    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
116    pub(crate) domain_version: ::std::option::Option<crate::types::DomainVersion>,
117    pub(crate) service_role: ::std::option::Option<::std::string::String>,
118    _request_id: Option<String>,
119}
120impl CreateDomainOutputBuilder {
121    /// <p>The identifier of the Amazon DataZone domain.</p>
122    /// This field is required.
123    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.id = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The identifier of the Amazon DataZone domain.</p>
128    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.id = input;
130        self
131    }
132    /// <p>The identifier of the Amazon DataZone domain.</p>
133    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
134        &self.id
135    }
136    /// <p>The ID of the root domain unit.</p>
137    pub fn root_domain_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.root_domain_unit_id = ::std::option::Option::Some(input.into());
139        self
140    }
141    /// <p>The ID of the root domain unit.</p>
142    pub fn set_root_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.root_domain_unit_id = input;
144        self
145    }
146    /// <p>The ID of the root domain unit.</p>
147    pub fn get_root_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
148        &self.root_domain_unit_id
149    }
150    /// <p>The name of the Amazon DataZone domain.</p>
151    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.name = ::std::option::Option::Some(input.into());
153        self
154    }
155    /// <p>The name of the Amazon DataZone domain.</p>
156    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157        self.name = input;
158        self
159    }
160    /// <p>The name of the Amazon DataZone domain.</p>
161    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
162        &self.name
163    }
164    /// <p>The description of the Amazon DataZone domain.</p>
165    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166        self.description = ::std::option::Option::Some(input.into());
167        self
168    }
169    /// <p>The description of the Amazon DataZone domain.</p>
170    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171        self.description = input;
172        self
173    }
174    /// <p>The description of the Amazon DataZone domain.</p>
175    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
176        &self.description
177    }
178    /// <p>The single-sign on configuration of the Amazon DataZone domain.</p>
179    pub fn single_sign_on(mut self, input: crate::types::SingleSignOn) -> Self {
180        self.single_sign_on = ::std::option::Option::Some(input);
181        self
182    }
183    /// <p>The single-sign on configuration of the Amazon DataZone domain.</p>
184    pub fn set_single_sign_on(mut self, input: ::std::option::Option<crate::types::SingleSignOn>) -> Self {
185        self.single_sign_on = input;
186        self
187    }
188    /// <p>The single-sign on configuration of the Amazon DataZone domain.</p>
189    pub fn get_single_sign_on(&self) -> &::std::option::Option<crate::types::SingleSignOn> {
190        &self.single_sign_on
191    }
192    /// <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>
193    pub fn domain_execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        self.domain_execution_role = ::std::option::Option::Some(input.into());
195        self
196    }
197    /// <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>
198    pub fn set_domain_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.domain_execution_role = input;
200        self
201    }
202    /// <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>
203    pub fn get_domain_execution_role(&self) -> &::std::option::Option<::std::string::String> {
204        &self.domain_execution_role
205    }
206    /// <p>The ARN of the Amazon DataZone domain.</p>
207    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208        self.arn = ::std::option::Option::Some(input.into());
209        self
210    }
211    /// <p>The ARN of the Amazon DataZone domain.</p>
212    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213        self.arn = input;
214        self
215    }
216    /// <p>The ARN of the Amazon DataZone domain.</p>
217    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
218        &self.arn
219    }
220    /// <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>
221    pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222        self.kms_key_identifier = ::std::option::Option::Some(input.into());
223        self
224    }
225    /// <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>
226    pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227        self.kms_key_identifier = input;
228        self
229    }
230    /// <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>
231    pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
232        &self.kms_key_identifier
233    }
234    /// <p>The status of the Amazon DataZone domain.</p>
235    pub fn status(mut self, input: crate::types::DomainStatus) -> Self {
236        self.status = ::std::option::Option::Some(input);
237        self
238    }
239    /// <p>The status of the Amazon DataZone domain.</p>
240    pub fn set_status(mut self, input: ::std::option::Option<crate::types::DomainStatus>) -> Self {
241        self.status = input;
242        self
243    }
244    /// <p>The status of the Amazon DataZone domain.</p>
245    pub fn get_status(&self) -> &::std::option::Option<crate::types::DomainStatus> {
246        &self.status
247    }
248    /// <p>The URL of the data portal for this Amazon DataZone domain.</p>
249    pub fn portal_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
250        self.portal_url = ::std::option::Option::Some(input.into());
251        self
252    }
253    /// <p>The URL of the data portal for this Amazon DataZone domain.</p>
254    pub fn set_portal_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
255        self.portal_url = input;
256        self
257    }
258    /// <p>The URL of the data portal for this Amazon DataZone domain.</p>
259    pub fn get_portal_url(&self) -> &::std::option::Option<::std::string::String> {
260        &self.portal_url
261    }
262    /// Adds a key-value pair to `tags`.
263    ///
264    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
265    ///
266    /// <p>The tags specified for the Amazon DataZone domain.</p>
267    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
268        let mut hash_map = self.tags.unwrap_or_default();
269        hash_map.insert(k.into(), v.into());
270        self.tags = ::std::option::Option::Some(hash_map);
271        self
272    }
273    /// <p>The tags specified for the Amazon DataZone domain.</p>
274    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
275        self.tags = input;
276        self
277    }
278    /// <p>The tags specified for the Amazon DataZone domain.</p>
279    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
280        &self.tags
281    }
282    /// <p>The version of the domain that is created.</p>
283    pub fn domain_version(mut self, input: crate::types::DomainVersion) -> Self {
284        self.domain_version = ::std::option::Option::Some(input);
285        self
286    }
287    /// <p>The version of the domain that is created.</p>
288    pub fn set_domain_version(mut self, input: ::std::option::Option<crate::types::DomainVersion>) -> Self {
289        self.domain_version = input;
290        self
291    }
292    /// <p>The version of the domain that is created.</p>
293    pub fn get_domain_version(&self) -> &::std::option::Option<crate::types::DomainVersion> {
294        &self.domain_version
295    }
296    /// <p>Te service role of the domain that is created.</p>
297    pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
298        self.service_role = ::std::option::Option::Some(input.into());
299        self
300    }
301    /// <p>Te service role of the domain that is created.</p>
302    pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
303        self.service_role = input;
304        self
305    }
306    /// <p>Te service role of the domain that is created.</p>
307    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
308        &self.service_role
309    }
310    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
311        self._request_id = Some(request_id.into());
312        self
313    }
314
315    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
316        self._request_id = request_id;
317        self
318    }
319    /// Consumes the builder and constructs a [`CreateDomainOutput`](crate::operation::create_domain::CreateDomainOutput).
320    /// This method will fail if any of the following fields are not set:
321    /// - [`id`](crate::operation::create_domain::builders::CreateDomainOutputBuilder::id)
322    pub fn build(
323        self,
324    ) -> ::std::result::Result<crate::operation::create_domain::CreateDomainOutput, ::aws_smithy_types::error::operation::BuildError> {
325        ::std::result::Result::Ok(crate::operation::create_domain::CreateDomainOutput {
326            id: self.id.ok_or_else(|| {
327                ::aws_smithy_types::error::operation::BuildError::missing_field(
328                    "id",
329                    "id was not specified but it is required when building CreateDomainOutput",
330                )
331            })?,
332            root_domain_unit_id: self.root_domain_unit_id,
333            name: self.name,
334            description: self.description,
335            single_sign_on: self.single_sign_on,
336            domain_execution_role: self.domain_execution_role,
337            arn: self.arn,
338            kms_key_identifier: self.kms_key_identifier,
339            status: self.status,
340            portal_url: self.portal_url,
341            tags: self.tags,
342            domain_version: self.domain_version,
343            service_role: self.service_role,
344            _request_id: self._request_id,
345        })
346    }
347}