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.

/// A request to create a channel
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateChannelInput {
    /// Specification of CDI inputs for this channel
    #[doc(hidden)]
    pub cdi_input_specification: std::option::Option<crate::types::CdiInputSpecification>,
    /// The class for this channel. STANDARD for a channel with two pipelines or SINGLE_PIPELINE for a channel with one pipeline.
    #[doc(hidden)]
    pub channel_class: std::option::Option<crate::types::ChannelClass>,
    /// Placeholder documentation for __listOfOutputDestination
    #[doc(hidden)]
    pub destinations: std::option::Option<std::vec::Vec<crate::types::OutputDestination>>,
    /// Encoder Settings
    #[doc(hidden)]
    pub encoder_settings: std::option::Option<crate::types::EncoderSettings>,
    /// List of input attachments for channel.
    #[doc(hidden)]
    pub input_attachments: std::option::Option<std::vec::Vec<crate::types::InputAttachment>>,
    /// Specification of network and file inputs for this channel
    #[doc(hidden)]
    pub input_specification: std::option::Option<crate::types::InputSpecification>,
    /// The log level to write to CloudWatch Logs.
    #[doc(hidden)]
    pub log_level: std::option::Option<crate::types::LogLevel>,
    /// Maintenance settings for this channel.
    #[doc(hidden)]
    pub maintenance: std::option::Option<crate::types::MaintenanceCreateSettings>,
    /// Name of channel.
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
    #[doc(hidden)]
    pub request_id: std::option::Option<std::string::String>,
    /// Deprecated field that's only usable by whitelisted customers.
    #[deprecated]
    #[doc(hidden)]
    pub reserved: std::option::Option<std::string::String>,
    /// An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
    /// A collection of key-value pairs.
    #[doc(hidden)]
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// Settings for the VPC outputs
    #[doc(hidden)]
    pub vpc: std::option::Option<crate::types::VpcOutputSettings>,
}
impl CreateChannelInput {
    /// Specification of CDI inputs for this channel
    pub fn cdi_input_specification(
        &self,
    ) -> std::option::Option<&crate::types::CdiInputSpecification> {
        self.cdi_input_specification.as_ref()
    }
    /// 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(&self) -> std::option::Option<&crate::types::ChannelClass> {
        self.channel_class.as_ref()
    }
    /// Placeholder documentation for __listOfOutputDestination
    pub fn destinations(&self) -> std::option::Option<&[crate::types::OutputDestination]> {
        self.destinations.as_deref()
    }
    /// Encoder Settings
    pub fn encoder_settings(&self) -> std::option::Option<&crate::types::EncoderSettings> {
        self.encoder_settings.as_ref()
    }
    /// List of input attachments for channel.
    pub fn input_attachments(&self) -> std::option::Option<&[crate::types::InputAttachment]> {
        self.input_attachments.as_deref()
    }
    /// Specification of network and file inputs for this channel
    pub fn input_specification(&self) -> std::option::Option<&crate::types::InputSpecification> {
        self.input_specification.as_ref()
    }
    /// The log level to write to CloudWatch Logs.
    pub fn log_level(&self) -> std::option::Option<&crate::types::LogLevel> {
        self.log_level.as_ref()
    }
    /// Maintenance settings for this channel.
    pub fn maintenance(&self) -> std::option::Option<&crate::types::MaintenanceCreateSettings> {
        self.maintenance.as_ref()
    }
    /// Name of channel.
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
    pub fn request_id(&self) -> std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// Deprecated field that's only usable by whitelisted customers.
    #[deprecated]
    pub fn reserved(&self) -> std::option::Option<&str> {
        self.reserved.as_deref()
    }
    /// An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// A collection of key-value pairs.
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
    /// Settings for the VPC outputs
    pub fn vpc(&self) -> std::option::Option<&crate::types::VpcOutputSettings> {
        self.vpc.as_ref()
    }
}
impl CreateChannelInput {
    /// Creates a new builder-style object to manufacture [`CreateChannelInput`](crate::operation::create_channel::CreateChannelInput).
    pub fn builder() -> crate::operation::create_channel::builders::CreateChannelInputBuilder {
        crate::operation::create_channel::builders::CreateChannelInputBuilder::default()
    }
}

/// A builder for [`CreateChannelInput`](crate::operation::create_channel::CreateChannelInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateChannelInputBuilder {
    pub(crate) cdi_input_specification: std::option::Option<crate::types::CdiInputSpecification>,
    pub(crate) channel_class: std::option::Option<crate::types::ChannelClass>,
    pub(crate) destinations: std::option::Option<std::vec::Vec<crate::types::OutputDestination>>,
    pub(crate) encoder_settings: std::option::Option<crate::types::EncoderSettings>,
    pub(crate) input_attachments: std::option::Option<std::vec::Vec<crate::types::InputAttachment>>,
    pub(crate) input_specification: std::option::Option<crate::types::InputSpecification>,
    pub(crate) log_level: std::option::Option<crate::types::LogLevel>,
    pub(crate) maintenance: std::option::Option<crate::types::MaintenanceCreateSettings>,
    pub(crate) name: std::option::Option<std::string::String>,
    pub(crate) request_id: std::option::Option<std::string::String>,
    pub(crate) reserved: std::option::Option<std::string::String>,
    pub(crate) role_arn: std::option::Option<std::string::String>,
    pub(crate) tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    pub(crate) vpc: std::option::Option<crate::types::VpcOutputSettings>,
}
impl CreateChannelInputBuilder {
    /// Specification of CDI inputs for this channel
    pub fn cdi_input_specification(mut self, input: crate::types::CdiInputSpecification) -> Self {
        self.cdi_input_specification = Some(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.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.channel_class = Some(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.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 {
        let mut v = self.destinations.unwrap_or_default();
        v.push(input);
        self.destinations = Some(v);
        self
    }
    /// Placeholder documentation for __listOfOutputDestination
    pub fn set_destinations(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::OutputDestination>>,
    ) -> Self {
        self.destinations = input;
        self
    }
    /// Encoder Settings
    pub fn encoder_settings(mut self, input: crate::types::EncoderSettings) -> Self {
        self.encoder_settings = Some(input);
        self
    }
    /// Encoder Settings
    pub fn set_encoder_settings(
        mut self,
        input: std::option::Option<crate::types::EncoderSettings>,
    ) -> Self {
        self.encoder_settings = input;
        self
    }
    /// Appends an item to `input_attachments`.
    ///
    /// 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 {
        let mut v = self.input_attachments.unwrap_or_default();
        v.push(input);
        self.input_attachments = Some(v);
        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.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.input_specification = Some(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.input_specification = input;
        self
    }
    /// The log level to write to CloudWatch Logs.
    pub fn log_level(mut self, input: crate::types::LogLevel) -> Self {
        self.log_level = Some(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.log_level = input;
        self
    }
    /// Maintenance settings for this channel.
    pub fn maintenance(mut self, input: crate::types::MaintenanceCreateSettings) -> Self {
        self.maintenance = Some(input);
        self
    }
    /// Maintenance settings for this channel.
    pub fn set_maintenance(
        mut self,
        input: std::option::Option<crate::types::MaintenanceCreateSettings>,
    ) -> Self {
        self.maintenance = input;
        self
    }
    /// Name of channel.
    pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
        self.name = Some(input.into());
        self
    }
    /// Name of channel.
    pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.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.request_id = Some(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.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.reserved = Some(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.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.role_arn = Some(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.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 {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = Some(hash_map);
        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.tags = input;
        self
    }
    /// Settings for the VPC outputs
    pub fn vpc(mut self, input: crate::types::VpcOutputSettings) -> Self {
        self.vpc = Some(input);
        self
    }
    /// Settings for the VPC outputs
    pub fn set_vpc(mut self, input: std::option::Option<crate::types::VpcOutputSettings>) -> Self {
        self.vpc = input;
        self
    }
    /// Consumes the builder and constructs a [`CreateChannelInput`](crate::operation::create_channel::CreateChannelInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::create_channel::CreateChannelInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::create_channel::CreateChannelInput {
            cdi_input_specification: self.cdi_input_specification,
            channel_class: self.channel_class,
            destinations: self.destinations,
            encoder_settings: self.encoder_settings,
            input_attachments: self.input_attachments,
            input_specification: self.input_specification,
            log_level: self.log_level,
            maintenance: self.maintenance,
            name: self.name,
            request_id: self.request_id,
            reserved: self.reserved,
            role_arn: self.role_arn,
            tags: self.tags,
            vpc: self.vpc,
        })
    }
}