aws_sdk_datazone/operation/update_domain/
_update_domain_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateDomainOutput {
6 pub id: ::std::string::String,
8 pub root_domain_unit_id: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub single_sign_on: ::std::option::Option<crate::types::SingleSignOn>,
14 pub domain_execution_role: ::std::option::Option<::std::string::String>,
16 pub service_role: ::std::option::Option<::std::string::String>,
18 pub name: ::std::option::Option<::std::string::String>,
20 pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
22 _request_id: Option<String>,
23}
24impl UpdateDomainOutput {
25 pub fn id(&self) -> &str {
27 use std::ops::Deref;
28 self.id.deref()
29 }
30 pub fn root_domain_unit_id(&self) -> ::std::option::Option<&str> {
32 self.root_domain_unit_id.as_deref()
33 }
34 pub fn description(&self) -> ::std::option::Option<&str> {
36 self.description.as_deref()
37 }
38 pub fn single_sign_on(&self) -> ::std::option::Option<&crate::types::SingleSignOn> {
40 self.single_sign_on.as_ref()
41 }
42 pub fn domain_execution_role(&self) -> ::std::option::Option<&str> {
44 self.domain_execution_role.as_deref()
45 }
46 pub fn service_role(&self) -> ::std::option::Option<&str> {
48 self.service_role.as_deref()
49 }
50 pub fn name(&self) -> ::std::option::Option<&str> {
52 self.name.as_deref()
53 }
54 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 pub fn builder() -> crate::operation::update_domain::builders::UpdateDomainOutputBuilder {
67 crate::operation::update_domain::builders::UpdateDomainOutputBuilder::default()
68 }
69}
70
71#[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 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 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94 self.id = input;
95 self
96 }
97 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
99 &self.id
100 }
101 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 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 pub fn get_root_domain_unit_id(&self) -> &::std::option::Option<::std::string::String> {
113 &self.root_domain_unit_id
114 }
115 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.description = input;
123 self
124 }
125 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
127 &self.description
128 }
129 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 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 pub fn get_single_sign_on(&self) -> &::std::option::Option<crate::types::SingleSignOn> {
141 &self.single_sign_on
142 }
143 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 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 pub fn get_domain_execution_role(&self) -> &::std::option::Option<::std::string::String> {
155 &self.domain_execution_role
156 }
157 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 pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.service_role = input;
165 self
166 }
167 pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
169 &self.service_role
170 }
171 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178 self.name = input;
179 self
180 }
181 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
183 &self.name
184 }
185 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 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 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 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}