aws-sdk-cloudwatchomni 1.2.0

AWS SDK for CloudWatch Omni
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 ListAlertsInput {
    /// The unique ID of the space.
    pub space_id: ::std::option::Option<::std::string::String>,
    /// Filter criteria narrowing which alerts are returned. All members are optional; the three name/id filters are mutually exclusive.
    pub filter_criteria: ::std::option::Option<crate::types::AlertFilterCriteria>,
    /// The field to sort results by.
    pub sort_by: ::std::option::Option<crate::types::AlertSortField>,
    /// The order in which to sort results.
    pub sort_order: ::std::option::Option<crate::types::AlertSortOrder>,
    /// A token to retrieve the next page of results.
    pub next_token: ::std::option::Option<::std::string::String>,
    /// The maximum number of alerts to return per page.
    pub max_results: ::std::option::Option<i32>,
}
impl ListAlertsInput {
    /// The unique ID of the space.
    pub fn space_id(&self) -> ::std::option::Option<&str> {
        self.space_id.as_deref()
    }
    /// Filter criteria narrowing which alerts are returned. All members are optional; the three name/id filters are mutually exclusive.
    pub fn filter_criteria(&self) -> ::std::option::Option<&crate::types::AlertFilterCriteria> {
        self.filter_criteria.as_ref()
    }
    /// The field to sort results by.
    pub fn sort_by(&self) -> ::std::option::Option<&crate::types::AlertSortField> {
        self.sort_by.as_ref()
    }
    /// The order in which to sort results.
    pub fn sort_order(&self) -> ::std::option::Option<&crate::types::AlertSortOrder> {
        self.sort_order.as_ref()
    }
    /// A token to retrieve the next page of results.
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// The maximum number of alerts to return per page.
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
}
impl ListAlertsInput {
    /// Creates a new builder-style object to manufacture [`ListAlertsInput`](crate::operation::list_alerts::ListAlertsInput).
    pub fn builder() -> crate::operation::list_alerts::builders::ListAlertsInputBuilder {
        crate::operation::list_alerts::builders::ListAlertsInputBuilder::default()
    }
}

/// A builder for [`ListAlertsInput`](crate::operation::list_alerts::ListAlertsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListAlertsInputBuilder {
    pub(crate) space_id: ::std::option::Option<::std::string::String>,
    pub(crate) filter_criteria: ::std::option::Option<crate::types::AlertFilterCriteria>,
    pub(crate) sort_by: ::std::option::Option<crate::types::AlertSortField>,
    pub(crate) sort_order: ::std::option::Option<crate::types::AlertSortOrder>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
}
impl ListAlertsInputBuilder {
    /// The unique ID of the space.
    /// This field is required.
    pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique ID of the space.
    pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.space_id = input;
        self
    }
    /// The unique ID of the space.
    pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.space_id
    }
    /// Filter criteria narrowing which alerts are returned. All members are optional; the three name/id filters are mutually exclusive.
    pub fn filter_criteria(mut self, input: crate::types::AlertFilterCriteria) -> Self {
        self.filter_criteria = ::std::option::Option::Some(input);
        self
    }
    /// Filter criteria narrowing which alerts are returned. All members are optional; the three name/id filters are mutually exclusive.
    pub fn set_filter_criteria(mut self, input: ::std::option::Option<crate::types::AlertFilterCriteria>) -> Self {
        self.filter_criteria = input;
        self
    }
    /// Filter criteria narrowing which alerts are returned. All members are optional; the three name/id filters are mutually exclusive.
    pub fn get_filter_criteria(&self) -> &::std::option::Option<crate::types::AlertFilterCriteria> {
        &self.filter_criteria
    }
    /// The field to sort results by.
    pub fn sort_by(mut self, input: crate::types::AlertSortField) -> Self {
        self.sort_by = ::std::option::Option::Some(input);
        self
    }
    /// The field to sort results by.
    pub fn set_sort_by(mut self, input: ::std::option::Option<crate::types::AlertSortField>) -> Self {
        self.sort_by = input;
        self
    }
    /// The field to sort results by.
    pub fn get_sort_by(&self) -> &::std::option::Option<crate::types::AlertSortField> {
        &self.sort_by
    }
    /// The order in which to sort results.
    pub fn sort_order(mut self, input: crate::types::AlertSortOrder) -> Self {
        self.sort_order = ::std::option::Option::Some(input);
        self
    }
    /// The order in which to sort results.
    pub fn set_sort_order(mut self, input: ::std::option::Option<crate::types::AlertSortOrder>) -> Self {
        self.sort_order = input;
        self
    }
    /// The order in which to sort results.
    pub fn get_sort_order(&self) -> &::std::option::Option<crate::types::AlertSortOrder> {
        &self.sort_order
    }
    /// A token to retrieve the next page of results.
    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 token to retrieve the next page of results.
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// A token to retrieve the next page of results.
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// The maximum number of alerts to return per page.
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// The maximum number of alerts to return per page.
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// The maximum number of alerts to return per page.
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Consumes the builder and constructs a [`ListAlertsInput`](crate::operation::list_alerts::ListAlertsInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::list_alerts::ListAlertsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_alerts::ListAlertsInput {
            space_id: self.space_id,
            filter_criteria: self.filter_criteria,
            sort_by: self.sort_by,
            sort_order: self.sort_order,
            next_token: self.next_token,
            max_results: self.max_results,
        })
    }
}