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
// 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 TestMappingInput {
    /// <p>Specify the contents of the EDI (electronic data interchange) XML or JSON file that is used as input for the transform.</p>
    pub input_file_content: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.</p>
    pub mapping_template: ::std::option::Option<::std::string::String>,
    /// <p>Specifies that the currently supported file formats for EDI transformations are <code>JSON</code> and <code>XML</code>.</p>
    pub file_format: ::std::option::Option<crate::types::FileFormat>,
}
impl TestMappingInput {
    /// <p>Specify the contents of the EDI (electronic data interchange) XML or JSON file that is used as input for the transform.</p>
    pub fn input_file_content(&self) -> ::std::option::Option<&str> {
        self.input_file_content.as_deref()
    }
    /// <p>Specifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.</p>
    pub fn mapping_template(&self) -> ::std::option::Option<&str> {
        self.mapping_template.as_deref()
    }
    /// <p>Specifies that the currently supported file formats for EDI transformations are <code>JSON</code> and <code>XML</code>.</p>
    pub fn file_format(&self) -> ::std::option::Option<&crate::types::FileFormat> {
        self.file_format.as_ref()
    }
}
impl TestMappingInput {
    /// Creates a new builder-style object to manufacture [`TestMappingInput`](crate::operation::test_mapping::TestMappingInput).
    pub fn builder() -> crate::operation::test_mapping::builders::TestMappingInputBuilder {
        crate::operation::test_mapping::builders::TestMappingInputBuilder::default()
    }
}

/// A builder for [`TestMappingInput`](crate::operation::test_mapping::TestMappingInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TestMappingInputBuilder {
    pub(crate) input_file_content: ::std::option::Option<::std::string::String>,
    pub(crate) mapping_template: ::std::option::Option<::std::string::String>,
    pub(crate) file_format: ::std::option::Option<crate::types::FileFormat>,
}
impl TestMappingInputBuilder {
    /// <p>Specify the contents of the EDI (electronic data interchange) XML or JSON file that is used as input for the transform.</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>Specify the contents of the EDI (electronic data interchange) XML or JSON file that is used as input for the transform.</p>
    pub fn set_input_file_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.input_file_content = input;
        self
    }
    /// <p>Specify the contents of the EDI (electronic data interchange) XML or JSON file that is used as input for the transform.</p>
    pub fn get_input_file_content(&self) -> &::std::option::Option<::std::string::String> {
        &self.input_file_content
    }
    /// <p>Specifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.</p>
    /// This field is required.
    pub fn mapping_template(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.mapping_template = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.</p>
    pub fn set_mapping_template(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.mapping_template = input;
        self
    }
    /// <p>Specifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.</p>
    pub fn get_mapping_template(&self) -> &::std::option::Option<::std::string::String> {
        &self.mapping_template
    }
    /// <p>Specifies that the currently supported file formats for EDI transformations are <code>JSON</code> and <code>XML</code>.</p>
    /// This field is required.
    pub fn file_format(mut self, input: crate::types::FileFormat) -> Self {
        self.file_format = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies that the currently supported file formats for EDI transformations are <code>JSON</code> and <code>XML</code>.</p>
    pub fn set_file_format(mut self, input: ::std::option::Option<crate::types::FileFormat>) -> Self {
        self.file_format = input;
        self
    }
    /// <p>Specifies that the currently supported file formats for EDI transformations are <code>JSON</code> and <code>XML</code>.</p>
    pub fn get_file_format(&self) -> &::std::option::Option<crate::types::FileFormat> {
        &self.file_format
    }
    /// Consumes the builder and constructs a [`TestMappingInput`](crate::operation::test_mapping::TestMappingInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::test_mapping::TestMappingInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::test_mapping::TestMappingInput {
            input_file_content: self.input_file_content,
            mapping_template: self.mapping_template,
            file_format: self.file_format,
        })
    }
}