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 device instance for which you want to create a remote access session.</p>
140    pub fn instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.instance_arn(input.into());
142        self
143    }
144    /// <p>The Amazon Resource Name (ARN) of the device instance for which you want to create a remote access session.</p>
145    pub fn set_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_instance_arn(input);
147        self
148    }
149    /// <p>The Amazon Resource Name (ARN) of the device instance for which you want to create a remote access session.</p>
150    pub fn get_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_instance_arn()
152    }
153    /// <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>
154    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
155    pub fn ssh_public_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156        self.inner = self.inner.ssh_public_key(input.into());
157        self
158    }
159    /// <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>
160    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
161    pub fn set_ssh_public_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.inner = self.inner.set_ssh_public_key(input);
163        self
164    }
165    /// <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>
166    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
167    pub fn get_ssh_public_key(&self) -> &::std::option::Option<::std::string::String> {
168        self.inner.get_ssh_public_key()
169    }
170    /// <p>Set to <code>true</code> if you want to access devices remotely for debugging in your remote access session.</p>
171    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
172    pub fn remote_debug_enabled(mut self, input: bool) -> Self {
173        self.inner = self.inner.remote_debug_enabled(input);
174        self
175    }
176    /// <p>Set to <code>true</code> if you want to access devices remotely for debugging in your remote access session.</p>
177    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
178    pub fn set_remote_debug_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
179        self.inner = self.inner.set_remote_debug_enabled(input);
180        self
181    }
182    /// <p>Set to <code>true</code> if you want to access devices remotely for debugging in your remote access session.</p>
183    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
184    pub fn get_remote_debug_enabled(&self) -> &::std::option::Option<bool> {
185        self.inner.get_remote_debug_enabled()
186    }
187    /// <p>Set to <code>true</code> to enable remote recording for the remote access session.</p>
188    pub fn remote_record_enabled(mut self, input: bool) -> Self {
189        self.inner = self.inner.remote_record_enabled(input);
190        self
191    }
192    /// <p>Set to <code>true</code> to enable remote recording for the remote access session.</p>
193    pub fn set_remote_record_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
194        self.inner = self.inner.set_remote_record_enabled(input);
195        self
196    }
197    /// <p>Set to <code>true</code> to enable remote recording for the remote access session.</p>
198    pub fn get_remote_record_enabled(&self) -> &::std::option::Option<bool> {
199        self.inner.get_remote_record_enabled()
200    }
201    /// <p>The Amazon Resource Name (ARN) for the app to be recorded in the remote access session.</p>
202    pub fn remote_record_app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.inner = self.inner.remote_record_app_arn(input.into());
204        self
205    }
206    /// <p>The Amazon Resource Name (ARN) for the app to be recorded in the remote access session.</p>
207    pub fn set_remote_record_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208        self.inner = self.inner.set_remote_record_app_arn(input);
209        self
210    }
211    /// <p>The Amazon Resource Name (ARN) for the app to be recorded in the remote access session.</p>
212    pub fn get_remote_record_app_arn(&self) -> &::std::option::Option<::std::string::String> {
213        self.inner.get_remote_record_app_arn()
214    }
215    /// <p>The name of the remote access session to create.</p>
216    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217        self.inner = self.inner.name(input.into());
218        self
219    }
220    /// <p>The name of the remote access session to create.</p>
221    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222        self.inner = self.inner.set_name(input);
223        self
224    }
225    /// <p>The name of the remote access session to create.</p>
226    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
227        self.inner.get_name()
228    }
229    /// <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>
230    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
231    pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
232        self.inner = self.inner.client_id(input.into());
233        self
234    }
235    /// <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>
236    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
237    pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
238        self.inner = self.inner.set_client_id(input);
239        self
240    }
241    /// <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>
242    /// <p>Remote debugging is <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html">no longer supported</a>.</p>
243    pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
244        self.inner.get_client_id()
245    }
246    /// <p>The configuration information for the remote access session request.</p>
247    pub fn configuration(mut self, input: crate::types::CreateRemoteAccessSessionConfiguration) -> Self {
248        self.inner = self.inner.configuration(input);
249        self
250    }
251    /// <p>The configuration information for the remote access session request.</p>
252    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::CreateRemoteAccessSessionConfiguration>) -> Self {
253        self.inner = self.inner.set_configuration(input);
254        self
255    }
256    /// <p>The configuration information for the remote access session request.</p>
257    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::CreateRemoteAccessSessionConfiguration> {
258        self.inner.get_configuration()
259    }
260    /// <p>The interaction mode of the remote access session. Valid values are:</p>
261    /// <ul>
262    /// <li>
263    /// <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>
264    /// <li>
265    /// <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>
266    /// <li>
267    /// <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>
268    /// </ul>
269    pub fn interaction_mode(mut self, input: crate::types::InteractionMode) -> Self {
270        self.inner = self.inner.interaction_mode(input);
271        self
272    }
273    /// <p>The interaction mode of the remote access session. Valid values are:</p>
274    /// <ul>
275    /// <li>
276    /// <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>
277    /// <li>
278    /// <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>
279    /// <li>
280    /// <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>
281    /// </ul>
282    pub fn set_interaction_mode(mut self, input: ::std::option::Option<crate::types::InteractionMode>) -> Self {
283        self.inner = self.inner.set_interaction_mode(input);
284        self
285    }
286    /// <p>The interaction mode of the remote access session. Valid values are:</p>
287    /// <ul>
288    /// <li>
289    /// <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>
290    /// <li>
291    /// <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>
292    /// <li>
293    /// <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>
294    /// </ul>
295    pub fn get_interaction_mode(&self) -> &::std::option::Option<crate::types::InteractionMode> {
296        self.inner.get_interaction_mode()
297    }
298    /// <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>
299    /// <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>
300    pub fn skip_app_resign(mut self, input: bool) -> Self {
301        self.inner = self.inner.skip_app_resign(input);
302        self
303    }
304    /// <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>
305    /// <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>
306    pub fn set_skip_app_resign(mut self, input: ::std::option::Option<bool>) -> Self {
307        self.inner = self.inner.set_skip_app_resign(input);
308        self
309    }
310    /// <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>
311    /// <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>
312    pub fn get_skip_app_resign(&self) -> &::std::option::Option<bool> {
313        self.inner.get_skip_app_resign()
314    }
315}