aws_sdk_entityresolution/operation/create_id_mapping_workflow/
_create_id_mapping_workflow_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 CreateIdMappingWorkflowOutput {
6    /// <p>The name of the workflow.</p>
7    pub workflow_name: ::std::string::String,
8    /// <p>The ARN (Amazon Resource Name) that Entity Resolution generated for the <code>IDMappingWorkflow</code>.</p>
9    pub workflow_arn: ::std::string::String,
10    /// <p>A description of the workflow.</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::vec::Vec<crate::types::IdMappingWorkflowInputSource>,
14    /// <p>A list of <code>IdMappingWorkflowOutputSource</code> objects, each of which contains fields <code>OutputS3Path</code> and <code>Output</code>.</p>
15    pub output_source_config: ::std::option::Option<::std::vec::Vec<crate::types::IdMappingWorkflowOutputSource>>,
16    /// <p>An object which defines the ID mapping technique and any additional configurations.</p>
17    pub id_mapping_techniques: ::std::option::Option<crate::types::IdMappingTechniques>,
18    /// <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to create resources on your behalf as part of workflow execution.</p>
19    pub role_arn: ::std::string::String,
20    _request_id: Option<String>,
21}
22impl CreateIdMappingWorkflowOutput {
23    /// <p>The name of the workflow.</p>
24    pub fn workflow_name(&self) -> &str {
25        use std::ops::Deref;
26        self.workflow_name.deref()
27    }
28    /// <p>The ARN (Amazon Resource Name) that Entity Resolution generated for the <code>IDMappingWorkflow</code>.</p>
29    pub fn workflow_arn(&self) -> &str {
30        use std::ops::Deref;
31        self.workflow_arn.deref()
32    }
33    /// <p>A description of the workflow.</p>
34    pub fn description(&self) -> ::std::option::Option<&str> {
35        self.description.as_deref()
36    }
37    /// <p>A list of <code>InputSource</code> objects, which have the fields <code>InputSourceARN</code> and <code>SchemaName</code>.</p>
38    pub fn input_source_config(&self) -> &[crate::types::IdMappingWorkflowInputSource] {
39        use std::ops::Deref;
40        self.input_source_config.deref()
41    }
42    /// <p>A list of <code>IdMappingWorkflowOutputSource</code> objects, each of which contains fields <code>OutputS3Path</code> and <code>Output</code>.</p>
43    ///
44    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.output_source_config.is_none()`.
45    pub fn output_source_config(&self) -> &[crate::types::IdMappingWorkflowOutputSource] {
46        self.output_source_config.as_deref().unwrap_or_default()
47    }
48    /// <p>An object which defines the ID mapping technique and any additional configurations.</p>
49    pub fn id_mapping_techniques(&self) -> ::std::option::Option<&crate::types::IdMappingTechniques> {
50        self.id_mapping_techniques.as_ref()
51    }
52    /// <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to create resources on your behalf as part of workflow execution.</p>
53    pub fn role_arn(&self) -> &str {
54        use std::ops::Deref;
55        self.role_arn.deref()
56    }
57}
58impl ::aws_types::request_id::RequestId for CreateIdMappingWorkflowOutput {
59    fn request_id(&self) -> Option<&str> {
60        self._request_id.as_deref()
61    }
62}
63impl CreateIdMappingWorkflowOutput {
64    /// Creates a new builder-style object to manufacture [`CreateIdMappingWorkflowOutput`](crate::operation::create_id_mapping_workflow::CreateIdMappingWorkflowOutput).
65    pub fn builder() -> crate::operation::create_id_mapping_workflow::builders::CreateIdMappingWorkflowOutputBuilder {
66        crate::operation::create_id_mapping_workflow::builders::CreateIdMappingWorkflowOutputBuilder::default()
67    }
68}
69
70/// A builder for [`CreateIdMappingWorkflowOutput`](crate::operation::create_id_mapping_workflow::CreateIdMappingWorkflowOutput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct CreateIdMappingWorkflowOutputBuilder {
74    pub(crate) workflow_name: ::std::option::Option<::std::string::String>,
75    pub(crate) workflow_arn: ::std::option::Option<::std::string::String>,
76    pub(crate) description: ::std::option::Option<::std::string::String>,
77    pub(crate) input_source_config: ::std::option::Option<::std::vec::Vec<crate::types::IdMappingWorkflowInputSource>>,
78    pub(crate) output_source_config: ::std::option::Option<::std::vec::Vec<crate::types::IdMappingWorkflowOutputSource>>,
79    pub(crate) id_mapping_techniques: ::std::option::Option<crate::types::IdMappingTechniques>,
80    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
81    _request_id: Option<String>,
82}
83impl CreateIdMappingWorkflowOutputBuilder {
84    /// <p>The name of the workflow.</p>
85    /// This field is required.
86    pub fn workflow_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.workflow_name = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The name of the workflow.</p>
91    pub fn set_workflow_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.workflow_name = input;
93        self
94    }
95    /// <p>The name of the workflow.</p>
96    pub fn get_workflow_name(&self) -> &::std::option::Option<::std::string::String> {
97        &self.workflow_name
98    }
99    /// <p>The ARN (Amazon Resource Name) that Entity Resolution generated for the <code>IDMappingWorkflow</code>.</p>
100    /// This field is required.
101    pub fn workflow_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.workflow_arn = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The ARN (Amazon Resource Name) that Entity Resolution generated for the <code>IDMappingWorkflow</code>.</p>
106    pub fn set_workflow_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.workflow_arn = input;
108        self
109    }
110    /// <p>The ARN (Amazon Resource Name) that Entity Resolution generated for the <code>IDMappingWorkflow</code>.</p>
111    pub fn get_workflow_arn(&self) -> &::std::option::Option<::std::string::String> {
112        &self.workflow_arn
113    }
114    /// <p>A description of the workflow.</p>
115    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.description = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>A description of the workflow.</p>
120    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.description = input;
122        self
123    }
124    /// <p>A description of the workflow.</p>
125    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
126        &self.description
127    }
128    /// Appends an item to `input_source_config`.
129    ///
130    /// To override the contents of this collection use [`set_input_source_config`](Self::set_input_source_config).
131    ///
132    /// <p>A list of <code>InputSource</code> objects, which have the fields <code>InputSourceARN</code> and <code>SchemaName</code>.</p>
133    pub fn input_source_config(mut self, input: crate::types::IdMappingWorkflowInputSource) -> Self {
134        let mut v = self.input_source_config.unwrap_or_default();
135        v.push(input);
136        self.input_source_config = ::std::option::Option::Some(v);
137        self
138    }
139    /// <p>A list of <code>InputSource</code> objects, which have the fields <code>InputSourceARN</code> and <code>SchemaName</code>.</p>
140    pub fn set_input_source_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IdMappingWorkflowInputSource>>) -> Self {
141        self.input_source_config = input;
142        self
143    }
144    /// <p>A list of <code>InputSource</code> objects, which have the fields <code>InputSourceARN</code> and <code>SchemaName</code>.</p>
145    pub fn get_input_source_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IdMappingWorkflowInputSource>> {
146        &self.input_source_config
147    }
148    /// Appends an item to `output_source_config`.
149    ///
150    /// To override the contents of this collection use [`set_output_source_config`](Self::set_output_source_config).
151    ///
152    /// <p>A list of <code>IdMappingWorkflowOutputSource</code> objects, each of which contains fields <code>OutputS3Path</code> and <code>Output</code>.</p>
153    pub fn output_source_config(mut self, input: crate::types::IdMappingWorkflowOutputSource) -> Self {
154        let mut v = self.output_source_config.unwrap_or_default();
155        v.push(input);
156        self.output_source_config = ::std::option::Option::Some(v);
157        self
158    }
159    /// <p>A list of <code>IdMappingWorkflowOutputSource</code> objects, each of which contains fields <code>OutputS3Path</code> and <code>Output</code>.</p>
160    pub fn set_output_source_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IdMappingWorkflowOutputSource>>) -> Self {
161        self.output_source_config = input;
162        self
163    }
164    /// <p>A list of <code>IdMappingWorkflowOutputSource</code> objects, each of which contains fields <code>OutputS3Path</code> and <code>Output</code>.</p>
165    pub fn get_output_source_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IdMappingWorkflowOutputSource>> {
166        &self.output_source_config
167    }
168    /// <p>An object which defines the ID mapping technique and any additional configurations.</p>
169    /// This field is required.
170    pub fn id_mapping_techniques(mut self, input: crate::types::IdMappingTechniques) -> Self {
171        self.id_mapping_techniques = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>An object which defines the ID mapping technique and any additional configurations.</p>
175    pub fn set_id_mapping_techniques(mut self, input: ::std::option::Option<crate::types::IdMappingTechniques>) -> Self {
176        self.id_mapping_techniques = input;
177        self
178    }
179    /// <p>An object which defines the ID mapping technique and any additional configurations.</p>
180    pub fn get_id_mapping_techniques(&self) -> &::std::option::Option<crate::types::IdMappingTechniques> {
181        &self.id_mapping_techniques
182    }
183    /// <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to create resources on your behalf as part of workflow execution.</p>
184    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.role_arn = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to create resources on your behalf as part of workflow execution.</p>
189    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.role_arn = input;
191        self
192    }
193    /// <p>The Amazon Resource Name (ARN) of the IAM role. Entity Resolution assumes this role to create resources on your behalf as part of workflow execution.</p>
194    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
195        &self.role_arn
196    }
197    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
198        self._request_id = Some(request_id.into());
199        self
200    }
201
202    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
203        self._request_id = request_id;
204        self
205    }
206    /// Consumes the builder and constructs a [`CreateIdMappingWorkflowOutput`](crate::operation::create_id_mapping_workflow::CreateIdMappingWorkflowOutput).
207    /// This method will fail if any of the following fields are not set:
208    /// - [`workflow_name`](crate::operation::create_id_mapping_workflow::builders::CreateIdMappingWorkflowOutputBuilder::workflow_name)
209    /// - [`workflow_arn`](crate::operation::create_id_mapping_workflow::builders::CreateIdMappingWorkflowOutputBuilder::workflow_arn)
210    /// - [`input_source_config`](crate::operation::create_id_mapping_workflow::builders::CreateIdMappingWorkflowOutputBuilder::input_source_config)
211    pub fn build(
212        self,
213    ) -> ::std::result::Result<
214        crate::operation::create_id_mapping_workflow::CreateIdMappingWorkflowOutput,
215        ::aws_smithy_types::error::operation::BuildError,
216    > {
217        ::std::result::Result::Ok(crate::operation::create_id_mapping_workflow::CreateIdMappingWorkflowOutput {
218            workflow_name: self.workflow_name.ok_or_else(|| {
219                ::aws_smithy_types::error::operation::BuildError::missing_field(
220                    "workflow_name",
221                    "workflow_name was not specified but it is required when building CreateIdMappingWorkflowOutput",
222                )
223            })?,
224            workflow_arn: self.workflow_arn.ok_or_else(|| {
225                ::aws_smithy_types::error::operation::BuildError::missing_field(
226                    "workflow_arn",
227                    "workflow_arn was not specified but it is required when building CreateIdMappingWorkflowOutput",
228                )
229            })?,
230            description: self.description,
231            input_source_config: self.input_source_config.ok_or_else(|| {
232                ::aws_smithy_types::error::operation::BuildError::missing_field(
233                    "input_source_config",
234                    "input_source_config was not specified but it is required when building CreateIdMappingWorkflowOutput",
235                )
236            })?,
237            output_source_config: self.output_source_config,
238            id_mapping_techniques: self.id_mapping_techniques,
239            role_arn: self.role_arn.unwrap_or_default(),
240            _request_id: self._request_id,
241        })
242    }
243}