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/dataexchange/DataExchangeClient.h>
21 #include <aws/dataexchange/DataExchangeEndpoint.h>
22 #include <aws/dataexchange/DataExchangeErrorMarshaller.h>
23 #include <aws/dataexchange/model/CancelJobRequest.h>
24 #include <aws/dataexchange/model/CreateDataSetRequest.h>
25 #include <aws/dataexchange/model/CreateEventActionRequest.h>
26 #include <aws/dataexchange/model/CreateJobRequest.h>
27 #include <aws/dataexchange/model/CreateRevisionRequest.h>
28 #include <aws/dataexchange/model/DeleteAssetRequest.h>
29 #include <aws/dataexchange/model/DeleteDataSetRequest.h>
30 #include <aws/dataexchange/model/DeleteEventActionRequest.h>
31 #include <aws/dataexchange/model/DeleteRevisionRequest.h>
32 #include <aws/dataexchange/model/GetAssetRequest.h>
33 #include <aws/dataexchange/model/GetDataSetRequest.h>
34 #include <aws/dataexchange/model/GetEventActionRequest.h>
35 #include <aws/dataexchange/model/GetJobRequest.h>
36 #include <aws/dataexchange/model/GetRevisionRequest.h>
37 #include <aws/dataexchange/model/ListDataSetRevisionsRequest.h>
38 #include <aws/dataexchange/model/ListDataSetsRequest.h>
39 #include <aws/dataexchange/model/ListEventActionsRequest.h>
40 #include <aws/dataexchange/model/ListJobsRequest.h>
41 #include <aws/dataexchange/model/ListRevisionAssetsRequest.h>
42 #include <aws/dataexchange/model/ListTagsForResourceRequest.h>
43 #include <aws/dataexchange/model/StartJobRequest.h>
44 #include <aws/dataexchange/model/TagResourceRequest.h>
45 #include <aws/dataexchange/model/UntagResourceRequest.h>
46 #include <aws/dataexchange/model/UpdateAssetRequest.h>
47 #include <aws/dataexchange/model/UpdateDataSetRequest.h>
48 #include <aws/dataexchange/model/UpdateEventActionRequest.h>
49 #include <aws/dataexchange/model/UpdateRevisionRequest.h>
50
51 using namespace Aws;
52 using namespace Aws::Auth;
53 using namespace Aws::Client;
54 using namespace Aws::DataExchange;
55 using namespace Aws::DataExchange::Model;
56 using namespace Aws::Http;
57 using namespace Aws::Utils::Json;
58
59 static const char* SERVICE_NAME = "dataexchange";
60 static const char* ALLOCATION_TAG = "DataExchangeClient";
61
62
DataExchangeClient(const Client::ClientConfiguration & clientConfiguration)63 DataExchangeClient::DataExchangeClient(const Client::ClientConfiguration& clientConfiguration) :
64 BASECLASS(clientConfiguration,
65 Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
66 SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
67 Aws::MakeShared<DataExchangeErrorMarshaller>(ALLOCATION_TAG)),
68 m_executor(clientConfiguration.executor)
69 {
70 init(clientConfiguration);
71 }
72
DataExchangeClient(const AWSCredentials & credentials,const Client::ClientConfiguration & clientConfiguration)73 DataExchangeClient::DataExchangeClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
74 BASECLASS(clientConfiguration,
75 Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
76 SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
77 Aws::MakeShared<DataExchangeErrorMarshaller>(ALLOCATION_TAG)),
78 m_executor(clientConfiguration.executor)
79 {
80 init(clientConfiguration);
81 }
82
DataExchangeClient(const std::shared_ptr<AWSCredentialsProvider> & credentialsProvider,const Client::ClientConfiguration & clientConfiguration)83 DataExchangeClient::DataExchangeClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
84 const Client::ClientConfiguration& clientConfiguration) :
85 BASECLASS(clientConfiguration,
86 Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
87 SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
88 Aws::MakeShared<DataExchangeErrorMarshaller>(ALLOCATION_TAG)),
89 m_executor(clientConfiguration.executor)
90 {
91 init(clientConfiguration);
92 }
93
~DataExchangeClient()94 DataExchangeClient::~DataExchangeClient()
95 {
96 }
97
init(const Client::ClientConfiguration & config)98 void DataExchangeClient::init(const Client::ClientConfiguration& config)
99 {
100 SetServiceClientName("DataExchange");
101 m_configScheme = SchemeMapper::ToString(config.scheme);
102 if (config.endpointOverride.empty())
103 {
104 m_uri = m_configScheme + "://" + DataExchangeEndpoint::ForRegion(config.region, config.useDualStack);
105 }
106 else
107 {
108 OverrideEndpoint(config.endpointOverride);
109 }
110 }
111
OverrideEndpoint(const Aws::String & endpoint)112 void DataExchangeClient::OverrideEndpoint(const Aws::String& endpoint)
113 {
114 if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
115 {
116 m_uri = endpoint;
117 }
118 else
119 {
120 m_uri = m_configScheme + "://" + endpoint;
121 }
122 }
123
CancelJob(const CancelJobRequest & request) const124 CancelJobOutcome DataExchangeClient::CancelJob(const CancelJobRequest& request) const
125 {
126 if (!request.JobIdHasBeenSet())
127 {
128 AWS_LOGSTREAM_ERROR("CancelJob", "Required field: JobId, is not set");
129 return CancelJobOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobId]", false));
130 }
131 Aws::Http::URI uri = m_uri;
132 uri.AddPathSegments("/v1/jobs/");
133 uri.AddPathSegment(request.GetJobId());
134 return CancelJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
135 }
136
CancelJobCallable(const CancelJobRequest & request) const137 CancelJobOutcomeCallable DataExchangeClient::CancelJobCallable(const CancelJobRequest& request) const
138 {
139 auto task = Aws::MakeShared< std::packaged_task< CancelJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CancelJob(request); } );
140 auto packagedFunction = [task]() { (*task)(); };
141 m_executor->Submit(packagedFunction);
142 return task->get_future();
143 }
144
CancelJobAsync(const CancelJobRequest & request,const CancelJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const145 void DataExchangeClient::CancelJobAsync(const CancelJobRequest& request, const CancelJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
146 {
147 m_executor->Submit( [this, request, handler, context](){ this->CancelJobAsyncHelper( request, handler, context ); } );
148 }
149
CancelJobAsyncHelper(const CancelJobRequest & request,const CancelJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const150 void DataExchangeClient::CancelJobAsyncHelper(const CancelJobRequest& request, const CancelJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
151 {
152 handler(this, request, CancelJob(request), context);
153 }
154
CreateDataSet(const CreateDataSetRequest & request) const155 CreateDataSetOutcome DataExchangeClient::CreateDataSet(const CreateDataSetRequest& request) const
156 {
157 Aws::Http::URI uri = m_uri;
158 uri.AddPathSegments("/v1/data-sets");
159 return CreateDataSetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
160 }
161
CreateDataSetCallable(const CreateDataSetRequest & request) const162 CreateDataSetOutcomeCallable DataExchangeClient::CreateDataSetCallable(const CreateDataSetRequest& request) const
163 {
164 auto task = Aws::MakeShared< std::packaged_task< CreateDataSetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateDataSet(request); } );
165 auto packagedFunction = [task]() { (*task)(); };
166 m_executor->Submit(packagedFunction);
167 return task->get_future();
168 }
169
CreateDataSetAsync(const CreateDataSetRequest & request,const CreateDataSetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const170 void DataExchangeClient::CreateDataSetAsync(const CreateDataSetRequest& request, const CreateDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
171 {
172 m_executor->Submit( [this, request, handler, context](){ this->CreateDataSetAsyncHelper( request, handler, context ); } );
173 }
174
CreateDataSetAsyncHelper(const CreateDataSetRequest & request,const CreateDataSetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const175 void DataExchangeClient::CreateDataSetAsyncHelper(const CreateDataSetRequest& request, const CreateDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
176 {
177 handler(this, request, CreateDataSet(request), context);
178 }
179
CreateEventAction(const CreateEventActionRequest & request) const180 CreateEventActionOutcome DataExchangeClient::CreateEventAction(const CreateEventActionRequest& request) const
181 {
182 Aws::Http::URI uri = m_uri;
183 uri.AddPathSegments("/v1/event-actions");
184 return CreateEventActionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
185 }
186
CreateEventActionCallable(const CreateEventActionRequest & request) const187 CreateEventActionOutcomeCallable DataExchangeClient::CreateEventActionCallable(const CreateEventActionRequest& request) const
188 {
189 auto task = Aws::MakeShared< std::packaged_task< CreateEventActionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateEventAction(request); } );
190 auto packagedFunction = [task]() { (*task)(); };
191 m_executor->Submit(packagedFunction);
192 return task->get_future();
193 }
194
CreateEventActionAsync(const CreateEventActionRequest & request,const CreateEventActionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const195 void DataExchangeClient::CreateEventActionAsync(const CreateEventActionRequest& request, const CreateEventActionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
196 {
197 m_executor->Submit( [this, request, handler, context](){ this->CreateEventActionAsyncHelper( request, handler, context ); } );
198 }
199
CreateEventActionAsyncHelper(const CreateEventActionRequest & request,const CreateEventActionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const200 void DataExchangeClient::CreateEventActionAsyncHelper(const CreateEventActionRequest& request, const CreateEventActionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
201 {
202 handler(this, request, CreateEventAction(request), context);
203 }
204
CreateJob(const CreateJobRequest & request) const205 CreateJobOutcome DataExchangeClient::CreateJob(const CreateJobRequest& request) const
206 {
207 Aws::Http::URI uri = m_uri;
208 uri.AddPathSegments("/v1/jobs");
209 return CreateJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
210 }
211
CreateJobCallable(const CreateJobRequest & request) const212 CreateJobOutcomeCallable DataExchangeClient::CreateJobCallable(const CreateJobRequest& request) const
213 {
214 auto task = Aws::MakeShared< std::packaged_task< CreateJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateJob(request); } );
215 auto packagedFunction = [task]() { (*task)(); };
216 m_executor->Submit(packagedFunction);
217 return task->get_future();
218 }
219
CreateJobAsync(const CreateJobRequest & request,const CreateJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const220 void DataExchangeClient::CreateJobAsync(const CreateJobRequest& request, const CreateJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
221 {
222 m_executor->Submit( [this, request, handler, context](){ this->CreateJobAsyncHelper( request, handler, context ); } );
223 }
224
CreateJobAsyncHelper(const CreateJobRequest & request,const CreateJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const225 void DataExchangeClient::CreateJobAsyncHelper(const CreateJobRequest& request, const CreateJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
226 {
227 handler(this, request, CreateJob(request), context);
228 }
229
CreateRevision(const CreateRevisionRequest & request) const230 CreateRevisionOutcome DataExchangeClient::CreateRevision(const CreateRevisionRequest& request) const
231 {
232 if (!request.DataSetIdHasBeenSet())
233 {
234 AWS_LOGSTREAM_ERROR("CreateRevision", "Required field: DataSetId, is not set");
235 return CreateRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
236 }
237 Aws::Http::URI uri = m_uri;
238 uri.AddPathSegments("/v1/data-sets/");
239 uri.AddPathSegment(request.GetDataSetId());
240 uri.AddPathSegments("/revisions");
241 return CreateRevisionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
242 }
243
CreateRevisionCallable(const CreateRevisionRequest & request) const244 CreateRevisionOutcomeCallable DataExchangeClient::CreateRevisionCallable(const CreateRevisionRequest& request) const
245 {
246 auto task = Aws::MakeShared< std::packaged_task< CreateRevisionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateRevision(request); } );
247 auto packagedFunction = [task]() { (*task)(); };
248 m_executor->Submit(packagedFunction);
249 return task->get_future();
250 }
251
CreateRevisionAsync(const CreateRevisionRequest & request,const CreateRevisionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const252 void DataExchangeClient::CreateRevisionAsync(const CreateRevisionRequest& request, const CreateRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
253 {
254 m_executor->Submit( [this, request, handler, context](){ this->CreateRevisionAsyncHelper( request, handler, context ); } );
255 }
256
CreateRevisionAsyncHelper(const CreateRevisionRequest & request,const CreateRevisionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const257 void DataExchangeClient::CreateRevisionAsyncHelper(const CreateRevisionRequest& request, const CreateRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
258 {
259 handler(this, request, CreateRevision(request), context);
260 }
261
DeleteAsset(const DeleteAssetRequest & request) const262 DeleteAssetOutcome DataExchangeClient::DeleteAsset(const DeleteAssetRequest& request) const
263 {
264 if (!request.AssetIdHasBeenSet())
265 {
266 AWS_LOGSTREAM_ERROR("DeleteAsset", "Required field: AssetId, is not set");
267 return DeleteAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AssetId]", false));
268 }
269 if (!request.DataSetIdHasBeenSet())
270 {
271 AWS_LOGSTREAM_ERROR("DeleteAsset", "Required field: DataSetId, is not set");
272 return DeleteAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
273 }
274 if (!request.RevisionIdHasBeenSet())
275 {
276 AWS_LOGSTREAM_ERROR("DeleteAsset", "Required field: RevisionId, is not set");
277 return DeleteAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
278 }
279 Aws::Http::URI uri = m_uri;
280 uri.AddPathSegments("/v1/data-sets/");
281 uri.AddPathSegment(request.GetDataSetId());
282 uri.AddPathSegments("/revisions/");
283 uri.AddPathSegment(request.GetRevisionId());
284 uri.AddPathSegments("/assets/");
285 uri.AddPathSegment(request.GetAssetId());
286 return DeleteAssetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
287 }
288
DeleteAssetCallable(const DeleteAssetRequest & request) const289 DeleteAssetOutcomeCallable DataExchangeClient::DeleteAssetCallable(const DeleteAssetRequest& request) const
290 {
291 auto task = Aws::MakeShared< std::packaged_task< DeleteAssetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteAsset(request); } );
292 auto packagedFunction = [task]() { (*task)(); };
293 m_executor->Submit(packagedFunction);
294 return task->get_future();
295 }
296
DeleteAssetAsync(const DeleteAssetRequest & request,const DeleteAssetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const297 void DataExchangeClient::DeleteAssetAsync(const DeleteAssetRequest& request, const DeleteAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
298 {
299 m_executor->Submit( [this, request, handler, context](){ this->DeleteAssetAsyncHelper( request, handler, context ); } );
300 }
301
DeleteAssetAsyncHelper(const DeleteAssetRequest & request,const DeleteAssetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const302 void DataExchangeClient::DeleteAssetAsyncHelper(const DeleteAssetRequest& request, const DeleteAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
303 {
304 handler(this, request, DeleteAsset(request), context);
305 }
306
DeleteDataSet(const DeleteDataSetRequest & request) const307 DeleteDataSetOutcome DataExchangeClient::DeleteDataSet(const DeleteDataSetRequest& request) const
308 {
309 if (!request.DataSetIdHasBeenSet())
310 {
311 AWS_LOGSTREAM_ERROR("DeleteDataSet", "Required field: DataSetId, is not set");
312 return DeleteDataSetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
313 }
314 Aws::Http::URI uri = m_uri;
315 uri.AddPathSegments("/v1/data-sets/");
316 uri.AddPathSegment(request.GetDataSetId());
317 return DeleteDataSetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
318 }
319
DeleteDataSetCallable(const DeleteDataSetRequest & request) const320 DeleteDataSetOutcomeCallable DataExchangeClient::DeleteDataSetCallable(const DeleteDataSetRequest& request) const
321 {
322 auto task = Aws::MakeShared< std::packaged_task< DeleteDataSetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteDataSet(request); } );
323 auto packagedFunction = [task]() { (*task)(); };
324 m_executor->Submit(packagedFunction);
325 return task->get_future();
326 }
327
DeleteDataSetAsync(const DeleteDataSetRequest & request,const DeleteDataSetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const328 void DataExchangeClient::DeleteDataSetAsync(const DeleteDataSetRequest& request, const DeleteDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
329 {
330 m_executor->Submit( [this, request, handler, context](){ this->DeleteDataSetAsyncHelper( request, handler, context ); } );
331 }
332
DeleteDataSetAsyncHelper(const DeleteDataSetRequest & request,const DeleteDataSetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const333 void DataExchangeClient::DeleteDataSetAsyncHelper(const DeleteDataSetRequest& request, const DeleteDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
334 {
335 handler(this, request, DeleteDataSet(request), context);
336 }
337
DeleteEventAction(const DeleteEventActionRequest & request) const338 DeleteEventActionOutcome DataExchangeClient::DeleteEventAction(const DeleteEventActionRequest& request) const
339 {
340 if (!request.EventActionIdHasBeenSet())
341 {
342 AWS_LOGSTREAM_ERROR("DeleteEventAction", "Required field: EventActionId, is not set");
343 return DeleteEventActionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EventActionId]", false));
344 }
345 Aws::Http::URI uri = m_uri;
346 uri.AddPathSegments("/v1/event-actions/");
347 uri.AddPathSegment(request.GetEventActionId());
348 return DeleteEventActionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
349 }
350
DeleteEventActionCallable(const DeleteEventActionRequest & request) const351 DeleteEventActionOutcomeCallable DataExchangeClient::DeleteEventActionCallable(const DeleteEventActionRequest& request) const
352 {
353 auto task = Aws::MakeShared< std::packaged_task< DeleteEventActionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteEventAction(request); } );
354 auto packagedFunction = [task]() { (*task)(); };
355 m_executor->Submit(packagedFunction);
356 return task->get_future();
357 }
358
DeleteEventActionAsync(const DeleteEventActionRequest & request,const DeleteEventActionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const359 void DataExchangeClient::DeleteEventActionAsync(const DeleteEventActionRequest& request, const DeleteEventActionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
360 {
361 m_executor->Submit( [this, request, handler, context](){ this->DeleteEventActionAsyncHelper( request, handler, context ); } );
362 }
363
DeleteEventActionAsyncHelper(const DeleteEventActionRequest & request,const DeleteEventActionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const364 void DataExchangeClient::DeleteEventActionAsyncHelper(const DeleteEventActionRequest& request, const DeleteEventActionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
365 {
366 handler(this, request, DeleteEventAction(request), context);
367 }
368
DeleteRevision(const DeleteRevisionRequest & request) const369 DeleteRevisionOutcome DataExchangeClient::DeleteRevision(const DeleteRevisionRequest& request) const
370 {
371 if (!request.DataSetIdHasBeenSet())
372 {
373 AWS_LOGSTREAM_ERROR("DeleteRevision", "Required field: DataSetId, is not set");
374 return DeleteRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
375 }
376 if (!request.RevisionIdHasBeenSet())
377 {
378 AWS_LOGSTREAM_ERROR("DeleteRevision", "Required field: RevisionId, is not set");
379 return DeleteRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
380 }
381 Aws::Http::URI uri = m_uri;
382 uri.AddPathSegments("/v1/data-sets/");
383 uri.AddPathSegment(request.GetDataSetId());
384 uri.AddPathSegments("/revisions/");
385 uri.AddPathSegment(request.GetRevisionId());
386 return DeleteRevisionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
387 }
388
DeleteRevisionCallable(const DeleteRevisionRequest & request) const389 DeleteRevisionOutcomeCallable DataExchangeClient::DeleteRevisionCallable(const DeleteRevisionRequest& request) const
390 {
391 auto task = Aws::MakeShared< std::packaged_task< DeleteRevisionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteRevision(request); } );
392 auto packagedFunction = [task]() { (*task)(); };
393 m_executor->Submit(packagedFunction);
394 return task->get_future();
395 }
396
DeleteRevisionAsync(const DeleteRevisionRequest & request,const DeleteRevisionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const397 void DataExchangeClient::DeleteRevisionAsync(const DeleteRevisionRequest& request, const DeleteRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
398 {
399 m_executor->Submit( [this, request, handler, context](){ this->DeleteRevisionAsyncHelper( request, handler, context ); } );
400 }
401
DeleteRevisionAsyncHelper(const DeleteRevisionRequest & request,const DeleteRevisionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const402 void DataExchangeClient::DeleteRevisionAsyncHelper(const DeleteRevisionRequest& request, const DeleteRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
403 {
404 handler(this, request, DeleteRevision(request), context);
405 }
406
GetAsset(const GetAssetRequest & request) const407 GetAssetOutcome DataExchangeClient::GetAsset(const GetAssetRequest& request) const
408 {
409 if (!request.AssetIdHasBeenSet())
410 {
411 AWS_LOGSTREAM_ERROR("GetAsset", "Required field: AssetId, is not set");
412 return GetAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AssetId]", false));
413 }
414 if (!request.DataSetIdHasBeenSet())
415 {
416 AWS_LOGSTREAM_ERROR("GetAsset", "Required field: DataSetId, is not set");
417 return GetAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
418 }
419 if (!request.RevisionIdHasBeenSet())
420 {
421 AWS_LOGSTREAM_ERROR("GetAsset", "Required field: RevisionId, is not set");
422 return GetAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
423 }
424 Aws::Http::URI uri = m_uri;
425 uri.AddPathSegments("/v1/data-sets/");
426 uri.AddPathSegment(request.GetDataSetId());
427 uri.AddPathSegments("/revisions/");
428 uri.AddPathSegment(request.GetRevisionId());
429 uri.AddPathSegments("/assets/");
430 uri.AddPathSegment(request.GetAssetId());
431 return GetAssetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
432 }
433
GetAssetCallable(const GetAssetRequest & request) const434 GetAssetOutcomeCallable DataExchangeClient::GetAssetCallable(const GetAssetRequest& request) const
435 {
436 auto task = Aws::MakeShared< std::packaged_task< GetAssetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetAsset(request); } );
437 auto packagedFunction = [task]() { (*task)(); };
438 m_executor->Submit(packagedFunction);
439 return task->get_future();
440 }
441
GetAssetAsync(const GetAssetRequest & request,const GetAssetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const442 void DataExchangeClient::GetAssetAsync(const GetAssetRequest& request, const GetAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
443 {
444 m_executor->Submit( [this, request, handler, context](){ this->GetAssetAsyncHelper( request, handler, context ); } );
445 }
446
GetAssetAsyncHelper(const GetAssetRequest & request,const GetAssetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const447 void DataExchangeClient::GetAssetAsyncHelper(const GetAssetRequest& request, const GetAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
448 {
449 handler(this, request, GetAsset(request), context);
450 }
451
GetDataSet(const GetDataSetRequest & request) const452 GetDataSetOutcome DataExchangeClient::GetDataSet(const GetDataSetRequest& request) const
453 {
454 if (!request.DataSetIdHasBeenSet())
455 {
456 AWS_LOGSTREAM_ERROR("GetDataSet", "Required field: DataSetId, is not set");
457 return GetDataSetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
458 }
459 Aws::Http::URI uri = m_uri;
460 uri.AddPathSegments("/v1/data-sets/");
461 uri.AddPathSegment(request.GetDataSetId());
462 return GetDataSetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
463 }
464
GetDataSetCallable(const GetDataSetRequest & request) const465 GetDataSetOutcomeCallable DataExchangeClient::GetDataSetCallable(const GetDataSetRequest& request) const
466 {
467 auto task = Aws::MakeShared< std::packaged_task< GetDataSetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetDataSet(request); } );
468 auto packagedFunction = [task]() { (*task)(); };
469 m_executor->Submit(packagedFunction);
470 return task->get_future();
471 }
472
GetDataSetAsync(const GetDataSetRequest & request,const GetDataSetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const473 void DataExchangeClient::GetDataSetAsync(const GetDataSetRequest& request, const GetDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
474 {
475 m_executor->Submit( [this, request, handler, context](){ this->GetDataSetAsyncHelper( request, handler, context ); } );
476 }
477
GetDataSetAsyncHelper(const GetDataSetRequest & request,const GetDataSetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const478 void DataExchangeClient::GetDataSetAsyncHelper(const GetDataSetRequest& request, const GetDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
479 {
480 handler(this, request, GetDataSet(request), context);
481 }
482
GetEventAction(const GetEventActionRequest & request) const483 GetEventActionOutcome DataExchangeClient::GetEventAction(const GetEventActionRequest& request) const
484 {
485 if (!request.EventActionIdHasBeenSet())
486 {
487 AWS_LOGSTREAM_ERROR("GetEventAction", "Required field: EventActionId, is not set");
488 return GetEventActionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EventActionId]", false));
489 }
490 Aws::Http::URI uri = m_uri;
491 uri.AddPathSegments("/v1/event-actions/");
492 uri.AddPathSegment(request.GetEventActionId());
493 return GetEventActionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
494 }
495
GetEventActionCallable(const GetEventActionRequest & request) const496 GetEventActionOutcomeCallable DataExchangeClient::GetEventActionCallable(const GetEventActionRequest& request) const
497 {
498 auto task = Aws::MakeShared< std::packaged_task< GetEventActionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetEventAction(request); } );
499 auto packagedFunction = [task]() { (*task)(); };
500 m_executor->Submit(packagedFunction);
501 return task->get_future();
502 }
503
GetEventActionAsync(const GetEventActionRequest & request,const GetEventActionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const504 void DataExchangeClient::GetEventActionAsync(const GetEventActionRequest& request, const GetEventActionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
505 {
506 m_executor->Submit( [this, request, handler, context](){ this->GetEventActionAsyncHelper( request, handler, context ); } );
507 }
508
GetEventActionAsyncHelper(const GetEventActionRequest & request,const GetEventActionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const509 void DataExchangeClient::GetEventActionAsyncHelper(const GetEventActionRequest& request, const GetEventActionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
510 {
511 handler(this, request, GetEventAction(request), context);
512 }
513
GetJob(const GetJobRequest & request) const514 GetJobOutcome DataExchangeClient::GetJob(const GetJobRequest& request) const
515 {
516 if (!request.JobIdHasBeenSet())
517 {
518 AWS_LOGSTREAM_ERROR("GetJob", "Required field: JobId, is not set");
519 return GetJobOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobId]", false));
520 }
521 Aws::Http::URI uri = m_uri;
522 uri.AddPathSegments("/v1/jobs/");
523 uri.AddPathSegment(request.GetJobId());
524 return GetJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
525 }
526
GetJobCallable(const GetJobRequest & request) const527 GetJobOutcomeCallable DataExchangeClient::GetJobCallable(const GetJobRequest& request) const
528 {
529 auto task = Aws::MakeShared< std::packaged_task< GetJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetJob(request); } );
530 auto packagedFunction = [task]() { (*task)(); };
531 m_executor->Submit(packagedFunction);
532 return task->get_future();
533 }
534
GetJobAsync(const GetJobRequest & request,const GetJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const535 void DataExchangeClient::GetJobAsync(const GetJobRequest& request, const GetJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
536 {
537 m_executor->Submit( [this, request, handler, context](){ this->GetJobAsyncHelper( request, handler, context ); } );
538 }
539
GetJobAsyncHelper(const GetJobRequest & request,const GetJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const540 void DataExchangeClient::GetJobAsyncHelper(const GetJobRequest& request, const GetJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
541 {
542 handler(this, request, GetJob(request), context);
543 }
544
GetRevision(const GetRevisionRequest & request) const545 GetRevisionOutcome DataExchangeClient::GetRevision(const GetRevisionRequest& request) const
546 {
547 if (!request.DataSetIdHasBeenSet())
548 {
549 AWS_LOGSTREAM_ERROR("GetRevision", "Required field: DataSetId, is not set");
550 return GetRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
551 }
552 if (!request.RevisionIdHasBeenSet())
553 {
554 AWS_LOGSTREAM_ERROR("GetRevision", "Required field: RevisionId, is not set");
555 return GetRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
556 }
557 Aws::Http::URI uri = m_uri;
558 uri.AddPathSegments("/v1/data-sets/");
559 uri.AddPathSegment(request.GetDataSetId());
560 uri.AddPathSegments("/revisions/");
561 uri.AddPathSegment(request.GetRevisionId());
562 return GetRevisionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
563 }
564
GetRevisionCallable(const GetRevisionRequest & request) const565 GetRevisionOutcomeCallable DataExchangeClient::GetRevisionCallable(const GetRevisionRequest& request) const
566 {
567 auto task = Aws::MakeShared< std::packaged_task< GetRevisionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetRevision(request); } );
568 auto packagedFunction = [task]() { (*task)(); };
569 m_executor->Submit(packagedFunction);
570 return task->get_future();
571 }
572
GetRevisionAsync(const GetRevisionRequest & request,const GetRevisionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const573 void DataExchangeClient::GetRevisionAsync(const GetRevisionRequest& request, const GetRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
574 {
575 m_executor->Submit( [this, request, handler, context](){ this->GetRevisionAsyncHelper( request, handler, context ); } );
576 }
577
GetRevisionAsyncHelper(const GetRevisionRequest & request,const GetRevisionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const578 void DataExchangeClient::GetRevisionAsyncHelper(const GetRevisionRequest& request, const GetRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
579 {
580 handler(this, request, GetRevision(request), context);
581 }
582
ListDataSetRevisions(const ListDataSetRevisionsRequest & request) const583 ListDataSetRevisionsOutcome DataExchangeClient::ListDataSetRevisions(const ListDataSetRevisionsRequest& request) const
584 {
585 if (!request.DataSetIdHasBeenSet())
586 {
587 AWS_LOGSTREAM_ERROR("ListDataSetRevisions", "Required field: DataSetId, is not set");
588 return ListDataSetRevisionsOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
589 }
590 Aws::Http::URI uri = m_uri;
591 uri.AddPathSegments("/v1/data-sets/");
592 uri.AddPathSegment(request.GetDataSetId());
593 uri.AddPathSegments("/revisions");
594 return ListDataSetRevisionsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
595 }
596
ListDataSetRevisionsCallable(const ListDataSetRevisionsRequest & request) const597 ListDataSetRevisionsOutcomeCallable DataExchangeClient::ListDataSetRevisionsCallable(const ListDataSetRevisionsRequest& request) const
598 {
599 auto task = Aws::MakeShared< std::packaged_task< ListDataSetRevisionsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListDataSetRevisions(request); } );
600 auto packagedFunction = [task]() { (*task)(); };
601 m_executor->Submit(packagedFunction);
602 return task->get_future();
603 }
604
ListDataSetRevisionsAsync(const ListDataSetRevisionsRequest & request,const ListDataSetRevisionsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const605 void DataExchangeClient::ListDataSetRevisionsAsync(const ListDataSetRevisionsRequest& request, const ListDataSetRevisionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
606 {
607 m_executor->Submit( [this, request, handler, context](){ this->ListDataSetRevisionsAsyncHelper( request, handler, context ); } );
608 }
609
ListDataSetRevisionsAsyncHelper(const ListDataSetRevisionsRequest & request,const ListDataSetRevisionsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const610 void DataExchangeClient::ListDataSetRevisionsAsyncHelper(const ListDataSetRevisionsRequest& request, const ListDataSetRevisionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
611 {
612 handler(this, request, ListDataSetRevisions(request), context);
613 }
614
ListDataSets(const ListDataSetsRequest & request) const615 ListDataSetsOutcome DataExchangeClient::ListDataSets(const ListDataSetsRequest& request) const
616 {
617 Aws::Http::URI uri = m_uri;
618 uri.AddPathSegments("/v1/data-sets");
619 return ListDataSetsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
620 }
621
ListDataSetsCallable(const ListDataSetsRequest & request) const622 ListDataSetsOutcomeCallable DataExchangeClient::ListDataSetsCallable(const ListDataSetsRequest& request) const
623 {
624 auto task = Aws::MakeShared< std::packaged_task< ListDataSetsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListDataSets(request); } );
625 auto packagedFunction = [task]() { (*task)(); };
626 m_executor->Submit(packagedFunction);
627 return task->get_future();
628 }
629
ListDataSetsAsync(const ListDataSetsRequest & request,const ListDataSetsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const630 void DataExchangeClient::ListDataSetsAsync(const ListDataSetsRequest& request, const ListDataSetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
631 {
632 m_executor->Submit( [this, request, handler, context](){ this->ListDataSetsAsyncHelper( request, handler, context ); } );
633 }
634
ListDataSetsAsyncHelper(const ListDataSetsRequest & request,const ListDataSetsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const635 void DataExchangeClient::ListDataSetsAsyncHelper(const ListDataSetsRequest& request, const ListDataSetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
636 {
637 handler(this, request, ListDataSets(request), context);
638 }
639
ListEventActions(const ListEventActionsRequest & request) const640 ListEventActionsOutcome DataExchangeClient::ListEventActions(const ListEventActionsRequest& request) const
641 {
642 Aws::Http::URI uri = m_uri;
643 uri.AddPathSegments("/v1/event-actions");
644 return ListEventActionsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
645 }
646
ListEventActionsCallable(const ListEventActionsRequest & request) const647 ListEventActionsOutcomeCallable DataExchangeClient::ListEventActionsCallable(const ListEventActionsRequest& request) const
648 {
649 auto task = Aws::MakeShared< std::packaged_task< ListEventActionsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListEventActions(request); } );
650 auto packagedFunction = [task]() { (*task)(); };
651 m_executor->Submit(packagedFunction);
652 return task->get_future();
653 }
654
ListEventActionsAsync(const ListEventActionsRequest & request,const ListEventActionsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const655 void DataExchangeClient::ListEventActionsAsync(const ListEventActionsRequest& request, const ListEventActionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
656 {
657 m_executor->Submit( [this, request, handler, context](){ this->ListEventActionsAsyncHelper( request, handler, context ); } );
658 }
659
ListEventActionsAsyncHelper(const ListEventActionsRequest & request,const ListEventActionsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const660 void DataExchangeClient::ListEventActionsAsyncHelper(const ListEventActionsRequest& request, const ListEventActionsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
661 {
662 handler(this, request, ListEventActions(request), context);
663 }
664
ListJobs(const ListJobsRequest & request) const665 ListJobsOutcome DataExchangeClient::ListJobs(const ListJobsRequest& request) const
666 {
667 Aws::Http::URI uri = m_uri;
668 uri.AddPathSegments("/v1/jobs");
669 return ListJobsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
670 }
671
ListJobsCallable(const ListJobsRequest & request) const672 ListJobsOutcomeCallable DataExchangeClient::ListJobsCallable(const ListJobsRequest& request) const
673 {
674 auto task = Aws::MakeShared< std::packaged_task< ListJobsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListJobs(request); } );
675 auto packagedFunction = [task]() { (*task)(); };
676 m_executor->Submit(packagedFunction);
677 return task->get_future();
678 }
679
ListJobsAsync(const ListJobsRequest & request,const ListJobsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const680 void DataExchangeClient::ListJobsAsync(const ListJobsRequest& request, const ListJobsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
681 {
682 m_executor->Submit( [this, request, handler, context](){ this->ListJobsAsyncHelper( request, handler, context ); } );
683 }
684
ListJobsAsyncHelper(const ListJobsRequest & request,const ListJobsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const685 void DataExchangeClient::ListJobsAsyncHelper(const ListJobsRequest& request, const ListJobsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
686 {
687 handler(this, request, ListJobs(request), context);
688 }
689
ListRevisionAssets(const ListRevisionAssetsRequest & request) const690 ListRevisionAssetsOutcome DataExchangeClient::ListRevisionAssets(const ListRevisionAssetsRequest& request) const
691 {
692 if (!request.DataSetIdHasBeenSet())
693 {
694 AWS_LOGSTREAM_ERROR("ListRevisionAssets", "Required field: DataSetId, is not set");
695 return ListRevisionAssetsOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
696 }
697 if (!request.RevisionIdHasBeenSet())
698 {
699 AWS_LOGSTREAM_ERROR("ListRevisionAssets", "Required field: RevisionId, is not set");
700 return ListRevisionAssetsOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
701 }
702 Aws::Http::URI uri = m_uri;
703 uri.AddPathSegments("/v1/data-sets/");
704 uri.AddPathSegment(request.GetDataSetId());
705 uri.AddPathSegments("/revisions/");
706 uri.AddPathSegment(request.GetRevisionId());
707 uri.AddPathSegments("/assets");
708 return ListRevisionAssetsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
709 }
710
ListRevisionAssetsCallable(const ListRevisionAssetsRequest & request) const711 ListRevisionAssetsOutcomeCallable DataExchangeClient::ListRevisionAssetsCallable(const ListRevisionAssetsRequest& request) const
712 {
713 auto task = Aws::MakeShared< std::packaged_task< ListRevisionAssetsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListRevisionAssets(request); } );
714 auto packagedFunction = [task]() { (*task)(); };
715 m_executor->Submit(packagedFunction);
716 return task->get_future();
717 }
718
ListRevisionAssetsAsync(const ListRevisionAssetsRequest & request,const ListRevisionAssetsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const719 void DataExchangeClient::ListRevisionAssetsAsync(const ListRevisionAssetsRequest& request, const ListRevisionAssetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
720 {
721 m_executor->Submit( [this, request, handler, context](){ this->ListRevisionAssetsAsyncHelper( request, handler, context ); } );
722 }
723
ListRevisionAssetsAsyncHelper(const ListRevisionAssetsRequest & request,const ListRevisionAssetsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const724 void DataExchangeClient::ListRevisionAssetsAsyncHelper(const ListRevisionAssetsRequest& request, const ListRevisionAssetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
725 {
726 handler(this, request, ListRevisionAssets(request), context);
727 }
728
ListTagsForResource(const ListTagsForResourceRequest & request) const729 ListTagsForResourceOutcome DataExchangeClient::ListTagsForResource(const ListTagsForResourceRequest& request) const
730 {
731 if (!request.ResourceArnHasBeenSet())
732 {
733 AWS_LOGSTREAM_ERROR("ListTagsForResource", "Required field: ResourceArn, is not set");
734 return ListTagsForResourceOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
735 }
736 Aws::Http::URI uri = m_uri;
737 uri.AddPathSegments("/tags/");
738 uri.AddPathSegment(request.GetResourceArn());
739 return ListTagsForResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
740 }
741
ListTagsForResourceCallable(const ListTagsForResourceRequest & request) const742 ListTagsForResourceOutcomeCallable DataExchangeClient::ListTagsForResourceCallable(const ListTagsForResourceRequest& request) const
743 {
744 auto task = Aws::MakeShared< std::packaged_task< ListTagsForResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListTagsForResource(request); } );
745 auto packagedFunction = [task]() { (*task)(); };
746 m_executor->Submit(packagedFunction);
747 return task->get_future();
748 }
749
ListTagsForResourceAsync(const ListTagsForResourceRequest & request,const ListTagsForResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const750 void DataExchangeClient::ListTagsForResourceAsync(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
751 {
752 m_executor->Submit( [this, request, handler, context](){ this->ListTagsForResourceAsyncHelper( request, handler, context ); } );
753 }
754
ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest & request,const ListTagsForResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const755 void DataExchangeClient::ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
756 {
757 handler(this, request, ListTagsForResource(request), context);
758 }
759
StartJob(const StartJobRequest & request) const760 StartJobOutcome DataExchangeClient::StartJob(const StartJobRequest& request) const
761 {
762 if (!request.JobIdHasBeenSet())
763 {
764 AWS_LOGSTREAM_ERROR("StartJob", "Required field: JobId, is not set");
765 return StartJobOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [JobId]", false));
766 }
767 Aws::Http::URI uri = m_uri;
768 uri.AddPathSegments("/v1/jobs/");
769 uri.AddPathSegment(request.GetJobId());
770 return StartJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
771 }
772
StartJobCallable(const StartJobRequest & request) const773 StartJobOutcomeCallable DataExchangeClient::StartJobCallable(const StartJobRequest& request) const
774 {
775 auto task = Aws::MakeShared< std::packaged_task< StartJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->StartJob(request); } );
776 auto packagedFunction = [task]() { (*task)(); };
777 m_executor->Submit(packagedFunction);
778 return task->get_future();
779 }
780
StartJobAsync(const StartJobRequest & request,const StartJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const781 void DataExchangeClient::StartJobAsync(const StartJobRequest& request, const StartJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
782 {
783 m_executor->Submit( [this, request, handler, context](){ this->StartJobAsyncHelper( request, handler, context ); } );
784 }
785
StartJobAsyncHelper(const StartJobRequest & request,const StartJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const786 void DataExchangeClient::StartJobAsyncHelper(const StartJobRequest& request, const StartJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
787 {
788 handler(this, request, StartJob(request), context);
789 }
790
TagResource(const TagResourceRequest & request) const791 TagResourceOutcome DataExchangeClient::TagResource(const TagResourceRequest& request) const
792 {
793 if (!request.ResourceArnHasBeenSet())
794 {
795 AWS_LOGSTREAM_ERROR("TagResource", "Required field: ResourceArn, is not set");
796 return TagResourceOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
797 }
798 Aws::Http::URI uri = m_uri;
799 uri.AddPathSegments("/tags/");
800 uri.AddPathSegment(request.GetResourceArn());
801 return TagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
802 }
803
TagResourceCallable(const TagResourceRequest & request) const804 TagResourceOutcomeCallable DataExchangeClient::TagResourceCallable(const TagResourceRequest& request) const
805 {
806 auto task = Aws::MakeShared< std::packaged_task< TagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->TagResource(request); } );
807 auto packagedFunction = [task]() { (*task)(); };
808 m_executor->Submit(packagedFunction);
809 return task->get_future();
810 }
811
TagResourceAsync(const TagResourceRequest & request,const TagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const812 void DataExchangeClient::TagResourceAsync(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
813 {
814 m_executor->Submit( [this, request, handler, context](){ this->TagResourceAsyncHelper( request, handler, context ); } );
815 }
816
TagResourceAsyncHelper(const TagResourceRequest & request,const TagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const817 void DataExchangeClient::TagResourceAsyncHelper(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
818 {
819 handler(this, request, TagResource(request), context);
820 }
821
UntagResource(const UntagResourceRequest & request) const822 UntagResourceOutcome DataExchangeClient::UntagResource(const UntagResourceRequest& request) const
823 {
824 if (!request.ResourceArnHasBeenSet())
825 {
826 AWS_LOGSTREAM_ERROR("UntagResource", "Required field: ResourceArn, is not set");
827 return UntagResourceOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
828 }
829 if (!request.TagKeysHasBeenSet())
830 {
831 AWS_LOGSTREAM_ERROR("UntagResource", "Required field: TagKeys, is not set");
832 return UntagResourceOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TagKeys]", false));
833 }
834 Aws::Http::URI uri = m_uri;
835 uri.AddPathSegments("/tags/");
836 uri.AddPathSegment(request.GetResourceArn());
837 return UntagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
838 }
839
UntagResourceCallable(const UntagResourceRequest & request) const840 UntagResourceOutcomeCallable DataExchangeClient::UntagResourceCallable(const UntagResourceRequest& request) const
841 {
842 auto task = Aws::MakeShared< std::packaged_task< UntagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UntagResource(request); } );
843 auto packagedFunction = [task]() { (*task)(); };
844 m_executor->Submit(packagedFunction);
845 return task->get_future();
846 }
847
UntagResourceAsync(const UntagResourceRequest & request,const UntagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const848 void DataExchangeClient::UntagResourceAsync(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
849 {
850 m_executor->Submit( [this, request, handler, context](){ this->UntagResourceAsyncHelper( request, handler, context ); } );
851 }
852
UntagResourceAsyncHelper(const UntagResourceRequest & request,const UntagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const853 void DataExchangeClient::UntagResourceAsyncHelper(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
854 {
855 handler(this, request, UntagResource(request), context);
856 }
857
UpdateAsset(const UpdateAssetRequest & request) const858 UpdateAssetOutcome DataExchangeClient::UpdateAsset(const UpdateAssetRequest& request) const
859 {
860 if (!request.AssetIdHasBeenSet())
861 {
862 AWS_LOGSTREAM_ERROR("UpdateAsset", "Required field: AssetId, is not set");
863 return UpdateAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [AssetId]", false));
864 }
865 if (!request.DataSetIdHasBeenSet())
866 {
867 AWS_LOGSTREAM_ERROR("UpdateAsset", "Required field: DataSetId, is not set");
868 return UpdateAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
869 }
870 if (!request.RevisionIdHasBeenSet())
871 {
872 AWS_LOGSTREAM_ERROR("UpdateAsset", "Required field: RevisionId, is not set");
873 return UpdateAssetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
874 }
875 Aws::Http::URI uri = m_uri;
876 uri.AddPathSegments("/v1/data-sets/");
877 uri.AddPathSegment(request.GetDataSetId());
878 uri.AddPathSegments("/revisions/");
879 uri.AddPathSegment(request.GetRevisionId());
880 uri.AddPathSegments("/assets/");
881 uri.AddPathSegment(request.GetAssetId());
882 return UpdateAssetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
883 }
884
UpdateAssetCallable(const UpdateAssetRequest & request) const885 UpdateAssetOutcomeCallable DataExchangeClient::UpdateAssetCallable(const UpdateAssetRequest& request) const
886 {
887 auto task = Aws::MakeShared< std::packaged_task< UpdateAssetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateAsset(request); } );
888 auto packagedFunction = [task]() { (*task)(); };
889 m_executor->Submit(packagedFunction);
890 return task->get_future();
891 }
892
UpdateAssetAsync(const UpdateAssetRequest & request,const UpdateAssetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const893 void DataExchangeClient::UpdateAssetAsync(const UpdateAssetRequest& request, const UpdateAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
894 {
895 m_executor->Submit( [this, request, handler, context](){ this->UpdateAssetAsyncHelper( request, handler, context ); } );
896 }
897
UpdateAssetAsyncHelper(const UpdateAssetRequest & request,const UpdateAssetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const898 void DataExchangeClient::UpdateAssetAsyncHelper(const UpdateAssetRequest& request, const UpdateAssetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
899 {
900 handler(this, request, UpdateAsset(request), context);
901 }
902
UpdateDataSet(const UpdateDataSetRequest & request) const903 UpdateDataSetOutcome DataExchangeClient::UpdateDataSet(const UpdateDataSetRequest& request) const
904 {
905 if (!request.DataSetIdHasBeenSet())
906 {
907 AWS_LOGSTREAM_ERROR("UpdateDataSet", "Required field: DataSetId, is not set");
908 return UpdateDataSetOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
909 }
910 Aws::Http::URI uri = m_uri;
911 uri.AddPathSegments("/v1/data-sets/");
912 uri.AddPathSegment(request.GetDataSetId());
913 return UpdateDataSetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
914 }
915
UpdateDataSetCallable(const UpdateDataSetRequest & request) const916 UpdateDataSetOutcomeCallable DataExchangeClient::UpdateDataSetCallable(const UpdateDataSetRequest& request) const
917 {
918 auto task = Aws::MakeShared< std::packaged_task< UpdateDataSetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateDataSet(request); } );
919 auto packagedFunction = [task]() { (*task)(); };
920 m_executor->Submit(packagedFunction);
921 return task->get_future();
922 }
923
UpdateDataSetAsync(const UpdateDataSetRequest & request,const UpdateDataSetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const924 void DataExchangeClient::UpdateDataSetAsync(const UpdateDataSetRequest& request, const UpdateDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
925 {
926 m_executor->Submit( [this, request, handler, context](){ this->UpdateDataSetAsyncHelper( request, handler, context ); } );
927 }
928
UpdateDataSetAsyncHelper(const UpdateDataSetRequest & request,const UpdateDataSetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const929 void DataExchangeClient::UpdateDataSetAsyncHelper(const UpdateDataSetRequest& request, const UpdateDataSetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
930 {
931 handler(this, request, UpdateDataSet(request), context);
932 }
933
UpdateEventAction(const UpdateEventActionRequest & request) const934 UpdateEventActionOutcome DataExchangeClient::UpdateEventAction(const UpdateEventActionRequest& request) const
935 {
936 if (!request.EventActionIdHasBeenSet())
937 {
938 AWS_LOGSTREAM_ERROR("UpdateEventAction", "Required field: EventActionId, is not set");
939 return UpdateEventActionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [EventActionId]", false));
940 }
941 Aws::Http::URI uri = m_uri;
942 uri.AddPathSegments("/v1/event-actions/");
943 uri.AddPathSegment(request.GetEventActionId());
944 return UpdateEventActionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
945 }
946
UpdateEventActionCallable(const UpdateEventActionRequest & request) const947 UpdateEventActionOutcomeCallable DataExchangeClient::UpdateEventActionCallable(const UpdateEventActionRequest& request) const
948 {
949 auto task = Aws::MakeShared< std::packaged_task< UpdateEventActionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateEventAction(request); } );
950 auto packagedFunction = [task]() { (*task)(); };
951 m_executor->Submit(packagedFunction);
952 return task->get_future();
953 }
954
UpdateEventActionAsync(const UpdateEventActionRequest & request,const UpdateEventActionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const955 void DataExchangeClient::UpdateEventActionAsync(const UpdateEventActionRequest& request, const UpdateEventActionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
956 {
957 m_executor->Submit( [this, request, handler, context](){ this->UpdateEventActionAsyncHelper( request, handler, context ); } );
958 }
959
UpdateEventActionAsyncHelper(const UpdateEventActionRequest & request,const UpdateEventActionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const960 void DataExchangeClient::UpdateEventActionAsyncHelper(const UpdateEventActionRequest& request, const UpdateEventActionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
961 {
962 handler(this, request, UpdateEventAction(request), context);
963 }
964
UpdateRevision(const UpdateRevisionRequest & request) const965 UpdateRevisionOutcome DataExchangeClient::UpdateRevision(const UpdateRevisionRequest& request) const
966 {
967 if (!request.DataSetIdHasBeenSet())
968 {
969 AWS_LOGSTREAM_ERROR("UpdateRevision", "Required field: DataSetId, is not set");
970 return UpdateRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DataSetId]", false));
971 }
972 if (!request.RevisionIdHasBeenSet())
973 {
974 AWS_LOGSTREAM_ERROR("UpdateRevision", "Required field: RevisionId, is not set");
975 return UpdateRevisionOutcome(Aws::Client::AWSError<DataExchangeErrors>(DataExchangeErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [RevisionId]", false));
976 }
977 Aws::Http::URI uri = m_uri;
978 uri.AddPathSegments("/v1/data-sets/");
979 uri.AddPathSegment(request.GetDataSetId());
980 uri.AddPathSegments("/revisions/");
981 uri.AddPathSegment(request.GetRevisionId());
982 return UpdateRevisionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
983 }
984
UpdateRevisionCallable(const UpdateRevisionRequest & request) const985 UpdateRevisionOutcomeCallable DataExchangeClient::UpdateRevisionCallable(const UpdateRevisionRequest& request) const
986 {
987 auto task = Aws::MakeShared< std::packaged_task< UpdateRevisionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateRevision(request); } );
988 auto packagedFunction = [task]() { (*task)(); };
989 m_executor->Submit(packagedFunction);
990 return task->get_future();
991 }
992
UpdateRevisionAsync(const UpdateRevisionRequest & request,const UpdateRevisionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const993 void DataExchangeClient::UpdateRevisionAsync(const UpdateRevisionRequest& request, const UpdateRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
994 {
995 m_executor->Submit( [this, request, handler, context](){ this->UpdateRevisionAsyncHelper( request, handler, context ); } );
996 }
997
UpdateRevisionAsyncHelper(const UpdateRevisionRequest & request,const UpdateRevisionResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const998 void DataExchangeClient::UpdateRevisionAsyncHelper(const UpdateRevisionRequest& request, const UpdateRevisionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
999 {
1000 handler(this, request, UpdateRevision(request), context);
1001 }
1002
1003