aws-sdk-greengrass 0.26.0

AWS SDK for AWS Greengrass
Documentation
// 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 ListGroupsInput {
    /// The maximum number of results to be returned per request.
    #[doc(hidden)]
    pub max_results: std::option::Option<std::string::String>,
    /// The token for the next set of results, or ''null'' if there are no additional results.
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl ListGroupsInput {
    /// The maximum number of results to be returned per request.
    pub fn max_results(&self) -> std::option::Option<&str> {
        self.max_results.as_deref()
    }
    /// The token for the next set of results, or ''null'' if there are no additional results.
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ListGroupsInput {
    /// Creates a new builder-style object to manufacture [`ListGroupsInput`](crate::operation::list_groups::ListGroupsInput).
    pub fn builder() -> crate::operation::list_groups::builders::ListGroupsInputBuilder {
        crate::operation::list_groups::builders::ListGroupsInputBuilder::default()
    }
}

/// A builder for [`ListGroupsInput`](crate::operation::list_groups::ListGroupsInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListGroupsInputBuilder {
    pub(crate) max_results: std::option::Option<std::string::String>,
    pub(crate) next_token: std::option::Option<std::string::String>,
}
impl ListGroupsInputBuilder {
    /// The maximum number of results to be returned per request.
    pub fn max_results(mut self, input: impl Into<std::string::String>) -> Self {
        self.max_results = Some(input.into());
        self
    }
    /// The maximum number of results to be returned per request.
    pub fn set_max_results(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.max_results = input;
        self
    }
    /// The token for the next set of results, or ''null'' if there are no additional results.
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// The token for the next set of results, or ''null'' if there are no additional results.
    pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Consumes the builder and constructs a [`ListGroupsInput`](crate::operation::list_groups::ListGroupsInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::list_groups::ListGroupsInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::list_groups::ListGroupsInput {
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}