aws_sdk_entityresolution/operation/update_id_namespace/
_update_id_namespace_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateIdNamespaceOutput {
6 pub id_namespace_name: ::std::string::String,
8 pub id_namespace_arn: ::std::string::String,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub input_source_config: ::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceInputSource>>,
14 pub id_mapping_workflow_properties: ::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceIdMappingWorkflowProperties>>,
16 pub r#type: crate::types::IdNamespaceType,
20 pub role_arn: ::std::option::Option<::std::string::String>,
22 pub created_at: ::aws_smithy_types::DateTime,
24 pub updated_at: ::aws_smithy_types::DateTime,
26 _request_id: Option<String>,
27}
28impl UpdateIdNamespaceOutput {
29 pub fn id_namespace_name(&self) -> &str {
31 use std::ops::Deref;
32 self.id_namespace_name.deref()
33 }
34 pub fn id_namespace_arn(&self) -> &str {
36 use std::ops::Deref;
37 self.id_namespace_arn.deref()
38 }
39 pub fn description(&self) -> ::std::option::Option<&str> {
41 self.description.as_deref()
42 }
43 pub fn input_source_config(&self) -> &[crate::types::IdNamespaceInputSource] {
47 self.input_source_config.as_deref().unwrap_or_default()
48 }
49 pub fn id_mapping_workflow_properties(&self) -> &[crate::types::IdNamespaceIdMappingWorkflowProperties] {
53 self.id_mapping_workflow_properties.as_deref().unwrap_or_default()
54 }
55 pub fn r#type(&self) -> &crate::types::IdNamespaceType {
59 &self.r#type
60 }
61 pub fn role_arn(&self) -> ::std::option::Option<&str> {
63 self.role_arn.as_deref()
64 }
65 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
67 &self.created_at
68 }
69 pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
71 &self.updated_at
72 }
73}
74impl ::aws_types::request_id::RequestId for UpdateIdNamespaceOutput {
75 fn request_id(&self) -> Option<&str> {
76 self._request_id.as_deref()
77 }
78}
79impl UpdateIdNamespaceOutput {
80 pub fn builder() -> crate::operation::update_id_namespace::builders::UpdateIdNamespaceOutputBuilder {
82 crate::operation::update_id_namespace::builders::UpdateIdNamespaceOutputBuilder::default()
83 }
84}
85
86#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
88#[non_exhaustive]
89pub struct UpdateIdNamespaceOutputBuilder {
90 pub(crate) id_namespace_name: ::std::option::Option<::std::string::String>,
91 pub(crate) id_namespace_arn: ::std::option::Option<::std::string::String>,
92 pub(crate) description: ::std::option::Option<::std::string::String>,
93 pub(crate) input_source_config: ::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceInputSource>>,
94 pub(crate) id_mapping_workflow_properties: ::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceIdMappingWorkflowProperties>>,
95 pub(crate) r#type: ::std::option::Option<crate::types::IdNamespaceType>,
96 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
97 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
98 pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
99 _request_id: Option<String>,
100}
101impl UpdateIdNamespaceOutputBuilder {
102 pub fn id_namespace_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.id_namespace_name = ::std::option::Option::Some(input.into());
106 self
107 }
108 pub fn set_id_namespace_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.id_namespace_name = input;
111 self
112 }
113 pub fn get_id_namespace_name(&self) -> &::std::option::Option<::std::string::String> {
115 &self.id_namespace_name
116 }
117 pub fn id_namespace_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120 self.id_namespace_arn = ::std::option::Option::Some(input.into());
121 self
122 }
123 pub fn set_id_namespace_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125 self.id_namespace_arn = input;
126 self
127 }
128 pub fn get_id_namespace_arn(&self) -> &::std::option::Option<::std::string::String> {
130 &self.id_namespace_arn
131 }
132 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.description = ::std::option::Option::Some(input.into());
135 self
136 }
137 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.description = input;
140 self
141 }
142 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
144 &self.description
145 }
146 pub fn input_source_config(mut self, input: crate::types::IdNamespaceInputSource) -> Self {
152 let mut v = self.input_source_config.unwrap_or_default();
153 v.push(input);
154 self.input_source_config = ::std::option::Option::Some(v);
155 self
156 }
157 pub fn set_input_source_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceInputSource>>) -> Self {
159 self.input_source_config = input;
160 self
161 }
162 pub fn get_input_source_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceInputSource>> {
164 &self.input_source_config
165 }
166 pub fn id_mapping_workflow_properties(mut self, input: crate::types::IdNamespaceIdMappingWorkflowProperties) -> Self {
172 let mut v = self.id_mapping_workflow_properties.unwrap_or_default();
173 v.push(input);
174 self.id_mapping_workflow_properties = ::std::option::Option::Some(v);
175 self
176 }
177 pub fn set_id_mapping_workflow_properties(
179 mut self,
180 input: ::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceIdMappingWorkflowProperties>>,
181 ) -> Self {
182 self.id_mapping_workflow_properties = input;
183 self
184 }
185 pub fn get_id_mapping_workflow_properties(
187 &self,
188 ) -> &::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceIdMappingWorkflowProperties>> {
189 &self.id_mapping_workflow_properties
190 }
191 pub fn r#type(mut self, input: crate::types::IdNamespaceType) -> Self {
196 self.r#type = ::std::option::Option::Some(input);
197 self
198 }
199 pub fn set_type(mut self, input: ::std::option::Option<crate::types::IdNamespaceType>) -> Self {
203 self.r#type = input;
204 self
205 }
206 pub fn get_type(&self) -> &::std::option::Option<crate::types::IdNamespaceType> {
210 &self.r#type
211 }
212 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214 self.role_arn = ::std::option::Option::Some(input.into());
215 self
216 }
217 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219 self.role_arn = input;
220 self
221 }
222 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
224 &self.role_arn
225 }
226 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
229 self.created_at = ::std::option::Option::Some(input);
230 self
231 }
232 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
234 self.created_at = input;
235 self
236 }
237 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
239 &self.created_at
240 }
241 pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
244 self.updated_at = ::std::option::Option::Some(input);
245 self
246 }
247 pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
249 self.updated_at = input;
250 self
251 }
252 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
254 &self.updated_at
255 }
256 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
257 self._request_id = Some(request_id.into());
258 self
259 }
260
261 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
262 self._request_id = request_id;
263 self
264 }
265 pub fn build(
273 self,
274 ) -> ::std::result::Result<crate::operation::update_id_namespace::UpdateIdNamespaceOutput, ::aws_smithy_types::error::operation::BuildError> {
275 ::std::result::Result::Ok(crate::operation::update_id_namespace::UpdateIdNamespaceOutput {
276 id_namespace_name: self.id_namespace_name.ok_or_else(|| {
277 ::aws_smithy_types::error::operation::BuildError::missing_field(
278 "id_namespace_name",
279 "id_namespace_name was not specified but it is required when building UpdateIdNamespaceOutput",
280 )
281 })?,
282 id_namespace_arn: self.id_namespace_arn.ok_or_else(|| {
283 ::aws_smithy_types::error::operation::BuildError::missing_field(
284 "id_namespace_arn",
285 "id_namespace_arn was not specified but it is required when building UpdateIdNamespaceOutput",
286 )
287 })?,
288 description: self.description,
289 input_source_config: self.input_source_config,
290 id_mapping_workflow_properties: self.id_mapping_workflow_properties,
291 r#type: self.r#type.ok_or_else(|| {
292 ::aws_smithy_types::error::operation::BuildError::missing_field(
293 "r#type",
294 "r#type was not specified but it is required when building UpdateIdNamespaceOutput",
295 )
296 })?,
297 role_arn: self.role_arn,
298 created_at: self.created_at.ok_or_else(|| {
299 ::aws_smithy_types::error::operation::BuildError::missing_field(
300 "created_at",
301 "created_at was not specified but it is required when building UpdateIdNamespaceOutput",
302 )
303 })?,
304 updated_at: self.updated_at.ok_or_else(|| {
305 ::aws_smithy_types::error::operation::BuildError::missing_field(
306 "updated_at",
307 "updated_at was not specified but it is required when building UpdateIdNamespaceOutput",
308 )
309 })?,
310 _request_id: self._request_id,
311 })
312 }
313}