aws_sdk_entityresolution/operation/update_id_namespace/
_update_id_namespace_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 UpdateIdNamespaceOutput {
6    /// <p>The name of the ID namespace.</p>
7    pub id_namespace_name: ::std::string::String,
8    /// <p>The Amazon Resource Name (ARN) of the ID namespace.</p>
9    pub id_namespace_arn: ::std::string::String,
10    /// <p>The description of the ID namespace.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>A list of <code>InputSource</code> objects, which have the fields <code>InputSourceARN</code> and <code>SchemaName</code>.</p>
13    pub input_source_config: ::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceInputSource>>,
14    /// <p>Determines the properties of <code>IdMappingWorkflow</code> where this <code>IdNamespace</code> can be used as a <code>Source</code> or a <code>Target</code>.</p>
15    pub id_mapping_workflow_properties: ::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceIdMappingWorkflowProperties>>,
16    /// <p>The type of ID namespace. There are two types: <code>SOURCE</code> and <code>TARGET</code>.</p>
17    /// <p>The <code>SOURCE</code> contains configurations for <code>sourceId</code> data that will be processed in an ID mapping workflow.</p>
18    /// <p>The <code>TARGET</code> contains a configuration of <code>targetId</code> to which all <code>sourceIds</code> will resolve to.</p>
19    pub r#type: crate::types::IdNamespaceType,
20    /// <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to access the resources defined in this <code>IdNamespace</code> on your behalf as part of a workflow run.</p>
21    pub role_arn: ::std::option::Option<::std::string::String>,
22    /// <p>The timestamp of when the ID namespace was created.</p>
23    pub created_at: ::aws_smithy_types::DateTime,
24    /// <p>The timestamp of when the ID namespace was last updated.</p>
25    pub updated_at: ::aws_smithy_types::DateTime,
26    _request_id: Option<String>,
27}
28impl UpdateIdNamespaceOutput {
29    /// <p>The name of the ID namespace.</p>
30    pub fn id_namespace_name(&self) -> &str {
31        use std::ops::Deref;
32        self.id_namespace_name.deref()
33    }
34    /// <p>The Amazon Resource Name (ARN) of the ID namespace.</p>
35    pub fn id_namespace_arn(&self) -> &str {
36        use std::ops::Deref;
37        self.id_namespace_arn.deref()
38    }
39    /// <p>The description of the ID namespace.</p>
40    pub fn description(&self) -> ::std::option::Option<&str> {
41        self.description.as_deref()
42    }
43    /// <p>A list of <code>InputSource</code> objects, which have the fields <code>InputSourceARN</code> and <code>SchemaName</code>.</p>
44    ///
45    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.input_source_config.is_none()`.
46    pub fn input_source_config(&self) -> &[crate::types::IdNamespaceInputSource] {
47        self.input_source_config.as_deref().unwrap_or_default()
48    }
49    /// <p>Determines the properties of <code>IdMappingWorkflow</code> where this <code>IdNamespace</code> can be used as a <code>Source</code> or a <code>Target</code>.</p>
50    ///
51    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.id_mapping_workflow_properties.is_none()`.
52    pub fn id_mapping_workflow_properties(&self) -> &[crate::types::IdNamespaceIdMappingWorkflowProperties] {
53        self.id_mapping_workflow_properties.as_deref().unwrap_or_default()
54    }
55    /// <p>The type of ID namespace. There are two types: <code>SOURCE</code> and <code>TARGET</code>.</p>
56    /// <p>The <code>SOURCE</code> contains configurations for <code>sourceId</code> data that will be processed in an ID mapping workflow.</p>
57    /// <p>The <code>TARGET</code> contains a configuration of <code>targetId</code> to which all <code>sourceIds</code> will resolve to.</p>
58    pub fn r#type(&self) -> &crate::types::IdNamespaceType {
59        &self.r#type
60    }
61    /// <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to access the resources defined in this <code>IdNamespace</code> on your behalf as part of a workflow run.</p>
62    pub fn role_arn(&self) -> ::std::option::Option<&str> {
63        self.role_arn.as_deref()
64    }
65    /// <p>The timestamp of when the ID namespace was created.</p>
66    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
67        &self.created_at
68    }
69    /// <p>The timestamp of when the ID namespace was last updated.</p>
70    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    /// Creates a new builder-style object to manufacture [`UpdateIdNamespaceOutput`](crate::operation::update_id_namespace::UpdateIdNamespaceOutput).
81    pub fn builder() -> crate::operation::update_id_namespace::builders::UpdateIdNamespaceOutputBuilder {
82        crate::operation::update_id_namespace::builders::UpdateIdNamespaceOutputBuilder::default()
83    }
84}
85
86/// A builder for [`UpdateIdNamespaceOutput`](crate::operation::update_id_namespace::UpdateIdNamespaceOutput).
87#[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    /// <p>The name of the ID namespace.</p>
103    /// This field is required.
104    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    /// <p>The name of the ID namespace.</p>
109    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    /// <p>The name of the ID namespace.</p>
114    pub fn get_id_namespace_name(&self) -> &::std::option::Option<::std::string::String> {
115        &self.id_namespace_name
116    }
117    /// <p>The Amazon Resource Name (ARN) of the ID namespace.</p>
118    /// This field is required.
119    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    /// <p>The Amazon Resource Name (ARN) of the ID namespace.</p>
124    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    /// <p>The Amazon Resource Name (ARN) of the ID namespace.</p>
129    pub fn get_id_namespace_arn(&self) -> &::std::option::Option<::std::string::String> {
130        &self.id_namespace_arn
131    }
132    /// <p>The description of the ID namespace.</p>
133    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    /// <p>The description of the ID namespace.</p>
138    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.description = input;
140        self
141    }
142    /// <p>The description of the ID namespace.</p>
143    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
144        &self.description
145    }
146    /// Appends an item to `input_source_config`.
147    ///
148    /// To override the contents of this collection use [`set_input_source_config`](Self::set_input_source_config).
149    ///
150    /// <p>A list of <code>InputSource</code> objects, which have the fields <code>InputSourceARN</code> and <code>SchemaName</code>.</p>
151    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    /// <p>A list of <code>InputSource</code> objects, which have the fields <code>InputSourceARN</code> and <code>SchemaName</code>.</p>
158    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    /// <p>A list of <code>InputSource</code> objects, which have the fields <code>InputSourceARN</code> and <code>SchemaName</code>.</p>
163    pub fn get_input_source_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IdNamespaceInputSource>> {
164        &self.input_source_config
165    }
166    /// Appends an item to `id_mapping_workflow_properties`.
167    ///
168    /// To override the contents of this collection use [`set_id_mapping_workflow_properties`](Self::set_id_mapping_workflow_properties).
169    ///
170    /// <p>Determines the properties of <code>IdMappingWorkflow</code> where this <code>IdNamespace</code> can be used as a <code>Source</code> or a <code>Target</code>.</p>
171    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    /// <p>Determines the properties of <code>IdMappingWorkflow</code> where this <code>IdNamespace</code> can be used as a <code>Source</code> or a <code>Target</code>.</p>
178    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    /// <p>Determines the properties of <code>IdMappingWorkflow</code> where this <code>IdNamespace</code> can be used as a <code>Source</code> or a <code>Target</code>.</p>
186    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    /// <p>The type of ID namespace. There are two types: <code>SOURCE</code> and <code>TARGET</code>.</p>
192    /// <p>The <code>SOURCE</code> contains configurations for <code>sourceId</code> data that will be processed in an ID mapping workflow.</p>
193    /// <p>The <code>TARGET</code> contains a configuration of <code>targetId</code> to which all <code>sourceIds</code> will resolve to.</p>
194    /// This field is required.
195    pub fn r#type(mut self, input: crate::types::IdNamespaceType) -> Self {
196        self.r#type = ::std::option::Option::Some(input);
197        self
198    }
199    /// <p>The type of ID namespace. There are two types: <code>SOURCE</code> and <code>TARGET</code>.</p>
200    /// <p>The <code>SOURCE</code> contains configurations for <code>sourceId</code> data that will be processed in an ID mapping workflow.</p>
201    /// <p>The <code>TARGET</code> contains a configuration of <code>targetId</code> to which all <code>sourceIds</code> will resolve to.</p>
202    pub fn set_type(mut self, input: ::std::option::Option<crate::types::IdNamespaceType>) -> Self {
203        self.r#type = input;
204        self
205    }
206    /// <p>The type of ID namespace. There are two types: <code>SOURCE</code> and <code>TARGET</code>.</p>
207    /// <p>The <code>SOURCE</code> contains configurations for <code>sourceId</code> data that will be processed in an ID mapping workflow.</p>
208    /// <p>The <code>TARGET</code> contains a configuration of <code>targetId</code> to which all <code>sourceIds</code> will resolve to.</p>
209    pub fn get_type(&self) -> &::std::option::Option<crate::types::IdNamespaceType> {
210        &self.r#type
211    }
212    /// <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to access the resources defined in this <code>IdNamespace</code> on your behalf as part of a workflow run.</p>
213    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    /// <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to access the resources defined in this <code>IdNamespace</code> on your behalf as part of a workflow run.</p>
218    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219        self.role_arn = input;
220        self
221    }
222    /// <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to access the resources defined in this <code>IdNamespace</code> on your behalf as part of a workflow run.</p>
223    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
224        &self.role_arn
225    }
226    /// <p>The timestamp of when the ID namespace was created.</p>
227    /// This field is required.
228    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    /// <p>The timestamp of when the ID namespace was created.</p>
233    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    /// <p>The timestamp of when the ID namespace was created.</p>
238    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
239        &self.created_at
240    }
241    /// <p>The timestamp of when the ID namespace was last updated.</p>
242    /// This field is required.
243    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    /// <p>The timestamp of when the ID namespace was last updated.</p>
248    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    /// <p>The timestamp of when the ID namespace was last updated.</p>
253    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    /// Consumes the builder and constructs a [`UpdateIdNamespaceOutput`](crate::operation::update_id_namespace::UpdateIdNamespaceOutput).
266    /// This method will fail if any of the following fields are not set:
267    /// - [`id_namespace_name`](crate::operation::update_id_namespace::builders::UpdateIdNamespaceOutputBuilder::id_namespace_name)
268    /// - [`id_namespace_arn`](crate::operation::update_id_namespace::builders::UpdateIdNamespaceOutputBuilder::id_namespace_arn)
269    /// - [`r#type`](crate::operation::update_id_namespace::builders::UpdateIdNamespaceOutputBuilder::type)
270    /// - [`created_at`](crate::operation::update_id_namespace::builders::UpdateIdNamespaceOutputBuilder::created_at)
271    /// - [`updated_at`](crate::operation::update_id_namespace::builders::UpdateIdNamespaceOutputBuilder::updated_at)
272    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}