1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// 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 GetMappingInput {
    /// <p>Specifies the source table.</p>
    pub source: ::std::option::Option<crate::types::CatalogEntry>,
    /// <p>A list of target tables.</p>
    pub sinks: ::std::option::Option<::std::vec::Vec<crate::types::CatalogEntry>>,
    /// <p>Parameters for the mapping.</p>
    pub location: ::std::option::Option<crate::types::Location>,
}
impl GetMappingInput {
    /// <p>Specifies the source table.</p>
    pub fn source(&self) -> ::std::option::Option<&crate::types::CatalogEntry> {
        self.source.as_ref()
    }
    /// <p>A list of target tables.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sinks.is_none()`.
    pub fn sinks(&self) -> &[crate::types::CatalogEntry] {
        self.sinks.as_deref().unwrap_or_default()
    }
    /// <p>Parameters for the mapping.</p>
    pub fn location(&self) -> ::std::option::Option<&crate::types::Location> {
        self.location.as_ref()
    }
}
impl GetMappingInput {
    /// Creates a new builder-style object to manufacture [`GetMappingInput`](crate::operation::get_mapping::GetMappingInput).
    pub fn builder() -> crate::operation::get_mapping::builders::GetMappingInputBuilder {
        crate::operation::get_mapping::builders::GetMappingInputBuilder::default()
    }
}

/// A builder for [`GetMappingInput`](crate::operation::get_mapping::GetMappingInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetMappingInputBuilder {
    pub(crate) source: ::std::option::Option<crate::types::CatalogEntry>,
    pub(crate) sinks: ::std::option::Option<::std::vec::Vec<crate::types::CatalogEntry>>,
    pub(crate) location: ::std::option::Option<crate::types::Location>,
}
impl GetMappingInputBuilder {
    /// <p>Specifies the source table.</p>
    /// This field is required.
    pub fn source(mut self, input: crate::types::CatalogEntry) -> Self {
        self.source = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the source table.</p>
    pub fn set_source(mut self, input: ::std::option::Option<crate::types::CatalogEntry>) -> Self {
        self.source = input;
        self
    }
    /// <p>Specifies the source table.</p>
    pub fn get_source(&self) -> &::std::option::Option<crate::types::CatalogEntry> {
        &self.source
    }
    /// Appends an item to `sinks`.
    ///
    /// To override the contents of this collection use [`set_sinks`](Self::set_sinks).
    ///
    /// <p>A list of target tables.</p>
    pub fn sinks(mut self, input: crate::types::CatalogEntry) -> Self {
        let mut v = self.sinks.unwrap_or_default();
        v.push(input);
        self.sinks = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of target tables.</p>
    pub fn set_sinks(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CatalogEntry>>) -> Self {
        self.sinks = input;
        self
    }
    /// <p>A list of target tables.</p>
    pub fn get_sinks(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CatalogEntry>> {
        &self.sinks
    }
    /// <p>Parameters for the mapping.</p>
    pub fn location(mut self, input: crate::types::Location) -> Self {
        self.location = ::std::option::Option::Some(input);
        self
    }
    /// <p>Parameters for the mapping.</p>
    pub fn set_location(mut self, input: ::std::option::Option<crate::types::Location>) -> Self {
        self.location = input;
        self
    }
    /// <p>Parameters for the mapping.</p>
    pub fn get_location(&self) -> &::std::option::Option<crate::types::Location> {
        &self.location
    }
    /// Consumes the builder and constructs a [`GetMappingInput`](crate::operation::get_mapping::GetMappingInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_mapping::GetMappingInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_mapping::GetMappingInput {
            source: self.source,
            sinks: self.sinks,
            location: self.location,
        })
    }
}