aws-sdk-b2bi 1.74.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 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,
        })
    }
}