aws_sdk_deadline/operation/search_steps/
_search_steps_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SearchStepsOutput {
pub steps: ::std::vec::Vec<crate::types::StepSearchSummary>,
pub next_item_offset: ::std::option::Option<i32>,
pub total_results: i32,
_request_id: Option<String>,
}
impl SearchStepsOutput {
pub fn steps(&self) -> &[crate::types::StepSearchSummary] {
use std::ops::Deref;
self.steps.deref()
}
pub fn next_item_offset(&self) -> ::std::option::Option<i32> {
self.next_item_offset
}
pub fn total_results(&self) -> i32 {
self.total_results
}
}
impl ::aws_types::request_id::RequestId for SearchStepsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl SearchStepsOutput {
pub fn builder() -> crate::operation::search_steps::builders::SearchStepsOutputBuilder {
crate::operation::search_steps::builders::SearchStepsOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SearchStepsOutputBuilder {
pub(crate) steps: ::std::option::Option<::std::vec::Vec<crate::types::StepSearchSummary>>,
pub(crate) next_item_offset: ::std::option::Option<i32>,
pub(crate) total_results: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl SearchStepsOutputBuilder {
pub fn steps(mut self, input: crate::types::StepSearchSummary) -> Self {
let mut v = self.steps.unwrap_or_default();
v.push(input);
self.steps = ::std::option::Option::Some(v);
self
}
pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StepSearchSummary>>) -> Self {
self.steps = input;
self
}
pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StepSearchSummary>> {
&self.steps
}
pub fn next_item_offset(mut self, input: i32) -> Self {
self.next_item_offset = ::std::option::Option::Some(input);
self
}
pub fn set_next_item_offset(mut self, input: ::std::option::Option<i32>) -> Self {
self.next_item_offset = input;
self
}
pub fn get_next_item_offset(&self) -> &::std::option::Option<i32> {
&self.next_item_offset
}
pub fn total_results(mut self, input: i32) -> Self {
self.total_results = ::std::option::Option::Some(input);
self
}
pub fn set_total_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.total_results = input;
self
}
pub fn get_total_results(&self) -> &::std::option::Option<i32> {
&self.total_results
}
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) -> ::std::result::Result<crate::operation::search_steps::SearchStepsOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::search_steps::SearchStepsOutput {
steps: self.steps.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"steps",
"steps was not specified but it is required when building SearchStepsOutput",
)
})?,
next_item_offset: self.next_item_offset,
total_results: self.total_results.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"total_results",
"total_results was not specified but it is required when building SearchStepsOutput",
)
})?,
_request_id: self._request_id,
})
}
}