aws_sdk_b2bi/operation/test_parsing/_test_parsing_input.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 TestParsingInput {
6 /// <p>Specifies an <code>S3Location</code> object, which contains the Amazon S3 bucket and prefix for the location of the input file.</p>
7 pub input_file: ::std::option::Option<crate::types::S3Location>,
8 /// <p>Specifies that the currently supported file formats for EDI transformations are <code>JSON</code> and <code>XML</code>.</p>
9 pub file_format: ::std::option::Option<crate::types::FileFormat>,
10 /// <p>Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.</p>
11 pub edi_type: ::std::option::Option<crate::types::EdiType>,
12 /// <p>Specifies advanced options for parsing the input EDI file. These options allow for more granular control over the parsing process, including split options for X12 files.</p>
13 pub advanced_options: ::std::option::Option<crate::types::AdvancedOptions>,
14}
15impl TestParsingInput {
16 /// <p>Specifies an <code>S3Location</code> object, which contains the Amazon S3 bucket and prefix for the location of the input file.</p>
17 pub fn input_file(&self) -> ::std::option::Option<&crate::types::S3Location> {
18 self.input_file.as_ref()
19 }
20 /// <p>Specifies that the currently supported file formats for EDI transformations are <code>JSON</code> and <code>XML</code>.</p>
21 pub fn file_format(&self) -> ::std::option::Option<&crate::types::FileFormat> {
22 self.file_format.as_ref()
23 }
24 /// <p>Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.</p>
25 pub fn edi_type(&self) -> ::std::option::Option<&crate::types::EdiType> {
26 self.edi_type.as_ref()
27 }
28 /// <p>Specifies advanced options for parsing the input EDI file. These options allow for more granular control over the parsing process, including split options for X12 files.</p>
29 pub fn advanced_options(&self) -> ::std::option::Option<&crate::types::AdvancedOptions> {
30 self.advanced_options.as_ref()
31 }
32}
33impl TestParsingInput {
34 /// Creates a new builder-style object to manufacture [`TestParsingInput`](crate::operation::test_parsing::TestParsingInput).
35 pub fn builder() -> crate::operation::test_parsing::builders::TestParsingInputBuilder {
36 crate::operation::test_parsing::builders::TestParsingInputBuilder::default()
37 }
38}
39
40/// A builder for [`TestParsingInput`](crate::operation::test_parsing::TestParsingInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct TestParsingInputBuilder {
44 pub(crate) input_file: ::std::option::Option<crate::types::S3Location>,
45 pub(crate) file_format: ::std::option::Option<crate::types::FileFormat>,
46 pub(crate) edi_type: ::std::option::Option<crate::types::EdiType>,
47 pub(crate) advanced_options: ::std::option::Option<crate::types::AdvancedOptions>,
48}
49impl TestParsingInputBuilder {
50 /// <p>Specifies an <code>S3Location</code> object, which contains the Amazon S3 bucket and prefix for the location of the input file.</p>
51 /// This field is required.
52 pub fn input_file(mut self, input: crate::types::S3Location) -> Self {
53 self.input_file = ::std::option::Option::Some(input);
54 self
55 }
56 /// <p>Specifies an <code>S3Location</code> object, which contains the Amazon S3 bucket and prefix for the location of the input file.</p>
57 pub fn set_input_file(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
58 self.input_file = input;
59 self
60 }
61 /// <p>Specifies an <code>S3Location</code> object, which contains the Amazon S3 bucket and prefix for the location of the input file.</p>
62 pub fn get_input_file(&self) -> &::std::option::Option<crate::types::S3Location> {
63 &self.input_file
64 }
65 /// <p>Specifies that the currently supported file formats for EDI transformations are <code>JSON</code> and <code>XML</code>.</p>
66 /// This field is required.
67 pub fn file_format(mut self, input: crate::types::FileFormat) -> Self {
68 self.file_format = ::std::option::Option::Some(input);
69 self
70 }
71 /// <p>Specifies that the currently supported file formats for EDI transformations are <code>JSON</code> and <code>XML</code>.</p>
72 pub fn set_file_format(mut self, input: ::std::option::Option<crate::types::FileFormat>) -> Self {
73 self.file_format = input;
74 self
75 }
76 /// <p>Specifies that the currently supported file formats for EDI transformations are <code>JSON</code> and <code>XML</code>.</p>
77 pub fn get_file_format(&self) -> &::std::option::Option<crate::types::FileFormat> {
78 &self.file_format
79 }
80 /// <p>Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.</p>
81 /// This field is required.
82 pub fn edi_type(mut self, input: crate::types::EdiType) -> Self {
83 self.edi_type = ::std::option::Option::Some(input);
84 self
85 }
86 /// <p>Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.</p>
87 pub fn set_edi_type(mut self, input: ::std::option::Option<crate::types::EdiType>) -> Self {
88 self.edi_type = input;
89 self
90 }
91 /// <p>Specifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.</p>
92 pub fn get_edi_type(&self) -> &::std::option::Option<crate::types::EdiType> {
93 &self.edi_type
94 }
95 /// <p>Specifies advanced options for parsing the input EDI file. These options allow for more granular control over the parsing process, including split options for X12 files.</p>
96 pub fn advanced_options(mut self, input: crate::types::AdvancedOptions) -> Self {
97 self.advanced_options = ::std::option::Option::Some(input);
98 self
99 }
100 /// <p>Specifies advanced options for parsing the input EDI file. These options allow for more granular control over the parsing process, including split options for X12 files.</p>
101 pub fn set_advanced_options(mut self, input: ::std::option::Option<crate::types::AdvancedOptions>) -> Self {
102 self.advanced_options = input;
103 self
104 }
105 /// <p>Specifies advanced options for parsing the input EDI file. These options allow for more granular control over the parsing process, including split options for X12 files.</p>
106 pub fn get_advanced_options(&self) -> &::std::option::Option<crate::types::AdvancedOptions> {
107 &self.advanced_options
108 }
109 /// Consumes the builder and constructs a [`TestParsingInput`](crate::operation::test_parsing::TestParsingInput).
110 pub fn build(self) -> ::std::result::Result<crate::operation::test_parsing::TestParsingInput, ::aws_smithy_types::error::operation::BuildError> {
111 ::std::result::Result::Ok(crate::operation::test_parsing::TestParsingInput {
112 input_file: self.input_file,
113 file_format: self.file_format,
114 edi_type: self.edi_type,
115 advanced_options: self.advanced_options,
116 })
117 }
118}