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

/// <p>Describes how results of the Select job are serialized.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct OutputSerialization {
    /// <p>Describes the serialization of CSV-encoded Select results.</p>
    pub csv: ::std::option::Option<crate::types::CsvOutput>,
    /// <p>Specifies JSON as request's output serialization format.</p>
    pub json: ::std::option::Option<crate::types::JsonOutput>,
}
impl OutputSerialization {
    /// <p>Describes the serialization of CSV-encoded Select results.</p>
    pub fn csv(&self) -> ::std::option::Option<&crate::types::CsvOutput> {
        self.csv.as_ref()
    }
    /// <p>Specifies JSON as request's output serialization format.</p>
    pub fn json(&self) -> ::std::option::Option<&crate::types::JsonOutput> {
        self.json.as_ref()
    }
}
impl OutputSerialization {
    /// Creates a new builder-style object to manufacture [`OutputSerialization`](crate::types::OutputSerialization).
    pub fn builder() -> crate::types::builders::OutputSerializationBuilder {
        crate::types::builders::OutputSerializationBuilder::default()
    }
}

/// A builder for [`OutputSerialization`](crate::types::OutputSerialization).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct OutputSerializationBuilder {
    pub(crate) csv: ::std::option::Option<crate::types::CsvOutput>,
    pub(crate) json: ::std::option::Option<crate::types::JsonOutput>,
}
impl OutputSerializationBuilder {
    /// <p>Describes the serialization of CSV-encoded Select results.</p>
    pub fn csv(mut self, input: crate::types::CsvOutput) -> Self {
        self.csv = ::std::option::Option::Some(input);
        self
    }
    /// <p>Describes the serialization of CSV-encoded Select results.</p>
    pub fn set_csv(mut self, input: ::std::option::Option<crate::types::CsvOutput>) -> Self {
        self.csv = input;
        self
    }
    /// <p>Describes the serialization of CSV-encoded Select results.</p>
    pub fn get_csv(&self) -> &::std::option::Option<crate::types::CsvOutput> {
        &self.csv
    }
    /// <p>Specifies JSON as request's output serialization format.</p>
    pub fn json(mut self, input: crate::types::JsonOutput) -> Self {
        self.json = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies JSON as request's output serialization format.</p>
    pub fn set_json(mut self, input: ::std::option::Option<crate::types::JsonOutput>) -> Self {
        self.json = input;
        self
    }
    /// <p>Specifies JSON as request's output serialization format.</p>
    pub fn get_json(&self) -> &::std::option::Option<crate::types::JsonOutput> {
        &self.json
    }
    /// Consumes the builder and constructs a [`OutputSerialization`](crate::types::OutputSerialization).
    pub fn build(self) -> crate::types::OutputSerialization {
        crate::types::OutputSerialization {
            csv: self.csv,
            json: self.json,
        }
    }
}