aws-sdk-b2bi 1.37.0

AWS SDK for AWS B2B Data Interchange
Documentation
// 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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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,
        })
    }
}