aws_sdk_medialive/operation/update_channel/
_update_channel_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// A request to update a channel.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateChannelInput {
7    /// Specification of CDI inputs for this channel
8    pub cdi_input_specification: ::std::option::Option<crate::types::CdiInputSpecification>,
9    /// channel ID
10    pub channel_id: ::std::option::Option<::std::string::String>,
11    /// A list of output destinations for this channel.
12    pub destinations: ::std::option::Option<::std::vec::Vec<crate::types::OutputDestination>>,
13    /// The encoder settings for this channel.
14    pub encoder_settings: ::std::option::Option<crate::types::EncoderSettings>,
15    /// Placeholder documentation for __listOfInputAttachment
16    pub input_attachments: ::std::option::Option<::std::vec::Vec<crate::types::InputAttachment>>,
17    /// Specification of network and file inputs for this channel
18    pub input_specification: ::std::option::Option<crate::types::InputSpecification>,
19    /// The log level to write to CloudWatch Logs.
20    pub log_level: ::std::option::Option<crate::types::LogLevel>,
21    /// Maintenance settings for this channel.
22    pub maintenance: ::std::option::Option<crate::types::MaintenanceUpdateSettings>,
23    /// The name of the channel.
24    pub name: ::std::option::Option<::std::string::String>,
25    /// 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.
26    pub role_arn: ::std::option::Option<::std::string::String>,
27    /// Channel engine version for this channel
28    pub channel_engine_version: ::std::option::Option<crate::types::ChannelEngineVersionRequest>,
29    /// Placeholder documentation for __boolean
30    pub dry_run: ::std::option::Option<bool>,
31    /// The Elemental Anywhere settings for this channel.
32    pub anywhere_settings: ::std::option::Option<crate::types::AnywhereSettings>,
33}
34impl UpdateChannelInput {
35    /// Specification of CDI inputs for this channel
36    pub fn cdi_input_specification(&self) -> ::std::option::Option<&crate::types::CdiInputSpecification> {
37        self.cdi_input_specification.as_ref()
38    }
39    /// channel ID
40    pub fn channel_id(&self) -> ::std::option::Option<&str> {
41        self.channel_id.as_deref()
42    }
43    /// A list of output destinations for this channel.
44    ///
45    /// 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()`.
46    pub fn destinations(&self) -> &[crate::types::OutputDestination] {
47        self.destinations.as_deref().unwrap_or_default()
48    }
49    /// The encoder settings for this channel.
50    pub fn encoder_settings(&self) -> ::std::option::Option<&crate::types::EncoderSettings> {
51        self.encoder_settings.as_ref()
52    }
53    /// Placeholder documentation for __listOfInputAttachment
54    ///
55    /// 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()`.
56    pub fn input_attachments(&self) -> &[crate::types::InputAttachment] {
57        self.input_attachments.as_deref().unwrap_or_default()
58    }
59    /// Specification of network and file inputs for this channel
60    pub fn input_specification(&self) -> ::std::option::Option<&crate::types::InputSpecification> {
61        self.input_specification.as_ref()
62    }
63    /// The log level to write to CloudWatch Logs.
64    pub fn log_level(&self) -> ::std::option::Option<&crate::types::LogLevel> {
65        self.log_level.as_ref()
66    }
67    /// Maintenance settings for this channel.
68    pub fn maintenance(&self) -> ::std::option::Option<&crate::types::MaintenanceUpdateSettings> {
69        self.maintenance.as_ref()
70    }
71    /// The name of the channel.
72    pub fn name(&self) -> ::std::option::Option<&str> {
73        self.name.as_deref()
74    }
75    /// 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.
76    pub fn role_arn(&self) -> ::std::option::Option<&str> {
77        self.role_arn.as_deref()
78    }
79    /// Channel engine version for this channel
80    pub fn channel_engine_version(&self) -> ::std::option::Option<&crate::types::ChannelEngineVersionRequest> {
81        self.channel_engine_version.as_ref()
82    }
83    /// Placeholder documentation for __boolean
84    pub fn dry_run(&self) -> ::std::option::Option<bool> {
85        self.dry_run
86    }
87    /// The Elemental Anywhere settings for this channel.
88    pub fn anywhere_settings(&self) -> ::std::option::Option<&crate::types::AnywhereSettings> {
89        self.anywhere_settings.as_ref()
90    }
91}
92impl UpdateChannelInput {
93    /// Creates a new builder-style object to manufacture [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
94    pub fn builder() -> crate::operation::update_channel::builders::UpdateChannelInputBuilder {
95        crate::operation::update_channel::builders::UpdateChannelInputBuilder::default()
96    }
97}
98
99/// A builder for [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
100#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
101#[non_exhaustive]
102pub struct UpdateChannelInputBuilder {
103    pub(crate) cdi_input_specification: ::std::option::Option<crate::types::CdiInputSpecification>,
104    pub(crate) channel_id: ::std::option::Option<::std::string::String>,
105    pub(crate) destinations: ::std::option::Option<::std::vec::Vec<crate::types::OutputDestination>>,
106    pub(crate) encoder_settings: ::std::option::Option<crate::types::EncoderSettings>,
107    pub(crate) input_attachments: ::std::option::Option<::std::vec::Vec<crate::types::InputAttachment>>,
108    pub(crate) input_specification: ::std::option::Option<crate::types::InputSpecification>,
109    pub(crate) log_level: ::std::option::Option<crate::types::LogLevel>,
110    pub(crate) maintenance: ::std::option::Option<crate::types::MaintenanceUpdateSettings>,
111    pub(crate) name: ::std::option::Option<::std::string::String>,
112    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
113    pub(crate) channel_engine_version: ::std::option::Option<crate::types::ChannelEngineVersionRequest>,
114    pub(crate) dry_run: ::std::option::Option<bool>,
115    pub(crate) anywhere_settings: ::std::option::Option<crate::types::AnywhereSettings>,
116}
117impl UpdateChannelInputBuilder {
118    /// Specification of CDI inputs for this channel
119    pub fn cdi_input_specification(mut self, input: crate::types::CdiInputSpecification) -> Self {
120        self.cdi_input_specification = ::std::option::Option::Some(input);
121        self
122    }
123    /// Specification of CDI inputs for this channel
124    pub fn set_cdi_input_specification(mut self, input: ::std::option::Option<crate::types::CdiInputSpecification>) -> Self {
125        self.cdi_input_specification = input;
126        self
127    }
128    /// Specification of CDI inputs for this channel
129    pub fn get_cdi_input_specification(&self) -> &::std::option::Option<crate::types::CdiInputSpecification> {
130        &self.cdi_input_specification
131    }
132    /// channel ID
133    /// This field is required.
134    pub fn channel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.channel_id = ::std::option::Option::Some(input.into());
136        self
137    }
138    /// channel ID
139    pub fn set_channel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.channel_id = input;
141        self
142    }
143    /// channel ID
144    pub fn get_channel_id(&self) -> &::std::option::Option<::std::string::String> {
145        &self.channel_id
146    }
147    /// Appends an item to `destinations`.
148    ///
149    /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
150    ///
151    /// A list of output destinations for this channel.
152    pub fn destinations(mut self, input: crate::types::OutputDestination) -> Self {
153        let mut v = self.destinations.unwrap_or_default();
154        v.push(input);
155        self.destinations = ::std::option::Option::Some(v);
156        self
157    }
158    /// A list of output destinations for this channel.
159    pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OutputDestination>>) -> Self {
160        self.destinations = input;
161        self
162    }
163    /// A list of output destinations for this channel.
164    pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OutputDestination>> {
165        &self.destinations
166    }
167    /// The encoder settings for this channel.
168    pub fn encoder_settings(mut self, input: crate::types::EncoderSettings) -> Self {
169        self.encoder_settings = ::std::option::Option::Some(input);
170        self
171    }
172    /// The encoder settings for this channel.
173    pub fn set_encoder_settings(mut self, input: ::std::option::Option<crate::types::EncoderSettings>) -> Self {
174        self.encoder_settings = input;
175        self
176    }
177    /// The encoder settings for this channel.
178    pub fn get_encoder_settings(&self) -> &::std::option::Option<crate::types::EncoderSettings> {
179        &self.encoder_settings
180    }
181    /// Appends an item to `input_attachments`.
182    ///
183    /// To override the contents of this collection use [`set_input_attachments`](Self::set_input_attachments).
184    ///
185    /// Placeholder documentation for __listOfInputAttachment
186    pub fn input_attachments(mut self, input: crate::types::InputAttachment) -> Self {
187        let mut v = self.input_attachments.unwrap_or_default();
188        v.push(input);
189        self.input_attachments = ::std::option::Option::Some(v);
190        self
191    }
192    /// Placeholder documentation for __listOfInputAttachment
193    pub fn set_input_attachments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InputAttachment>>) -> Self {
194        self.input_attachments = input;
195        self
196    }
197    /// Placeholder documentation for __listOfInputAttachment
198    pub fn get_input_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InputAttachment>> {
199        &self.input_attachments
200    }
201    /// Specification of network and file inputs for this channel
202    pub fn input_specification(mut self, input: crate::types::InputSpecification) -> Self {
203        self.input_specification = ::std::option::Option::Some(input);
204        self
205    }
206    /// Specification of network and file inputs for this channel
207    pub fn set_input_specification(mut self, input: ::std::option::Option<crate::types::InputSpecification>) -> Self {
208        self.input_specification = input;
209        self
210    }
211    /// Specification of network and file inputs for this channel
212    pub fn get_input_specification(&self) -> &::std::option::Option<crate::types::InputSpecification> {
213        &self.input_specification
214    }
215    /// The log level to write to CloudWatch Logs.
216    pub fn log_level(mut self, input: crate::types::LogLevel) -> Self {
217        self.log_level = ::std::option::Option::Some(input);
218        self
219    }
220    /// The log level to write to CloudWatch Logs.
221    pub fn set_log_level(mut self, input: ::std::option::Option<crate::types::LogLevel>) -> Self {
222        self.log_level = input;
223        self
224    }
225    /// The log level to write to CloudWatch Logs.
226    pub fn get_log_level(&self) -> &::std::option::Option<crate::types::LogLevel> {
227        &self.log_level
228    }
229    /// Maintenance settings for this channel.
230    pub fn maintenance(mut self, input: crate::types::MaintenanceUpdateSettings) -> Self {
231        self.maintenance = ::std::option::Option::Some(input);
232        self
233    }
234    /// Maintenance settings for this channel.
235    pub fn set_maintenance(mut self, input: ::std::option::Option<crate::types::MaintenanceUpdateSettings>) -> Self {
236        self.maintenance = input;
237        self
238    }
239    /// Maintenance settings for this channel.
240    pub fn get_maintenance(&self) -> &::std::option::Option<crate::types::MaintenanceUpdateSettings> {
241        &self.maintenance
242    }
243    /// The name of the channel.
244    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
245        self.name = ::std::option::Option::Some(input.into());
246        self
247    }
248    /// The name of the channel.
249    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
250        self.name = input;
251        self
252    }
253    /// The name of the channel.
254    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
255        &self.name
256    }
257    /// 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.
258    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
259        self.role_arn = ::std::option::Option::Some(input.into());
260        self
261    }
262    /// 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.
263    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
264        self.role_arn = input;
265        self
266    }
267    /// 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.
268    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
269        &self.role_arn
270    }
271    /// Channel engine version for this channel
272    pub fn channel_engine_version(mut self, input: crate::types::ChannelEngineVersionRequest) -> Self {
273        self.channel_engine_version = ::std::option::Option::Some(input);
274        self
275    }
276    /// Channel engine version for this channel
277    pub fn set_channel_engine_version(mut self, input: ::std::option::Option<crate::types::ChannelEngineVersionRequest>) -> Self {
278        self.channel_engine_version = input;
279        self
280    }
281    /// Channel engine version for this channel
282    pub fn get_channel_engine_version(&self) -> &::std::option::Option<crate::types::ChannelEngineVersionRequest> {
283        &self.channel_engine_version
284    }
285    /// Placeholder documentation for __boolean
286    pub fn dry_run(mut self, input: bool) -> Self {
287        self.dry_run = ::std::option::Option::Some(input);
288        self
289    }
290    /// Placeholder documentation for __boolean
291    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
292        self.dry_run = input;
293        self
294    }
295    /// Placeholder documentation for __boolean
296    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
297        &self.dry_run
298    }
299    /// The Elemental Anywhere settings for this channel.
300    pub fn anywhere_settings(mut self, input: crate::types::AnywhereSettings) -> Self {
301        self.anywhere_settings = ::std::option::Option::Some(input);
302        self
303    }
304    /// The Elemental Anywhere settings for this channel.
305    pub fn set_anywhere_settings(mut self, input: ::std::option::Option<crate::types::AnywhereSettings>) -> Self {
306        self.anywhere_settings = input;
307        self
308    }
309    /// The Elemental Anywhere settings for this channel.
310    pub fn get_anywhere_settings(&self) -> &::std::option::Option<crate::types::AnywhereSettings> {
311        &self.anywhere_settings
312    }
313    /// Consumes the builder and constructs a [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
314    pub fn build(
315        self,
316    ) -> ::std::result::Result<crate::operation::update_channel::UpdateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
317        ::std::result::Result::Ok(crate::operation::update_channel::UpdateChannelInput {
318            cdi_input_specification: self.cdi_input_specification,
319            channel_id: self.channel_id,
320            destinations: self.destinations,
321            encoder_settings: self.encoder_settings,
322            input_attachments: self.input_attachments,
323            input_specification: self.input_specification,
324            log_level: self.log_level,
325            maintenance: self.maintenance,
326            name: self.name,
327            role_arn: self.role_arn,
328            channel_engine_version: self.channel_engine_version,
329            dry_run: self.dry_run,
330            anywhere_settings: self.anywhere_settings,
331        })
332    }
333}