aws-sdk-medialive 1.46.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
    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.
    pub channel_class: ::std::option::Option<crate::types::ChannelClass>,
    /// Placeholder documentation for __listOfOutputDestination
    pub destinations: ::std::option::Option<::std::vec::Vec<crate::types::OutputDestination>>,
    /// Encoder Settings
    pub encoder_settings: ::std::option::Option<crate::types::EncoderSettings>,
    /// List of input attachments for channel.
    pub input_attachments: ::std::option::Option<::std::vec::Vec<crate::types::InputAttachment>>,
    /// Specification of network and file inputs for this channel
    pub input_specification: ::std::option::Option<crate::types::InputSpecification>,
    /// The log level to write to CloudWatch Logs.
    pub log_level: ::std::option::Option<crate::types::LogLevel>,
    /// Maintenance settings for this channel.
    pub maintenance: ::std::option::Option<crate::types::MaintenanceCreateSettings>,
    /// Name of channel.
    pub name: ::std::option::Option<::std::string::String>,
    /// Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
    pub request_id: ::std::option::Option<::std::string::String>,
    /// Deprecated field that's only usable by whitelisted customers.
    #[deprecated]
    pub reserved: ::std::option::Option<::std::string::String>,
    /// An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// A collection of key-value pairs.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// Settings for the VPC outputs
    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
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.destinations.is_none()`.
    pub fn destinations(&self) -> &[crate::types::OutputDestination] {
        self.destinations.as_deref().unwrap_or_default()
    }
    /// Encoder Settings
    pub fn encoder_settings(&self) -> ::std::option::Option<&crate::types::EncoderSettings> {
        self.encoder_settings.as_ref()
    }
    /// List of input attachments for channel.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.input_attachments.is_none()`.
    pub fn input_attachments(&self) -> &[crate::types::InputAttachment] {
        self.input_attachments.as_deref().unwrap_or_default()
    }
    /// 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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 = ::std::option::Option::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
    }
    /// Specification of CDI inputs for this channel
    pub fn get_cdi_input_specification(&self) -> &::std::option::Option<crate::types::CdiInputSpecification> {
        &self.cdi_input_specification
    }
    /// 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 = ::std::option::Option::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
    }
    /// The class for this channel. STANDARD for a channel with two pipelines or SINGLE_PIPELINE for a channel with one pipeline.
    pub fn get_channel_class(&self) -> &::std::option::Option<crate::types::ChannelClass> {
        &self.channel_class
    }
    /// 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 = ::std::option::Option::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
    }
    /// Placeholder documentation for __listOfOutputDestination
    pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OutputDestination>> {
        &self.destinations
    }
    /// Encoder Settings
    pub fn encoder_settings(mut self, input: crate::types::EncoderSettings) -> Self {
        self.encoder_settings = ::std::option::Option::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
    }
    /// Encoder Settings
    pub fn get_encoder_settings(&self) -> &::std::option::Option<crate::types::EncoderSettings> {
        &self.encoder_settings
    }
    /// 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 = ::std::option::Option::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
    }
    /// List of input attachments for channel.
    pub fn get_input_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InputAttachment>> {
        &self.input_attachments
    }
    /// Specification of network and file inputs for this channel
    pub fn input_specification(mut self, input: crate::types::InputSpecification) -> Self {
        self.input_specification = ::std::option::Option::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
    }
    /// Specification of network and file inputs for this channel
    pub fn get_input_specification(&self) -> &::std::option::Option<crate::types::InputSpecification> {
        &self.input_specification
    }
    /// The log level to write to CloudWatch Logs.
    pub fn log_level(mut self, input: crate::types::LogLevel) -> Self {
        self.log_level = ::std::option::Option::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
    }
    /// The log level to write to CloudWatch Logs.
    pub fn get_log_level(&self) -> &::std::option::Option<crate::types::LogLevel> {
        &self.log_level
    }
    /// Maintenance settings for this channel.
    pub fn maintenance(mut self, input: crate::types::MaintenanceCreateSettings) -> Self {
        self.maintenance = ::std::option::Option::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
    }
    /// Maintenance settings for this channel.
    pub fn get_maintenance(&self) -> &::std::option::Option<crate::types::MaintenanceCreateSettings> {
        &self.maintenance
    }
    /// Name of channel.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::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
    }
    /// Name of channel.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_id = ::std::option::Option::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
    }
    /// Unique request ID to be specified. This is needed to prevent retries from creating multiple resources.
    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_id
    }
    /// Deprecated field that's only usable by whitelisted customers.
    #[deprecated]
    pub fn reserved(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reserved = ::std::option::Option::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
    }
    /// Deprecated field that's only usable by whitelisted customers.
    #[deprecated]
    pub fn get_reserved(&self) -> &::std::option::Option<::std::string::String> {
        &self.reserved
    }
    /// An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::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
    }
    /// An optional Amazon Resource Name (ARN) of the role to assume when running the Channel.
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// 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 ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::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
    }
    /// A collection of key-value pairs.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Settings for the VPC outputs
    pub fn vpc(mut self, input: crate::types::VpcOutputSettings) -> Self {
        self.vpc = ::std::option::Option::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
    }
    /// Settings for the VPC outputs
    pub fn get_vpc(&self) -> &::std::option::Option<crate::types::VpcOutputSettings> {
        &self.vpc
    }
    /// Consumes the builder and constructs a [`CreateChannelInput`](crate::operation::create_channel::CreateChannelInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_channel::CreateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::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,
        })
    }
}