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::create_channel::_create_channel_output::CreateChannelOutputBuilder;

pub use crate::operation::create_channel::_create_channel_input::CreateChannelInputBuilder;

/// Fluent builder constructing a request to `CreateChannel`.
///
/// Creates a new channel
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateChannelFluentBuilder {
    handle: std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_channel::builders::CreateChannelInputBuilder,
}
impl CreateChannelFluentBuilder {
    /// Creates a new `CreateChannel`.
    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::create_channel::CreateChannel,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::result::SdkError<crate::operation::create_channel::CreateChannelError>,
    > {
        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::create_channel::CreateChannelOutput,
        aws_smithy_http::result::SdkError<crate::operation::create_channel::CreateChannelError>,
    > {
        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
    }
    /// Specification of CDI inputs for this channel
    pub fn cdi_input_specification(mut self, input: crate::types::CdiInputSpecification) -> Self {
        self.inner = self.inner.cdi_input_specification(input);
        self
    }
    /// Specification of CDI inputs for this channel
    pub fn set_cdi_input_specification(
        mut self,
        input: std::option::Option<crate::types::CdiInputSpecification>,
    ) -> Self {
        self.inner = self.inner.set_cdi_input_specification(input);
        self
    }
    /// The class for this channel. STANDARD for a channel with two pipelines or SINGLE_PIPELINE for a channel with one pipeline.
    pub fn channel_class(mut self, input: crate::types::ChannelClass) -> Self {
        self.inner = self.inner.channel_class(input);
        self
    }
    /// The class for this channel. STANDARD for a channel with two pipelines or SINGLE_PIPELINE for a channel with one pipeline.
    pub fn set_channel_class(
        mut self,
        input: std::option::Option<crate::types::ChannelClass>,
    ) -> Self {
        self.inner = self.inner.set_channel_class(input);
        self
    }
    /// Appends an item to `Destinations`.
    ///
    /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
    ///
    /// Placeholder documentation for __listOfOutputDestination
    pub fn destinations(mut self, input: crate::types::OutputDestination) -> Self {
        self.inner = self.inner.destinations(input);
        self
    }
    /// Placeholder documentation for __listOfOutputDestination
    pub fn set_destinations(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::OutputDestination>>,
    ) -> Self {
        self.inner = self.inner.set_destinations(input);
        self
    }
    /// Encoder Settings
    pub fn encoder_settings(mut self, input: crate::types::EncoderSettings) -> Self {
        self.inner = self.inner.encoder_settings(input);
        self
    }
    /// Encoder Settings
    pub fn set_encoder_settings(
        mut self,
        input: std::option::Option<crate::types::EncoderSettings>,
    ) -> Self {
        self.inner = self.inner.set_encoder_settings(input);
        self
    }
    /// Appends an item to `InputAttachments`.
    ///
    /// To override the contents of this collection use [`set_input_attachments`](Self::set_input_attachments).
    ///
    /// List of input attachments for channel.
    pub fn input_attachments(mut self, input: crate::types::InputAttachment) -> Self {
        self.inner = self.inner.input_attachments(input);
        self
    }
    /// List of input attachments for channel.
    pub fn set_input_attachments(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::InputAttachment>>,
    ) -> Self {
        self.inner = self.inner.set_input_attachments(input);
        self
    }
    /// Specification of network and file inputs for this channel
    pub fn input_specification(mut self, input: crate::types::InputSpecification) -> Self {
        self.inner = self.inner.input_specification(input);
        self
    }
    /// Specification of network and file inputs for this channel
    pub fn set_input_specification(
        mut self,
        input: std::option::Option<crate::types::InputSpecification>,
    ) -> Self {
        self.inner = self.inner.set_input_specification(input);
        self
    }
    /// The log level to write to CloudWatch Logs.
    pub fn log_level(mut self, input: crate::types::LogLevel) -> Self {
        self.inner = self.inner.log_level(input);
        self
    }
    /// The log level to write to CloudWatch Logs.
    pub fn set_log_level(mut self, input: std::option::Option<crate::types::LogLevel>) -> Self {
        self.inner = self.inner.set_log_level(input);
        self
    }
    /// Maintenance settings for this channel.
    pub fn maintenance(mut self, input: crate::types::MaintenanceCreateSettings) -> Self {
        self.inner = self.inner.maintenance(input);
        self
    }
    /// Maintenance settings for this channel.
    pub fn set_maintenance(
        mut self,
        input: std::option::Option<crate::types::MaintenanceCreateSettings>,
    ) -> Self {
        self.inner = self.inner.set_maintenance(input);
        self
    }
    /// Name of channel.
    pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// Name of channel.
    pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
    pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.request_id(input.into());
        self
    }
    /// Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
    pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_request_id(input);
        self
    }
    /// Deprecated field that's only usable by whitelisted customers.
    #[deprecated]
    pub fn reserved(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.reserved(input.into());
        self
    }
    /// Deprecated field that's only usable by whitelisted customers.
    #[deprecated]
    pub fn set_reserved(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_reserved(input);
        self
    }
    /// An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
    pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.role_arn(input.into());
        self
    }
    /// An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
    pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_role_arn(input);
        self
    }
    /// Adds a key-value pair to `Tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// A collection of key-value pairs.
    pub fn tags(
        mut self,
        k: impl Into<std::string::String>,
        v: impl Into<std::string::String>,
    ) -> Self {
        self.inner = self.inner.tags(k.into(), v.into());
        self
    }
    /// A collection of key-value pairs.
    pub fn set_tags(
        mut self,
        input: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    ) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// Settings for the VPC outputs
    pub fn vpc(mut self, input: crate::types::VpcOutputSettings) -> Self {
        self.inner = self.inner.vpc(input);
        self
    }
    /// Settings for the VPC outputs
    pub fn set_vpc(mut self, input: std::option::Option<crate::types::VpcOutputSettings>) -> Self {
        self.inner = self.inner.set_vpc(input);
        self
    }
}