aws_sdk_appstream/operation/describe_sessions/
_describe_sessions_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 DescribeSessionsInput {
6    /// <p>The name of the stack. This value is case-sensitive.</p>
7    pub stack_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the fleet. This value is case-sensitive.</p>
9    pub fleet_name: ::std::option::Option<::std::string::String>,
10    /// <p>The user identifier (ID). If you specify a user ID, you must also specify the authentication type.</p>
11    pub user_id: ::std::option::Option<::std::string::String>,
12    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
13    pub next_token: ::std::option::Option<::std::string::String>,
14    /// <p>The size of each page of results. The default value is 20 and the maximum value is 50.</p>
15    pub limit: ::std::option::Option<i32>,
16    /// <p>The authentication method. Specify <code>API</code> for a user authenticated using a streaming URL or <code>SAML</code> for a SAML federated user. The default is to authenticate users using a streaming URL.</p>
17    pub authentication_type: ::std::option::Option<crate::types::AuthenticationType>,
18    /// <p>The identifier for the instance hosting the session.</p>
19    pub instance_id: ::std::option::Option<::std::string::String>,
20}
21impl DescribeSessionsInput {
22    /// <p>The name of the stack. This value is case-sensitive.</p>
23    pub fn stack_name(&self) -> ::std::option::Option<&str> {
24        self.stack_name.as_deref()
25    }
26    /// <p>The name of the fleet. This value is case-sensitive.</p>
27    pub fn fleet_name(&self) -> ::std::option::Option<&str> {
28        self.fleet_name.as_deref()
29    }
30    /// <p>The user identifier (ID). If you specify a user ID, you must also specify the authentication type.</p>
31    pub fn user_id(&self) -> ::std::option::Option<&str> {
32        self.user_id.as_deref()
33    }
34    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
35    pub fn next_token(&self) -> ::std::option::Option<&str> {
36        self.next_token.as_deref()
37    }
38    /// <p>The size of each page of results. The default value is 20 and the maximum value is 50.</p>
39    pub fn limit(&self) -> ::std::option::Option<i32> {
40        self.limit
41    }
42    /// <p>The authentication method. Specify <code>API</code> for a user authenticated using a streaming URL or <code>SAML</code> for a SAML federated user. The default is to authenticate users using a streaming URL.</p>
43    pub fn authentication_type(&self) -> ::std::option::Option<&crate::types::AuthenticationType> {
44        self.authentication_type.as_ref()
45    }
46    /// <p>The identifier for the instance hosting the session.</p>
47    pub fn instance_id(&self) -> ::std::option::Option<&str> {
48        self.instance_id.as_deref()
49    }
50}
51impl DescribeSessionsInput {
52    /// Creates a new builder-style object to manufacture [`DescribeSessionsInput`](crate::operation::describe_sessions::DescribeSessionsInput).
53    pub fn builder() -> crate::operation::describe_sessions::builders::DescribeSessionsInputBuilder {
54        crate::operation::describe_sessions::builders::DescribeSessionsInputBuilder::default()
55    }
56}
57
58/// A builder for [`DescribeSessionsInput`](crate::operation::describe_sessions::DescribeSessionsInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct DescribeSessionsInputBuilder {
62    pub(crate) stack_name: ::std::option::Option<::std::string::String>,
63    pub(crate) fleet_name: ::std::option::Option<::std::string::String>,
64    pub(crate) user_id: ::std::option::Option<::std::string::String>,
65    pub(crate) next_token: ::std::option::Option<::std::string::String>,
66    pub(crate) limit: ::std::option::Option<i32>,
67    pub(crate) authentication_type: ::std::option::Option<crate::types::AuthenticationType>,
68    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
69}
70impl DescribeSessionsInputBuilder {
71    /// <p>The name of the stack. This value is case-sensitive.</p>
72    /// This field is required.
73    pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.stack_name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The name of the stack. This value is case-sensitive.</p>
78    pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.stack_name = input;
80        self
81    }
82    /// <p>The name of the stack. This value is case-sensitive.</p>
83    pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.stack_name
85    }
86    /// <p>The name of the fleet. This value is case-sensitive.</p>
87    /// This field is required.
88    pub fn fleet_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.fleet_name = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>The name of the fleet. This value is case-sensitive.</p>
93    pub fn set_fleet_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.fleet_name = input;
95        self
96    }
97    /// <p>The name of the fleet. This value is case-sensitive.</p>
98    pub fn get_fleet_name(&self) -> &::std::option::Option<::std::string::String> {
99        &self.fleet_name
100    }
101    /// <p>The user identifier (ID). If you specify a user ID, you must also specify the authentication type.</p>
102    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.user_id = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The user identifier (ID). If you specify a user ID, you must also specify the authentication type.</p>
107    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.user_id = input;
109        self
110    }
111    /// <p>The user identifier (ID). If you specify a user ID, you must also specify the authentication type.</p>
112    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
113        &self.user_id
114    }
115    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
116    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.next_token = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
121    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.next_token = input;
123        self
124    }
125    /// <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>
126    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
127        &self.next_token
128    }
129    /// <p>The size of each page of results. The default value is 20 and the maximum value is 50.</p>
130    pub fn limit(mut self, input: i32) -> Self {
131        self.limit = ::std::option::Option::Some(input);
132        self
133    }
134    /// <p>The size of each page of results. The default value is 20 and the maximum value is 50.</p>
135    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
136        self.limit = input;
137        self
138    }
139    /// <p>The size of each page of results. The default value is 20 and the maximum value is 50.</p>
140    pub fn get_limit(&self) -> &::std::option::Option<i32> {
141        &self.limit
142    }
143    /// <p>The authentication method. Specify <code>API</code> for a user authenticated using a streaming URL or <code>SAML</code> for a SAML federated user. The default is to authenticate users using a streaming URL.</p>
144    pub fn authentication_type(mut self, input: crate::types::AuthenticationType) -> Self {
145        self.authentication_type = ::std::option::Option::Some(input);
146        self
147    }
148    /// <p>The authentication method. Specify <code>API</code> for a user authenticated using a streaming URL or <code>SAML</code> for a SAML federated user. The default is to authenticate users using a streaming URL.</p>
149    pub fn set_authentication_type(mut self, input: ::std::option::Option<crate::types::AuthenticationType>) -> Self {
150        self.authentication_type = input;
151        self
152    }
153    /// <p>The authentication method. Specify <code>API</code> for a user authenticated using a streaming URL or <code>SAML</code> for a SAML federated user. The default is to authenticate users using a streaming URL.</p>
154    pub fn get_authentication_type(&self) -> &::std::option::Option<crate::types::AuthenticationType> {
155        &self.authentication_type
156    }
157    /// <p>The identifier for the instance hosting the session.</p>
158    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.instance_id = ::std::option::Option::Some(input.into());
160        self
161    }
162    /// <p>The identifier for the instance hosting the session.</p>
163    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.instance_id = input;
165        self
166    }
167    /// <p>The identifier for the instance hosting the session.</p>
168    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
169        &self.instance_id
170    }
171    /// Consumes the builder and constructs a [`DescribeSessionsInput`](crate::operation::describe_sessions::DescribeSessionsInput).
172    pub fn build(
173        self,
174    ) -> ::std::result::Result<crate::operation::describe_sessions::DescribeSessionsInput, ::aws_smithy_types::error::operation::BuildError> {
175        ::std::result::Result::Ok(crate::operation::describe_sessions::DescribeSessionsInput {
176            stack_name: self.stack_name,
177            fleet_name: self.fleet_name,
178            user_id: self.user_id,
179            next_token: self.next_token,
180            limit: self.limit,
181            authentication_type: self.authentication_type,
182            instance_id: self.instance_id,
183        })
184    }
185}