aws-sdk-dax 1.93.0

AWS SDK for Amazon DynamoDB Accelerator (DAX)
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 DescribeSubnetGroupsInput {
    /// <p>The name of the subnet group.</p>
    pub subnet_group_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
    /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl DescribeSubnetGroupsInput {
    /// <p>The name of the subnet group.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_group_names.is_none()`.
    pub fn subnet_group_names(&self) -> &[::std::string::String] {
        self.subnet_group_names.as_deref().unwrap_or_default()
    }
    /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
    /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl DescribeSubnetGroupsInput {
    /// Creates a new builder-style object to manufacture [`DescribeSubnetGroupsInput`](crate::operation::describe_subnet_groups::DescribeSubnetGroupsInput).
    pub fn builder() -> crate::operation::describe_subnet_groups::builders::DescribeSubnetGroupsInputBuilder {
        crate::operation::describe_subnet_groups::builders::DescribeSubnetGroupsInputBuilder::default()
    }
}

/// A builder for [`DescribeSubnetGroupsInput`](crate::operation::describe_subnet_groups::DescribeSubnetGroupsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeSubnetGroupsInputBuilder {
    pub(crate) subnet_group_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl DescribeSubnetGroupsInputBuilder {
    /// Appends an item to `subnet_group_names`.
    ///
    /// To override the contents of this collection use [`set_subnet_group_names`](Self::set_subnet_group_names).
    ///
    /// <p>The name of the subnet group.</p>
    pub fn subnet_group_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.subnet_group_names.unwrap_or_default();
        v.push(input.into());
        self.subnet_group_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>The name of the subnet group.</p>
    pub fn set_subnet_group_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.subnet_group_names = input;
        self
    }
    /// <p>The name of the subnet group.</p>
    pub fn get_subnet_group_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.subnet_group_names
    }
    /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
    /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
    /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of results to include in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that the remaining results can be retrieved.</p>
    /// <p>The value for <code>MaxResults</code> must be between 20 and 100.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</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>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by <code>MaxResults</code>.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`DescribeSubnetGroupsInput`](crate::operation::describe_subnet_groups::DescribeSubnetGroupsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_subnet_groups::DescribeSubnetGroupsInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::describe_subnet_groups::DescribeSubnetGroupsInput {
            subnet_group_names: self.subnet_group_names,
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}