aws-sdk-ivs 1.74.0

AWS SDK for Amazon Interactive Video Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateChannelInput {
    /// <p>ARN of the channel to be updated.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>Channel name.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Channel latency mode. Use <code>NORMAL</code> to broadcast and deliver live video up to Full HD. Use <code>LOW</code> for near-real-time interaction with viewers.</p>
    pub latency_mode: ::std::option::Option<crate::types::ChannelLatencyMode>,
    /// <p>Channel type, which determines the allowable resolution and bitrate. <i>If you exceed the allowable input resolution or bitrate, the stream probably will disconnect immediately.</i> Default: <code>STANDARD</code>. For details, see <a href="https://docs.aws.amazon.com/ivs/latest/LowLatencyAPIReference/channel-types.html">Channel Types</a>.</p>
    pub r#type: ::std::option::Option<crate::types::ChannelType>,
    /// <p>Whether the channel is private (enabled for playback authorization).</p>
    pub authorized: ::std::option::Option<bool>,
    /// <p>Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. If this is set to an empty string, recording is disabled.</p>
    pub recording_configuration_arn: ::std::option::Option<::std::string::String>,
    /// <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
    pub insecure_ingest: ::std::option::Option<bool>,
    /// <p>Optional transcode preset for the channel. This is selectable only for <code>ADVANCED_HD</code> and <code>ADVANCED_SD</code> channel types. For those channel types, the default <code>preset</code> is <code>HIGHER_BANDWIDTH_DELIVERY</code>. For other channel types (<code>BASIC</code> and <code>STANDARD</code>), <code>preset</code> is the empty string (<code>""</code>).</p>
    pub preset: ::std::option::Option<crate::types::TranscodePreset>,
    /// <p>Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback restriction. If this is set to an empty string, playback restriction policy is disabled.</p>
    pub playback_restriction_policy_arn: ::std::option::Option<::std::string::String>,
    /// <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
    pub multitrack_input_configuration: ::std::option::Option<crate::types::MultitrackInputConfiguration>,
    /// <p>Indicates which content-packaging format is used (MPEG-TS or fMP4). If <code>multitrackInputConfiguration</code> is specified and <code>enabled</code> is <code>true</code>, then <code>containerFormat</code> is required and must be set to <code>FRAGMENTED_MP4</code>. Otherwise, <code>containerFormat</code> may be set to <code>TS</code> or <code>FRAGMENTED_MP4</code>. Default: <code>TS</code>.</p>
    pub container_format: ::std::option::Option<crate::types::ContainerFormat>,
}
impl UpdateChannelInput {
    /// <p>ARN of the channel to be updated.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>Channel name.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Channel latency mode. Use <code>NORMAL</code> to broadcast and deliver live video up to Full HD. Use <code>LOW</code> for near-real-time interaction with viewers.</p>
    pub fn latency_mode(&self) -> ::std::option::Option<&crate::types::ChannelLatencyMode> {
        self.latency_mode.as_ref()
    }
    /// <p>Channel type, which determines the allowable resolution and bitrate. <i>If you exceed the allowable input resolution or bitrate, the stream probably will disconnect immediately.</i> Default: <code>STANDARD</code>. For details, see <a href="https://docs.aws.amazon.com/ivs/latest/LowLatencyAPIReference/channel-types.html">Channel Types</a>.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ChannelType> {
        self.r#type.as_ref()
    }
    /// <p>Whether the channel is private (enabled for playback authorization).</p>
    pub fn authorized(&self) -> ::std::option::Option<bool> {
        self.authorized
    }
    /// <p>Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. If this is set to an empty string, recording is disabled.</p>
    pub fn recording_configuration_arn(&self) -> ::std::option::Option<&str> {
        self.recording_configuration_arn.as_deref()
    }
    /// <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
    pub fn insecure_ingest(&self) -> ::std::option::Option<bool> {
        self.insecure_ingest
    }
    /// <p>Optional transcode preset for the channel. This is selectable only for <code>ADVANCED_HD</code> and <code>ADVANCED_SD</code> channel types. For those channel types, the default <code>preset</code> is <code>HIGHER_BANDWIDTH_DELIVERY</code>. For other channel types (<code>BASIC</code> and <code>STANDARD</code>), <code>preset</code> is the empty string (<code>""</code>).</p>
    pub fn preset(&self) -> ::std::option::Option<&crate::types::TranscodePreset> {
        self.preset.as_ref()
    }
    /// <p>Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback restriction. If this is set to an empty string, playback restriction policy is disabled.</p>
    pub fn playback_restriction_policy_arn(&self) -> ::std::option::Option<&str> {
        self.playback_restriction_policy_arn.as_deref()
    }
    /// <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
    pub fn multitrack_input_configuration(&self) -> ::std::option::Option<&crate::types::MultitrackInputConfiguration> {
        self.multitrack_input_configuration.as_ref()
    }
    /// <p>Indicates which content-packaging format is used (MPEG-TS or fMP4). If <code>multitrackInputConfiguration</code> is specified and <code>enabled</code> is <code>true</code>, then <code>containerFormat</code> is required and must be set to <code>FRAGMENTED_MP4</code>. Otherwise, <code>containerFormat</code> may be set to <code>TS</code> or <code>FRAGMENTED_MP4</code>. Default: <code>TS</code>.</p>
    pub fn container_format(&self) -> ::std::option::Option<&crate::types::ContainerFormat> {
        self.container_format.as_ref()
    }
}
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) arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) latency_mode: ::std::option::Option<crate::types::ChannelLatencyMode>,
    pub(crate) r#type: ::std::option::Option<crate::types::ChannelType>,
    pub(crate) authorized: ::std::option::Option<bool>,
    pub(crate) recording_configuration_arn: ::std::option::Option<::std::string::String>,
    pub(crate) insecure_ingest: ::std::option::Option<bool>,
    pub(crate) preset: ::std::option::Option<crate::types::TranscodePreset>,
    pub(crate) playback_restriction_policy_arn: ::std::option::Option<::std::string::String>,
    pub(crate) multitrack_input_configuration: ::std::option::Option<crate::types::MultitrackInputConfiguration>,
    pub(crate) container_format: ::std::option::Option<crate::types::ContainerFormat>,
}
impl UpdateChannelInputBuilder {
    /// <p>ARN of the channel to be updated.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ARN of the channel to be updated.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>ARN of the channel to be updated.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>Channel name.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Channel name.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>Channel name.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Channel latency mode. Use <code>NORMAL</code> to broadcast and deliver live video up to Full HD. Use <code>LOW</code> for near-real-time interaction with viewers.</p>
    pub fn latency_mode(mut self, input: crate::types::ChannelLatencyMode) -> Self {
        self.latency_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>Channel latency mode. Use <code>NORMAL</code> to broadcast and deliver live video up to Full HD. Use <code>LOW</code> for near-real-time interaction with viewers.</p>
    pub fn set_latency_mode(mut self, input: ::std::option::Option<crate::types::ChannelLatencyMode>) -> Self {
        self.latency_mode = input;
        self
    }
    /// <p>Channel latency mode. Use <code>NORMAL</code> to broadcast and deliver live video up to Full HD. Use <code>LOW</code> for near-real-time interaction with viewers.</p>
    pub fn get_latency_mode(&self) -> &::std::option::Option<crate::types::ChannelLatencyMode> {
        &self.latency_mode
    }
    /// <p>Channel type, which determines the allowable resolution and bitrate. <i>If you exceed the allowable input resolution or bitrate, the stream probably will disconnect immediately.</i> Default: <code>STANDARD</code>. For details, see <a href="https://docs.aws.amazon.com/ivs/latest/LowLatencyAPIReference/channel-types.html">Channel Types</a>.</p>
    pub fn r#type(mut self, input: crate::types::ChannelType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Channel type, which determines the allowable resolution and bitrate. <i>If you exceed the allowable input resolution or bitrate, the stream probably will disconnect immediately.</i> Default: <code>STANDARD</code>. For details, see <a href="https://docs.aws.amazon.com/ivs/latest/LowLatencyAPIReference/channel-types.html">Channel Types</a>.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ChannelType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>Channel type, which determines the allowable resolution and bitrate. <i>If you exceed the allowable input resolution or bitrate, the stream probably will disconnect immediately.</i> Default: <code>STANDARD</code>. For details, see <a href="https://docs.aws.amazon.com/ivs/latest/LowLatencyAPIReference/channel-types.html">Channel Types</a>.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ChannelType> {
        &self.r#type
    }
    /// <p>Whether the channel is private (enabled for playback authorization).</p>
    pub fn authorized(mut self, input: bool) -> Self {
        self.authorized = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether the channel is private (enabled for playback authorization).</p>
    pub fn set_authorized(mut self, input: ::std::option::Option<bool>) -> Self {
        self.authorized = input;
        self
    }
    /// <p>Whether the channel is private (enabled for playback authorization).</p>
    pub fn get_authorized(&self) -> &::std::option::Option<bool> {
        &self.authorized
    }
    /// <p>Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. If this is set to an empty string, recording is disabled.</p>
    pub fn recording_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recording_configuration_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. If this is set to an empty string, recording is disabled.</p>
    pub fn set_recording_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recording_configuration_arn = input;
        self
    }
    /// <p>Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. If this is set to an empty string, recording is disabled.</p>
    pub fn get_recording_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.recording_configuration_arn
    }
    /// <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
    pub fn insecure_ingest(mut self, input: bool) -> Self {
        self.insecure_ingest = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
    pub fn set_insecure_ingest(mut self, input: ::std::option::Option<bool>) -> Self {
        self.insecure_ingest = input;
        self
    }
    /// <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
    pub fn get_insecure_ingest(&self) -> &::std::option::Option<bool> {
        &self.insecure_ingest
    }
    /// <p>Optional transcode preset for the channel. This is selectable only for <code>ADVANCED_HD</code> and <code>ADVANCED_SD</code> channel types. For those channel types, the default <code>preset</code> is <code>HIGHER_BANDWIDTH_DELIVERY</code>. For other channel types (<code>BASIC</code> and <code>STANDARD</code>), <code>preset</code> is the empty string (<code>""</code>).</p>
    pub fn preset(mut self, input: crate::types::TranscodePreset) -> Self {
        self.preset = ::std::option::Option::Some(input);
        self
    }
    /// <p>Optional transcode preset for the channel. This is selectable only for <code>ADVANCED_HD</code> and <code>ADVANCED_SD</code> channel types. For those channel types, the default <code>preset</code> is <code>HIGHER_BANDWIDTH_DELIVERY</code>. For other channel types (<code>BASIC</code> and <code>STANDARD</code>), <code>preset</code> is the empty string (<code>""</code>).</p>
    pub fn set_preset(mut self, input: ::std::option::Option<crate::types::TranscodePreset>) -> Self {
        self.preset = input;
        self
    }
    /// <p>Optional transcode preset for the channel. This is selectable only for <code>ADVANCED_HD</code> and <code>ADVANCED_SD</code> channel types. For those channel types, the default <code>preset</code> is <code>HIGHER_BANDWIDTH_DELIVERY</code>. For other channel types (<code>BASIC</code> and <code>STANDARD</code>), <code>preset</code> is the empty string (<code>""</code>).</p>
    pub fn get_preset(&self) -> &::std::option::Option<crate::types::TranscodePreset> {
        &self.preset
    }
    /// <p>Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback restriction. If this is set to an empty string, playback restriction policy is disabled.</p>
    pub fn playback_restriction_policy_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.playback_restriction_policy_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback restriction. If this is set to an empty string, playback restriction policy is disabled.</p>
    pub fn set_playback_restriction_policy_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.playback_restriction_policy_arn = input;
        self
    }
    /// <p>Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback restriction. If this is set to an empty string, playback restriction policy is disabled.</p>
    pub fn get_playback_restriction_policy_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.playback_restriction_policy_arn
    }
    /// <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
    pub fn multitrack_input_configuration(mut self, input: crate::types::MultitrackInputConfiguration) -> Self {
        self.multitrack_input_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
    pub fn set_multitrack_input_configuration(mut self, input: ::std::option::Option<crate::types::MultitrackInputConfiguration>) -> Self {
        self.multitrack_input_configuration = input;
        self
    }
    /// <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
    pub fn get_multitrack_input_configuration(&self) -> &::std::option::Option<crate::types::MultitrackInputConfiguration> {
        &self.multitrack_input_configuration
    }
    /// <p>Indicates which content-packaging format is used (MPEG-TS or fMP4). If <code>multitrackInputConfiguration</code> is specified and <code>enabled</code> is <code>true</code>, then <code>containerFormat</code> is required and must be set to <code>FRAGMENTED_MP4</code>. Otherwise, <code>containerFormat</code> may be set to <code>TS</code> or <code>FRAGMENTED_MP4</code>. Default: <code>TS</code>.</p>
    pub fn container_format(mut self, input: crate::types::ContainerFormat) -> Self {
        self.container_format = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates which content-packaging format is used (MPEG-TS or fMP4). If <code>multitrackInputConfiguration</code> is specified and <code>enabled</code> is <code>true</code>, then <code>containerFormat</code> is required and must be set to <code>FRAGMENTED_MP4</code>. Otherwise, <code>containerFormat</code> may be set to <code>TS</code> or <code>FRAGMENTED_MP4</code>. Default: <code>TS</code>.</p>
    pub fn set_container_format(mut self, input: ::std::option::Option<crate::types::ContainerFormat>) -> Self {
        self.container_format = input;
        self
    }
    /// <p>Indicates which content-packaging format is used (MPEG-TS or fMP4). If <code>multitrackInputConfiguration</code> is specified and <code>enabled</code> is <code>true</code>, then <code>containerFormat</code> is required and must be set to <code>FRAGMENTED_MP4</code>. Otherwise, <code>containerFormat</code> may be set to <code>TS</code> or <code>FRAGMENTED_MP4</code>. Default: <code>TS</code>.</p>
    pub fn get_container_format(&self) -> &::std::option::Option<crate::types::ContainerFormat> {
        &self.container_format
    }
    /// 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 {
            arn: self.arn,
            name: self.name,
            latency_mode: self.latency_mode,
            r#type: self.r#type,
            authorized: self.authorized,
            recording_configuration_arn: self.recording_configuration_arn,
            insecure_ingest: self.insecure_ingest,
            preset: self.preset,
            playback_restriction_policy_arn: self.playback_restriction_policy_arn,
            multitrack_input_configuration: self.multitrack_input_configuration,
            container_format: self.container_format,
        })
    }
}