1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GenerateMappingInput {
/// <p>Provide the contents of a sample X12 EDI file (for inbound EDI) or JSON/XML file (for outbound EDI) to use as a starting point for the mapping.</p>
pub input_file_content: ::std::option::Option<::std::string::String>,
/// <p>Provide the contents of a sample X12 EDI file (for outbound EDI) or JSON/XML file (for inbound EDI) to use as a target for the mapping.</p>
pub output_file_content: ::std::option::Option<::std::string::String>,
/// <p>Specify the mapping type: either <code>JSONATA</code> or <code>XSLT.</code></p>
pub mapping_type: ::std::option::Option<crate::types::MappingType>,
}
impl GenerateMappingInput {
/// <p>Provide the contents of a sample X12 EDI file (for inbound EDI) or JSON/XML file (for outbound EDI) to use as a starting point for the mapping.</p>
pub fn input_file_content(&self) -> ::std::option::Option<&str> {
self.input_file_content.as_deref()
}
/// <p>Provide the contents of a sample X12 EDI file (for outbound EDI) or JSON/XML file (for inbound EDI) to use as a target for the mapping.</p>
pub fn output_file_content(&self) -> ::std::option::Option<&str> {
self.output_file_content.as_deref()
}
/// <p>Specify the mapping type: either <code>JSONATA</code> or <code>XSLT.</code></p>
pub fn mapping_type(&self) -> ::std::option::Option<&crate::types::MappingType> {
self.mapping_type.as_ref()
}
}
impl GenerateMappingInput {
/// Creates a new builder-style object to manufacture [`GenerateMappingInput`](crate::operation::generate_mapping::GenerateMappingInput).
pub fn builder() -> crate::operation::generate_mapping::builders::GenerateMappingInputBuilder {
crate::operation::generate_mapping::builders::GenerateMappingInputBuilder::default()
}
}
/// A builder for [`GenerateMappingInput`](crate::operation::generate_mapping::GenerateMappingInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GenerateMappingInputBuilder {
pub(crate) input_file_content: ::std::option::Option<::std::string::String>,
pub(crate) output_file_content: ::std::option::Option<::std::string::String>,
pub(crate) mapping_type: ::std::option::Option<crate::types::MappingType>,
}
impl GenerateMappingInputBuilder {
/// <p>Provide the contents of a sample X12 EDI file (for inbound EDI) or JSON/XML file (for outbound EDI) to use as a starting point for the mapping.</p>
/// This field is required.
pub fn input_file_content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.input_file_content = ::std::option::Option::Some(input.into());
self
}
/// <p>Provide the contents of a sample X12 EDI file (for inbound EDI) or JSON/XML file (for outbound EDI) to use as a starting point for the mapping.</p>
pub fn set_input_file_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.input_file_content = input;
self
}
/// <p>Provide the contents of a sample X12 EDI file (for inbound EDI) or JSON/XML file (for outbound EDI) to use as a starting point for the mapping.</p>
pub fn get_input_file_content(&self) -> &::std::option::Option<::std::string::String> {
&self.input_file_content
}
/// <p>Provide the contents of a sample X12 EDI file (for outbound EDI) or JSON/XML file (for inbound EDI) to use as a target for the mapping.</p>
/// This field is required.
pub fn output_file_content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.output_file_content = ::std::option::Option::Some(input.into());
self
}
/// <p>Provide the contents of a sample X12 EDI file (for outbound EDI) or JSON/XML file (for inbound EDI) to use as a target for the mapping.</p>
pub fn set_output_file_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.output_file_content = input;
self
}
/// <p>Provide the contents of a sample X12 EDI file (for outbound EDI) or JSON/XML file (for inbound EDI) to use as a target for the mapping.</p>
pub fn get_output_file_content(&self) -> &::std::option::Option<::std::string::String> {
&self.output_file_content
}
/// <p>Specify the mapping type: either <code>JSONATA</code> or <code>XSLT.</code></p>
/// This field is required.
pub fn mapping_type(mut self, input: crate::types::MappingType) -> Self {
self.mapping_type = ::std::option::Option::Some(input);
self
}
/// <p>Specify the mapping type: either <code>JSONATA</code> or <code>XSLT.</code></p>
pub fn set_mapping_type(mut self, input: ::std::option::Option<crate::types::MappingType>) -> Self {
self.mapping_type = input;
self
}
/// <p>Specify the mapping type: either <code>JSONATA</code> or <code>XSLT.</code></p>
pub fn get_mapping_type(&self) -> &::std::option::Option<crate::types::MappingType> {
&self.mapping_type
}
/// Consumes the builder and constructs a [`GenerateMappingInput`](crate::operation::generate_mapping::GenerateMappingInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::generate_mapping::GenerateMappingInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::generate_mapping::GenerateMappingInput {
input_file_content: self.input_file_content,
output_file_content: self.output_file_content,
mapping_type: self.mapping_type,
})
}
}