aws_sdk_entityresolution/operation/create_id_mapping_workflow/
_create_id_mapping_workflow_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateIdMappingWorkflowOutput {
6 pub workflow_name: ::std::string::String,
8 pub workflow_arn: ::std::string::String,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub input_source_config: ::std::vec::Vec<crate::types::IdMappingWorkflowInputSource>,
14 pub output_source_config: ::std::option::Option<::std::vec::Vec<crate::types::IdMappingWorkflowOutputSource>>,
16 pub id_mapping_techniques: ::std::option::Option<crate::types::IdMappingTechniques>,
18 pub role_arn: ::std::string::String,
20 _request_id: Option<String>,
21}
22impl CreateIdMappingWorkflowOutput {
23 pub fn workflow_name(&self) -> &str {
25 use std::ops::Deref;
26 self.workflow_name.deref()
27 }
28 pub fn workflow_arn(&self) -> &str {
30 use std::ops::Deref;
31 self.workflow_arn.deref()
32 }
33 pub fn description(&self) -> ::std::option::Option<&str> {
35 self.description.as_deref()
36 }
37 pub fn input_source_config(&self) -> &[crate::types::IdMappingWorkflowInputSource] {
39 use std::ops::Deref;
40 self.input_source_config.deref()
41 }
42 pub fn output_source_config(&self) -> &[crate::types::IdMappingWorkflowOutputSource] {
46 self.output_source_config.as_deref().unwrap_or_default()
47 }
48 pub fn id_mapping_techniques(&self) -> ::std::option::Option<&crate::types::IdMappingTechniques> {
50 self.id_mapping_techniques.as_ref()
51 }
52 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 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#[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 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 pub fn set_workflow_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.workflow_name = input;
93 self
94 }
95 pub fn get_workflow_name(&self) -> &::std::option::Option<::std::string::String> {
97 &self.workflow_name
98 }
99 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 pub fn set_workflow_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.workflow_arn = input;
108 self
109 }
110 pub fn get_workflow_arn(&self) -> &::std::option::Option<::std::string::String> {
112 &self.workflow_arn
113 }
114 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.description = input;
122 self
123 }
124 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
126 &self.description
127 }
128 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 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 pub fn get_input_source_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IdMappingWorkflowInputSource>> {
146 &self.input_source_config
147 }
148 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 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 pub fn get_output_source_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IdMappingWorkflowOutputSource>> {
166 &self.output_source_config
167 }
168 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 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 pub fn get_id_mapping_techniques(&self) -> &::std::option::Option<crate::types::IdMappingTechniques> {
181 &self.id_mapping_techniques
182 }
183 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 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190 self.role_arn = input;
191 self
192 }
193 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 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}