aws_sdk_devicefarm/operation/create_remote_access_session/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_remote_access_session::_create_remote_access_session_output::CreateRemoteAccessSessionOutputBuilder;
3
4pub use crate::operation::create_remote_access_session::_create_remote_access_session_input::CreateRemoteAccessSessionInputBuilder;
5
6impl crate::operation::create_remote_access_session::builders::CreateRemoteAccessSessionInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_remote_access_session::CreateRemoteAccessSessionOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_remote_access_session::CreateRemoteAccessSessionError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_remote_access_session();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateRemoteAccessSession`.
24///
25/// <p>Specifies and starts a remote access session.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateRemoteAccessSessionFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_remote_access_session::builders::CreateRemoteAccessSessionInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_remote_access_session::CreateRemoteAccessSessionOutput,
35        crate::operation::create_remote_access_session::CreateRemoteAccessSessionError,
36    > for CreateRemoteAccessSessionFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::create_remote_access_session::CreateRemoteAccessSessionOutput,
44            crate::operation::create_remote_access_session::CreateRemoteAccessSessionError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateRemoteAccessSessionFluentBuilder {
51    /// Creates a new `CreateRemoteAccessSessionFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the CreateRemoteAccessSession as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_remote_access_session::builders::CreateRemoteAccessSessionInputBuilder {
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.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::create_remote_access_session::CreateRemoteAccessSessionOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_remote_access_session::CreateRemoteAccessSessionError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::create_remote_access_session::CreateRemoteAccessSession::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_remote_access_session::CreateRemoteAccessSession::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::create_remote_access_session::CreateRemoteAccessSessionOutput,
97        crate::operation::create_remote_access_session::CreateRemoteAccessSessionError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>The Amazon Resource Name (ARN) of the project for which you want to create a remote access session.</p>
112    pub fn project_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.project_arn(input.into());
114        self
115    }
116    /// <p>The Amazon Resource Name (ARN) of the project for which you want to create a remote access session.</p>
117    pub fn set_project_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_project_arn(input);
119        self
120    }
121    /// <p>The Amazon Resource Name (ARN) of the project for which you want to create a remote access session.</p>
122    pub fn get_project_arn(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_project_arn()
124    }
125    /// <p>The ARN of the device for which you want to create a remote access session.</p>
126    pub fn device_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.device_arn(input.into());
128        self
129    }
130    /// <p>The ARN of the device for which you want to create a remote access session.</p>
131    pub fn set_device_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_device_arn(input);
133        self
134    }
135    /// <p>The ARN of the device for which you want to create a remote access session.</p>
136    pub fn get_device_arn(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_device_arn()
138    }
139    /// <p>The Amazon Resource Name (ARN) of the app to create the remote access session.</p>
140    pub fn app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.app_arn(input.into());
142        self
143    }
144    /// <p>The Amazon Resource Name (ARN) of the app to create the remote access session.</p>
145    pub fn set_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_app_arn(input);
147        self
148    }
149    /// <p>The Amazon Resource Name (ARN) of the app to create the remote access session.</p>
150    pub fn get_app_arn(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_app_arn()
152    }
153    /// <p>The Amazon Resource Name (ARN) of the device instance for which you want to create a remote access session.</p>
154    pub fn instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.instance_arn(input.into());
156        self
157    }
158    /// <p>The Amazon Resource Name (ARN) of the device instance for which you want to create a remote access session.</p>
159    pub fn set_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_instance_arn(input);
161        self
162    }
163    /// <p>The Amazon Resource Name (ARN) of the device instance for which you want to create a remote access session.</p>
164    pub fn get_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_instance_arn()
166    }
167    /// <p>Ignored. The public key of the <code>ssh</code> key pair you want to use for connecting to remote devices in your remote debugging session. This key is required only if <code>remoteDebugEnabled</code> is set to <code>true</code>.</p>
168    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
169    pub fn ssh_public_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170        self.inner = self.inner.ssh_public_key(input.into());
171        self
172    }
173    /// <p>Ignored. The public key of the <code>ssh</code> key pair you want to use for connecting to remote devices in your remote debugging session. This key is required only if <code>remoteDebugEnabled</code> is set to <code>true</code>.</p>
174    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
175    pub fn set_ssh_public_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.inner = self.inner.set_ssh_public_key(input);
177        self
178    }
179    /// <p>Ignored. The public key of the <code>ssh</code> key pair you want to use for connecting to remote devices in your remote debugging session. This key is required only if <code>remoteDebugEnabled</code> is set to <code>true</code>.</p>
180    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
181    pub fn get_ssh_public_key(&self) -> &::std::option::Option<::std::string::String> {
182        self.inner.get_ssh_public_key()
183    }
184    /// <p>Set to <code>true</code> if you want to access devices remotely for debugging in your remote access session.</p>
185    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
186    pub fn remote_debug_enabled(mut self, input: bool) -> Self {
187        self.inner = self.inner.remote_debug_enabled(input);
188        self
189    }
190    /// <p>Set to <code>true</code> if you want to access devices remotely for debugging in your remote access session.</p>
191    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
192    pub fn set_remote_debug_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
193        self.inner = self.inner.set_remote_debug_enabled(input);
194        self
195    }
196    /// <p>Set to <code>true</code> if you want to access devices remotely for debugging in your remote access session.</p>
197    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
198    pub fn get_remote_debug_enabled(&self) -> &::std::option::Option<bool> {
199        self.inner.get_remote_debug_enabled()
200    }
201    /// <p>Set to <code>true</code> to enable remote recording for the remote access session.</p>
202    pub fn remote_record_enabled(mut self, input: bool) -> Self {
203        self.inner = self.inner.remote_record_enabled(input);
204        self
205    }
206    /// <p>Set to <code>true</code> to enable remote recording for the remote access session.</p>
207    pub fn set_remote_record_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
208        self.inner = self.inner.set_remote_record_enabled(input);
209        self
210    }
211    /// <p>Set to <code>true</code> to enable remote recording for the remote access session.</p>
212    pub fn get_remote_record_enabled(&self) -> &::std::option::Option<bool> {
213        self.inner.get_remote_record_enabled()
214    }
215    /// <p>The Amazon Resource Name (ARN) for the app to be recorded in the remote access session.</p>
216    pub fn remote_record_app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217        self.inner = self.inner.remote_record_app_arn(input.into());
218        self
219    }
220    /// <p>The Amazon Resource Name (ARN) for the app to be recorded in the remote access session.</p>
221    pub fn set_remote_record_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222        self.inner = self.inner.set_remote_record_app_arn(input);
223        self
224    }
225    /// <p>The Amazon Resource Name (ARN) for the app to be recorded in the remote access session.</p>
226    pub fn get_remote_record_app_arn(&self) -> &::std::option::Option<::std::string::String> {
227        self.inner.get_remote_record_app_arn()
228    }
229    /// <p>The name of the remote access session to create.</p>
230    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231        self.inner = self.inner.name(input.into());
232        self
233    }
234    /// <p>The name of the remote access session to create.</p>
235    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236        self.inner = self.inner.set_name(input);
237        self
238    }
239    /// <p>The name of the remote access session to create.</p>
240    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
241        self.inner.get_name()
242    }
243    /// <p>Unique identifier for the client. If you want access to multiple devices on the same client, you should pass the same <code>clientId</code> value in each call to <code>CreateRemoteAccessSession</code>. This identifier is required only if <code>remoteDebugEnabled</code> is set to <code>true</code>.</p>
244    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
245    pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
246        self.inner = self.inner.client_id(input.into());
247        self
248    }
249    /// <p>Unique identifier for the client. If you want access to multiple devices on the same client, you should pass the same <code>clientId</code> value in each call to <code>CreateRemoteAccessSession</code>. This identifier is required only if <code>remoteDebugEnabled</code> is set to <code>true</code>.</p>
250    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
251    pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
252        self.inner = self.inner.set_client_id(input);
253        self
254    }
255    /// <p>Unique identifier for the client. If you want access to multiple devices on the same client, you should pass the same <code>clientId</code> value in each call to <code>CreateRemoteAccessSession</code>. This identifier is required only if <code>remoteDebugEnabled</code> is set to <code>true</code>.</p>
256    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
257    pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
258        self.inner.get_client_id()
259    }
260    /// <p>The configuration information for the remote access session request.</p>
261    pub fn configuration(mut self, input: crate::types::CreateRemoteAccessSessionConfiguration) -> Self {
262        self.inner = self.inner.configuration(input);
263        self
264    }
265    /// <p>The configuration information for the remote access session request.</p>
266    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::CreateRemoteAccessSessionConfiguration>) -> Self {
267        self.inner = self.inner.set_configuration(input);
268        self
269    }
270    /// <p>The configuration information for the remote access session request.</p>
271    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::CreateRemoteAccessSessionConfiguration> {
272        self.inner.get_configuration()
273    }
274    /// <p>The interaction mode of the remote access session. Valid values are:</p>
275    /// <ul>
276    /// <li>
277    /// <p>INTERACTIVE: You can interact with the iOS device by viewing, touching, and rotating the screen. You cannot run XCUITest framework-based tests in this mode.</p></li>
278    /// <li>
279    /// <p>NO_VIDEO: You are connected to the device, but cannot interact with it or view the screen. This mode has the fastest test execution speed. You can run XCUITest framework-based tests in this mode.</p></li>
280    /// <li>
281    /// <p>VIDEO_ONLY: You can view the screen, but cannot touch or rotate it. You can run XCUITest framework-based tests and watch the screen in this mode.</p></li>
282    /// </ul>
283    pub fn interaction_mode(mut self, input: crate::types::InteractionMode) -> Self {
284        self.inner = self.inner.interaction_mode(input);
285        self
286    }
287    /// <p>The interaction mode of the remote access session. Valid values are:</p>
288    /// <ul>
289    /// <li>
290    /// <p>INTERACTIVE: You can interact with the iOS device by viewing, touching, and rotating the screen. You cannot run XCUITest framework-based tests in this mode.</p></li>
291    /// <li>
292    /// <p>NO_VIDEO: You are connected to the device, but cannot interact with it or view the screen. This mode has the fastest test execution speed. You can run XCUITest framework-based tests in this mode.</p></li>
293    /// <li>
294    /// <p>VIDEO_ONLY: You can view the screen, but cannot touch or rotate it. You can run XCUITest framework-based tests and watch the screen in this mode.</p></li>
295    /// </ul>
296    pub fn set_interaction_mode(mut self, input: ::std::option::Option<crate::types::InteractionMode>) -> Self {
297        self.inner = self.inner.set_interaction_mode(input);
298        self
299    }
300    /// <p>The interaction mode of the remote access session. Valid values are:</p>
301    /// <ul>
302    /// <li>
303    /// <p>INTERACTIVE: You can interact with the iOS device by viewing, touching, and rotating the screen. You cannot run XCUITest framework-based tests in this mode.</p></li>
304    /// <li>
305    /// <p>NO_VIDEO: You are connected to the device, but cannot interact with it or view the screen. This mode has the fastest test execution speed. You can run XCUITest framework-based tests in this mode.</p></li>
306    /// <li>
307    /// <p>VIDEO_ONLY: You can view the screen, but cannot touch or rotate it. You can run XCUITest framework-based tests and watch the screen in this mode.</p></li>
308    /// </ul>
309    pub fn get_interaction_mode(&self) -> &::std::option::Option<crate::types::InteractionMode> {
310        self.inner.get_interaction_mode()
311    }
312    /// <p>When set to <code>true</code>, for private devices, Device Farm does not sign your app again. For public devices, Device Farm always signs your apps again.</p>
313    /// <p>For more information on how Device Farm modifies your uploads during tests, see <a href="http://aws.amazon.com/device-farm/faqs/">Do you modify my app?</a></p>
314    pub fn skip_app_resign(mut self, input: bool) -> Self {
315        self.inner = self.inner.skip_app_resign(input);
316        self
317    }
318    /// <p>When set to <code>true</code>, for private devices, Device Farm does not sign your app again. For public devices, Device Farm always signs your apps again.</p>
319    /// <p>For more information on how Device Farm modifies your uploads during tests, see <a href="http://aws.amazon.com/device-farm/faqs/">Do you modify my app?</a></p>
320    pub fn set_skip_app_resign(mut self, input: ::std::option::Option<bool>) -> Self {
321        self.inner = self.inner.set_skip_app_resign(input);
322        self
323    }
324    /// <p>When set to <code>true</code>, for private devices, Device Farm does not sign your app again. For public devices, Device Farm always signs your apps again.</p>
325    /// <p>For more information on how Device Farm modifies your uploads during tests, see <a href="http://aws.amazon.com/device-farm/faqs/">Do you modify my app?</a></p>
326    pub fn get_skip_app_resign(&self) -> &::std::option::Option<bool> {
327        self.inner.get_skip_app_resign()
328    }
329}