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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about a serialization/deserialization program (SerDe) that serves as an extractor and loader.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SerDeInfo {
    /// <p>Name of the SerDe.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Usually the class that implements the SerDe. An example is <code>org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe</code>.</p>
    pub serialization_library: ::std::option::Option<::std::string::String>,
    /// <p>These key-value pairs define initialization parameters for the SerDe.</p>
    pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl SerDeInfo {
    /// <p>Name of the SerDe.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Usually the class that implements the SerDe. An example is <code>org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe</code>.</p>
    pub fn serialization_library(&self) -> ::std::option::Option<&str> {
        self.serialization_library.as_deref()
    }
    /// <p>These key-value pairs define initialization parameters for the SerDe.</p>
    pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.parameters.as_ref()
    }
}
impl SerDeInfo {
    /// Creates a new builder-style object to manufacture [`SerDeInfo`](crate::types::SerDeInfo).
    pub fn builder() -> crate::types::builders::SerDeInfoBuilder {
        crate::types::builders::SerDeInfoBuilder::default()
    }
}

/// A builder for [`SerDeInfo`](crate::types::SerDeInfo).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SerDeInfoBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) serialization_library: ::std::option::Option<::std::string::String>,
    pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl SerDeInfoBuilder {
    /// <p>Name of the SerDe.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Name of the SerDe.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>Name of the SerDe.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Usually the class that implements the SerDe. An example is <code>org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe</code>.</p>
    pub fn serialization_library(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.serialization_library = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Usually the class that implements the SerDe. An example is <code>org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe</code>.</p>
    pub fn set_serialization_library(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.serialization_library = input;
        self
    }
    /// <p>Usually the class that implements the SerDe. An example is <code>org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe</code>.</p>
    pub fn get_serialization_library(&self) -> &::std::option::Option<::std::string::String> {
        &self.serialization_library
    }
    /// Adds a key-value pair to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>These key-value pairs define initialization parameters for the SerDe.</p>
    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.parameters.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.parameters = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>These key-value pairs define initialization parameters for the SerDe.</p>
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.parameters = input;
        self
    }
    /// <p>These key-value pairs define initialization parameters for the SerDe.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.parameters
    }
    /// Consumes the builder and constructs a [`SerDeInfo`](crate::types::SerDeInfo).
    pub fn build(self) -> crate::types::SerDeInfo {
        crate::types::SerDeInfo {
            name: self.name,
            serialization_library: self.serialization_library,
            parameters: self.parameters,
        }
    }
}