#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ExecuteQueryOutput {
#[doc(hidden)]
pub column_descriptions: std::option::Option<std::vec::Vec<crate::types::ColumnDescription>>,
#[doc(hidden)]
pub rows: std::option::Option<std::vec::Vec<crate::types::Row>>,
#[doc(hidden)]
pub next_token: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl ExecuteQueryOutput {
pub fn column_descriptions(&self) -> std::option::Option<&[crate::types::ColumnDescription]> {
self.column_descriptions.as_deref()
}
pub fn rows(&self) -> std::option::Option<&[crate::types::Row]> {
self.rows.as_deref()
}
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl aws_http::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 = 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 rows(mut self, input: crate::types::Row) -> Self {
let mut v = self.rows.unwrap_or_default();
v.push(input);
self.rows = 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 next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = 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(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,
}
}
}