aws-sdk-cloudwatch 1.109.0

AWS SDK for Amazon CloudWatch
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 DescribeInsightRulesInput {
    /// <p>Include this value, if it was returned by the previous operation, to get the next set of rules.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of results to return in one operation. If you omit this parameter, the default of 500 is used.</p>
    pub max_results: ::std::option::Option<i32>,
}
impl DescribeInsightRulesInput {
    /// <p>Include this value, if it was returned by the previous operation, to get the next set of rules.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The maximum number of results to return in one operation. If you omit this parameter, the default of 500 is used.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
}
impl DescribeInsightRulesInput {
    /// Creates a new builder-style object to manufacture [`DescribeInsightRulesInput`](crate::operation::describe_insight_rules::DescribeInsightRulesInput).
    pub fn builder() -> crate::operation::describe_insight_rules::builders::DescribeInsightRulesInputBuilder {
        crate::operation::describe_insight_rules::builders::DescribeInsightRulesInputBuilder::default()
    }
}

/// A builder for [`DescribeInsightRulesInput`](crate::operation::describe_insight_rules::DescribeInsightRulesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeInsightRulesInputBuilder {
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
}
impl DescribeInsightRulesInputBuilder {
    /// <p>Include this value, if it was returned by the previous operation, to get the next set of rules.</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>Include this value, if it was returned by the previous operation, to get the next set of rules.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>Include this value, if it was returned by the previous operation, to get the next set of rules.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The maximum number of results to return in one operation. If you omit this parameter, the default of 500 is used.</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 return in one operation. If you omit this parameter, the default of 500 is used.</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 return in one operation. If you omit this parameter, the default of 500 is used.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Consumes the builder and constructs a [`DescribeInsightRulesInput`](crate::operation::describe_insight_rules::DescribeInsightRulesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_insight_rules::DescribeInsightRulesInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::describe_insight_rules::DescribeInsightRulesInput {
            next_token: self.next_token,
            max_results: self.max_results,
        })
    }
}