aws-sdk-medialive 1.149.0

AWS SDK for AWS Elemental MediaLive
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Placeholder documentation for ListAlertsRequest
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListAlertsInput {
    /// The unique ID of the channel
    pub channel_id: ::std::option::Option<::std::string::String>,
    /// The maximum number of items to return
    pub max_results: ::std::option::Option<i32>,
    /// The next pagination token
    pub next_token: ::std::option::Option<::std::string::String>,
    /// Specifies the set of alerts to return based on their state. SET - Return only alerts with SET state. CLEARED - Return only alerts with CLEARED state. ALL - Return all alerts.
    pub state_filter: ::std::option::Option<::std::string::String>,
}
impl ListAlertsInput {
    /// The unique ID of the channel
    pub fn channel_id(&self) -> ::std::option::Option<&str> {
        self.channel_id.as_deref()
    }
    /// The maximum number of items to return
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// The next pagination token
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// Specifies the set of alerts to return based on their state. SET - Return only alerts with SET state. CLEARED - Return only alerts with CLEARED state. ALL - Return all alerts.
    pub fn state_filter(&self) -> ::std::option::Option<&str> {
        self.state_filter.as_deref()
    }
}
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) channel_id: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) state_filter: ::std::option::Option<::std::string::String>,
}
impl ListAlertsInputBuilder {
    /// The unique ID of the channel
    /// This field is required.
    pub fn channel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.channel_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique ID of the channel
    pub fn set_channel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.channel_id = input;
        self
    }
    /// The unique ID of the channel
    pub fn get_channel_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.channel_id
    }
    /// The maximum number of items to return
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// The maximum number of items to return
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// The maximum number of items to return
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// The next pagination token
    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
    }
    /// The next pagination token
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// The next pagination token
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Specifies the set of alerts to return based on their state. SET - Return only alerts with SET state. CLEARED - Return only alerts with CLEARED state. ALL - Return all alerts.
    pub fn state_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.state_filter = ::std::option::Option::Some(input.into());
        self
    }
    /// Specifies the set of alerts to return based on their state. SET - Return only alerts with SET state. CLEARED - Return only alerts with CLEARED state. ALL - Return all alerts.
    pub fn set_state_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.state_filter = input;
        self
    }
    /// Specifies the set of alerts to return based on their state. SET - Return only alerts with SET state. CLEARED - Return only alerts with CLEARED state. ALL - Return all alerts.
    pub fn get_state_filter(&self) -> &::std::option::Option<::std::string::String> {
        &self.state_filter
    }
    /// 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 {
            channel_id: self.channel_id,
            max_results: self.max_results,
            next_token: self.next_token,
            state_filter: self.state_filter,
        })
    }
}