1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_stack::_create_stack_output::CreateStackOutputBuilder;
34pub use crate::operation::create_stack::_create_stack_input::CreateStackInputBuilder;
56impl crate::operation::create_stack::builders::CreateStackInputBuilder {
7/// Sends a request with this input using the given client.
8pub async fn send_with(
9self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12crate::operation::create_stack::CreateStackOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14crate::operation::create_stack::CreateStackError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18let mut fluent_builder = client.create_stack();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21}
22}
23/// Fluent builder constructing a request to `CreateStack`.
24///
25/// <p>Creates a stack to start streaming applications to users. A stack consists of an associated fleet, user access policies, and storage configurations.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateStackFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_stack::builders::CreateStackInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33crate::client::customize::internal::CustomizableSend<
34crate::operation::create_stack::CreateStackOutput,
35crate::operation::create_stack::CreateStackError,
36 > for CreateStackFluentBuilder
37{
38fn send(
39self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42crate::client::customize::internal::SendResult<
43crate::operation::create_stack::CreateStackOutput,
44crate::operation::create_stack::CreateStackError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateStackFluentBuilder {
51/// Creates a new `CreateStackFluentBuilder`.
52pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59/// Access the CreateStack as a reference.
60pub fn as_input(&self) -> &crate::operation::create_stack::builders::CreateStackInputBuilder {
61&self.inner
62 }
63/// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71pub async fn send(
72self,
73 ) -> ::std::result::Result<
74crate::operation::create_stack::CreateStackOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76crate::operation::create_stack::CreateStackError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80let input = self
81.inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84let runtime_plugins = crate::operation::create_stack::CreateStack::operation_runtime_plugins(
85self.handle.runtime_plugins.clone(),
86&self.handle.conf,
87self.config_override,
88 );
89crate::operation::create_stack::CreateStack::orchestrate(&runtime_plugins, input).await
90}
9192/// Consumes this builder, creating a customizable operation that can be modified before being sent.
93pub fn customize(
94self,
95 ) -> crate::client::customize::CustomizableOperation<
96crate::operation::create_stack::CreateStackOutput,
97crate::operation::create_stack::CreateStackError,
98Self,
99 > {
100crate::client::customize::CustomizableOperation::new(self)
101 }
102pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103self.set_config_override(::std::option::Option::Some(config_override.into()));
104self
105}
106107pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108self.config_override = config_override;
109self
110}
111/// <p>The name of the stack.</p>
112pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113self.inner = self.inner.name(input.into());
114self
115}
116/// <p>The name of the stack.</p>
117pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118self.inner = self.inner.set_name(input);
119self
120}
121/// <p>The name of the stack.</p>
122pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
123self.inner.get_name()
124 }
125/// <p>The description to display.</p>
126pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127self.inner = self.inner.description(input.into());
128self
129}
130/// <p>The description to display.</p>
131pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132self.inner = self.inner.set_description(input);
133self
134}
135/// <p>The description to display.</p>
136pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
137self.inner.get_description()
138 }
139/// <p>The stack name to display.</p>
140pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141self.inner = self.inner.display_name(input.into());
142self
143}
144/// <p>The stack name to display.</p>
145pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146self.inner = self.inner.set_display_name(input);
147self
148}
149/// <p>The stack name to display.</p>
150pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
151self.inner.get_display_name()
152 }
153///
154 /// Appends an item to `StorageConnectors`.
155 ///
156 /// To override the contents of this collection use [`set_storage_connectors`](Self::set_storage_connectors).
157 ///
158 /// <p>The storage connectors to enable.</p>
159pub fn storage_connectors(mut self, input: crate::types::StorageConnector) -> Self {
160self.inner = self.inner.storage_connectors(input);
161self
162}
163/// <p>The storage connectors to enable.</p>
164pub fn set_storage_connectors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>>) -> Self {
165self.inner = self.inner.set_storage_connectors(input);
166self
167}
168/// <p>The storage connectors to enable.</p>
169pub fn get_storage_connectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StorageConnector>> {
170self.inner.get_storage_connectors()
171 }
172/// <p>The URL that users are redirected to after their streaming session ends.</p>
173pub fn redirect_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174self.inner = self.inner.redirect_url(input.into());
175self
176}
177/// <p>The URL that users are redirected to after their streaming session ends.</p>
178pub fn set_redirect_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179self.inner = self.inner.set_redirect_url(input);
180self
181}
182/// <p>The URL that users are redirected to after their streaming session ends.</p>
183pub fn get_redirect_url(&self) -> &::std::option::Option<::std::string::String> {
184self.inner.get_redirect_url()
185 }
186/// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
187pub fn feedback_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188self.inner = self.inner.feedback_url(input.into());
189self
190}
191/// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
192pub fn set_feedback_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193self.inner = self.inner.set_feedback_url(input);
194self
195}
196/// <p>The URL that users are redirected to after they click the Send Feedback link. If no URL is specified, no Send Feedback link is displayed.</p>
197pub fn get_feedback_url(&self) -> &::std::option::Option<::std::string::String> {
198self.inner.get_feedback_url()
199 }
200///
201 /// Appends an item to `UserSettings`.
202 ///
203 /// To override the contents of this collection use [`set_user_settings`](Self::set_user_settings).
204 ///
205 /// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
206pub fn user_settings(mut self, input: crate::types::UserSetting) -> Self {
207self.inner = self.inner.user_settings(input);
208self
209}
210/// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
211pub fn set_user_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UserSetting>>) -> Self {
212self.inner = self.inner.set_user_settings(input);
213self
214}
215/// <p>The actions that are enabled or disabled for users during their streaming sessions. By default, these actions are enabled.</p>
216pub fn get_user_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UserSetting>> {
217self.inner.get_user_settings()
218 }
219/// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
220pub fn application_settings(mut self, input: crate::types::ApplicationSettings) -> Self {
221self.inner = self.inner.application_settings(input);
222self
223}
224/// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
225pub fn set_application_settings(mut self, input: ::std::option::Option<crate::types::ApplicationSettings>) -> Self {
226self.inner = self.inner.set_application_settings(input);
227self
228}
229/// <p>The persistent application settings for users of a stack. When these settings are enabled, changes that users make to applications and Windows settings are automatically saved after each session and applied to the next session.</p>
230pub fn get_application_settings(&self) -> &::std::option::Option<crate::types::ApplicationSettings> {
231self.inner.get_application_settings()
232 }
233///
234 /// Adds a key-value pair to `Tags`.
235 ///
236 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
237 ///
238 /// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
239 /// <p>If you do not specify a value, the value is set to an empty string.</p>
240 /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
241 /// <p>_ . : / = + \ - @</p>
242 /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>.</p>
243pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
244self.inner = self.inner.tags(k.into(), v.into());
245self
246}
247/// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
248 /// <p>If you do not specify a value, the value is set to an empty string.</p>
249 /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
250 /// <p>_ . : / = + \ - @</p>
251 /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>.</p>
252pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
253self.inner = self.inner.set_tags(input);
254self
255}
256/// <p>The tags to associate with the stack. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=.</p>
257 /// <p>If you do not specify a value, the value is set to an empty string.</p>
258 /// <p>Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special characters:</p>
259 /// <p>_ . : / = + \ - @</p>
260 /// <p>For more information about tags, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html">Tagging Your Resources</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>.</p>
261pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
262self.inner.get_tags()
263 }
264///
265 /// Appends an item to `AccessEndpoints`.
266 ///
267 /// To override the contents of this collection use [`set_access_endpoints`](Self::set_access_endpoints).
268 ///
269 /// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to AppStream 2.0 only through the specified endpoints.</p>
270pub fn access_endpoints(mut self, input: crate::types::AccessEndpoint) -> Self {
271self.inner = self.inner.access_endpoints(input);
272self
273}
274/// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to AppStream 2.0 only through the specified endpoints.</p>
275pub fn set_access_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>>) -> Self {
276self.inner = self.inner.set_access_endpoints(input);
277self
278}
279/// <p>The list of interface VPC endpoint (interface endpoint) objects. Users of the stack can connect to AppStream 2.0 only through the specified endpoints.</p>
280pub fn get_access_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccessEndpoint>> {
281self.inner.get_access_endpoints()
282 }
283///
284 /// Appends an item to `EmbedHostDomains`.
285 ///
286 /// To override the contents of this collection use [`set_embed_host_domains`](Self::set_embed_host_domains).
287 ///
288 /// <p>The domains where AppStream 2.0 streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded AppStream 2.0 streaming sessions.</p>
289pub fn embed_host_domains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
290self.inner = self.inner.embed_host_domains(input.into());
291self
292}
293/// <p>The domains where AppStream 2.0 streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded AppStream 2.0 streaming sessions.</p>
294pub fn set_embed_host_domains(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
295self.inner = self.inner.set_embed_host_domains(input);
296self
297}
298/// <p>The domains where AppStream 2.0 streaming sessions can be embedded in an iframe. You must approve the domains that you want to host embedded AppStream 2.0 streaming sessions.</p>
299pub fn get_embed_host_domains(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
300self.inner.get_embed_host_domains()
301 }
302/// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
303pub fn streaming_experience_settings(mut self, input: crate::types::StreamingExperienceSettings) -> Self {
304self.inner = self.inner.streaming_experience_settings(input);
305self
306}
307/// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
308pub fn set_streaming_experience_settings(mut self, input: ::std::option::Option<crate::types::StreamingExperienceSettings>) -> Self {
309self.inner = self.inner.set_streaming_experience_settings(input);
310self
311}
312/// <p>The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, UDP is only supported in the Windows native client.</p>
313pub fn get_streaming_experience_settings(&self) -> &::std::option::Option<crate::types::StreamingExperienceSettings> {
314self.inner.get_streaming_experience_settings()
315 }
316}