aws-sdk-medialive 1.83.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
    pub cdi_input_specification: ::std::option::Option<crate::types::CdiInputSpecification>,
    /// channel ID
    pub channel_id: ::std::option::Option<::std::string::String>,
    /// A list of output destinations for this channel.
    pub destinations: ::std::option::Option<::std::vec::Vec<crate::types::OutputDestination>>,
    /// The encoder settings for this channel.
    pub encoder_settings: ::std::option::Option<crate::types::EncoderSettings>,
    /// Placeholder documentation for __listOfInputAttachment
    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::MaintenanceUpdateSettings>,
    /// The name of the channel.
    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.
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// Channel engine version for this channel
    pub channel_engine_version: ::std::option::Option<crate::types::ChannelEngineVersionRequest>,
    /// Placeholder documentation for __boolean
    pub dry_run: ::std::option::Option<bool>,
}
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.
    ///
    /// 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()
    }
    /// 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
    ///
    /// 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::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()
    }
    /// Channel engine version for this channel
    pub fn channel_engine_version(&self) -> ::std::option::Option<&crate::types::ChannelEngineVersionRequest> {
        self.channel_engine_version.as_ref()
    }
    /// Placeholder documentation for __boolean
    pub fn dry_run(&self) -> ::std::option::Option<bool> {
        self.dry_run
    }
}
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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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>,
    pub(crate) channel_engine_version: ::std::option::Option<crate::types::ChannelEngineVersionRequest>,
    pub(crate) dry_run: ::std::option::Option<bool>,
}
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 = ::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
    }
    /// channel ID
    /// This field is required.
    pub fn channel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.channel_id = ::std::option::Option::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
    }
    /// channel ID
    pub fn get_channel_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.channel_id
    }
    /// 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 = ::std::option::Option::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
    }
    /// A list of output destinations for this channel.
    pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OutputDestination>> {
        &self.destinations
    }
    /// The encoder settings for this channel.
    pub fn encoder_settings(mut self, input: crate::types::EncoderSettings) -> Self {
        self.encoder_settings = ::std::option::Option::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
    }
    /// The encoder settings for this channel.
    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).
    ///
    /// 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 = ::std::option::Option::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
    }
    /// Placeholder documentation for __listOfInputAttachment
    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::MaintenanceUpdateSettings) -> 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::MaintenanceUpdateSettings>) -> Self {
        self.maintenance = input;
        self
    }
    /// Maintenance settings for this channel.
    pub fn get_maintenance(&self) -> &::std::option::Option<crate::types::MaintenanceUpdateSettings> {
        &self.maintenance
    }
    /// The name of the channel.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::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
    }
    /// The name of the channel.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// 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 ::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. 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
    }
    /// 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 get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// Channel engine version for this channel
    pub fn channel_engine_version(mut self, input: crate::types::ChannelEngineVersionRequest) -> Self {
        self.channel_engine_version = ::std::option::Option::Some(input);
        self
    }
    /// Channel engine version for this channel
    pub fn set_channel_engine_version(mut self, input: ::std::option::Option<crate::types::ChannelEngineVersionRequest>) -> Self {
        self.channel_engine_version = input;
        self
    }
    /// Channel engine version for this channel
    pub fn get_channel_engine_version(&self) -> &::std::option::Option<crate::types::ChannelEngineVersionRequest> {
        &self.channel_engine_version
    }
    /// Placeholder documentation for __boolean
    pub fn dry_run(mut self, input: bool) -> Self {
        self.dry_run = ::std::option::Option::Some(input);
        self
    }
    /// Placeholder documentation for __boolean
    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
        self.dry_run = input;
        self
    }
    /// Placeholder documentation for __boolean
    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
        &self.dry_run
    }
    /// Consumes the builder and constructs a [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_channel::UpdateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::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,
            channel_engine_version: self.channel_engine_version,
            dry_run: self.dry_run,
        })
    }
}