aws-sdk-b2bi 1.73.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 TestConversionInput {
    /// <p>Specify the source file for an outbound EDI request.</p>
    pub source: ::std::option::Option<crate::types::ConversionSource>,
    /// <p>Specify the format (X12 is the only currently supported format), and other details for the conversion target.</p>
    pub target: ::std::option::Option<crate::types::ConversionTarget>,
}
impl TestConversionInput {
    /// <p>Specify the source file for an outbound EDI request.</p>
    pub fn source(&self) -> ::std::option::Option<&crate::types::ConversionSource> {
        self.source.as_ref()
    }
    /// <p>Specify the format (X12 is the only currently supported format), and other details for the conversion target.</p>
    pub fn target(&self) -> ::std::option::Option<&crate::types::ConversionTarget> {
        self.target.as_ref()
    }
}
impl TestConversionInput {
    /// Creates a new builder-style object to manufacture [`TestConversionInput`](crate::operation::test_conversion::TestConversionInput).
    pub fn builder() -> crate::operation::test_conversion::builders::TestConversionInputBuilder {
        crate::operation::test_conversion::builders::TestConversionInputBuilder::default()
    }
}

/// A builder for [`TestConversionInput`](crate::operation::test_conversion::TestConversionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TestConversionInputBuilder {
    pub(crate) source: ::std::option::Option<crate::types::ConversionSource>,
    pub(crate) target: ::std::option::Option<crate::types::ConversionTarget>,
}
impl TestConversionInputBuilder {
    /// <p>Specify the source file for an outbound EDI request.</p>
    /// This field is required.
    pub fn source(mut self, input: crate::types::ConversionSource) -> Self {
        self.source = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specify the source file for an outbound EDI request.</p>
    pub fn set_source(mut self, input: ::std::option::Option<crate::types::ConversionSource>) -> Self {
        self.source = input;
        self
    }
    /// <p>Specify the source file for an outbound EDI request.</p>
    pub fn get_source(&self) -> &::std::option::Option<crate::types::ConversionSource> {
        &self.source
    }
    /// <p>Specify the format (X12 is the only currently supported format), and other details for the conversion target.</p>
    /// This field is required.
    pub fn target(mut self, input: crate::types::ConversionTarget) -> Self {
        self.target = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specify the format (X12 is the only currently supported format), and other details for the conversion target.</p>
    pub fn set_target(mut self, input: ::std::option::Option<crate::types::ConversionTarget>) -> Self {
        self.target = input;
        self
    }
    /// <p>Specify the format (X12 is the only currently supported format), and other details for the conversion target.</p>
    pub fn get_target(&self) -> &::std::option::Option<crate::types::ConversionTarget> {
        &self.target
    }
    /// Consumes the builder and constructs a [`TestConversionInput`](crate::operation::test_conversion::TestConversionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::test_conversion::TestConversionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::test_conversion::TestConversionInput {
            source: self.source,
            target: self.target,
        })
    }
}