aws_sdk_mediapackagev2/operation/create_channel/
_create_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 CreateChannelInput {
6    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
7    pub channel_group_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group. You can't change the name after you create the channel.</p>
9    pub channel_name: ::std::option::Option<::std::string::String>,
10    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
11    pub client_token: ::std::option::Option<::std::string::String>,
12    /// <p>The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.</p>
13    /// <p>The allowed values are:</p>
14    /// <ul>
15    /// <li>
16    /// <p><code>HLS</code> - The HLS streaming specification (which defines M3U8 manifests and TS segments).</p></li>
17    /// <li>
18    /// <p><code>CMAF</code> - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).</p></li>
19    /// </ul>
20    pub input_type: ::std::option::Option<crate::types::InputType>,
21    /// <p>Enter any descriptive text that helps you to identify the channel.</p>
22    pub description: ::std::option::Option<::std::string::String>,
23    /// <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
24    pub input_switch_configuration: ::std::option::Option<crate::types::InputSwitchConfiguration>,
25    /// <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
26    pub output_header_configuration: ::std::option::Option<crate::types::OutputHeaderConfiguration>,
27    /// <p>A comma-separated list of tag key:value pairs that you define. For example:</p>
28    /// <p><code>"Key1": "Value1",</code></p>
29    /// <p><code>"Key2": "Value2"</code></p>
30    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
31}
32impl CreateChannelInput {
33    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
34    pub fn channel_group_name(&self) -> ::std::option::Option<&str> {
35        self.channel_group_name.as_deref()
36    }
37    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group. You can't change the name after you create the channel.</p>
38    pub fn channel_name(&self) -> ::std::option::Option<&str> {
39        self.channel_name.as_deref()
40    }
41    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
42    pub fn client_token(&self) -> ::std::option::Option<&str> {
43        self.client_token.as_deref()
44    }
45    /// <p>The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.</p>
46    /// <p>The allowed values are:</p>
47    /// <ul>
48    /// <li>
49    /// <p><code>HLS</code> - The HLS streaming specification (which defines M3U8 manifests and TS segments).</p></li>
50    /// <li>
51    /// <p><code>CMAF</code> - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).</p></li>
52    /// </ul>
53    pub fn input_type(&self) -> ::std::option::Option<&crate::types::InputType> {
54        self.input_type.as_ref()
55    }
56    /// <p>Enter any descriptive text that helps you to identify the channel.</p>
57    pub fn description(&self) -> ::std::option::Option<&str> {
58        self.description.as_deref()
59    }
60    /// <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
61    pub fn input_switch_configuration(&self) -> ::std::option::Option<&crate::types::InputSwitchConfiguration> {
62        self.input_switch_configuration.as_ref()
63    }
64    /// <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
65    pub fn output_header_configuration(&self) -> ::std::option::Option<&crate::types::OutputHeaderConfiguration> {
66        self.output_header_configuration.as_ref()
67    }
68    /// <p>A comma-separated list of tag key:value pairs that you define. For example:</p>
69    /// <p><code>"Key1": "Value1",</code></p>
70    /// <p><code>"Key2": "Value2"</code></p>
71    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
72        self.tags.as_ref()
73    }
74}
75impl CreateChannelInput {
76    /// Creates a new builder-style object to manufacture [`CreateChannelInput`](crate::operation::create_channel::CreateChannelInput).
77    pub fn builder() -> crate::operation::create_channel::builders::CreateChannelInputBuilder {
78        crate::operation::create_channel::builders::CreateChannelInputBuilder::default()
79    }
80}
81
82/// A builder for [`CreateChannelInput`](crate::operation::create_channel::CreateChannelInput).
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct CreateChannelInputBuilder {
86    pub(crate) channel_group_name: ::std::option::Option<::std::string::String>,
87    pub(crate) channel_name: ::std::option::Option<::std::string::String>,
88    pub(crate) client_token: ::std::option::Option<::std::string::String>,
89    pub(crate) input_type: ::std::option::Option<crate::types::InputType>,
90    pub(crate) description: ::std::option::Option<::std::string::String>,
91    pub(crate) input_switch_configuration: ::std::option::Option<crate::types::InputSwitchConfiguration>,
92    pub(crate) output_header_configuration: ::std::option::Option<crate::types::OutputHeaderConfiguration>,
93    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
94}
95impl CreateChannelInputBuilder {
96    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
97    /// This field is required.
98    pub fn channel_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99        self.channel_group_name = ::std::option::Option::Some(input.into());
100        self
101    }
102    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
103    pub fn set_channel_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.channel_group_name = input;
105        self
106    }
107    /// <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
108    pub fn get_channel_group_name(&self) -> &::std::option::Option<::std::string::String> {
109        &self.channel_group_name
110    }
111    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group. You can't change the name after you create the channel.</p>
112    /// This field is required.
113    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.channel_name = ::std::option::Option::Some(input.into());
115        self
116    }
117    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group. You can't change the name after you create the channel.</p>
118    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.channel_name = input;
120        self
121    }
122    /// <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group. You can't change the name after you create the channel.</p>
123    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
124        &self.channel_name
125    }
126    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
127    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.client_token = ::std::option::Option::Some(input.into());
129        self
130    }
131    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
132    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.client_token = input;
134        self
135    }
136    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
137    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
138        &self.client_token
139    }
140    /// <p>The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.</p>
141    /// <p>The allowed values are:</p>
142    /// <ul>
143    /// <li>
144    /// <p><code>HLS</code> - The HLS streaming specification (which defines M3U8 manifests and TS segments).</p></li>
145    /// <li>
146    /// <p><code>CMAF</code> - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).</p></li>
147    /// </ul>
148    pub fn input_type(mut self, input: crate::types::InputType) -> Self {
149        self.input_type = ::std::option::Option::Some(input);
150        self
151    }
152    /// <p>The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.</p>
153    /// <p>The allowed values are:</p>
154    /// <ul>
155    /// <li>
156    /// <p><code>HLS</code> - The HLS streaming specification (which defines M3U8 manifests and TS segments).</p></li>
157    /// <li>
158    /// <p><code>CMAF</code> - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).</p></li>
159    /// </ul>
160    pub fn set_input_type(mut self, input: ::std::option::Option<crate::types::InputType>) -> Self {
161        self.input_type = input;
162        self
163    }
164    /// <p>The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior.</p>
165    /// <p>The allowed values are:</p>
166    /// <ul>
167    /// <li>
168    /// <p><code>HLS</code> - The HLS streaming specification (which defines M3U8 manifests and TS segments).</p></li>
169    /// <li>
170    /// <p><code>CMAF</code> - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests).</p></li>
171    /// </ul>
172    pub fn get_input_type(&self) -> &::std::option::Option<crate::types::InputType> {
173        &self.input_type
174    }
175    /// <p>Enter any descriptive text that helps you to identify the channel.</p>
176    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.description = ::std::option::Option::Some(input.into());
178        self
179    }
180    /// <p>Enter any descriptive text that helps you to identify the channel.</p>
181    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.description = input;
183        self
184    }
185    /// <p>Enter any descriptive text that helps you to identify the channel.</p>
186    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
187        &self.description
188    }
189    /// <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
190    pub fn input_switch_configuration(mut self, input: crate::types::InputSwitchConfiguration) -> Self {
191        self.input_switch_configuration = ::std::option::Option::Some(input);
192        self
193    }
194    /// <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
195    pub fn set_input_switch_configuration(mut self, input: ::std::option::Option<crate::types::InputSwitchConfiguration>) -> Self {
196        self.input_switch_configuration = input;
197        self
198    }
199    /// <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
200    pub fn get_input_switch_configuration(&self) -> &::std::option::Option<crate::types::InputSwitchConfiguration> {
201        &self.input_switch_configuration
202    }
203    /// <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
204    pub fn output_header_configuration(mut self, input: crate::types::OutputHeaderConfiguration) -> Self {
205        self.output_header_configuration = ::std::option::Option::Some(input);
206        self
207    }
208    /// <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
209    pub fn set_output_header_configuration(mut self, input: ::std::option::Option<crate::types::OutputHeaderConfiguration>) -> Self {
210        self.output_header_configuration = input;
211        self
212    }
213    /// <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
214    pub fn get_output_header_configuration(&self) -> &::std::option::Option<crate::types::OutputHeaderConfiguration> {
215        &self.output_header_configuration
216    }
217    /// Adds a key-value pair to `tags`.
218    ///
219    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
220    ///
221    /// <p>A comma-separated list of tag key:value pairs that you define. For example:</p>
222    /// <p><code>"Key1": "Value1",</code></p>
223    /// <p><code>"Key2": "Value2"</code></p>
224    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
225        let mut hash_map = self.tags.unwrap_or_default();
226        hash_map.insert(k.into(), v.into());
227        self.tags = ::std::option::Option::Some(hash_map);
228        self
229    }
230    /// <p>A comma-separated list of tag key:value pairs that you define. For example:</p>
231    /// <p><code>"Key1": "Value1",</code></p>
232    /// <p><code>"Key2": "Value2"</code></p>
233    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
234        self.tags = input;
235        self
236    }
237    /// <p>A comma-separated list of tag key:value pairs that you define. For example:</p>
238    /// <p><code>"Key1": "Value1",</code></p>
239    /// <p><code>"Key2": "Value2"</code></p>
240    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
241        &self.tags
242    }
243    /// Consumes the builder and constructs a [`CreateChannelInput`](crate::operation::create_channel::CreateChannelInput).
244    pub fn build(
245        self,
246    ) -> ::std::result::Result<crate::operation::create_channel::CreateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
247        ::std::result::Result::Ok(crate::operation::create_channel::CreateChannelInput {
248            channel_group_name: self.channel_group_name,
249            channel_name: self.channel_name,
250            client_token: self.client_token,
251            input_type: self.input_type,
252            description: self.description,
253            input_switch_configuration: self.input_switch_configuration,
254            output_header_configuration: self.output_header_configuration,
255            tags: self.tags,
256        })
257    }
258}