aws-sdk-notifications 1.52.0

AWS SDK for AWS User Notifications
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::list_notification_configurations::_list_notification_configurations_input::ListNotificationConfigurationsInputBuilder;

pub use crate::operation::list_notification_configurations::_list_notification_configurations_output::ListNotificationConfigurationsOutputBuilder;

impl crate::operation::list_notification_configurations::builders::ListNotificationConfigurationsInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::list_notification_configurations::ListNotificationConfigurationsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::list_notification_configurations::ListNotificationConfigurationsError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.list_notification_configurations();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `ListNotificationConfigurations`.
///
/// <p>Returns a list of abbreviated <code>NotificationConfigurations</code> according to specified filters, in reverse chronological order (newest first).</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ListNotificationConfigurationsFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::list_notification_configurations::builders::ListNotificationConfigurationsInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::list_notification_configurations::ListNotificationConfigurationsOutput,
        crate::operation::list_notification_configurations::ListNotificationConfigurationsError,
    > for ListNotificationConfigurationsFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::list_notification_configurations::ListNotificationConfigurationsOutput,
            crate::operation::list_notification_configurations::ListNotificationConfigurationsError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl ListNotificationConfigurationsFluentBuilder {
    /// Creates a new `ListNotificationConfigurationsFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the ListNotificationConfigurations as a reference.
    pub fn as_input(&self) -> &crate::operation::list_notification_configurations::builders::ListNotificationConfigurationsInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::list_notification_configurations::ListNotificationConfigurationsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::list_notification_configurations::ListNotificationConfigurationsError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::list_notification_configurations::ListNotificationConfigurations::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::list_notification_configurations::ListNotificationConfigurations::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::list_notification_configurations::ListNotificationConfigurationsOutput,
        crate::operation::list_notification_configurations::ListNotificationConfigurationsError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// Create a paginator for this request
    ///
    /// Paginators are used by calling [`send().await`](crate::operation::list_notification_configurations::paginator::ListNotificationConfigurationsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
    pub fn into_paginator(self) -> crate::operation::list_notification_configurations::paginator::ListNotificationConfigurationsPaginator {
        crate::operation::list_notification_configurations::paginator::ListNotificationConfigurationsPaginator::new(self.handle, self.inner)
    }
    /// <p>The matched event source.</p>
    /// <p>Must match one of the valid EventBridge sources. Only Amazon Web Services service sourced events are supported. For example, <code>aws.ec2</code> and <code>aws.cloudwatch</code>. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-delivery-level">Event delivery from Amazon Web Services services</a> in the <i>Amazon EventBridge User Guide</i>.</p>
    pub fn event_rule_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.event_rule_source(input.into());
        self
    }
    /// <p>The matched event source.</p>
    /// <p>Must match one of the valid EventBridge sources. Only Amazon Web Services service sourced events are supported. For example, <code>aws.ec2</code> and <code>aws.cloudwatch</code>. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-delivery-level">Event delivery from Amazon Web Services services</a> in the <i>Amazon EventBridge User Guide</i>.</p>
    pub fn set_event_rule_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_event_rule_source(input);
        self
    }
    /// <p>The matched event source.</p>
    /// <p>Must match one of the valid EventBridge sources. Only Amazon Web Services service sourced events are supported. For example, <code>aws.ec2</code> and <code>aws.cloudwatch</code>. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html#eb-service-event-delivery-level">Event delivery from Amazon Web Services services</a> in the <i>Amazon EventBridge User Guide</i>.</p>
    pub fn get_event_rule_source(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_event_rule_source()
    }
    /// <p>The Amazon Resource Name (ARN) of the Channel to match.</p>
    pub fn channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.channel_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Channel to match.</p>
    pub fn set_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_channel_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Channel to match.</p>
    pub fn get_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_channel_arn()
    }
    /// <p>The <code>NotificationConfiguration</code> status to match.</p>
    /// <ul>
    /// <li>
    /// <p>Values:</p>
    /// <ul>
    /// <li>
    /// <p><code>ACTIVE</code></p>
    /// <ul>
    /// <li>
    /// <p>All <code>EventRules</code> are <code>ACTIVE</code> and any call can be run.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>PARTIALLY_ACTIVE</code></p>
    /// <ul>
    /// <li>
    /// <p>Some <code>EventRules</code> are <code>ACTIVE</code> and some are <code>INACTIVE</code>. Any call can be run.</p></li>
    /// <li>
    /// <p>Any call can be run.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>INACTIVE</code></p>
    /// <ul>
    /// <li>
    /// <p>All <code>EventRules</code> are <code>INACTIVE</code> and any call can be run.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>DELETING</code></p>
    /// <ul>
    /// <li>
    /// <p>This <code>NotificationConfiguration</code> is being deleted.</p></li>
    /// <li>
    /// <p>Only <code>GET</code> and <code>LIST</code> calls can be run.</p></li>
    /// </ul></li>
    /// </ul></li>
    /// </ul>
    pub fn status(mut self, input: crate::types::NotificationConfigurationStatus) -> Self {
        self.inner = self.inner.status(input);
        self
    }
    /// <p>The <code>NotificationConfiguration</code> status to match.</p>
    /// <ul>
    /// <li>
    /// <p>Values:</p>
    /// <ul>
    /// <li>
    /// <p><code>ACTIVE</code></p>
    /// <ul>
    /// <li>
    /// <p>All <code>EventRules</code> are <code>ACTIVE</code> and any call can be run.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>PARTIALLY_ACTIVE</code></p>
    /// <ul>
    /// <li>
    /// <p>Some <code>EventRules</code> are <code>ACTIVE</code> and some are <code>INACTIVE</code>. Any call can be run.</p></li>
    /// <li>
    /// <p>Any call can be run.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>INACTIVE</code></p>
    /// <ul>
    /// <li>
    /// <p>All <code>EventRules</code> are <code>INACTIVE</code> and any call can be run.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>DELETING</code></p>
    /// <ul>
    /// <li>
    /// <p>This <code>NotificationConfiguration</code> is being deleted.</p></li>
    /// <li>
    /// <p>Only <code>GET</code> and <code>LIST</code> calls can be run.</p></li>
    /// </ul></li>
    /// </ul></li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::NotificationConfigurationStatus>) -> Self {
        self.inner = self.inner.set_status(input);
        self
    }
    /// <p>The <code>NotificationConfiguration</code> status to match.</p>
    /// <ul>
    /// <li>
    /// <p>Values:</p>
    /// <ul>
    /// <li>
    /// <p><code>ACTIVE</code></p>
    /// <ul>
    /// <li>
    /// <p>All <code>EventRules</code> are <code>ACTIVE</code> and any call can be run.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>PARTIALLY_ACTIVE</code></p>
    /// <ul>
    /// <li>
    /// <p>Some <code>EventRules</code> are <code>ACTIVE</code> and some are <code>INACTIVE</code>. Any call can be run.</p></li>
    /// <li>
    /// <p>Any call can be run.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>INACTIVE</code></p>
    /// <ul>
    /// <li>
    /// <p>All <code>EventRules</code> are <code>INACTIVE</code> and any call can be run.</p></li>
    /// </ul></li>
    /// <li>
    /// <p><code>DELETING</code></p>
    /// <ul>
    /// <li>
    /// <p>This <code>NotificationConfiguration</code> is being deleted.</p></li>
    /// <li>
    /// <p>Only <code>GET</code> and <code>LIST</code> calls can be run.</p></li>
    /// </ul></li>
    /// </ul></li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::NotificationConfigurationStatus> {
        self.inner.get_status()
    }
    /// <p>The subtype used to filter the notification configurations in the request.</p>
    pub fn subtype(mut self, input: crate::types::NotificationConfigurationSubtype) -> Self {
        self.inner = self.inner.subtype(input);
        self
    }
    /// <p>The subtype used to filter the notification configurations in the request.</p>
    pub fn set_subtype(mut self, input: ::std::option::Option<crate::types::NotificationConfigurationSubtype>) -> Self {
        self.inner = self.inner.set_subtype(input);
        self
    }
    /// <p>The subtype used to filter the notification configurations in the request.</p>
    pub fn get_subtype(&self) -> &::std::option::Option<crate::types::NotificationConfigurationSubtype> {
        self.inner.get_subtype()
    }
    /// <p>The maximum number of results to be returned in this call. Defaults to 20.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.inner = self.inner.max_results(input);
        self
    }
    /// <p>The maximum number of results to be returned in this call. Defaults to 20.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_max_results(input);
        self
    }
    /// <p>The maximum number of results to be returned in this call. Defaults to 20.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        self.inner.get_max_results()
    }
    /// <p>The start token for paginated calls. Retrieved from the response of a previous <code>ListEventRules</code> call. Next token uses Base64 encoding.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.next_token(input.into());
        self
    }
    /// <p>The start token for paginated calls. Retrieved from the response of a previous <code>ListEventRules</code> call. Next token uses Base64 encoding.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_next_token(input);
        self
    }
    /// <p>The start token for paginated calls. Retrieved from the response of a previous <code>ListEventRules</code> call. Next token uses Base64 encoding.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_next_token()
    }
}