#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ExecuteTransactionOutput {
pub responses: ::std::option::Option<::std::vec::Vec<crate::types::ItemResponse>>,
pub consumed_capacity: ::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>>,
_request_id: Option<String>,
}
impl ExecuteTransactionOutput {
pub fn responses(&self) -> &[crate::types::ItemResponse] {
self.responses.as_deref().unwrap_or_default()
}
pub fn consumed_capacity(&self) -> &[crate::types::ConsumedCapacity] {
self.consumed_capacity.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for ExecuteTransactionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ExecuteTransactionOutput {
pub fn builder() -> crate::operation::execute_transaction::builders::ExecuteTransactionOutputBuilder {
crate::operation::execute_transaction::builders::ExecuteTransactionOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ExecuteTransactionOutputBuilder {
pub(crate) responses: ::std::option::Option<::std::vec::Vec<crate::types::ItemResponse>>,
pub(crate) consumed_capacity: ::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>>,
_request_id: Option<String>,
}
impl ExecuteTransactionOutputBuilder {
pub fn responses(mut self, input: crate::types::ItemResponse) -> Self {
let mut v = self.responses.unwrap_or_default();
v.push(input);
self.responses = ::std::option::Option::Some(v);
self
}
pub fn set_responses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ItemResponse>>) -> Self {
self.responses = input;
self
}
pub fn get_responses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ItemResponse>> {
&self.responses
}
pub fn consumed_capacity(mut self, input: crate::types::ConsumedCapacity) -> Self {
let mut v = self.consumed_capacity.unwrap_or_default();
v.push(input);
self.consumed_capacity = ::std::option::Option::Some(v);
self
}
pub fn set_consumed_capacity(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>>) -> Self {
self.consumed_capacity = input;
self
}
pub fn get_consumed_capacity(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>> {
&self.consumed_capacity
}
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_transaction::ExecuteTransactionOutput {
crate::operation::execute_transaction::ExecuteTransactionOutput {
responses: self.responses,
consumed_capacity: self.consumed_capacity,
_request_id: self._request_id,
}
}
}