aws_sdk_ivs/operation/update_channel/
_update_channel_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateChannelInput {
6    /// <p>ARN of the channel to be updated.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>Channel name.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <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>
11    pub latency_mode: ::std::option::Option<crate::types::ChannelLatencyMode>,
12    /// <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>
13    pub r#type: ::std::option::Option<crate::types::ChannelType>,
14    /// <p>Whether the channel is private (enabled for playback authorization).</p>
15    pub authorized: ::std::option::Option<bool>,
16    /// <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>
17    pub recording_configuration_arn: ::std::option::Option<::std::string::String>,
18    /// <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
19    pub insecure_ingest: ::std::option::Option<bool>,
20    /// <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>
21    pub preset: ::std::option::Option<crate::types::TranscodePreset>,
22    /// <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>
23    pub playback_restriction_policy_arn: ::std::option::Option<::std::string::String>,
24    /// <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
25    pub multitrack_input_configuration: ::std::option::Option<crate::types::MultitrackInputConfiguration>,
26    /// <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>
27    pub container_format: ::std::option::Option<crate::types::ContainerFormat>,
28}
29impl UpdateChannelInput {
30    /// <p>ARN of the channel to be updated.</p>
31    pub fn arn(&self) -> ::std::option::Option<&str> {
32        self.arn.as_deref()
33    }
34    /// <p>Channel name.</p>
35    pub fn name(&self) -> ::std::option::Option<&str> {
36        self.name.as_deref()
37    }
38    /// <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>
39    pub fn latency_mode(&self) -> ::std::option::Option<&crate::types::ChannelLatencyMode> {
40        self.latency_mode.as_ref()
41    }
42    /// <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>
43    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ChannelType> {
44        self.r#type.as_ref()
45    }
46    /// <p>Whether the channel is private (enabled for playback authorization).</p>
47    pub fn authorized(&self) -> ::std::option::Option<bool> {
48        self.authorized
49    }
50    /// <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>
51    pub fn recording_configuration_arn(&self) -> ::std::option::Option<&str> {
52        self.recording_configuration_arn.as_deref()
53    }
54    /// <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
55    pub fn insecure_ingest(&self) -> ::std::option::Option<bool> {
56        self.insecure_ingest
57    }
58    /// <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>
59    pub fn preset(&self) -> ::std::option::Option<&crate::types::TranscodePreset> {
60        self.preset.as_ref()
61    }
62    /// <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>
63    pub fn playback_restriction_policy_arn(&self) -> ::std::option::Option<&str> {
64        self.playback_restriction_policy_arn.as_deref()
65    }
66    /// <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
67    pub fn multitrack_input_configuration(&self) -> ::std::option::Option<&crate::types::MultitrackInputConfiguration> {
68        self.multitrack_input_configuration.as_ref()
69    }
70    /// <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>
71    pub fn container_format(&self) -> ::std::option::Option<&crate::types::ContainerFormat> {
72        self.container_format.as_ref()
73    }
74}
75impl UpdateChannelInput {
76    /// Creates a new builder-style object to manufacture [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
77    pub fn builder() -> crate::operation::update_channel::builders::UpdateChannelInputBuilder {
78        crate::operation::update_channel::builders::UpdateChannelInputBuilder::default()
79    }
80}
81
82/// A builder for [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct UpdateChannelInputBuilder {
86    pub(crate) arn: ::std::option::Option<::std::string::String>,
87    pub(crate) name: ::std::option::Option<::std::string::String>,
88    pub(crate) latency_mode: ::std::option::Option<crate::types::ChannelLatencyMode>,
89    pub(crate) r#type: ::std::option::Option<crate::types::ChannelType>,
90    pub(crate) authorized: ::std::option::Option<bool>,
91    pub(crate) recording_configuration_arn: ::std::option::Option<::std::string::String>,
92    pub(crate) insecure_ingest: ::std::option::Option<bool>,
93    pub(crate) preset: ::std::option::Option<crate::types::TranscodePreset>,
94    pub(crate) playback_restriction_policy_arn: ::std::option::Option<::std::string::String>,
95    pub(crate) multitrack_input_configuration: ::std::option::Option<crate::types::MultitrackInputConfiguration>,
96    pub(crate) container_format: ::std::option::Option<crate::types::ContainerFormat>,
97}
98impl UpdateChannelInputBuilder {
99    /// <p>ARN of the channel to be updated.</p>
100    /// This field is required.
101    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.arn = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>ARN of the channel to be updated.</p>
106    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.arn = input;
108        self
109    }
110    /// <p>ARN of the channel to be updated.</p>
111    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
112        &self.arn
113    }
114    /// <p>Channel name.</p>
115    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.name = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>Channel name.</p>
120    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.name = input;
122        self
123    }
124    /// <p>Channel name.</p>
125    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
126        &self.name
127    }
128    /// <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>
129    pub fn latency_mode(mut self, input: crate::types::ChannelLatencyMode) -> Self {
130        self.latency_mode = ::std::option::Option::Some(input);
131        self
132    }
133    /// <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>
134    pub fn set_latency_mode(mut self, input: ::std::option::Option<crate::types::ChannelLatencyMode>) -> Self {
135        self.latency_mode = input;
136        self
137    }
138    /// <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>
139    pub fn get_latency_mode(&self) -> &::std::option::Option<crate::types::ChannelLatencyMode> {
140        &self.latency_mode
141    }
142    /// <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>
143    pub fn r#type(mut self, input: crate::types::ChannelType) -> Self {
144        self.r#type = ::std::option::Option::Some(input);
145        self
146    }
147    /// <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>
148    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ChannelType>) -> Self {
149        self.r#type = input;
150        self
151    }
152    /// <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>
153    pub fn get_type(&self) -> &::std::option::Option<crate::types::ChannelType> {
154        &self.r#type
155    }
156    /// <p>Whether the channel is private (enabled for playback authorization).</p>
157    pub fn authorized(mut self, input: bool) -> Self {
158        self.authorized = ::std::option::Option::Some(input);
159        self
160    }
161    /// <p>Whether the channel is private (enabled for playback authorization).</p>
162    pub fn set_authorized(mut self, input: ::std::option::Option<bool>) -> Self {
163        self.authorized = input;
164        self
165    }
166    /// <p>Whether the channel is private (enabled for playback authorization).</p>
167    pub fn get_authorized(&self) -> &::std::option::Option<bool> {
168        &self.authorized
169    }
170    /// <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>
171    pub fn recording_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172        self.recording_configuration_arn = ::std::option::Option::Some(input.into());
173        self
174    }
175    /// <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>
176    pub fn set_recording_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177        self.recording_configuration_arn = input;
178        self
179    }
180    /// <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>
181    pub fn get_recording_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
182        &self.recording_configuration_arn
183    }
184    /// <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
185    pub fn insecure_ingest(mut self, input: bool) -> Self {
186        self.insecure_ingest = ::std::option::Option::Some(input);
187        self
188    }
189    /// <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
190    pub fn set_insecure_ingest(mut self, input: ::std::option::Option<bool>) -> Self {
191        self.insecure_ingest = input;
192        self
193    }
194    /// <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
195    pub fn get_insecure_ingest(&self) -> &::std::option::Option<bool> {
196        &self.insecure_ingest
197    }
198    /// <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>
199    pub fn preset(mut self, input: crate::types::TranscodePreset) -> Self {
200        self.preset = ::std::option::Option::Some(input);
201        self
202    }
203    /// <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>
204    pub fn set_preset(mut self, input: ::std::option::Option<crate::types::TranscodePreset>) -> Self {
205        self.preset = input;
206        self
207    }
208    /// <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>
209    pub fn get_preset(&self) -> &::std::option::Option<crate::types::TranscodePreset> {
210        &self.preset
211    }
212    /// <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>
213    pub fn playback_restriction_policy_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214        self.playback_restriction_policy_arn = ::std::option::Option::Some(input.into());
215        self
216    }
217    /// <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>
218    pub fn set_playback_restriction_policy_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219        self.playback_restriction_policy_arn = input;
220        self
221    }
222    /// <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>
223    pub fn get_playback_restriction_policy_arn(&self) -> &::std::option::Option<::std::string::String> {
224        &self.playback_restriction_policy_arn
225    }
226    /// <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
227    pub fn multitrack_input_configuration(mut self, input: crate::types::MultitrackInputConfiguration) -> Self {
228        self.multitrack_input_configuration = ::std::option::Option::Some(input);
229        self
230    }
231    /// <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
232    pub fn set_multitrack_input_configuration(mut self, input: ::std::option::Option<crate::types::MultitrackInputConfiguration>) -> Self {
233        self.multitrack_input_configuration = input;
234        self
235    }
236    /// <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
237    pub fn get_multitrack_input_configuration(&self) -> &::std::option::Option<crate::types::MultitrackInputConfiguration> {
238        &self.multitrack_input_configuration
239    }
240    /// <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>
241    pub fn container_format(mut self, input: crate::types::ContainerFormat) -> Self {
242        self.container_format = ::std::option::Option::Some(input);
243        self
244    }
245    /// <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>
246    pub fn set_container_format(mut self, input: ::std::option::Option<crate::types::ContainerFormat>) -> Self {
247        self.container_format = input;
248        self
249    }
250    /// <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>
251    pub fn get_container_format(&self) -> &::std::option::Option<crate::types::ContainerFormat> {
252        &self.container_format
253    }
254    /// Consumes the builder and constructs a [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
255    pub fn build(
256        self,
257    ) -> ::std::result::Result<crate::operation::update_channel::UpdateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
258        ::std::result::Result::Ok(crate::operation::update_channel::UpdateChannelInput {
259            arn: self.arn,
260            name: self.name,
261            latency_mode: self.latency_mode,
262            r#type: self.r#type,
263            authorized: self.authorized,
264            recording_configuration_arn: self.recording_configuration_arn,
265            insecure_ingest: self.insecure_ingest,
266            preset: self.preset,
267            playback_restriction_policy_arn: self.playback_restriction_policy_arn,
268            multitrack_input_configuration: self.multitrack_input_configuration,
269            container_format: self.container_format,
270        })
271    }
272}