aws-sdk-medialive 0.26.0

AWS SDK for AWS Elemental MediaLive
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::list_reservations::_list_reservations_output::ListReservationsOutputBuilder;

pub use crate::operation::list_reservations::_list_reservations_input::ListReservationsInputBuilder;

/// Fluent builder constructing a request to `ListReservations`.
///
/// List purchased reservations.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListReservationsFluentBuilder {
    handle: std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::list_reservations::builders::ListReservationsInputBuilder,
}
impl ListReservationsFluentBuilder {
    /// Creates a new `ListReservations`.
    pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: Default::default(),
        }
    }

    /// Consume this builder, creating a customizable operation that can be modified before being
    /// sent. The operation's inner [http::Request] can be modified as well.
    pub async fn customize(
        self,
    ) -> std::result::Result<
        crate::client::customize::CustomizableOperation<
            crate::operation::list_reservations::ListReservations,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::result::SdkError<
            crate::operation::list_reservations::ListReservationsError,
        >,
    > {
        let handle = self.handle.clone();
        let operation = self
            .inner
            .build()
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?
            .make_operation(&handle.conf)
            .await
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
        Ok(crate::client::customize::CustomizableOperation { handle, operation })
    }

    /// 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_reservations::ListReservationsOutput,
        aws_smithy_http::result::SdkError<
            crate::operation::list_reservations::ListReservationsError,
        >,
    > {
        let op = self
            .inner
            .build()
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?
            .make_operation(&self.handle.conf)
            .await
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
        self.handle.client.call(op).await
    }
    /// Create a paginator for this request
    ///
    /// Paginators are used by calling [`send().await`](crate::operation::list_reservations::paginator::ListReservationsPaginator::send) which returns a `Stream`.
    pub fn into_paginator(
        self,
    ) -> crate::operation::list_reservations::paginator::ListReservationsPaginator {
        crate::operation::list_reservations::paginator::ListReservationsPaginator::new(
            self.handle,
            self.inner,
        )
    }
    /// Filter by channel class, 'STANDARD' or 'SINGLE_PIPELINE'
    pub fn channel_class(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.channel_class(input.into());
        self
    }
    /// Filter by channel class, 'STANDARD' or 'SINGLE_PIPELINE'
    pub fn set_channel_class(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_channel_class(input);
        self
    }
    /// Filter by codec, 'AVC', 'HEVC', 'MPEG2', 'AUDIO', or 'LINK'
    pub fn codec(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.codec(input.into());
        self
    }
    /// Filter by codec, 'AVC', 'HEVC', 'MPEG2', 'AUDIO', or 'LINK'
    pub fn set_codec(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_codec(input);
        self
    }
    /// Placeholder documentation for MaxResults
    pub fn max_results(mut self, input: i32) -> Self {
        self.inner = self.inner.max_results(input);
        self
    }
    /// Placeholder documentation for MaxResults
    pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_max_results(input);
        self
    }
    /// Filter by bitrate, 'MAX_10_MBPS', 'MAX_20_MBPS', or 'MAX_50_MBPS'
    pub fn maximum_bitrate(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.maximum_bitrate(input.into());
        self
    }
    /// Filter by bitrate, 'MAX_10_MBPS', 'MAX_20_MBPS', or 'MAX_50_MBPS'
    pub fn set_maximum_bitrate(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_maximum_bitrate(input);
        self
    }
    /// Filter by framerate, 'MAX_30_FPS' or 'MAX_60_FPS'
    pub fn maximum_framerate(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.maximum_framerate(input.into());
        self
    }
    /// Filter by framerate, 'MAX_30_FPS' or 'MAX_60_FPS'
    pub fn set_maximum_framerate(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.inner = self.inner.set_maximum_framerate(input);
        self
    }
    /// Placeholder documentation for __string
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.next_token(input.into());
        self
    }
    /// Placeholder documentation for __string
    pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_next_token(input);
        self
    }
    /// Filter by resolution, 'SD', 'HD', 'FHD', or 'UHD'
    pub fn resolution(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.resolution(input.into());
        self
    }
    /// Filter by resolution, 'SD', 'HD', 'FHD', or 'UHD'
    pub fn set_resolution(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_resolution(input);
        self
    }
    /// Filter by resource type, 'INPUT', 'OUTPUT', 'MULTIPLEX', or 'CHANNEL'
    pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.resource_type(input.into());
        self
    }
    /// Filter by resource type, 'INPUT', 'OUTPUT', 'MULTIPLEX', or 'CHANNEL'
    pub fn set_resource_type(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_resource_type(input);
        self
    }
    /// Filter by special feature, 'ADVANCED_AUDIO' or 'AUDIO_NORMALIZATION'
    pub fn special_feature(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.special_feature(input.into());
        self
    }
    /// Filter by special feature, 'ADVANCED_AUDIO' or 'AUDIO_NORMALIZATION'
    pub fn set_special_feature(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_special_feature(input);
        self
    }
    /// Filter by video quality, 'STANDARD', 'ENHANCED', or 'PREMIUM'
    pub fn video_quality(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.video_quality(input.into());
        self
    }
    /// Filter by video quality, 'STANDARD', 'ENHANCED', or 'PREMIUM'
    pub fn set_video_quality(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_video_quality(input);
        self
    }
}