aws_sdk_b2bi/operation/get_transformer/
_get_transformer_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetTransformerOutput {
6 pub transformer_id: ::std::string::String,
8 pub transformer_arn: ::std::string::String,
10 pub name: ::std::string::String,
12 pub status: crate::types::TransformerStatus,
14 pub created_at: ::aws_smithy_types::DateTime,
16 pub modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
18 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
20 pub file_format: crate::types::FileFormat,
21 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
23 pub mapping_template: ::std::string::String,
24 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
26 pub edi_type: ::std::option::Option<crate::types::EdiType>,
27 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
29 pub sample_document: ::std::option::Option<::std::string::String>,
30 pub input_conversion: ::std::option::Option<crate::types::InputConversion>,
32 pub mapping: ::std::option::Option<crate::types::Mapping>,
34 pub output_conversion: ::std::option::Option<crate::types::OutputConversion>,
36 pub sample_documents: ::std::option::Option<crate::types::SampleDocuments>,
38 _request_id: Option<String>,
39}
40impl GetTransformerOutput {
41 pub fn transformer_id(&self) -> &str {
43 use std::ops::Deref;
44 self.transformer_id.deref()
45 }
46 pub fn transformer_arn(&self) -> &str {
48 use std::ops::Deref;
49 self.transformer_arn.deref()
50 }
51 pub fn name(&self) -> &str {
53 use std::ops::Deref;
54 self.name.deref()
55 }
56 pub fn status(&self) -> &crate::types::TransformerStatus {
58 &self.status
59 }
60 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
62 &self.created_at
63 }
64 pub fn modified_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
66 self.modified_at.as_ref()
67 }
68 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
70 pub fn file_format(&self) -> &crate::types::FileFormat {
71 &self.file_format
72 }
73 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
75 pub fn mapping_template(&self) -> &str {
76 use std::ops::Deref;
77 self.mapping_template.deref()
78 }
79 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
81 pub fn edi_type(&self) -> ::std::option::Option<&crate::types::EdiType> {
82 self.edi_type.as_ref()
83 }
84 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
86 pub fn sample_document(&self) -> ::std::option::Option<&str> {
87 self.sample_document.as_deref()
88 }
89 pub fn input_conversion(&self) -> ::std::option::Option<&crate::types::InputConversion> {
91 self.input_conversion.as_ref()
92 }
93 pub fn mapping(&self) -> ::std::option::Option<&crate::types::Mapping> {
95 self.mapping.as_ref()
96 }
97 pub fn output_conversion(&self) -> ::std::option::Option<&crate::types::OutputConversion> {
99 self.output_conversion.as_ref()
100 }
101 pub fn sample_documents(&self) -> ::std::option::Option<&crate::types::SampleDocuments> {
103 self.sample_documents.as_ref()
104 }
105}
106impl ::aws_types::request_id::RequestId for GetTransformerOutput {
107 fn request_id(&self) -> Option<&str> {
108 self._request_id.as_deref()
109 }
110}
111impl GetTransformerOutput {
112 pub fn builder() -> crate::operation::get_transformer::builders::GetTransformerOutputBuilder {
114 crate::operation::get_transformer::builders::GetTransformerOutputBuilder::default()
115 }
116}
117
118#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
120#[non_exhaustive]
121pub struct GetTransformerOutputBuilder {
122 pub(crate) transformer_id: ::std::option::Option<::std::string::String>,
123 pub(crate) transformer_arn: ::std::option::Option<::std::string::String>,
124 pub(crate) name: ::std::option::Option<::std::string::String>,
125 pub(crate) status: ::std::option::Option<crate::types::TransformerStatus>,
126 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
127 pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
128 pub(crate) file_format: ::std::option::Option<crate::types::FileFormat>,
129 pub(crate) mapping_template: ::std::option::Option<::std::string::String>,
130 pub(crate) edi_type: ::std::option::Option<crate::types::EdiType>,
131 pub(crate) sample_document: ::std::option::Option<::std::string::String>,
132 pub(crate) input_conversion: ::std::option::Option<crate::types::InputConversion>,
133 pub(crate) mapping: ::std::option::Option<crate::types::Mapping>,
134 pub(crate) output_conversion: ::std::option::Option<crate::types::OutputConversion>,
135 pub(crate) sample_documents: ::std::option::Option<crate::types::SampleDocuments>,
136 _request_id: Option<String>,
137}
138impl GetTransformerOutputBuilder {
139 pub fn transformer_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142 self.transformer_id = ::std::option::Option::Some(input.into());
143 self
144 }
145 pub fn set_transformer_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147 self.transformer_id = input;
148 self
149 }
150 pub fn get_transformer_id(&self) -> &::std::option::Option<::std::string::String> {
152 &self.transformer_id
153 }
154 pub fn transformer_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157 self.transformer_arn = ::std::option::Option::Some(input.into());
158 self
159 }
160 pub fn set_transformer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.transformer_arn = input;
163 self
164 }
165 pub fn get_transformer_arn(&self) -> &::std::option::Option<::std::string::String> {
167 &self.transformer_arn
168 }
169 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172 self.name = ::std::option::Option::Some(input.into());
173 self
174 }
175 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.name = input;
178 self
179 }
180 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
182 &self.name
183 }
184 pub fn status(mut self, input: crate::types::TransformerStatus) -> Self {
187 self.status = ::std::option::Option::Some(input);
188 self
189 }
190 pub fn set_status(mut self, input: ::std::option::Option<crate::types::TransformerStatus>) -> Self {
192 self.status = input;
193 self
194 }
195 pub fn get_status(&self) -> &::std::option::Option<crate::types::TransformerStatus> {
197 &self.status
198 }
199 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
202 self.created_at = ::std::option::Option::Some(input);
203 self
204 }
205 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
207 self.created_at = input;
208 self
209 }
210 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
212 &self.created_at
213 }
214 pub fn modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
216 self.modified_at = ::std::option::Option::Some(input);
217 self
218 }
219 pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
221 self.modified_at = input;
222 self
223 }
224 pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
226 &self.modified_at
227 }
228 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
230 pub fn file_format(mut self, input: crate::types::FileFormat) -> Self {
231 self.file_format = ::std::option::Option::Some(input);
232 self
233 }
234 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
236 pub fn set_file_format(mut self, input: ::std::option::Option<crate::types::FileFormat>) -> Self {
237 self.file_format = input;
238 self
239 }
240 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
242 pub fn get_file_format(&self) -> &::std::option::Option<crate::types::FileFormat> {
243 &self.file_format
244 }
245 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
247 pub fn mapping_template(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248 self.mapping_template = ::std::option::Option::Some(input.into());
249 self
250 }
251 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
253 pub fn set_mapping_template(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
254 self.mapping_template = input;
255 self
256 }
257 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
259 pub fn get_mapping_template(&self) -> &::std::option::Option<::std::string::String> {
260 &self.mapping_template
261 }
262 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
264 pub fn edi_type(mut self, input: crate::types::EdiType) -> Self {
265 self.edi_type = ::std::option::Option::Some(input);
266 self
267 }
268 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
270 pub fn set_edi_type(mut self, input: ::std::option::Option<crate::types::EdiType>) -> Self {
271 self.edi_type = input;
272 self
273 }
274 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
276 pub fn get_edi_type(&self) -> &::std::option::Option<crate::types::EdiType> {
277 &self.edi_type
278 }
279 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
281 pub fn sample_document(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
282 self.sample_document = ::std::option::Option::Some(input.into());
283 self
284 }
285 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
287 pub fn set_sample_document(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
288 self.sample_document = input;
289 self
290 }
291 #[deprecated(note = "This is a legacy trait. Please use input-conversion or output-conversion.")]
293 pub fn get_sample_document(&self) -> &::std::option::Option<::std::string::String> {
294 &self.sample_document
295 }
296 pub fn input_conversion(mut self, input: crate::types::InputConversion) -> Self {
298 self.input_conversion = ::std::option::Option::Some(input);
299 self
300 }
301 pub fn set_input_conversion(mut self, input: ::std::option::Option<crate::types::InputConversion>) -> Self {
303 self.input_conversion = input;
304 self
305 }
306 pub fn get_input_conversion(&self) -> &::std::option::Option<crate::types::InputConversion> {
308 &self.input_conversion
309 }
310 pub fn mapping(mut self, input: crate::types::Mapping) -> Self {
312 self.mapping = ::std::option::Option::Some(input);
313 self
314 }
315 pub fn set_mapping(mut self, input: ::std::option::Option<crate::types::Mapping>) -> Self {
317 self.mapping = input;
318 self
319 }
320 pub fn get_mapping(&self) -> &::std::option::Option<crate::types::Mapping> {
322 &self.mapping
323 }
324 pub fn output_conversion(mut self, input: crate::types::OutputConversion) -> Self {
326 self.output_conversion = ::std::option::Option::Some(input);
327 self
328 }
329 pub fn set_output_conversion(mut self, input: ::std::option::Option<crate::types::OutputConversion>) -> Self {
331 self.output_conversion = input;
332 self
333 }
334 pub fn get_output_conversion(&self) -> &::std::option::Option<crate::types::OutputConversion> {
336 &self.output_conversion
337 }
338 pub fn sample_documents(mut self, input: crate::types::SampleDocuments) -> Self {
340 self.sample_documents = ::std::option::Option::Some(input);
341 self
342 }
343 pub fn set_sample_documents(mut self, input: ::std::option::Option<crate::types::SampleDocuments>) -> Self {
345 self.sample_documents = input;
346 self
347 }
348 pub fn get_sample_documents(&self) -> &::std::option::Option<crate::types::SampleDocuments> {
350 &self.sample_documents
351 }
352 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
353 self._request_id = Some(request_id.into());
354 self
355 }
356
357 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
358 self._request_id = request_id;
359 self
360 }
361 pub fn build(
369 self,
370 ) -> ::std::result::Result<crate::operation::get_transformer::GetTransformerOutput, ::aws_smithy_types::error::operation::BuildError> {
371 ::std::result::Result::Ok(crate::operation::get_transformer::GetTransformerOutput {
372 transformer_id: self.transformer_id.ok_or_else(|| {
373 ::aws_smithy_types::error::operation::BuildError::missing_field(
374 "transformer_id",
375 "transformer_id was not specified but it is required when building GetTransformerOutput",
376 )
377 })?,
378 transformer_arn: self.transformer_arn.ok_or_else(|| {
379 ::aws_smithy_types::error::operation::BuildError::missing_field(
380 "transformer_arn",
381 "transformer_arn was not specified but it is required when building GetTransformerOutput",
382 )
383 })?,
384 name: self.name.ok_or_else(|| {
385 ::aws_smithy_types::error::operation::BuildError::missing_field(
386 "name",
387 "name was not specified but it is required when building GetTransformerOutput",
388 )
389 })?,
390 status: self.status.ok_or_else(|| {
391 ::aws_smithy_types::error::operation::BuildError::missing_field(
392 "status",
393 "status was not specified but it is required when building GetTransformerOutput",
394 )
395 })?,
396 created_at: self.created_at.ok_or_else(|| {
397 ::aws_smithy_types::error::operation::BuildError::missing_field(
398 "created_at",
399 "created_at was not specified but it is required when building GetTransformerOutput",
400 )
401 })?,
402 modified_at: self.modified_at,
403 file_format: self
404 .file_format
405 .unwrap_or("NOT_USED".parse::<crate::types::FileFormat>().expect("static value validated to member")),
406 mapping_template: self.mapping_template.unwrap_or_else(|| "NOT_USED".to_owned()),
407 edi_type: self.edi_type,
408 sample_document: self.sample_document,
409 input_conversion: self.input_conversion,
410 mapping: self.mapping,
411 output_conversion: self.output_conversion,
412 sample_documents: self.sample_documents,
413 _request_id: self._request_id,
414 })
415 }
416}