aws_sdk_b2bi/operation/test_conversion/
_test_conversion_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 TestConversionInput {
6    /// <p>Specify the source file for an outbound EDI request.</p>
7    pub source: ::std::option::Option<crate::types::ConversionSource>,
8    /// <p>Specify the format (X12 is the only currently supported format), and other details for the conversion target.</p>
9    pub target: ::std::option::Option<crate::types::ConversionTarget>,
10}
11impl TestConversionInput {
12    /// <p>Specify the source file for an outbound EDI request.</p>
13    pub fn source(&self) -> ::std::option::Option<&crate::types::ConversionSource> {
14        self.source.as_ref()
15    }
16    /// <p>Specify the format (X12 is the only currently supported format), and other details for the conversion target.</p>
17    pub fn target(&self) -> ::std::option::Option<&crate::types::ConversionTarget> {
18        self.target.as_ref()
19    }
20}
21impl TestConversionInput {
22    /// Creates a new builder-style object to manufacture [`TestConversionInput`](crate::operation::test_conversion::TestConversionInput).
23    pub fn builder() -> crate::operation::test_conversion::builders::TestConversionInputBuilder {
24        crate::operation::test_conversion::builders::TestConversionInputBuilder::default()
25    }
26}
27
28/// A builder for [`TestConversionInput`](crate::operation::test_conversion::TestConversionInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct TestConversionInputBuilder {
32    pub(crate) source: ::std::option::Option<crate::types::ConversionSource>,
33    pub(crate) target: ::std::option::Option<crate::types::ConversionTarget>,
34}
35impl TestConversionInputBuilder {
36    /// <p>Specify the source file for an outbound EDI request.</p>
37    /// This field is required.
38    pub fn source(mut self, input: crate::types::ConversionSource) -> Self {
39        self.source = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>Specify the source file for an outbound EDI request.</p>
43    pub fn set_source(mut self, input: ::std::option::Option<crate::types::ConversionSource>) -> Self {
44        self.source = input;
45        self
46    }
47    /// <p>Specify the source file for an outbound EDI request.</p>
48    pub fn get_source(&self) -> &::std::option::Option<crate::types::ConversionSource> {
49        &self.source
50    }
51    /// <p>Specify the format (X12 is the only currently supported format), and other details for the conversion target.</p>
52    /// This field is required.
53    pub fn target(mut self, input: crate::types::ConversionTarget) -> Self {
54        self.target = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>Specify the format (X12 is the only currently supported format), and other details for the conversion target.</p>
58    pub fn set_target(mut self, input: ::std::option::Option<crate::types::ConversionTarget>) -> Self {
59        self.target = input;
60        self
61    }
62    /// <p>Specify the format (X12 is the only currently supported format), and other details for the conversion target.</p>
63    pub fn get_target(&self) -> &::std::option::Option<crate::types::ConversionTarget> {
64        &self.target
65    }
66    /// Consumes the builder and constructs a [`TestConversionInput`](crate::operation::test_conversion::TestConversionInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::test_conversion::TestConversionInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::test_conversion::TestConversionInput {
71            source: self.source,
72            target: self.target,
73        })
74    }
75}