aws_sdk_nimble/operation/create_streaming_session/
_create_streaming_session_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 CreateStreamingSessionInput {
6    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// <p>The EC2 Instance type used for the streaming session.</p>
9    pub ec2_instance_type: ::std::option::Option<crate::types::StreamingInstanceType>,
10    /// <p>The ID of the launch profile used to control access from the streaming session.</p>
11    pub launch_profile_id: ::std::option::Option<::std::string::String>,
12    /// <p>The user ID of the user that owns the streaming session. The user that owns the session will be logging into the session and interacting with the virtual workstation.</p>
13    pub owned_by: ::std::option::Option<::std::string::String>,
14    /// <p>The ID of the streaming image.</p>
15    pub streaming_image_id: ::std::option::Option<::std::string::String>,
16    /// <p>The studio ID.</p>
17    pub studio_id: ::std::option::Option<::std::string::String>,
18    /// <p>A collection of labels, in the form of key-value pairs, that apply to this resource.</p>
19    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20}
21impl CreateStreamingSessionInput {
22    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
23    pub fn client_token(&self) -> ::std::option::Option<&str> {
24        self.client_token.as_deref()
25    }
26    /// <p>The EC2 Instance type used for the streaming session.</p>
27    pub fn ec2_instance_type(&self) -> ::std::option::Option<&crate::types::StreamingInstanceType> {
28        self.ec2_instance_type.as_ref()
29    }
30    /// <p>The ID of the launch profile used to control access from the streaming session.</p>
31    pub fn launch_profile_id(&self) -> ::std::option::Option<&str> {
32        self.launch_profile_id.as_deref()
33    }
34    /// <p>The user ID of the user that owns the streaming session. The user that owns the session will be logging into the session and interacting with the virtual workstation.</p>
35    pub fn owned_by(&self) -> ::std::option::Option<&str> {
36        self.owned_by.as_deref()
37    }
38    /// <p>The ID of the streaming image.</p>
39    pub fn streaming_image_id(&self) -> ::std::option::Option<&str> {
40        self.streaming_image_id.as_deref()
41    }
42    /// <p>The studio ID.</p>
43    pub fn studio_id(&self) -> ::std::option::Option<&str> {
44        self.studio_id.as_deref()
45    }
46    /// <p>A collection of labels, in the form of key-value pairs, that apply to this resource.</p>
47    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
48        self.tags.as_ref()
49    }
50}
51impl CreateStreamingSessionInput {
52    /// Creates a new builder-style object to manufacture [`CreateStreamingSessionInput`](crate::operation::create_streaming_session::CreateStreamingSessionInput).
53    pub fn builder() -> crate::operation::create_streaming_session::builders::CreateStreamingSessionInputBuilder {
54        crate::operation::create_streaming_session::builders::CreateStreamingSessionInputBuilder::default()
55    }
56}
57
58/// A builder for [`CreateStreamingSessionInput`](crate::operation::create_streaming_session::CreateStreamingSessionInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct CreateStreamingSessionInputBuilder {
62    pub(crate) client_token: ::std::option::Option<::std::string::String>,
63    pub(crate) ec2_instance_type: ::std::option::Option<crate::types::StreamingInstanceType>,
64    pub(crate) launch_profile_id: ::std::option::Option<::std::string::String>,
65    pub(crate) owned_by: ::std::option::Option<::std::string::String>,
66    pub(crate) streaming_image_id: ::std::option::Option<::std::string::String>,
67    pub(crate) studio_id: ::std::option::Option<::std::string::String>,
68    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
69}
70impl CreateStreamingSessionInputBuilder {
71    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
72    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.client_token = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
77    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.client_token = input;
79        self
80    }
81    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency.</p>
82    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
83        &self.client_token
84    }
85    /// <p>The EC2 Instance type used for the streaming session.</p>
86    pub fn ec2_instance_type(mut self, input: crate::types::StreamingInstanceType) -> Self {
87        self.ec2_instance_type = ::std::option::Option::Some(input);
88        self
89    }
90    /// <p>The EC2 Instance type used for the streaming session.</p>
91    pub fn set_ec2_instance_type(mut self, input: ::std::option::Option<crate::types::StreamingInstanceType>) -> Self {
92        self.ec2_instance_type = input;
93        self
94    }
95    /// <p>The EC2 Instance type used for the streaming session.</p>
96    pub fn get_ec2_instance_type(&self) -> &::std::option::Option<crate::types::StreamingInstanceType> {
97        &self.ec2_instance_type
98    }
99    /// <p>The ID of the launch profile used to control access from the streaming session.</p>
100    /// This field is required.
101    pub fn launch_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.launch_profile_id = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The ID of the launch profile used to control access from the streaming session.</p>
106    pub fn set_launch_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.launch_profile_id = input;
108        self
109    }
110    /// <p>The ID of the launch profile used to control access from the streaming session.</p>
111    pub fn get_launch_profile_id(&self) -> &::std::option::Option<::std::string::String> {
112        &self.launch_profile_id
113    }
114    /// <p>The user ID of the user that owns the streaming session. The user that owns the session will be logging into the session and interacting with the virtual workstation.</p>
115    pub fn owned_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.owned_by = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The user ID of the user that owns the streaming session. The user that owns the session will be logging into the session and interacting with the virtual workstation.</p>
120    pub fn set_owned_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.owned_by = input;
122        self
123    }
124    /// <p>The user ID of the user that owns the streaming session. The user that owns the session will be logging into the session and interacting with the virtual workstation.</p>
125    pub fn get_owned_by(&self) -> &::std::option::Option<::std::string::String> {
126        &self.owned_by
127    }
128    /// <p>The ID of the streaming image.</p>
129    pub fn streaming_image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.streaming_image_id = ::std::option::Option::Some(input.into());
131        self
132    }
133    /// <p>The ID of the streaming image.</p>
134    pub fn set_streaming_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.streaming_image_id = input;
136        self
137    }
138    /// <p>The ID of the streaming image.</p>
139    pub fn get_streaming_image_id(&self) -> &::std::option::Option<::std::string::String> {
140        &self.streaming_image_id
141    }
142    /// <p>The studio ID.</p>
143    /// This field is required.
144    pub fn studio_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.studio_id = ::std::option::Option::Some(input.into());
146        self
147    }
148    /// <p>The studio ID.</p>
149    pub fn set_studio_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.studio_id = input;
151        self
152    }
153    /// <p>The studio ID.</p>
154    pub fn get_studio_id(&self) -> &::std::option::Option<::std::string::String> {
155        &self.studio_id
156    }
157    /// Adds a key-value pair to `tags`.
158    ///
159    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
160    ///
161    /// <p>A collection of labels, in the form of key-value pairs, that apply to this resource.</p>
162    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
163        let mut hash_map = self.tags.unwrap_or_default();
164        hash_map.insert(k.into(), v.into());
165        self.tags = ::std::option::Option::Some(hash_map);
166        self
167    }
168    /// <p>A collection of labels, in the form of key-value pairs, that apply to this resource.</p>
169    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
170        self.tags = input;
171        self
172    }
173    /// <p>A collection of labels, in the form of key-value pairs, that apply to this resource.</p>
174    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
175        &self.tags
176    }
177    /// Consumes the builder and constructs a [`CreateStreamingSessionInput`](crate::operation::create_streaming_session::CreateStreamingSessionInput).
178    pub fn build(
179        self,
180    ) -> ::std::result::Result<
181        crate::operation::create_streaming_session::CreateStreamingSessionInput,
182        ::aws_smithy_types::error::operation::BuildError,
183    > {
184        ::std::result::Result::Ok(crate::operation::create_streaming_session::CreateStreamingSessionInput {
185            client_token: self.client_token,
186            ec2_instance_type: self.ec2_instance_type,
187            launch_profile_id: self.launch_profile_id,
188            owned_by: self.owned_by,
189            streaming_image_id: self.streaming_image_id,
190            studio_id: self.studio_id,
191            tags: self.tags,
192        })
193    }
194}