aws-sdk-continuum 1.1.0

AWS SDK for AWS Continuum
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Specifies pagination parameters for listing environments. Response-filtering justification: filtering is intentionally omitted because every current consumer needs the canonical complete, account-scoped environment inventory, and no useful selective server-side query use case is defined. Environment ID already has the GetEnvironment lookup operation, and status, name, or timestamp filtering is not needed by any current workflow. Adding speculative filters would require unsupported access patterns and ambiguous semantics without reducing data returned for existing consumers. If a concrete indexed query use case is introduced later, its filter values must be bound to pagination tokens so a token cannot be replayed against a different query. The formal API standards decision is recorded in the package-root BR_EXCEPTIONS.md file.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListEnvironmentsInput {
    /// The maximum number of results to return in a single call.
    pub max_results: ::std::option::Option<i32>,
    /// A pagination token returned by a previous call. Set to null for the first request; use the returned token for subsequent calls.
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListEnvironmentsInput {
    /// The maximum number of results to return in a single call.
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// A pagination token returned by a previous call. Set to null for the first request; use the returned token for subsequent calls.
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ListEnvironmentsInput {
    /// Creates a new builder-style object to manufacture [`ListEnvironmentsInput`](crate::operation::list_environments::ListEnvironmentsInput).
    pub fn builder() -> crate::operation::list_environments::builders::ListEnvironmentsInputBuilder {
        crate::operation::list_environments::builders::ListEnvironmentsInputBuilder::default()
    }
}

/// A builder for [`ListEnvironmentsInput`](crate::operation::list_environments::ListEnvironmentsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListEnvironmentsInputBuilder {
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListEnvironmentsInputBuilder {
    /// The maximum number of results to return in a single call.
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// The maximum number of results to return in a single call.
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// The maximum number of results to return in a single call.
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// A pagination token returned by a previous call. Set to null for the first request; use the returned token for subsequent calls.
    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
    }
    /// A pagination token returned by a previous call. Set to null for the first request; use the returned token for subsequent calls.
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// A pagination token returned by a previous call. Set to null for the first request; use the returned token for subsequent calls.
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ListEnvironmentsInput`](crate::operation::list_environments::ListEnvironmentsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_environments::ListEnvironmentsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_environments::ListEnvironmentsInput {
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}