1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/core/utils/Outcome.h>
7 #include <aws/core/auth/AWSAuthSigner.h>
8 #include <aws/core/client/CoreErrors.h>
9 #include <aws/core/client/RetryStrategy.h>
10 #include <aws/core/http/HttpClient.h>
11 #include <aws/core/http/HttpResponse.h>
12 #include <aws/core/http/HttpClientFactory.h>
13 #include <aws/core/auth/AWSCredentialsProviderChain.h>
14 #include <aws/core/utils/json/JsonSerializer.h>
15 #include <aws/core/utils/memory/stl/AWSStringStream.h>
16 #include <aws/core/utils/threading/Executor.h>
17 #include <aws/core/utils/DNS.h>
18 #include <aws/core/utils/logging/LogMacros.h>
19
20 #include <aws/connectparticipant/ConnectParticipantClient.h>
21 #include <aws/connectparticipant/ConnectParticipantEndpoint.h>
22 #include <aws/connectparticipant/ConnectParticipantErrorMarshaller.h>
23 #include <aws/connectparticipant/model/CompleteAttachmentUploadRequest.h>
24 #include <aws/connectparticipant/model/CreateParticipantConnectionRequest.h>
25 #include <aws/connectparticipant/model/DisconnectParticipantRequest.h>
26 #include <aws/connectparticipant/model/GetAttachmentRequest.h>
27 #include <aws/connectparticipant/model/GetTranscriptRequest.h>
28 #include <aws/connectparticipant/model/SendEventRequest.h>
29 #include <aws/connectparticipant/model/SendMessageRequest.h>
30 #include <aws/connectparticipant/model/StartAttachmentUploadRequest.h>
31
32 using namespace Aws;
33 using namespace Aws::Auth;
34 using namespace Aws::Client;
35 using namespace Aws::ConnectParticipant;
36 using namespace Aws::ConnectParticipant::Model;
37 using namespace Aws::Http;
38 using namespace Aws::Utils::Json;
39
40 static const char* SERVICE_NAME = "execute-api";
41 static const char* ALLOCATION_TAG = "ConnectParticipantClient";
42
43
ConnectParticipantClient(const Client::ClientConfiguration & clientConfiguration)44 ConnectParticipantClient::ConnectParticipantClient(const Client::ClientConfiguration& clientConfiguration) :
45 BASECLASS(clientConfiguration,
46 Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
47 SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
48 Aws::MakeShared<ConnectParticipantErrorMarshaller>(ALLOCATION_TAG)),
49 m_executor(clientConfiguration.executor)
50 {
51 init(clientConfiguration);
52 }
53
ConnectParticipantClient(const AWSCredentials & credentials,const Client::ClientConfiguration & clientConfiguration)54 ConnectParticipantClient::ConnectParticipantClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
55 BASECLASS(clientConfiguration,
56 Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
57 SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
58 Aws::MakeShared<ConnectParticipantErrorMarshaller>(ALLOCATION_TAG)),
59 m_executor(clientConfiguration.executor)
60 {
61 init(clientConfiguration);
62 }
63
ConnectParticipantClient(const std::shared_ptr<AWSCredentialsProvider> & credentialsProvider,const Client::ClientConfiguration & clientConfiguration)64 ConnectParticipantClient::ConnectParticipantClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
65 const Client::ClientConfiguration& clientConfiguration) :
66 BASECLASS(clientConfiguration,
67 Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
68 SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
69 Aws::MakeShared<ConnectParticipantErrorMarshaller>(ALLOCATION_TAG)),
70 m_executor(clientConfiguration.executor)
71 {
72 init(clientConfiguration);
73 }
74
~ConnectParticipantClient()75 ConnectParticipantClient::~ConnectParticipantClient()
76 {
77 }
78
init(const Client::ClientConfiguration & config)79 void ConnectParticipantClient::init(const Client::ClientConfiguration& config)
80 {
81 SetServiceClientName("ConnectParticipant");
82 m_configScheme = SchemeMapper::ToString(config.scheme);
83 if (config.endpointOverride.empty())
84 {
85 m_uri = m_configScheme + "://" + ConnectParticipantEndpoint::ForRegion(config.region, config.useDualStack);
86 }
87 else
88 {
89 OverrideEndpoint(config.endpointOverride);
90 }
91 }
92
OverrideEndpoint(const Aws::String & endpoint)93 void ConnectParticipantClient::OverrideEndpoint(const Aws::String& endpoint)
94 {
95 if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
96 {
97 m_uri = endpoint;
98 }
99 else
100 {
101 m_uri = m_configScheme + "://" + endpoint;
102 }
103 }
104
CompleteAttachmentUpload(const CompleteAttachmentUploadRequest & request) const105 CompleteAttachmentUploadOutcome ConnectParticipantClient::CompleteAttachmentUpload(const CompleteAttachmentUploadRequest& request) const
106 {
107 if (!request.ConnectionTokenHasBeenSet())
108 {
109 AWS_LOGSTREAM_ERROR("CompleteAttachmentUpload", "Required field: ConnectionToken, is not set");
110 return CompleteAttachmentUploadOutcome(Aws::Client::AWSError<ConnectParticipantErrors>(ConnectParticipantErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectionToken]", false));
111 }
112 Aws::Http::URI uri = m_uri;
113 uri.AddPathSegments("/participant/complete-attachment-upload");
114 return CompleteAttachmentUploadOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
115 }
116
CompleteAttachmentUploadCallable(const CompleteAttachmentUploadRequest & request) const117 CompleteAttachmentUploadOutcomeCallable ConnectParticipantClient::CompleteAttachmentUploadCallable(const CompleteAttachmentUploadRequest& request) const
118 {
119 auto task = Aws::MakeShared< std::packaged_task< CompleteAttachmentUploadOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CompleteAttachmentUpload(request); } );
120 auto packagedFunction = [task]() { (*task)(); };
121 m_executor->Submit(packagedFunction);
122 return task->get_future();
123 }
124
CompleteAttachmentUploadAsync(const CompleteAttachmentUploadRequest & request,const CompleteAttachmentUploadResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const125 void ConnectParticipantClient::CompleteAttachmentUploadAsync(const CompleteAttachmentUploadRequest& request, const CompleteAttachmentUploadResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
126 {
127 m_executor->Submit( [this, request, handler, context](){ this->CompleteAttachmentUploadAsyncHelper( request, handler, context ); } );
128 }
129
CompleteAttachmentUploadAsyncHelper(const CompleteAttachmentUploadRequest & request,const CompleteAttachmentUploadResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const130 void ConnectParticipantClient::CompleteAttachmentUploadAsyncHelper(const CompleteAttachmentUploadRequest& request, const CompleteAttachmentUploadResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
131 {
132 handler(this, request, CompleteAttachmentUpload(request), context);
133 }
134
CreateParticipantConnection(const CreateParticipantConnectionRequest & request) const135 CreateParticipantConnectionOutcome ConnectParticipantClient::CreateParticipantConnection(const CreateParticipantConnectionRequest& request) const
136 {
137 if (!request.ParticipantTokenHasBeenSet())
138 {
139 AWS_LOGSTREAM_ERROR("CreateParticipantConnection", "Required field: ParticipantToken, is not set");
140 return CreateParticipantConnectionOutcome(Aws::Client::AWSError<ConnectParticipantErrors>(ConnectParticipantErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ParticipantToken]", false));
141 }
142 Aws::Http::URI uri = m_uri;
143 uri.AddPathSegments("/participant/connection");
144 return CreateParticipantConnectionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
145 }
146
CreateParticipantConnectionCallable(const CreateParticipantConnectionRequest & request) const147 CreateParticipantConnectionOutcomeCallable ConnectParticipantClient::CreateParticipantConnectionCallable(const CreateParticipantConnectionRequest& request) const
148 {
149 auto task = Aws::MakeShared< std::packaged_task< CreateParticipantConnectionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateParticipantConnection(request); } );
150 auto packagedFunction = [task]() { (*task)(); };
151 m_executor->Submit(packagedFunction);
152 return task->get_future();
153 }
154
CreateParticipantConnectionAsync(const CreateParticipantConnectionRequest & request,const CreateParticipantConnectionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const155 void ConnectParticipantClient::CreateParticipantConnectionAsync(const CreateParticipantConnectionRequest& request, const CreateParticipantConnectionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
156 {
157 m_executor->Submit( [this, request, handler, context](){ this->CreateParticipantConnectionAsyncHelper( request, handler, context ); } );
158 }
159
CreateParticipantConnectionAsyncHelper(const CreateParticipantConnectionRequest & request,const CreateParticipantConnectionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const160 void ConnectParticipantClient::CreateParticipantConnectionAsyncHelper(const CreateParticipantConnectionRequest& request, const CreateParticipantConnectionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
161 {
162 handler(this, request, CreateParticipantConnection(request), context);
163 }
164
DisconnectParticipant(const DisconnectParticipantRequest & request) const165 DisconnectParticipantOutcome ConnectParticipantClient::DisconnectParticipant(const DisconnectParticipantRequest& request) const
166 {
167 if (!request.ConnectionTokenHasBeenSet())
168 {
169 AWS_LOGSTREAM_ERROR("DisconnectParticipant", "Required field: ConnectionToken, is not set");
170 return DisconnectParticipantOutcome(Aws::Client::AWSError<ConnectParticipantErrors>(ConnectParticipantErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectionToken]", false));
171 }
172 Aws::Http::URI uri = m_uri;
173 uri.AddPathSegments("/participant/disconnect");
174 return DisconnectParticipantOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
175 }
176
DisconnectParticipantCallable(const DisconnectParticipantRequest & request) const177 DisconnectParticipantOutcomeCallable ConnectParticipantClient::DisconnectParticipantCallable(const DisconnectParticipantRequest& request) const
178 {
179 auto task = Aws::MakeShared< std::packaged_task< DisconnectParticipantOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DisconnectParticipant(request); } );
180 auto packagedFunction = [task]() { (*task)(); };
181 m_executor->Submit(packagedFunction);
182 return task->get_future();
183 }
184
DisconnectParticipantAsync(const DisconnectParticipantRequest & request,const DisconnectParticipantResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const185 void ConnectParticipantClient::DisconnectParticipantAsync(const DisconnectParticipantRequest& request, const DisconnectParticipantResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
186 {
187 m_executor->Submit( [this, request, handler, context](){ this->DisconnectParticipantAsyncHelper( request, handler, context ); } );
188 }
189
DisconnectParticipantAsyncHelper(const DisconnectParticipantRequest & request,const DisconnectParticipantResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const190 void ConnectParticipantClient::DisconnectParticipantAsyncHelper(const DisconnectParticipantRequest& request, const DisconnectParticipantResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
191 {
192 handler(this, request, DisconnectParticipant(request), context);
193 }
194
GetAttachment(const GetAttachmentRequest & request) const195 GetAttachmentOutcome ConnectParticipantClient::GetAttachment(const GetAttachmentRequest& request) const
196 {
197 if (!request.ConnectionTokenHasBeenSet())
198 {
199 AWS_LOGSTREAM_ERROR("GetAttachment", "Required field: ConnectionToken, is not set");
200 return GetAttachmentOutcome(Aws::Client::AWSError<ConnectParticipantErrors>(ConnectParticipantErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectionToken]", false));
201 }
202 Aws::Http::URI uri = m_uri;
203 uri.AddPathSegments("/participant/attachment");
204 return GetAttachmentOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
205 }
206
GetAttachmentCallable(const GetAttachmentRequest & request) const207 GetAttachmentOutcomeCallable ConnectParticipantClient::GetAttachmentCallable(const GetAttachmentRequest& request) const
208 {
209 auto task = Aws::MakeShared< std::packaged_task< GetAttachmentOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetAttachment(request); } );
210 auto packagedFunction = [task]() { (*task)(); };
211 m_executor->Submit(packagedFunction);
212 return task->get_future();
213 }
214
GetAttachmentAsync(const GetAttachmentRequest & request,const GetAttachmentResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const215 void ConnectParticipantClient::GetAttachmentAsync(const GetAttachmentRequest& request, const GetAttachmentResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
216 {
217 m_executor->Submit( [this, request, handler, context](){ this->GetAttachmentAsyncHelper( request, handler, context ); } );
218 }
219
GetAttachmentAsyncHelper(const GetAttachmentRequest & request,const GetAttachmentResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const220 void ConnectParticipantClient::GetAttachmentAsyncHelper(const GetAttachmentRequest& request, const GetAttachmentResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
221 {
222 handler(this, request, GetAttachment(request), context);
223 }
224
GetTranscript(const GetTranscriptRequest & request) const225 GetTranscriptOutcome ConnectParticipantClient::GetTranscript(const GetTranscriptRequest& request) const
226 {
227 if (!request.ConnectionTokenHasBeenSet())
228 {
229 AWS_LOGSTREAM_ERROR("GetTranscript", "Required field: ConnectionToken, is not set");
230 return GetTranscriptOutcome(Aws::Client::AWSError<ConnectParticipantErrors>(ConnectParticipantErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectionToken]", false));
231 }
232 Aws::Http::URI uri = m_uri;
233 uri.AddPathSegments("/participant/transcript");
234 return GetTranscriptOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
235 }
236
GetTranscriptCallable(const GetTranscriptRequest & request) const237 GetTranscriptOutcomeCallable ConnectParticipantClient::GetTranscriptCallable(const GetTranscriptRequest& request) const
238 {
239 auto task = Aws::MakeShared< std::packaged_task< GetTranscriptOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetTranscript(request); } );
240 auto packagedFunction = [task]() { (*task)(); };
241 m_executor->Submit(packagedFunction);
242 return task->get_future();
243 }
244
GetTranscriptAsync(const GetTranscriptRequest & request,const GetTranscriptResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const245 void ConnectParticipantClient::GetTranscriptAsync(const GetTranscriptRequest& request, const GetTranscriptResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
246 {
247 m_executor->Submit( [this, request, handler, context](){ this->GetTranscriptAsyncHelper( request, handler, context ); } );
248 }
249
GetTranscriptAsyncHelper(const GetTranscriptRequest & request,const GetTranscriptResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const250 void ConnectParticipantClient::GetTranscriptAsyncHelper(const GetTranscriptRequest& request, const GetTranscriptResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
251 {
252 handler(this, request, GetTranscript(request), context);
253 }
254
SendEvent(const SendEventRequest & request) const255 SendEventOutcome ConnectParticipantClient::SendEvent(const SendEventRequest& request) const
256 {
257 if (!request.ConnectionTokenHasBeenSet())
258 {
259 AWS_LOGSTREAM_ERROR("SendEvent", "Required field: ConnectionToken, is not set");
260 return SendEventOutcome(Aws::Client::AWSError<ConnectParticipantErrors>(ConnectParticipantErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectionToken]", false));
261 }
262 Aws::Http::URI uri = m_uri;
263 uri.AddPathSegments("/participant/event");
264 return SendEventOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
265 }
266
SendEventCallable(const SendEventRequest & request) const267 SendEventOutcomeCallable ConnectParticipantClient::SendEventCallable(const SendEventRequest& request) const
268 {
269 auto task = Aws::MakeShared< std::packaged_task< SendEventOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->SendEvent(request); } );
270 auto packagedFunction = [task]() { (*task)(); };
271 m_executor->Submit(packagedFunction);
272 return task->get_future();
273 }
274
SendEventAsync(const SendEventRequest & request,const SendEventResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const275 void ConnectParticipantClient::SendEventAsync(const SendEventRequest& request, const SendEventResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
276 {
277 m_executor->Submit( [this, request, handler, context](){ this->SendEventAsyncHelper( request, handler, context ); } );
278 }
279
SendEventAsyncHelper(const SendEventRequest & request,const SendEventResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const280 void ConnectParticipantClient::SendEventAsyncHelper(const SendEventRequest& request, const SendEventResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
281 {
282 handler(this, request, SendEvent(request), context);
283 }
284
SendMessage(const SendMessageRequest & request) const285 SendMessageOutcome ConnectParticipantClient::SendMessage(const SendMessageRequest& request) const
286 {
287 if (!request.ConnectionTokenHasBeenSet())
288 {
289 AWS_LOGSTREAM_ERROR("SendMessage", "Required field: ConnectionToken, is not set");
290 return SendMessageOutcome(Aws::Client::AWSError<ConnectParticipantErrors>(ConnectParticipantErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectionToken]", false));
291 }
292 Aws::Http::URI uri = m_uri;
293 uri.AddPathSegments("/participant/message");
294 return SendMessageOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
295 }
296
SendMessageCallable(const SendMessageRequest & request) const297 SendMessageOutcomeCallable ConnectParticipantClient::SendMessageCallable(const SendMessageRequest& request) const
298 {
299 auto task = Aws::MakeShared< std::packaged_task< SendMessageOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->SendMessage(request); } );
300 auto packagedFunction = [task]() { (*task)(); };
301 m_executor->Submit(packagedFunction);
302 return task->get_future();
303 }
304
SendMessageAsync(const SendMessageRequest & request,const SendMessageResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const305 void ConnectParticipantClient::SendMessageAsync(const SendMessageRequest& request, const SendMessageResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
306 {
307 m_executor->Submit( [this, request, handler, context](){ this->SendMessageAsyncHelper( request, handler, context ); } );
308 }
309
SendMessageAsyncHelper(const SendMessageRequest & request,const SendMessageResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const310 void ConnectParticipantClient::SendMessageAsyncHelper(const SendMessageRequest& request, const SendMessageResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
311 {
312 handler(this, request, SendMessage(request), context);
313 }
314
StartAttachmentUpload(const StartAttachmentUploadRequest & request) const315 StartAttachmentUploadOutcome ConnectParticipantClient::StartAttachmentUpload(const StartAttachmentUploadRequest& request) const
316 {
317 if (!request.ConnectionTokenHasBeenSet())
318 {
319 AWS_LOGSTREAM_ERROR("StartAttachmentUpload", "Required field: ConnectionToken, is not set");
320 return StartAttachmentUploadOutcome(Aws::Client::AWSError<ConnectParticipantErrors>(ConnectParticipantErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ConnectionToken]", false));
321 }
322 Aws::Http::URI uri = m_uri;
323 uri.AddPathSegments("/participant/start-attachment-upload");
324 return StartAttachmentUploadOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
325 }
326
StartAttachmentUploadCallable(const StartAttachmentUploadRequest & request) const327 StartAttachmentUploadOutcomeCallable ConnectParticipantClient::StartAttachmentUploadCallable(const StartAttachmentUploadRequest& request) const
328 {
329 auto task = Aws::MakeShared< std::packaged_task< StartAttachmentUploadOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->StartAttachmentUpload(request); } );
330 auto packagedFunction = [task]() { (*task)(); };
331 m_executor->Submit(packagedFunction);
332 return task->get_future();
333 }
334
StartAttachmentUploadAsync(const StartAttachmentUploadRequest & request,const StartAttachmentUploadResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const335 void ConnectParticipantClient::StartAttachmentUploadAsync(const StartAttachmentUploadRequest& request, const StartAttachmentUploadResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
336 {
337 m_executor->Submit( [this, request, handler, context](){ this->StartAttachmentUploadAsyncHelper( request, handler, context ); } );
338 }
339
StartAttachmentUploadAsyncHelper(const StartAttachmentUploadRequest & request,const StartAttachmentUploadResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const340 void ConnectParticipantClient::StartAttachmentUploadAsyncHelper(const StartAttachmentUploadRequest& request, const StartAttachmentUploadResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
341 {
342 handler(this, request, StartAttachmentUpload(request), context);
343 }
344
345