aws_sdk_iottwinmaker/operation/execute_query/
_execute_query_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ExecuteQueryOutput {
6 pub column_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::ColumnDescription>>,
8 pub rows: ::std::option::Option<::std::vec::Vec<crate::types::Row>>,
10 pub next_token: ::std::option::Option<::std::string::String>,
12 _request_id: Option<String>,
13}
14impl ExecuteQueryOutput {
15 pub fn column_descriptions(&self) -> &[crate::types::ColumnDescription] {
19 self.column_descriptions.as_deref().unwrap_or_default()
20 }
21 pub fn rows(&self) -> &[crate::types::Row] {
25 self.rows.as_deref().unwrap_or_default()
26 }
27 pub fn next_token(&self) -> ::std::option::Option<&str> {
29 self.next_token.as_deref()
30 }
31}
32impl ::aws_types::request_id::RequestId for ExecuteQueryOutput {
33 fn request_id(&self) -> Option<&str> {
34 self._request_id.as_deref()
35 }
36}
37impl ExecuteQueryOutput {
38 pub fn builder() -> crate::operation::execute_query::builders::ExecuteQueryOutputBuilder {
40 crate::operation::execute_query::builders::ExecuteQueryOutputBuilder::default()
41 }
42}
43
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct ExecuteQueryOutputBuilder {
48 pub(crate) column_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::ColumnDescription>>,
49 pub(crate) rows: ::std::option::Option<::std::vec::Vec<crate::types::Row>>,
50 pub(crate) next_token: ::std::option::Option<::std::string::String>,
51 _request_id: Option<String>,
52}
53impl ExecuteQueryOutputBuilder {
54 pub fn column_descriptions(mut self, input: crate::types::ColumnDescription) -> Self {
60 let mut v = self.column_descriptions.unwrap_or_default();
61 v.push(input);
62 self.column_descriptions = ::std::option::Option::Some(v);
63 self
64 }
65 pub fn set_column_descriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ColumnDescription>>) -> Self {
67 self.column_descriptions = input;
68 self
69 }
70 pub fn get_column_descriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ColumnDescription>> {
72 &self.column_descriptions
73 }
74 pub fn rows(mut self, input: crate::types::Row) -> Self {
80 let mut v = self.rows.unwrap_or_default();
81 v.push(input);
82 self.rows = ::std::option::Option::Some(v);
83 self
84 }
85 pub fn set_rows(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Row>>) -> Self {
87 self.rows = input;
88 self
89 }
90 pub fn get_rows(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Row>> {
92 &self.rows
93 }
94 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.next_token = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.next_token = input;
102 self
103 }
104 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
106 &self.next_token
107 }
108 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
109 self._request_id = Some(request_id.into());
110 self
111 }
112
113 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
114 self._request_id = request_id;
115 self
116 }
117 pub fn build(self) -> crate::operation::execute_query::ExecuteQueryOutput {
119 crate::operation::execute_query::ExecuteQueryOutput {
120 column_descriptions: self.column_descriptions,
121 rows: self.rows,
122 next_token: self.next_token,
123 _request_id: self._request_id,
124 }
125 }
126}