aws-sdk-resourcegroups 1.23.0

AWS SDK for AWS Resource Groups
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 {
    /// <p>Filters, formatted as <code>GroupFilter</code> objects, that you want to apply to a <code>ListGroups</code> operation.</p>
    /// <ul>
    /// <li>
    /// <p><code>resource-type</code> - Filter the results to include only those resource groups that have the specified resource type in their <code>ResourceTypeFilter</code>. For example, <code>AWS::EC2::Instance</code> would return any resource group with a <code>ResourceTypeFilter</code> that includes <code>AWS::EC2::Instance</code>.</p></li>
    /// <li>
    /// <p><code>configuration-type</code> - Filter the results to include only those groups that have the specified configuration types attached. The current supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>AWS::AppRegistry::Application</code></p></li>
    /// <li>
    /// <p><code>AWS::AppRegistry::ApplicationResourceGroups</code></p></li>
    /// <li>
    /// <p><code>AWS::CloudFormation::Stack</code></p></li>
    /// <li>
    /// <p><code>AWS::EC2::CapacityReservationPool</code></p></li>
    /// <li>
    /// <p><code>AWS::EC2::HostManagement</code></p></li>
    /// <li>
    /// <p><code>AWS::NetworkFirewall::RuleGroup</code></p></li>
    /// </ul></li>
    /// </ul>
    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::GroupFilter>>,
    /// <p>The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value provided by a previous call's <code>NextToken</code> response to indicate where the output should continue from.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListGroupsInput {
    /// <p>Filters, formatted as <code>GroupFilter</code> objects, that you want to apply to a <code>ListGroups</code> operation.</p>
    /// <ul>
    /// <li>
    /// <p><code>resource-type</code> - Filter the results to include only those resource groups that have the specified resource type in their <code>ResourceTypeFilter</code>. For example, <code>AWS::EC2::Instance</code> would return any resource group with a <code>ResourceTypeFilter</code> that includes <code>AWS::EC2::Instance</code>.</p></li>
    /// <li>
    /// <p><code>configuration-type</code> - Filter the results to include only those groups that have the specified configuration types attached. The current supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>AWS::AppRegistry::Application</code></p></li>
    /// <li>
    /// <p><code>AWS::AppRegistry::ApplicationResourceGroups</code></p></li>
    /// <li>
    /// <p><code>AWS::CloudFormation::Stack</code></p></li>
    /// <li>
    /// <p><code>AWS::EC2::CapacityReservationPool</code></p></li>
    /// <li>
    /// <p><code>AWS::EC2::HostManagement</code></p></li>
    /// <li>
    /// <p><code>AWS::NetworkFirewall::RuleGroup</code></p></li>
    /// </ul></li>
    /// </ul>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
    pub fn filters(&self) -> &[crate::types::GroupFilter] {
        self.filters.as_deref().unwrap_or_default()
    }
    /// <p>The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value provided by a previous call's <code>NextToken</code> response to indicate where the output should continue from.</p>
    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) filters: ::std::option::Option<::std::vec::Vec<crate::types::GroupFilter>>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListGroupsInputBuilder {
    /// Appends an item to `filters`.
    ///
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
    ///
    /// <p>Filters, formatted as <code>GroupFilter</code> objects, that you want to apply to a <code>ListGroups</code> operation.</p>
    /// <ul>
    /// <li>
    /// <p><code>resource-type</code> - Filter the results to include only those resource groups that have the specified resource type in their <code>ResourceTypeFilter</code>. For example, <code>AWS::EC2::Instance</code> would return any resource group with a <code>ResourceTypeFilter</code> that includes <code>AWS::EC2::Instance</code>.</p></li>
    /// <li>
    /// <p><code>configuration-type</code> - Filter the results to include only those groups that have the specified configuration types attached. The current supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>AWS::AppRegistry::Application</code></p></li>
    /// <li>
    /// <p><code>AWS::AppRegistry::ApplicationResourceGroups</code></p></li>
    /// <li>
    /// <p><code>AWS::CloudFormation::Stack</code></p></li>
    /// <li>
    /// <p><code>AWS::EC2::CapacityReservationPool</code></p></li>
    /// <li>
    /// <p><code>AWS::EC2::HostManagement</code></p></li>
    /// <li>
    /// <p><code>AWS::NetworkFirewall::RuleGroup</code></p></li>
    /// </ul></li>
    /// </ul>
    pub fn filters(mut self, input: crate::types::GroupFilter) -> Self {
        let mut v = self.filters.unwrap_or_default();
        v.push(input);
        self.filters = ::std::option::Option::Some(v);
        self
    }
    /// <p>Filters, formatted as <code>GroupFilter</code> objects, that you want to apply to a <code>ListGroups</code> operation.</p>
    /// <ul>
    /// <li>
    /// <p><code>resource-type</code> - Filter the results to include only those resource groups that have the specified resource type in their <code>ResourceTypeFilter</code>. For example, <code>AWS::EC2::Instance</code> would return any resource group with a <code>ResourceTypeFilter</code> that includes <code>AWS::EC2::Instance</code>.</p></li>
    /// <li>
    /// <p><code>configuration-type</code> - Filter the results to include only those groups that have the specified configuration types attached. The current supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>AWS::AppRegistry::Application</code></p></li>
    /// <li>
    /// <p><code>AWS::AppRegistry::ApplicationResourceGroups</code></p></li>
    /// <li>
    /// <p><code>AWS::CloudFormation::Stack</code></p></li>
    /// <li>
    /// <p><code>AWS::EC2::CapacityReservationPool</code></p></li>
    /// <li>
    /// <p><code>AWS::EC2::HostManagement</code></p></li>
    /// <li>
    /// <p><code>AWS::NetworkFirewall::RuleGroup</code></p></li>
    /// </ul></li>
    /// </ul>
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GroupFilter>>) -> Self {
        self.filters = input;
        self
    }
    /// <p>Filters, formatted as <code>GroupFilter</code> objects, that you want to apply to a <code>ListGroups</code> operation.</p>
    /// <ul>
    /// <li>
    /// <p><code>resource-type</code> - Filter the results to include only those resource groups that have the specified resource type in their <code>ResourceTypeFilter</code>. For example, <code>AWS::EC2::Instance</code> would return any resource group with a <code>ResourceTypeFilter</code> that includes <code>AWS::EC2::Instance</code>.</p></li>
    /// <li>
    /// <p><code>configuration-type</code> - Filter the results to include only those groups that have the specified configuration types attached. The current supported values are:</p>
    /// <ul>
    /// <li>
    /// <p><code>AWS::AppRegistry::Application</code></p></li>
    /// <li>
    /// <p><code>AWS::AppRegistry::ApplicationResourceGroups</code></p></li>
    /// <li>
    /// <p><code>AWS::CloudFormation::Stack</code></p></li>
    /// <li>
    /// <p><code>AWS::EC2::CapacityReservationPool</code></p></li>
    /// <li>
    /// <p><code>AWS::EC2::HostManagement</code></p></li>
    /// <li>
    /// <p><code>AWS::NetworkFirewall::RuleGroup</code></p></li>
    /// </ul></li>
    /// </ul>
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GroupFilter>> {
        &self.filters
    }
    /// <p>The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value provided by a previous call's <code>NextToken</code> response to indicate where the output should continue from.</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>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value provided by a previous call's <code>NextToken</code> response to indicate where the output should continue from.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value provided by a previous call's <code>NextToken</code> response to indicate where the output should continue from.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ListGroupsInput`](crate::operation::list_groups::ListGroupsInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::list_groups::ListGroupsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_groups::ListGroupsInput {
            filters: self.filters,
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}