#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ExecuteQueryOutput {
pub column_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::ColumnDescription>>,
pub rows: ::std::option::Option<::std::vec::Vec<crate::types::Row>>,
pub next_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl ExecuteQueryOutput {
pub fn column_descriptions(&self) -> &[crate::types::ColumnDescription] {
self.column_descriptions.as_deref().unwrap_or_default()
}
pub fn rows(&self) -> &[crate::types::Row] {
self.rows.as_deref().unwrap_or_default()
}
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl ::aws_types::request_id::RequestId for ExecuteQueryOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ExecuteQueryOutput {
pub fn builder() -> crate::operation::execute_query::builders::ExecuteQueryOutputBuilder {
crate::operation::execute_query::builders::ExecuteQueryOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ExecuteQueryOutputBuilder {
pub(crate) column_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::ColumnDescription>>,
pub(crate) rows: ::std::option::Option<::std::vec::Vec<crate::types::Row>>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl ExecuteQueryOutputBuilder {
pub fn column_descriptions(mut self, input: crate::types::ColumnDescription) -> Self {
let mut v = self.column_descriptions.unwrap_or_default();
v.push(input);
self.column_descriptions = ::std::option::Option::Some(v);
self
}
pub fn set_column_descriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ColumnDescription>>) -> Self {
self.column_descriptions = input;
self
}
pub fn get_column_descriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ColumnDescription>> {
&self.column_descriptions
}
pub fn rows(mut self, input: crate::types::Row) -> Self {
let mut v = self.rows.unwrap_or_default();
v.push(input);
self.rows = ::std::option::Option::Some(v);
self
}
pub fn set_rows(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Row>>) -> Self {
self.rows = input;
self
}
pub fn get_rows(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Row>> {
&self.rows
}
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
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
}
pub fn build(self) -> crate::operation::execute_query::ExecuteQueryOutput {
crate::operation::execute_query::ExecuteQueryOutput {
column_descriptions: self.column_descriptions,
rows: self.rows,
next_token: self.next_token,
_request_id: self._request_id,
}
}
}