aws_sdk_deadline/operation/search_jobs/
_search_jobs_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SearchJobsOutput {
pub jobs: ::std::vec::Vec<crate::types::JobSearchSummary>,
pub next_item_offset: ::std::option::Option<i32>,
pub total_results: i32,
_request_id: Option<String>,
}
impl SearchJobsOutput {
pub fn jobs(&self) -> &[crate::types::JobSearchSummary] {
use std::ops::Deref;
self.jobs.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 SearchJobsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl SearchJobsOutput {
pub fn builder() -> crate::operation::search_jobs::builders::SearchJobsOutputBuilder {
crate::operation::search_jobs::builders::SearchJobsOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SearchJobsOutputBuilder {
pub(crate) jobs: ::std::option::Option<::std::vec::Vec<crate::types::JobSearchSummary>>,
pub(crate) next_item_offset: ::std::option::Option<i32>,
pub(crate) total_results: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl SearchJobsOutputBuilder {
pub fn jobs(mut self, input: crate::types::JobSearchSummary) -> Self {
let mut v = self.jobs.unwrap_or_default();
v.push(input);
self.jobs = ::std::option::Option::Some(v);
self
}
pub fn set_jobs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::JobSearchSummary>>) -> Self {
self.jobs = input;
self
}
pub fn get_jobs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::JobSearchSummary>> {
&self.jobs
}
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_jobs::SearchJobsOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::search_jobs::SearchJobsOutput {
jobs: self.jobs.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"jobs",
"jobs was not specified but it is required when building SearchJobsOutput",
)
})?,
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 SearchJobsOutput",
)
})?,
_request_id: self._request_id,
})
}
}