aws_sdk_medialive/operation/start_multiplex/
_start_multiplex_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Placeholder documentation for StartMultiplexResponse
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StartMultiplexOutput {
7    /// The unique arn of the multiplex.
8    pub arn: ::std::option::Option<::std::string::String>,
9    /// A list of availability zones for the multiplex.
10    pub availability_zones: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
11    /// A list of the multiplex output destinations.
12    pub destinations: ::std::option::Option<::std::vec::Vec<crate::types::MultiplexOutputDestination>>,
13    /// The unique id of the multiplex.
14    pub id: ::std::option::Option<::std::string::String>,
15    /// Configuration for a multiplex event.
16    pub multiplex_settings: ::std::option::Option<crate::types::MultiplexSettings>,
17    /// The name of the multiplex.
18    pub name: ::std::option::Option<::std::string::String>,
19    /// The number of currently healthy pipelines.
20    pub pipelines_running_count: ::std::option::Option<i32>,
21    /// The number of programs in the multiplex.
22    pub program_count: ::std::option::Option<i32>,
23    /// The current state of the multiplex.
24    pub state: ::std::option::Option<crate::types::MultiplexState>,
25    /// A collection of key-value pairs.
26    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
27    _request_id: Option<String>,
28}
29impl StartMultiplexOutput {
30    /// The unique arn of the multiplex.
31    pub fn arn(&self) -> ::std::option::Option<&str> {
32        self.arn.as_deref()
33    }
34    /// A list of availability zones for the multiplex.
35    ///
36    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.availability_zones.is_none()`.
37    pub fn availability_zones(&self) -> &[::std::string::String] {
38        self.availability_zones.as_deref().unwrap_or_default()
39    }
40    /// A list of the multiplex output destinations.
41    ///
42    /// 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()`.
43    pub fn destinations(&self) -> &[crate::types::MultiplexOutputDestination] {
44        self.destinations.as_deref().unwrap_or_default()
45    }
46    /// The unique id of the multiplex.
47    pub fn id(&self) -> ::std::option::Option<&str> {
48        self.id.as_deref()
49    }
50    /// Configuration for a multiplex event.
51    pub fn multiplex_settings(&self) -> ::std::option::Option<&crate::types::MultiplexSettings> {
52        self.multiplex_settings.as_ref()
53    }
54    /// The name of the multiplex.
55    pub fn name(&self) -> ::std::option::Option<&str> {
56        self.name.as_deref()
57    }
58    /// The number of currently healthy pipelines.
59    pub fn pipelines_running_count(&self) -> ::std::option::Option<i32> {
60        self.pipelines_running_count
61    }
62    /// The number of programs in the multiplex.
63    pub fn program_count(&self) -> ::std::option::Option<i32> {
64        self.program_count
65    }
66    /// The current state of the multiplex.
67    pub fn state(&self) -> ::std::option::Option<&crate::types::MultiplexState> {
68        self.state.as_ref()
69    }
70    /// A collection of key-value pairs.
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 ::aws_types::request_id::RequestId for StartMultiplexOutput {
76    fn request_id(&self) -> Option<&str> {
77        self._request_id.as_deref()
78    }
79}
80impl StartMultiplexOutput {
81    /// Creates a new builder-style object to manufacture [`StartMultiplexOutput`](crate::operation::start_multiplex::StartMultiplexOutput).
82    pub fn builder() -> crate::operation::start_multiplex::builders::StartMultiplexOutputBuilder {
83        crate::operation::start_multiplex::builders::StartMultiplexOutputBuilder::default()
84    }
85}
86
87/// A builder for [`StartMultiplexOutput`](crate::operation::start_multiplex::StartMultiplexOutput).
88#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
89#[non_exhaustive]
90pub struct StartMultiplexOutputBuilder {
91    pub(crate) arn: ::std::option::Option<::std::string::String>,
92    pub(crate) availability_zones: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
93    pub(crate) destinations: ::std::option::Option<::std::vec::Vec<crate::types::MultiplexOutputDestination>>,
94    pub(crate) id: ::std::option::Option<::std::string::String>,
95    pub(crate) multiplex_settings: ::std::option::Option<crate::types::MultiplexSettings>,
96    pub(crate) name: ::std::option::Option<::std::string::String>,
97    pub(crate) pipelines_running_count: ::std::option::Option<i32>,
98    pub(crate) program_count: ::std::option::Option<i32>,
99    pub(crate) state: ::std::option::Option<crate::types::MultiplexState>,
100    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
101    _request_id: Option<String>,
102}
103impl StartMultiplexOutputBuilder {
104    /// The unique arn of the multiplex.
105    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106        self.arn = ::std::option::Option::Some(input.into());
107        self
108    }
109    /// The unique arn of the multiplex.
110    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111        self.arn = input;
112        self
113    }
114    /// The unique arn of the multiplex.
115    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
116        &self.arn
117    }
118    /// Appends an item to `availability_zones`.
119    ///
120    /// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
121    ///
122    /// A list of availability zones for the multiplex.
123    pub fn availability_zones(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        let mut v = self.availability_zones.unwrap_or_default();
125        v.push(input.into());
126        self.availability_zones = ::std::option::Option::Some(v);
127        self
128    }
129    /// A list of availability zones for the multiplex.
130    pub fn set_availability_zones(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
131        self.availability_zones = input;
132        self
133    }
134    /// A list of availability zones for the multiplex.
135    pub fn get_availability_zones(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
136        &self.availability_zones
137    }
138    /// Appends an item to `destinations`.
139    ///
140    /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
141    ///
142    /// A list of the multiplex output destinations.
143    pub fn destinations(mut self, input: crate::types::MultiplexOutputDestination) -> Self {
144        let mut v = self.destinations.unwrap_or_default();
145        v.push(input);
146        self.destinations = ::std::option::Option::Some(v);
147        self
148    }
149    /// A list of the multiplex output destinations.
150    pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MultiplexOutputDestination>>) -> Self {
151        self.destinations = input;
152        self
153    }
154    /// A list of the multiplex output destinations.
155    pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MultiplexOutputDestination>> {
156        &self.destinations
157    }
158    /// The unique id of the multiplex.
159    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.id = ::std::option::Option::Some(input.into());
161        self
162    }
163    /// The unique id of the multiplex.
164    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.id = input;
166        self
167    }
168    /// The unique id of the multiplex.
169    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
170        &self.id
171    }
172    /// Configuration for a multiplex event.
173    pub fn multiplex_settings(mut self, input: crate::types::MultiplexSettings) -> Self {
174        self.multiplex_settings = ::std::option::Option::Some(input);
175        self
176    }
177    /// Configuration for a multiplex event.
178    pub fn set_multiplex_settings(mut self, input: ::std::option::Option<crate::types::MultiplexSettings>) -> Self {
179        self.multiplex_settings = input;
180        self
181    }
182    /// Configuration for a multiplex event.
183    pub fn get_multiplex_settings(&self) -> &::std::option::Option<crate::types::MultiplexSettings> {
184        &self.multiplex_settings
185    }
186    /// The name of the multiplex.
187    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188        self.name = ::std::option::Option::Some(input.into());
189        self
190    }
191    /// The name of the multiplex.
192    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.name = input;
194        self
195    }
196    /// The name of the multiplex.
197    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
198        &self.name
199    }
200    /// The number of currently healthy pipelines.
201    pub fn pipelines_running_count(mut self, input: i32) -> Self {
202        self.pipelines_running_count = ::std::option::Option::Some(input);
203        self
204    }
205    /// The number of currently healthy pipelines.
206    pub fn set_pipelines_running_count(mut self, input: ::std::option::Option<i32>) -> Self {
207        self.pipelines_running_count = input;
208        self
209    }
210    /// The number of currently healthy pipelines.
211    pub fn get_pipelines_running_count(&self) -> &::std::option::Option<i32> {
212        &self.pipelines_running_count
213    }
214    /// The number of programs in the multiplex.
215    pub fn program_count(mut self, input: i32) -> Self {
216        self.program_count = ::std::option::Option::Some(input);
217        self
218    }
219    /// The number of programs in the multiplex.
220    pub fn set_program_count(mut self, input: ::std::option::Option<i32>) -> Self {
221        self.program_count = input;
222        self
223    }
224    /// The number of programs in the multiplex.
225    pub fn get_program_count(&self) -> &::std::option::Option<i32> {
226        &self.program_count
227    }
228    /// The current state of the multiplex.
229    pub fn state(mut self, input: crate::types::MultiplexState) -> Self {
230        self.state = ::std::option::Option::Some(input);
231        self
232    }
233    /// The current state of the multiplex.
234    pub fn set_state(mut self, input: ::std::option::Option<crate::types::MultiplexState>) -> Self {
235        self.state = input;
236        self
237    }
238    /// The current state of the multiplex.
239    pub fn get_state(&self) -> &::std::option::Option<crate::types::MultiplexState> {
240        &self.state
241    }
242    /// Adds a key-value pair to `tags`.
243    ///
244    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
245    ///
246    /// A collection of key-value pairs.
247    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
248        let mut hash_map = self.tags.unwrap_or_default();
249        hash_map.insert(k.into(), v.into());
250        self.tags = ::std::option::Option::Some(hash_map);
251        self
252    }
253    /// A collection of key-value pairs.
254    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
255        self.tags = input;
256        self
257    }
258    /// A collection of key-value pairs.
259    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
260        &self.tags
261    }
262    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
263        self._request_id = Some(request_id.into());
264        self
265    }
266
267    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
268        self._request_id = request_id;
269        self
270    }
271    /// Consumes the builder and constructs a [`StartMultiplexOutput`](crate::operation::start_multiplex::StartMultiplexOutput).
272    pub fn build(self) -> crate::operation::start_multiplex::StartMultiplexOutput {
273        crate::operation::start_multiplex::StartMultiplexOutput {
274            arn: self.arn,
275            availability_zones: self.availability_zones,
276            destinations: self.destinations,
277            id: self.id,
278            multiplex_settings: self.multiplex_settings,
279            name: self.name,
280            pipelines_running_count: self.pipelines_running_count,
281            program_count: self.program_count,
282            state: self.state,
283            tags: self.tags,
284            _request_id: self._request_id,
285        }
286    }
287}