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 update a channel.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateChannelInput {
    /// Specification of CDI inputs for this channel
    #[doc(hidden)]
    pub cdi_input_specification: std::option::Option<crate::types::CdiInputSpecification>,
    /// channel ID
    #[doc(hidden)]
    pub channel_id: std::option::Option<std::string::String>,
    /// A list of output destinations for this channel.
    #[doc(hidden)]
    pub destinations: std::option::Option<std::vec::Vec<crate::types::OutputDestination>>,
    /// The encoder settings for this channel.
    #[doc(hidden)]
    pub encoder_settings: std::option::Option<crate::types::EncoderSettings>,
    /// Placeholder documentation for __listOfInputAttachment
    #[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::MaintenanceUpdateSettings>,
    /// The name of the channel.
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// An optional Amazon Resource Name (ARN) of the role to assume when running the Channel. If you do not specify this on an update call but the role was previously set that role will be removed.
    #[doc(hidden)]
    pub role_arn: std::option::Option<std::string::String>,
}
impl UpdateChannelInput {
    /// 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()
    }
    /// channel ID
    pub fn channel_id(&self) -> std::option::Option<&str> {
        self.channel_id.as_deref()
    }
    /// A list of output destinations for this channel.
    pub fn destinations(&self) -> std::option::Option<&[crate::types::OutputDestination]> {
        self.destinations.as_deref()
    }
    /// The encoder settings for this channel.
    pub fn encoder_settings(&self) -> std::option::Option<&crate::types::EncoderSettings> {
        self.encoder_settings.as_ref()
    }
    /// Placeholder documentation for __listOfInputAttachment
    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::MaintenanceUpdateSettings> {
        self.maintenance.as_ref()
    }
    /// The name of the channel.
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// An optional Amazon Resource Name (ARN) of the role to assume when running the Channel. If you do not specify this on an update call but the role was previously set that role will be removed.
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
}
impl UpdateChannelInput {
    /// Creates a new builder-style object to manufacture [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
    pub fn builder() -> crate::operation::update_channel::builders::UpdateChannelInputBuilder {
        crate::operation::update_channel::builders::UpdateChannelInputBuilder::default()
    }
}

/// A builder for [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct UpdateChannelInputBuilder {
    pub(crate) cdi_input_specification: std::option::Option<crate::types::CdiInputSpecification>,
    pub(crate) channel_id: std::option::Option<std::string::String>,
    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::MaintenanceUpdateSettings>,
    pub(crate) name: std::option::Option<std::string::String>,
    pub(crate) role_arn: std::option::Option<std::string::String>,
}
impl UpdateChannelInputBuilder {
    /// 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
    }
    /// channel ID
    pub fn channel_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.channel_id = Some(input.into());
        self
    }
    /// channel ID
    pub fn set_channel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.channel_id = input;
        self
    }
    /// Appends an item to `destinations`.
    ///
    /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
    ///
    /// A list of output destinations for this channel.
    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
    }
    /// A list of output destinations for this channel.
    pub fn set_destinations(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::OutputDestination>>,
    ) -> Self {
        self.destinations = input;
        self
    }
    /// The encoder settings for this channel.
    pub fn encoder_settings(mut self, input: crate::types::EncoderSettings) -> Self {
        self.encoder_settings = Some(input);
        self
    }
    /// The encoder settings for this channel.
    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).
    ///
    /// Placeholder documentation for __listOfInputAttachment
    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
    }
    /// Placeholder documentation for __listOfInputAttachment
    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::MaintenanceUpdateSettings) -> Self {
        self.maintenance = Some(input);
        self
    }
    /// Maintenance settings for this channel.
    pub fn set_maintenance(
        mut self,
        input: std::option::Option<crate::types::MaintenanceUpdateSettings>,
    ) -> Self {
        self.maintenance = input;
        self
    }
    /// The name of the channel.
    pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
        self.name = Some(input.into());
        self
    }
    /// The name of the channel.
    pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// An optional Amazon Resource Name (ARN) of the role to assume when running the Channel. If you do not specify this on an update call but the role was previously set that role will be removed.
    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. If you do not specify this on an update call but the role was previously set that role will be removed.
    pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// Consumes the builder and constructs a [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::update_channel::UpdateChannelInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::update_channel::UpdateChannelInput {
            cdi_input_specification: self.cdi_input_specification,
            channel_id: self.channel_id,
            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,
            role_arn: self.role_arn,
        })
    }
}