aws_sdk_ivsrealtime/operation/start_composition/
_start_composition_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 StartCompositionInput {
6    /// <p>ARN of the stage to be used for compositing.</p>
7    pub stage_arn: ::std::option::Option<::std::string::String>,
8    /// <p>Idempotency token.</p>
9    pub idempotency_token: ::std::option::Option<::std::string::String>,
10    /// <p>Layout object to configure composition parameters.</p>
11    pub layout: ::std::option::Option<crate::types::LayoutConfiguration>,
12    /// <p>Array of destination configuration.</p>
13    pub destinations: ::std::option::Option<::std::vec::Vec<crate::types::DestinationConfiguration>>,
14    /// <p>Tags attached to the resource. Array of maps, each of the form <code>string:string (key:value)</code>. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging AWS Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.</p>
15    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
16}
17impl StartCompositionInput {
18    /// <p>ARN of the stage to be used for compositing.</p>
19    pub fn stage_arn(&self) -> ::std::option::Option<&str> {
20        self.stage_arn.as_deref()
21    }
22    /// <p>Idempotency token.</p>
23    pub fn idempotency_token(&self) -> ::std::option::Option<&str> {
24        self.idempotency_token.as_deref()
25    }
26    /// <p>Layout object to configure composition parameters.</p>
27    pub fn layout(&self) -> ::std::option::Option<&crate::types::LayoutConfiguration> {
28        self.layout.as_ref()
29    }
30    /// <p>Array of destination configuration.</p>
31    ///
32    /// 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()`.
33    pub fn destinations(&self) -> &[crate::types::DestinationConfiguration] {
34        self.destinations.as_deref().unwrap_or_default()
35    }
36    /// <p>Tags attached to the resource. Array of maps, each of the form <code>string:string (key:value)</code>. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging AWS Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.</p>
37    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
38        self.tags.as_ref()
39    }
40}
41impl StartCompositionInput {
42    /// Creates a new builder-style object to manufacture [`StartCompositionInput`](crate::operation::start_composition::StartCompositionInput).
43    pub fn builder() -> crate::operation::start_composition::builders::StartCompositionInputBuilder {
44        crate::operation::start_composition::builders::StartCompositionInputBuilder::default()
45    }
46}
47
48/// A builder for [`StartCompositionInput`](crate::operation::start_composition::StartCompositionInput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct StartCompositionInputBuilder {
52    pub(crate) stage_arn: ::std::option::Option<::std::string::String>,
53    pub(crate) idempotency_token: ::std::option::Option<::std::string::String>,
54    pub(crate) layout: ::std::option::Option<crate::types::LayoutConfiguration>,
55    pub(crate) destinations: ::std::option::Option<::std::vec::Vec<crate::types::DestinationConfiguration>>,
56    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
57}
58impl StartCompositionInputBuilder {
59    /// <p>ARN of the stage to be used for compositing.</p>
60    /// This field is required.
61    pub fn stage_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.stage_arn = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>ARN of the stage to be used for compositing.</p>
66    pub fn set_stage_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.stage_arn = input;
68        self
69    }
70    /// <p>ARN of the stage to be used for compositing.</p>
71    pub fn get_stage_arn(&self) -> &::std::option::Option<::std::string::String> {
72        &self.stage_arn
73    }
74    /// <p>Idempotency token.</p>
75    pub fn idempotency_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.idempotency_token = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>Idempotency token.</p>
80    pub fn set_idempotency_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.idempotency_token = input;
82        self
83    }
84    /// <p>Idempotency token.</p>
85    pub fn get_idempotency_token(&self) -> &::std::option::Option<::std::string::String> {
86        &self.idempotency_token
87    }
88    /// <p>Layout object to configure composition parameters.</p>
89    pub fn layout(mut self, input: crate::types::LayoutConfiguration) -> Self {
90        self.layout = ::std::option::Option::Some(input);
91        self
92    }
93    /// <p>Layout object to configure composition parameters.</p>
94    pub fn set_layout(mut self, input: ::std::option::Option<crate::types::LayoutConfiguration>) -> Self {
95        self.layout = input;
96        self
97    }
98    /// <p>Layout object to configure composition parameters.</p>
99    pub fn get_layout(&self) -> &::std::option::Option<crate::types::LayoutConfiguration> {
100        &self.layout
101    }
102    /// Appends an item to `destinations`.
103    ///
104    /// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
105    ///
106    /// <p>Array of destination configuration.</p>
107    pub fn destinations(mut self, input: crate::types::DestinationConfiguration) -> Self {
108        let mut v = self.destinations.unwrap_or_default();
109        v.push(input);
110        self.destinations = ::std::option::Option::Some(v);
111        self
112    }
113    /// <p>Array of destination configuration.</p>
114    pub fn set_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DestinationConfiguration>>) -> Self {
115        self.destinations = input;
116        self
117    }
118    /// <p>Array of destination configuration.</p>
119    pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DestinationConfiguration>> {
120        &self.destinations
121    }
122    /// Adds a key-value pair to `tags`.
123    ///
124    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
125    ///
126    /// <p>Tags attached to the resource. Array of maps, each of the form <code>string:string (key:value)</code>. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging AWS Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.</p>
127    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
128        let mut hash_map = self.tags.unwrap_or_default();
129        hash_map.insert(k.into(), v.into());
130        self.tags = ::std::option::Option::Some(hash_map);
131        self
132    }
133    /// <p>Tags attached to the resource. Array of maps, each of the form <code>string:string (key:value)</code>. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging AWS Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.</p>
134    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
135        self.tags = input;
136        self
137    }
138    /// <p>Tags attached to the resource. Array of maps, each of the form <code>string:string (key:value)</code>. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging AWS Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.</p>
139    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
140        &self.tags
141    }
142    /// Consumes the builder and constructs a [`StartCompositionInput`](crate::operation::start_composition::StartCompositionInput).
143    pub fn build(
144        self,
145    ) -> ::std::result::Result<crate::operation::start_composition::StartCompositionInput, ::aws_smithy_types::error::operation::BuildError> {
146        ::std::result::Result::Ok(crate::operation::start_composition::StartCompositionInput {
147            stage_arn: self.stage_arn,
148            idempotency_token: self.idempotency_token,
149            layout: self.layout,
150            destinations: self.destinations,
151            tags: self.tags,
152        })
153    }
154}