1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/devicefarm/model/CreateRemoteAccessSessionRequest.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8 
9 #include <utility>
10 
11 using namespace Aws::DeviceFarm::Model;
12 using namespace Aws::Utils::Json;
13 using namespace Aws::Utils;
14 
CreateRemoteAccessSessionRequest()15 CreateRemoteAccessSessionRequest::CreateRemoteAccessSessionRequest() :
16     m_projectArnHasBeenSet(false),
17     m_deviceArnHasBeenSet(false),
18     m_instanceArnHasBeenSet(false),
19     m_sshPublicKeyHasBeenSet(false),
20     m_remoteDebugEnabled(false),
21     m_remoteDebugEnabledHasBeenSet(false),
22     m_remoteRecordEnabled(false),
23     m_remoteRecordEnabledHasBeenSet(false),
24     m_remoteRecordAppArnHasBeenSet(false),
25     m_nameHasBeenSet(false),
26     m_clientIdHasBeenSet(false),
27     m_configurationHasBeenSet(false),
28     m_interactionMode(InteractionMode::NOT_SET),
29     m_interactionModeHasBeenSet(false),
30     m_skipAppResign(false),
31     m_skipAppResignHasBeenSet(false)
32 {
33 }
34 
SerializePayload() const35 Aws::String CreateRemoteAccessSessionRequest::SerializePayload() const
36 {
37   JsonValue payload;
38 
39   if(m_projectArnHasBeenSet)
40   {
41    payload.WithString("projectArn", m_projectArn);
42 
43   }
44 
45   if(m_deviceArnHasBeenSet)
46   {
47    payload.WithString("deviceArn", m_deviceArn);
48 
49   }
50 
51   if(m_instanceArnHasBeenSet)
52   {
53    payload.WithString("instanceArn", m_instanceArn);
54 
55   }
56 
57   if(m_sshPublicKeyHasBeenSet)
58   {
59    payload.WithString("sshPublicKey", m_sshPublicKey);
60 
61   }
62 
63   if(m_remoteDebugEnabledHasBeenSet)
64   {
65    payload.WithBool("remoteDebugEnabled", m_remoteDebugEnabled);
66 
67   }
68 
69   if(m_remoteRecordEnabledHasBeenSet)
70   {
71    payload.WithBool("remoteRecordEnabled", m_remoteRecordEnabled);
72 
73   }
74 
75   if(m_remoteRecordAppArnHasBeenSet)
76   {
77    payload.WithString("remoteRecordAppArn", m_remoteRecordAppArn);
78 
79   }
80 
81   if(m_nameHasBeenSet)
82   {
83    payload.WithString("name", m_name);
84 
85   }
86 
87   if(m_clientIdHasBeenSet)
88   {
89    payload.WithString("clientId", m_clientId);
90 
91   }
92 
93   if(m_configurationHasBeenSet)
94   {
95    payload.WithObject("configuration", m_configuration.Jsonize());
96 
97   }
98 
99   if(m_interactionModeHasBeenSet)
100   {
101    payload.WithString("interactionMode", InteractionModeMapper::GetNameForInteractionMode(m_interactionMode));
102   }
103 
104   if(m_skipAppResignHasBeenSet)
105   {
106    payload.WithBool("skipAppResign", m_skipAppResign);
107 
108   }
109 
110   return payload.View().WriteReadable();
111 }
112 
GetRequestSpecificHeaders() const113 Aws::Http::HeaderValueCollection CreateRemoteAccessSessionRequest::GetRequestSpecificHeaders() const
114 {
115   Aws::Http::HeaderValueCollection headers;
116   headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "DeviceFarm_20150623.CreateRemoteAccessSession"));
117   return headers;
118 
119 }
120 
121 
122 
123 
124