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