aws_sdk_redshiftdata/operation/execute_statement/
_execute_statement_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ExecuteStatementOutput {
6 pub id: ::std::option::Option<::std::string::String>,
8 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
10 pub cluster_identifier: ::std::option::Option<::std::string::String>,
12 pub db_user: ::std::option::Option<::std::string::String>,
14 pub db_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16 pub database: ::std::option::Option<::std::string::String>,
18 pub secret_arn: ::std::option::Option<::std::string::String>,
20 pub workgroup_name: ::std::option::Option<::std::string::String>,
22 pub session_id: ::std::option::Option<::std::string::String>,
24 _request_id: Option<String>,
25}
26impl ExecuteStatementOutput {
27 pub fn id(&self) -> ::std::option::Option<&str> {
29 self.id.as_deref()
30 }
31 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
33 self.created_at.as_ref()
34 }
35 pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
37 self.cluster_identifier.as_deref()
38 }
39 pub fn db_user(&self) -> ::std::option::Option<&str> {
41 self.db_user.as_deref()
42 }
43 pub fn db_groups(&self) -> &[::std::string::String] {
47 self.db_groups.as_deref().unwrap_or_default()
48 }
49 pub fn database(&self) -> ::std::option::Option<&str> {
51 self.database.as_deref()
52 }
53 pub fn secret_arn(&self) -> ::std::option::Option<&str> {
55 self.secret_arn.as_deref()
56 }
57 pub fn workgroup_name(&self) -> ::std::option::Option<&str> {
59 self.workgroup_name.as_deref()
60 }
61 pub fn session_id(&self) -> ::std::option::Option<&str> {
63 self.session_id.as_deref()
64 }
65}
66impl ::aws_types::request_id::RequestId for ExecuteStatementOutput {
67 fn request_id(&self) -> Option<&str> {
68 self._request_id.as_deref()
69 }
70}
71impl ExecuteStatementOutput {
72 pub fn builder() -> crate::operation::execute_statement::builders::ExecuteStatementOutputBuilder {
74 crate::operation::execute_statement::builders::ExecuteStatementOutputBuilder::default()
75 }
76}
77
78#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
80#[non_exhaustive]
81pub struct ExecuteStatementOutputBuilder {
82 pub(crate) id: ::std::option::Option<::std::string::String>,
83 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
84 pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
85 pub(crate) db_user: ::std::option::Option<::std::string::String>,
86 pub(crate) db_groups: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
87 pub(crate) database: ::std::option::Option<::std::string::String>,
88 pub(crate) secret_arn: ::std::option::Option<::std::string::String>,
89 pub(crate) workgroup_name: ::std::option::Option<::std::string::String>,
90 pub(crate) session_id: ::std::option::Option<::std::string::String>,
91 _request_id: Option<String>,
92}
93impl ExecuteStatementOutputBuilder {
94 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.id = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.id = input;
102 self
103 }
104 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
106 &self.id
107 }
108 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
110 self.created_at = ::std::option::Option::Some(input);
111 self
112 }
113 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
115 self.created_at = input;
116 self
117 }
118 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
120 &self.created_at
121 }
122 pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.cluster_identifier = ::std::option::Option::Some(input.into());
125 self
126 }
127 pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.cluster_identifier = input;
130 self
131 }
132 pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
134 &self.cluster_identifier
135 }
136 pub fn db_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.db_user = ::std::option::Option::Some(input.into());
139 self
140 }
141 pub fn set_db_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.db_user = input;
144 self
145 }
146 pub fn get_db_user(&self) -> &::std::option::Option<::std::string::String> {
148 &self.db_user
149 }
150 pub fn db_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 let mut v = self.db_groups.unwrap_or_default();
157 v.push(input.into());
158 self.db_groups = ::std::option::Option::Some(v);
159 self
160 }
161 pub fn set_db_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
163 self.db_groups = input;
164 self
165 }
166 pub fn get_db_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
168 &self.db_groups
169 }
170 pub fn database(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172 self.database = ::std::option::Option::Some(input.into());
173 self
174 }
175 pub fn set_database(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.database = input;
178 self
179 }
180 pub fn get_database(&self) -> &::std::option::Option<::std::string::String> {
182 &self.database
183 }
184 pub fn secret_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186 self.secret_arn = ::std::option::Option::Some(input.into());
187 self
188 }
189 pub fn set_secret_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191 self.secret_arn = input;
192 self
193 }
194 pub fn get_secret_arn(&self) -> &::std::option::Option<::std::string::String> {
196 &self.secret_arn
197 }
198 pub fn workgroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 self.workgroup_name = ::std::option::Option::Some(input.into());
201 self
202 }
203 pub fn set_workgroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205 self.workgroup_name = input;
206 self
207 }
208 pub fn get_workgroup_name(&self) -> &::std::option::Option<::std::string::String> {
210 &self.workgroup_name
211 }
212 pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214 self.session_id = ::std::option::Option::Some(input.into());
215 self
216 }
217 pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219 self.session_id = input;
220 self
221 }
222 pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
224 &self.session_id
225 }
226 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
227 self._request_id = Some(request_id.into());
228 self
229 }
230
231 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
232 self._request_id = request_id;
233 self
234 }
235 pub fn build(self) -> crate::operation::execute_statement::ExecuteStatementOutput {
237 crate::operation::execute_statement::ExecuteStatementOutput {
238 id: self.id,
239 created_at: self.created_at,
240 cluster_identifier: self.cluster_identifier,
241 db_user: self.db_user,
242 db_groups: self.db_groups,
243 database: self.database,
244 secret_arn: self.secret_arn,
245 workgroup_name: self.workgroup_name,
246 session_id: self.session_id,
247 _request_id: self._request_id,
248 }
249 }
250}