// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListStepsOutput {
/// <p>The steps on the list.</p>
pub steps: ::std::vec::Vec<crate::types::StepSummary>,
/// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
pub next_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl ListStepsOutput {
/// <p>The steps on the list.</p>
pub fn steps(&self) -> &[crate::types::StepSummary] {
use std::ops::Deref;
self.steps.deref()
}
/// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl ::aws_types::request_id::RequestId for ListStepsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ListStepsOutput {
/// Creates a new builder-style object to manufacture [`ListStepsOutput`](crate::operation::list_steps::ListStepsOutput).
pub fn builder() -> crate::operation::list_steps::builders::ListStepsOutputBuilder {
crate::operation::list_steps::builders::ListStepsOutputBuilder::default()
}
}
/// A builder for [`ListStepsOutput`](crate::operation::list_steps::ListStepsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListStepsOutputBuilder {
pub(crate) steps: ::std::option::Option<::std::vec::Vec<crate::types::StepSummary>>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl ListStepsOutputBuilder {
/// Appends an item to `steps`.
///
/// To override the contents of this collection use [`set_steps`](Self::set_steps).
///
/// <p>The steps on the list.</p>
pub fn steps(mut self, input: crate::types::StepSummary) -> Self {
let mut v = self.steps.unwrap_or_default();
v.push(input);
self.steps = ::std::option::Option::Some(v);
self
}
/// <p>The steps on the list.</p>
pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StepSummary>>) -> Self {
self.steps = input;
self
}
/// <p>The steps on the list.</p>
pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StepSummary>> {
&self.steps
}
/// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
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
}
/// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
/// <p>If Deadline Cloud returns <code>nextToken</code>, then there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then <code>nextToken</code> is set to <code>null</code>. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 <code>ValidationException</code> error.</p>
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
}
/// Consumes the builder and constructs a [`ListStepsOutput`](crate::operation::list_steps::ListStepsOutput).
/// This method will fail if any of the following fields are not set:
/// - [`steps`](crate::operation::list_steps::builders::ListStepsOutputBuilder::steps)
pub fn build(self) -> ::std::result::Result<crate::operation::list_steps::ListStepsOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_steps::ListStepsOutput {
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 ListStepsOutput",
)
})?,
next_token: self.next_token,
_request_id: self._request_id,
})
}
}