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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// 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)]
pub struct PrepareQueryOutput {
    /// <p>The query string that you want prepare.</p>
    pub query_string: ::std::option::Option<::std::string::String>,
    /// <p>A list of SELECT clause columns of the submitted query string. </p>
    pub columns: ::std::option::Option<::std::vec::Vec<crate::types::SelectColumn>>,
    /// <p>A list of parameters used in the submitted query string. </p>
    pub parameters: ::std::option::Option<::std::vec::Vec<crate::types::ParameterMapping>>,
    _request_id: Option<String>,
}
impl PrepareQueryOutput {
    /// <p>The query string that you want prepare.</p>
    pub fn query_string(&self) -> ::std::option::Option<&str> {
        self.query_string.as_deref()
    }
    /// <p>A list of SELECT clause columns of the submitted query string. </p>
    pub fn columns(&self) -> ::std::option::Option<&[crate::types::SelectColumn]> {
        self.columns.as_deref()
    }
    /// <p>A list of parameters used in the submitted query string. </p>
    pub fn parameters(&self) -> ::std::option::Option<&[crate::types::ParameterMapping]> {
        self.parameters.as_deref()
    }
}
impl ::std::fmt::Debug for PrepareQueryOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PrepareQueryOutput");
        formatter.field("query_string", &"*** Sensitive Data Redacted ***");
        formatter.field("columns", &self.columns);
        formatter.field("parameters", &self.parameters);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_http::request_id::RequestId for PrepareQueryOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl PrepareQueryOutput {
    /// Creates a new builder-style object to manufacture [`PrepareQueryOutput`](crate::operation::prepare_query::PrepareQueryOutput).
    pub fn builder() -> crate::operation::prepare_query::builders::PrepareQueryOutputBuilder {
        crate::operation::prepare_query::builders::PrepareQueryOutputBuilder::default()
    }
}

/// A builder for [`PrepareQueryOutput`](crate::operation::prepare_query::PrepareQueryOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct PrepareQueryOutputBuilder {
    pub(crate) query_string: ::std::option::Option<::std::string::String>,
    pub(crate) columns: ::std::option::Option<::std::vec::Vec<crate::types::SelectColumn>>,
    pub(crate) parameters: ::std::option::Option<::std::vec::Vec<crate::types::ParameterMapping>>,
    _request_id: Option<String>,
}
impl PrepareQueryOutputBuilder {
    /// <p>The query string that you want prepare.</p>
    pub fn query_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.query_string = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The query string that you want prepare.</p>
    pub fn set_query_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.query_string = input;
        self
    }
    /// <p>The query string that you want prepare.</p>
    pub fn get_query_string(&self) -> &::std::option::Option<::std::string::String> {
        &self.query_string
    }
    /// Appends an item to `columns`.
    ///
    /// To override the contents of this collection use [`set_columns`](Self::set_columns).
    ///
    /// <p>A list of SELECT clause columns of the submitted query string. </p>
    pub fn columns(mut self, input: crate::types::SelectColumn) -> Self {
        let mut v = self.columns.unwrap_or_default();
        v.push(input);
        self.columns = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of SELECT clause columns of the submitted query string. </p>
    pub fn set_columns(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SelectColumn>>) -> Self {
        self.columns = input;
        self
    }
    /// <p>A list of SELECT clause columns of the submitted query string. </p>
    pub fn get_columns(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SelectColumn>> {
        &self.columns
    }
    /// Appends an item to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>A list of parameters used in the submitted query string. </p>
    pub fn parameters(mut self, input: crate::types::ParameterMapping) -> Self {
        let mut v = self.parameters.unwrap_or_default();
        v.push(input);
        self.parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of parameters used in the submitted query string. </p>
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterMapping>>) -> Self {
        self.parameters = input;
        self
    }
    /// <p>A list of parameters used in the submitted query string. </p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterMapping>> {
        &self.parameters
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`PrepareQueryOutput`](crate::operation::prepare_query::PrepareQueryOutput).
    pub fn build(self) -> crate::operation::prepare_query::PrepareQueryOutput {
        crate::operation::prepare_query::PrepareQueryOutput {
            query_string: self.query_string,
            columns: self.columns,
            parameters: self.parameters,
            _request_id: self._request_id,
        }
    }
}
impl ::std::fmt::Debug for PrepareQueryOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PrepareQueryOutputBuilder");
        formatter.field("query_string", &"*** Sensitive Data Redacted ***");
        formatter.field("columns", &self.columns);
        formatter.field("parameters", &self.parameters);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}