aws_sdk_b2bi/operation/generate_mapping/
_generate_mapping_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GenerateMappingInput {
6 pub input_file_content: ::std::option::Option<::std::string::String>,
8 pub output_file_content: ::std::option::Option<::std::string::String>,
10 pub mapping_type: ::std::option::Option<crate::types::MappingType>,
12}
13impl GenerateMappingInput {
14 pub fn input_file_content(&self) -> ::std::option::Option<&str> {
16 self.input_file_content.as_deref()
17 }
18 pub fn output_file_content(&self) -> ::std::option::Option<&str> {
20 self.output_file_content.as_deref()
21 }
22 pub fn mapping_type(&self) -> ::std::option::Option<&crate::types::MappingType> {
24 self.mapping_type.as_ref()
25 }
26}
27impl GenerateMappingInput {
28 pub fn builder() -> crate::operation::generate_mapping::builders::GenerateMappingInputBuilder {
30 crate::operation::generate_mapping::builders::GenerateMappingInputBuilder::default()
31 }
32}
33
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GenerateMappingInputBuilder {
38 pub(crate) input_file_content: ::std::option::Option<::std::string::String>,
39 pub(crate) output_file_content: ::std::option::Option<::std::string::String>,
40 pub(crate) mapping_type: ::std::option::Option<crate::types::MappingType>,
41}
42impl GenerateMappingInputBuilder {
43 pub fn input_file_content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.input_file_content = ::std::option::Option::Some(input.into());
47 self
48 }
49 pub fn set_input_file_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.input_file_content = input;
52 self
53 }
54 pub fn get_input_file_content(&self) -> &::std::option::Option<::std::string::String> {
56 &self.input_file_content
57 }
58 pub fn output_file_content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.output_file_content = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_output_file_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.output_file_content = input;
67 self
68 }
69 pub fn get_output_file_content(&self) -> &::std::option::Option<::std::string::String> {
71 &self.output_file_content
72 }
73 pub fn mapping_type(mut self, input: crate::types::MappingType) -> Self {
76 self.mapping_type = ::std::option::Option::Some(input);
77 self
78 }
79 pub fn set_mapping_type(mut self, input: ::std::option::Option<crate::types::MappingType>) -> Self {
81 self.mapping_type = input;
82 self
83 }
84 pub fn get_mapping_type(&self) -> &::std::option::Option<crate::types::MappingType> {
86 &self.mapping_type
87 }
88 pub fn build(
90 self,
91 ) -> ::std::result::Result<crate::operation::generate_mapping::GenerateMappingInput, ::aws_smithy_types::error::operation::BuildError> {
92 ::std::result::Result::Ok(crate::operation::generate_mapping::GenerateMappingInput {
93 input_file_content: self.input_file_content,
94 output_file_content: self.output_file_content,
95 mapping_type: self.mapping_type,
96 })
97 }
98}