aws_sdk_datazone/operation/update_domain/
_update_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 UpdateDomainOutput {
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 description to be updated as part of the <code>UpdateDomain</code> action.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The single sign-on option of the Amazon DataZone domain.</p>
13    pub single_sign_on: ::std::option::Option<crate::types::SingleSignOn>,
14    /// <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
15    pub domain_execution_role: ::std::option::Option<::std::string::String>,
16    /// <p>The service role of the domain.</p>
17    pub service_role: ::std::option::Option<::std::string::String>,
18    /// <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
19    pub name: ::std::option::Option<::std::string::String>,
20    /// <p>Specifies the timestamp of when the domain was last updated.</p>
21    pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
22    _request_id: Option<String>,
23}
24impl UpdateDomainOutput {
25    /// <p>The identifier of the Amazon DataZone domain.</p>
26    pub fn id(&self) -> &str {
27        use std::ops::Deref;
28        self.id.deref()
29    }
30    /// <p>The ID of the root domain unit.</p>
31    pub fn root_domain_unit_id(&self) -> ::std::option::Option<&str> {
32        self.root_domain_unit_id.as_deref()
33    }
34    /// <p>The description to be updated as part of the <code>UpdateDomain</code> action.</p>
35    pub fn description(&self) -> ::std::option::Option<&str> {
36        self.description.as_deref()
37    }
38    /// <p>The single sign-on option of the Amazon DataZone domain.</p>
39    pub fn single_sign_on(&self) -> ::std::option::Option<&crate::types::SingleSignOn> {
40        self.single_sign_on.as_ref()
41    }
42    /// <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
43    pub fn domain_execution_role(&self) -> ::std::option::Option<&str> {
44        self.domain_execution_role.as_deref()
45    }
46    /// <p>The service role of the domain.</p>
47    pub fn service_role(&self) -> ::std::option::Option<&str> {
48        self.service_role.as_deref()
49    }
50    /// <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
51    pub fn name(&self) -> ::std::option::Option<&str> {
52        self.name.as_deref()
53    }
54    /// <p>Specifies the timestamp of when the domain was last updated.</p>
55    pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
56        self.last_updated_at.as_ref()
57    }
58}
59impl ::aws_types::request_id::RequestId for UpdateDomainOutput {
60    fn request_id(&self) -> Option<&str> {
61        self._request_id.as_deref()
62    }
63}
64impl UpdateDomainOutput {
65    /// Creates a new builder-style object to manufacture [`UpdateDomainOutput`](crate::operation::update_domain::UpdateDomainOutput).
66    pub fn builder() -> crate::operation::update_domain::builders::UpdateDomainOutputBuilder {
67        crate::operation::update_domain::builders::UpdateDomainOutputBuilder::default()
68    }
69}
70
71/// A builder for [`UpdateDomainOutput`](crate::operation::update_domain::UpdateDomainOutput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
73#[non_exhaustive]
74pub struct UpdateDomainOutputBuilder {
75    pub(crate) id: ::std::option::Option<::std::string::String>,
76    pub(crate) root_domain_unit_id: ::std::option::Option<::std::string::String>,
77    pub(crate) description: ::std::option::Option<::std::string::String>,
78    pub(crate) single_sign_on: ::std::option::Option<crate::types::SingleSignOn>,
79    pub(crate) domain_execution_role: ::std::option::Option<::std::string::String>,
80    pub(crate) service_role: ::std::option::Option<::std::string::String>,
81    pub(crate) name: ::std::option::Option<::std::string::String>,
82    pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
83    _request_id: Option<String>,
84}
85impl UpdateDomainOutputBuilder {
86    /// <p>The identifier of the Amazon DataZone domain.</p>
87    /// This field is required.
88    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.id = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>The identifier of the Amazon DataZone domain.</p>
93    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.id = input;
95        self
96    }
97    /// <p>The identifier of the Amazon DataZone domain.</p>
98    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
99        &self.id
100    }
101    /// <p>The ID of the root domain unit.</p>
102    pub fn root_domain_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.root_domain_unit_id = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The ID of the root domain unit.</p>
107    pub fn set_root_domain_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.root_domain_unit_id = input;
109        self
110    }
111    /// <p>The ID of the root domain unit.</p>
112    pub fn get_root_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
113        &self.root_domain_unit_id
114    }
115    /// <p>The description to be updated as part of the <code>UpdateDomain</code> action.</p>
116    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.description = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// <p>The description to be updated as part of the <code>UpdateDomain</code> action.</p>
121    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.description = input;
123        self
124    }
125    /// <p>The description to be updated as part of the <code>UpdateDomain</code> action.</p>
126    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
127        &self.description
128    }
129    /// <p>The single sign-on option of the Amazon DataZone domain.</p>
130    pub fn single_sign_on(mut self, input: crate::types::SingleSignOn) -> Self {
131        self.single_sign_on = ::std::option::Option::Some(input);
132        self
133    }
134    /// <p>The single sign-on option of the Amazon DataZone domain.</p>
135    pub fn set_single_sign_on(mut self, input: ::std::option::Option<crate::types::SingleSignOn>) -> Self {
136        self.single_sign_on = input;
137        self
138    }
139    /// <p>The single sign-on option of the Amazon DataZone domain.</p>
140    pub fn get_single_sign_on(&self) -> &::std::option::Option<crate::types::SingleSignOn> {
141        &self.single_sign_on
142    }
143    /// <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
144    pub fn domain_execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.domain_execution_role = ::std::option::Option::Some(input.into());
146        self
147    }
148    /// <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
149    pub fn set_domain_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.domain_execution_role = input;
151        self
152    }
153    /// <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
154    pub fn get_domain_execution_role(&self) -> &::std::option::Option<::std::string::String> {
155        &self.domain_execution_role
156    }
157    /// <p>The service role of the domain.</p>
158    pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.service_role = ::std::option::Option::Some(input.into());
160        self
161    }
162    /// <p>The service role of the domain.</p>
163    pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.service_role = input;
165        self
166    }
167    /// <p>The service role of the domain.</p>
168    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
169        &self.service_role
170    }
171    /// <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
172    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173        self.name = ::std::option::Option::Some(input.into());
174        self
175    }
176    /// <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
177    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178        self.name = input;
179        self
180    }
181    /// <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
182    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
183        &self.name
184    }
185    /// <p>Specifies the timestamp of when the domain was last updated.</p>
186    pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
187        self.last_updated_at = ::std::option::Option::Some(input);
188        self
189    }
190    /// <p>Specifies the timestamp of when the domain was last updated.</p>
191    pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
192        self.last_updated_at = input;
193        self
194    }
195    /// <p>Specifies the timestamp of when the domain was last updated.</p>
196    pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
197        &self.last_updated_at
198    }
199    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
200        self._request_id = Some(request_id.into());
201        self
202    }
203
204    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
205        self._request_id = request_id;
206        self
207    }
208    /// Consumes the builder and constructs a [`UpdateDomainOutput`](crate::operation::update_domain::UpdateDomainOutput).
209    /// This method will fail if any of the following fields are not set:
210    /// - [`id`](crate::operation::update_domain::builders::UpdateDomainOutputBuilder::id)
211    pub fn build(
212        self,
213    ) -> ::std::result::Result<crate::operation::update_domain::UpdateDomainOutput, ::aws_smithy_types::error::operation::BuildError> {
214        ::std::result::Result::Ok(crate::operation::update_domain::UpdateDomainOutput {
215            id: self.id.ok_or_else(|| {
216                ::aws_smithy_types::error::operation::BuildError::missing_field(
217                    "id",
218                    "id was not specified but it is required when building UpdateDomainOutput",
219                )
220            })?,
221            root_domain_unit_id: self.root_domain_unit_id,
222            description: self.description,
223            single_sign_on: self.single_sign_on,
224            domain_execution_role: self.domain_execution_role,
225            service_role: self.service_role,
226            name: self.name,
227            last_updated_at: self.last_updated_at,
228            _request_id: self._request_id,
229        })
230    }
231}