aws_sdk_nimble/operation/create_streaming_session/
_create_streaming_session_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateStreamingSessionInput {
6 pub client_token: ::std::option::Option<::std::string::String>,
8 pub ec2_instance_type: ::std::option::Option<crate::types::StreamingInstanceType>,
10 pub launch_profile_id: ::std::option::Option<::std::string::String>,
12 pub owned_by: ::std::option::Option<::std::string::String>,
14 pub streaming_image_id: ::std::option::Option<::std::string::String>,
16 pub studio_id: ::std::option::Option<::std::string::String>,
18 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20}
21impl CreateStreamingSessionInput {
22 pub fn client_token(&self) -> ::std::option::Option<&str> {
24 self.client_token.as_deref()
25 }
26 pub fn ec2_instance_type(&self) -> ::std::option::Option<&crate::types::StreamingInstanceType> {
28 self.ec2_instance_type.as_ref()
29 }
30 pub fn launch_profile_id(&self) -> ::std::option::Option<&str> {
32 self.launch_profile_id.as_deref()
33 }
34 pub fn owned_by(&self) -> ::std::option::Option<&str> {
36 self.owned_by.as_deref()
37 }
38 pub fn streaming_image_id(&self) -> ::std::option::Option<&str> {
40 self.streaming_image_id.as_deref()
41 }
42 pub fn studio_id(&self) -> ::std::option::Option<&str> {
44 self.studio_id.as_deref()
45 }
46 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 pub fn builder() -> crate::operation::create_streaming_session::builders::CreateStreamingSessionInputBuilder {
54 crate::operation::create_streaming_session::builders::CreateStreamingSessionInputBuilder::default()
55 }
56}
57
58#[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 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 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78 self.client_token = input;
79 self
80 }
81 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
83 &self.client_token
84 }
85 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 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 pub fn get_ec2_instance_type(&self) -> &::std::option::Option<crate::types::StreamingInstanceType> {
97 &self.ec2_instance_type
98 }
99 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 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 pub fn get_launch_profile_id(&self) -> &::std::option::Option<::std::string::String> {
112 &self.launch_profile_id
113 }
114 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 pub fn set_owned_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.owned_by = input;
122 self
123 }
124 pub fn get_owned_by(&self) -> &::std::option::Option<::std::string::String> {
126 &self.owned_by
127 }
128 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 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 pub fn get_streaming_image_id(&self) -> &::std::option::Option<::std::string::String> {
140 &self.streaming_image_id
141 }
142 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 pub fn set_studio_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.studio_id = input;
151 self
152 }
153 pub fn get_studio_id(&self) -> &::std::option::Option<::std::string::String> {
155 &self.studio_id
156 }
157 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 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 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
175 &self.tags
176 }
177 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}