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/mediaconvert/MediaConvertClient.h>
21 #include <aws/mediaconvert/MediaConvertEndpoint.h>
22 #include <aws/mediaconvert/MediaConvertErrorMarshaller.h>
23 #include <aws/mediaconvert/model/AssociateCertificateRequest.h>
24 #include <aws/mediaconvert/model/CancelJobRequest.h>
25 #include <aws/mediaconvert/model/CreateJobRequest.h>
26 #include <aws/mediaconvert/model/CreateJobTemplateRequest.h>
27 #include <aws/mediaconvert/model/CreatePresetRequest.h>
28 #include <aws/mediaconvert/model/CreateQueueRequest.h>
29 #include <aws/mediaconvert/model/DeleteJobTemplateRequest.h>
30 #include <aws/mediaconvert/model/DeletePolicyRequest.h>
31 #include <aws/mediaconvert/model/DeletePresetRequest.h>
32 #include <aws/mediaconvert/model/DeleteQueueRequest.h>
33 #include <aws/mediaconvert/model/DescribeEndpointsRequest.h>
34 #include <aws/mediaconvert/model/DisassociateCertificateRequest.h>
35 #include <aws/mediaconvert/model/GetJobRequest.h>
36 #include <aws/mediaconvert/model/GetJobTemplateRequest.h>
37 #include <aws/mediaconvert/model/GetPolicyRequest.h>
38 #include <aws/mediaconvert/model/GetPresetRequest.h>
39 #include <aws/mediaconvert/model/GetQueueRequest.h>
40 #include <aws/mediaconvert/model/ListJobTemplatesRequest.h>
41 #include <aws/mediaconvert/model/ListJobsRequest.h>
42 #include <aws/mediaconvert/model/ListPresetsRequest.h>
43 #include <aws/mediaconvert/model/ListQueuesRequest.h>
44 #include <aws/mediaconvert/model/ListTagsForResourceRequest.h>
45 #include <aws/mediaconvert/model/PutPolicyRequest.h>
46 #include <aws/mediaconvert/model/TagResourceRequest.h>
47 #include <aws/mediaconvert/model/UntagResourceRequest.h>
48 #include <aws/mediaconvert/model/UpdateJobTemplateRequest.h>
49 #include <aws/mediaconvert/model/UpdatePresetRequest.h>
50 #include <aws/mediaconvert/model/UpdateQueueRequest.h>
51 
52 using namespace Aws;
53 using namespace Aws::Auth;
54 using namespace Aws::Client;
55 using namespace Aws::MediaConvert;
56 using namespace Aws::MediaConvert::Model;
57 using namespace Aws::Http;
58 using namespace Aws::Utils::Json;
59 
60 static const char* SERVICE_NAME = "mediaconvert";
61 static const char* ALLOCATION_TAG = "MediaConvertClient";
62 
63 
MediaConvertClient(const Client::ClientConfiguration & clientConfiguration)64 MediaConvertClient::MediaConvertClient(const Client::ClientConfiguration& clientConfiguration) :
65   BASECLASS(clientConfiguration,
66     Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
67         SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
68     Aws::MakeShared<MediaConvertErrorMarshaller>(ALLOCATION_TAG)),
69     m_executor(clientConfiguration.executor)
70 {
71   init(clientConfiguration);
72 }
73 
MediaConvertClient(const AWSCredentials & credentials,const Client::ClientConfiguration & clientConfiguration)74 MediaConvertClient::MediaConvertClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
75   BASECLASS(clientConfiguration,
76     Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
77          SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
78     Aws::MakeShared<MediaConvertErrorMarshaller>(ALLOCATION_TAG)),
79     m_executor(clientConfiguration.executor)
80 {
81   init(clientConfiguration);
82 }
83 
MediaConvertClient(const std::shared_ptr<AWSCredentialsProvider> & credentialsProvider,const Client::ClientConfiguration & clientConfiguration)84 MediaConvertClient::MediaConvertClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
85   const Client::ClientConfiguration& clientConfiguration) :
86   BASECLASS(clientConfiguration,
87     Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
88          SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
89     Aws::MakeShared<MediaConvertErrorMarshaller>(ALLOCATION_TAG)),
90     m_executor(clientConfiguration.executor)
91 {
92   init(clientConfiguration);
93 }
94 
~MediaConvertClient()95 MediaConvertClient::~MediaConvertClient()
96 {
97 }
98 
init(const Client::ClientConfiguration & config)99 void MediaConvertClient::init(const Client::ClientConfiguration& config)
100 {
101   SetServiceClientName("MediaConvert");
102   m_configScheme = SchemeMapper::ToString(config.scheme);
103   if (config.endpointOverride.empty())
104   {
105       m_uri = m_configScheme + "://" + MediaConvertEndpoint::ForRegion(config.region, config.useDualStack);
106   }
107   else
108   {
109       OverrideEndpoint(config.endpointOverride);
110   }
111 }
112 
OverrideEndpoint(const Aws::String & endpoint)113 void MediaConvertClient::OverrideEndpoint(const Aws::String& endpoint)
114 {
115   if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
116   {
117       m_uri = endpoint;
118   }
119   else
120   {
121       m_uri = m_configScheme + "://" + endpoint;
122   }
123 }
124 
AssociateCertificate(const AssociateCertificateRequest & request) const125 AssociateCertificateOutcome MediaConvertClient::AssociateCertificate(const AssociateCertificateRequest& request) const
126 {
127   Aws::Http::URI uri = m_uri;
128   uri.AddPathSegments("/2017-08-29/certificates");
129   return AssociateCertificateOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
130 }
131 
AssociateCertificateCallable(const AssociateCertificateRequest & request) const132 AssociateCertificateOutcomeCallable MediaConvertClient::AssociateCertificateCallable(const AssociateCertificateRequest& request) const
133 {
134   auto task = Aws::MakeShared< std::packaged_task< AssociateCertificateOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->AssociateCertificate(request); } );
135   auto packagedFunction = [task]() { (*task)(); };
136   m_executor->Submit(packagedFunction);
137   return task->get_future();
138 }
139 
AssociateCertificateAsync(const AssociateCertificateRequest & request,const AssociateCertificateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const140 void MediaConvertClient::AssociateCertificateAsync(const AssociateCertificateRequest& request, const AssociateCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
141 {
142   m_executor->Submit( [this, request, handler, context](){ this->AssociateCertificateAsyncHelper( request, handler, context ); } );
143 }
144 
AssociateCertificateAsyncHelper(const AssociateCertificateRequest & request,const AssociateCertificateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const145 void MediaConvertClient::AssociateCertificateAsyncHelper(const AssociateCertificateRequest& request, const AssociateCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
146 {
147   handler(this, request, AssociateCertificate(request), context);
148 }
149 
CancelJob(const CancelJobRequest & request) const150 CancelJobOutcome MediaConvertClient::CancelJob(const CancelJobRequest& request) const
151 {
152   if (!request.IdHasBeenSet())
153   {
154     AWS_LOGSTREAM_ERROR("CancelJob", "Required field: Id, is not set");
155     return CancelJobOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Id]", false));
156   }
157   Aws::Http::URI uri = m_uri;
158   uri.AddPathSegments("/2017-08-29/jobs/");
159   uri.AddPathSegment(request.GetId());
160   return CancelJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
161 }
162 
CancelJobCallable(const CancelJobRequest & request) const163 CancelJobOutcomeCallable MediaConvertClient::CancelJobCallable(const CancelJobRequest& request) const
164 {
165   auto task = Aws::MakeShared< std::packaged_task< CancelJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CancelJob(request); } );
166   auto packagedFunction = [task]() { (*task)(); };
167   m_executor->Submit(packagedFunction);
168   return task->get_future();
169 }
170 
CancelJobAsync(const CancelJobRequest & request,const CancelJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const171 void MediaConvertClient::CancelJobAsync(const CancelJobRequest& request, const CancelJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
172 {
173   m_executor->Submit( [this, request, handler, context](){ this->CancelJobAsyncHelper( request, handler, context ); } );
174 }
175 
CancelJobAsyncHelper(const CancelJobRequest & request,const CancelJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const176 void MediaConvertClient::CancelJobAsyncHelper(const CancelJobRequest& request, const CancelJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
177 {
178   handler(this, request, CancelJob(request), context);
179 }
180 
CreateJob(const CreateJobRequest & request) const181 CreateJobOutcome MediaConvertClient::CreateJob(const CreateJobRequest& request) const
182 {
183   Aws::Http::URI uri = m_uri;
184   uri.AddPathSegments("/2017-08-29/jobs");
185   return CreateJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
186 }
187 
CreateJobCallable(const CreateJobRequest & request) const188 CreateJobOutcomeCallable MediaConvertClient::CreateJobCallable(const CreateJobRequest& request) const
189 {
190   auto task = Aws::MakeShared< std::packaged_task< CreateJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateJob(request); } );
191   auto packagedFunction = [task]() { (*task)(); };
192   m_executor->Submit(packagedFunction);
193   return task->get_future();
194 }
195 
CreateJobAsync(const CreateJobRequest & request,const CreateJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const196 void MediaConvertClient::CreateJobAsync(const CreateJobRequest& request, const CreateJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
197 {
198   m_executor->Submit( [this, request, handler, context](){ this->CreateJobAsyncHelper( request, handler, context ); } );
199 }
200 
CreateJobAsyncHelper(const CreateJobRequest & request,const CreateJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const201 void MediaConvertClient::CreateJobAsyncHelper(const CreateJobRequest& request, const CreateJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
202 {
203   handler(this, request, CreateJob(request), context);
204 }
205 
CreateJobTemplate(const CreateJobTemplateRequest & request) const206 CreateJobTemplateOutcome MediaConvertClient::CreateJobTemplate(const CreateJobTemplateRequest& request) const
207 {
208   Aws::Http::URI uri = m_uri;
209   uri.AddPathSegments("/2017-08-29/jobTemplates");
210   return CreateJobTemplateOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
211 }
212 
CreateJobTemplateCallable(const CreateJobTemplateRequest & request) const213 CreateJobTemplateOutcomeCallable MediaConvertClient::CreateJobTemplateCallable(const CreateJobTemplateRequest& request) const
214 {
215   auto task = Aws::MakeShared< std::packaged_task< CreateJobTemplateOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateJobTemplate(request); } );
216   auto packagedFunction = [task]() { (*task)(); };
217   m_executor->Submit(packagedFunction);
218   return task->get_future();
219 }
220 
CreateJobTemplateAsync(const CreateJobTemplateRequest & request,const CreateJobTemplateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const221 void MediaConvertClient::CreateJobTemplateAsync(const CreateJobTemplateRequest& request, const CreateJobTemplateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
222 {
223   m_executor->Submit( [this, request, handler, context](){ this->CreateJobTemplateAsyncHelper( request, handler, context ); } );
224 }
225 
CreateJobTemplateAsyncHelper(const CreateJobTemplateRequest & request,const CreateJobTemplateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const226 void MediaConvertClient::CreateJobTemplateAsyncHelper(const CreateJobTemplateRequest& request, const CreateJobTemplateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
227 {
228   handler(this, request, CreateJobTemplate(request), context);
229 }
230 
CreatePreset(const CreatePresetRequest & request) const231 CreatePresetOutcome MediaConvertClient::CreatePreset(const CreatePresetRequest& request) const
232 {
233   Aws::Http::URI uri = m_uri;
234   uri.AddPathSegments("/2017-08-29/presets");
235   return CreatePresetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
236 }
237 
CreatePresetCallable(const CreatePresetRequest & request) const238 CreatePresetOutcomeCallable MediaConvertClient::CreatePresetCallable(const CreatePresetRequest& request) const
239 {
240   auto task = Aws::MakeShared< std::packaged_task< CreatePresetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreatePreset(request); } );
241   auto packagedFunction = [task]() { (*task)(); };
242   m_executor->Submit(packagedFunction);
243   return task->get_future();
244 }
245 
CreatePresetAsync(const CreatePresetRequest & request,const CreatePresetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const246 void MediaConvertClient::CreatePresetAsync(const CreatePresetRequest& request, const CreatePresetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
247 {
248   m_executor->Submit( [this, request, handler, context](){ this->CreatePresetAsyncHelper( request, handler, context ); } );
249 }
250 
CreatePresetAsyncHelper(const CreatePresetRequest & request,const CreatePresetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const251 void MediaConvertClient::CreatePresetAsyncHelper(const CreatePresetRequest& request, const CreatePresetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
252 {
253   handler(this, request, CreatePreset(request), context);
254 }
255 
CreateQueue(const CreateQueueRequest & request) const256 CreateQueueOutcome MediaConvertClient::CreateQueue(const CreateQueueRequest& request) const
257 {
258   Aws::Http::URI uri = m_uri;
259   uri.AddPathSegments("/2017-08-29/queues");
260   return CreateQueueOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
261 }
262 
CreateQueueCallable(const CreateQueueRequest & request) const263 CreateQueueOutcomeCallable MediaConvertClient::CreateQueueCallable(const CreateQueueRequest& request) const
264 {
265   auto task = Aws::MakeShared< std::packaged_task< CreateQueueOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateQueue(request); } );
266   auto packagedFunction = [task]() { (*task)(); };
267   m_executor->Submit(packagedFunction);
268   return task->get_future();
269 }
270 
CreateQueueAsync(const CreateQueueRequest & request,const CreateQueueResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const271 void MediaConvertClient::CreateQueueAsync(const CreateQueueRequest& request, const CreateQueueResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
272 {
273   m_executor->Submit( [this, request, handler, context](){ this->CreateQueueAsyncHelper( request, handler, context ); } );
274 }
275 
CreateQueueAsyncHelper(const CreateQueueRequest & request,const CreateQueueResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const276 void MediaConvertClient::CreateQueueAsyncHelper(const CreateQueueRequest& request, const CreateQueueResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
277 {
278   handler(this, request, CreateQueue(request), context);
279 }
280 
DeleteJobTemplate(const DeleteJobTemplateRequest & request) const281 DeleteJobTemplateOutcome MediaConvertClient::DeleteJobTemplate(const DeleteJobTemplateRequest& request) const
282 {
283   if (!request.NameHasBeenSet())
284   {
285     AWS_LOGSTREAM_ERROR("DeleteJobTemplate", "Required field: Name, is not set");
286     return DeleteJobTemplateOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
287   }
288   Aws::Http::URI uri = m_uri;
289   uri.AddPathSegments("/2017-08-29/jobTemplates/");
290   uri.AddPathSegment(request.GetName());
291   return DeleteJobTemplateOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
292 }
293 
DeleteJobTemplateCallable(const DeleteJobTemplateRequest & request) const294 DeleteJobTemplateOutcomeCallable MediaConvertClient::DeleteJobTemplateCallable(const DeleteJobTemplateRequest& request) const
295 {
296   auto task = Aws::MakeShared< std::packaged_task< DeleteJobTemplateOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteJobTemplate(request); } );
297   auto packagedFunction = [task]() { (*task)(); };
298   m_executor->Submit(packagedFunction);
299   return task->get_future();
300 }
301 
DeleteJobTemplateAsync(const DeleteJobTemplateRequest & request,const DeleteJobTemplateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const302 void MediaConvertClient::DeleteJobTemplateAsync(const DeleteJobTemplateRequest& request, const DeleteJobTemplateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
303 {
304   m_executor->Submit( [this, request, handler, context](){ this->DeleteJobTemplateAsyncHelper( request, handler, context ); } );
305 }
306 
DeleteJobTemplateAsyncHelper(const DeleteJobTemplateRequest & request,const DeleteJobTemplateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const307 void MediaConvertClient::DeleteJobTemplateAsyncHelper(const DeleteJobTemplateRequest& request, const DeleteJobTemplateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
308 {
309   handler(this, request, DeleteJobTemplate(request), context);
310 }
311 
DeletePolicy(const DeletePolicyRequest & request) const312 DeletePolicyOutcome MediaConvertClient::DeletePolicy(const DeletePolicyRequest& request) const
313 {
314   Aws::Http::URI uri = m_uri;
315   uri.AddPathSegments("/2017-08-29/policy");
316   return DeletePolicyOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
317 }
318 
DeletePolicyCallable(const DeletePolicyRequest & request) const319 DeletePolicyOutcomeCallable MediaConvertClient::DeletePolicyCallable(const DeletePolicyRequest& request) const
320 {
321   auto task = Aws::MakeShared< std::packaged_task< DeletePolicyOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeletePolicy(request); } );
322   auto packagedFunction = [task]() { (*task)(); };
323   m_executor->Submit(packagedFunction);
324   return task->get_future();
325 }
326 
DeletePolicyAsync(const DeletePolicyRequest & request,const DeletePolicyResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const327 void MediaConvertClient::DeletePolicyAsync(const DeletePolicyRequest& request, const DeletePolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
328 {
329   m_executor->Submit( [this, request, handler, context](){ this->DeletePolicyAsyncHelper( request, handler, context ); } );
330 }
331 
DeletePolicyAsyncHelper(const DeletePolicyRequest & request,const DeletePolicyResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const332 void MediaConvertClient::DeletePolicyAsyncHelper(const DeletePolicyRequest& request, const DeletePolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
333 {
334   handler(this, request, DeletePolicy(request), context);
335 }
336 
DeletePreset(const DeletePresetRequest & request) const337 DeletePresetOutcome MediaConvertClient::DeletePreset(const DeletePresetRequest& request) const
338 {
339   if (!request.NameHasBeenSet())
340   {
341     AWS_LOGSTREAM_ERROR("DeletePreset", "Required field: Name, is not set");
342     return DeletePresetOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
343   }
344   Aws::Http::URI uri = m_uri;
345   uri.AddPathSegments("/2017-08-29/presets/");
346   uri.AddPathSegment(request.GetName());
347   return DeletePresetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
348 }
349 
DeletePresetCallable(const DeletePresetRequest & request) const350 DeletePresetOutcomeCallable MediaConvertClient::DeletePresetCallable(const DeletePresetRequest& request) const
351 {
352   auto task = Aws::MakeShared< std::packaged_task< DeletePresetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeletePreset(request); } );
353   auto packagedFunction = [task]() { (*task)(); };
354   m_executor->Submit(packagedFunction);
355   return task->get_future();
356 }
357 
DeletePresetAsync(const DeletePresetRequest & request,const DeletePresetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const358 void MediaConvertClient::DeletePresetAsync(const DeletePresetRequest& request, const DeletePresetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
359 {
360   m_executor->Submit( [this, request, handler, context](){ this->DeletePresetAsyncHelper( request, handler, context ); } );
361 }
362 
DeletePresetAsyncHelper(const DeletePresetRequest & request,const DeletePresetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const363 void MediaConvertClient::DeletePresetAsyncHelper(const DeletePresetRequest& request, const DeletePresetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
364 {
365   handler(this, request, DeletePreset(request), context);
366 }
367 
DeleteQueue(const DeleteQueueRequest & request) const368 DeleteQueueOutcome MediaConvertClient::DeleteQueue(const DeleteQueueRequest& request) const
369 {
370   if (!request.NameHasBeenSet())
371   {
372     AWS_LOGSTREAM_ERROR("DeleteQueue", "Required field: Name, is not set");
373     return DeleteQueueOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
374   }
375   Aws::Http::URI uri = m_uri;
376   uri.AddPathSegments("/2017-08-29/queues/");
377   uri.AddPathSegment(request.GetName());
378   return DeleteQueueOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
379 }
380 
DeleteQueueCallable(const DeleteQueueRequest & request) const381 DeleteQueueOutcomeCallable MediaConvertClient::DeleteQueueCallable(const DeleteQueueRequest& request) const
382 {
383   auto task = Aws::MakeShared< std::packaged_task< DeleteQueueOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteQueue(request); } );
384   auto packagedFunction = [task]() { (*task)(); };
385   m_executor->Submit(packagedFunction);
386   return task->get_future();
387 }
388 
DeleteQueueAsync(const DeleteQueueRequest & request,const DeleteQueueResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const389 void MediaConvertClient::DeleteQueueAsync(const DeleteQueueRequest& request, const DeleteQueueResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
390 {
391   m_executor->Submit( [this, request, handler, context](){ this->DeleteQueueAsyncHelper( request, handler, context ); } );
392 }
393 
DeleteQueueAsyncHelper(const DeleteQueueRequest & request,const DeleteQueueResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const394 void MediaConvertClient::DeleteQueueAsyncHelper(const DeleteQueueRequest& request, const DeleteQueueResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
395 {
396   handler(this, request, DeleteQueue(request), context);
397 }
398 
DescribeEndpoints(const DescribeEndpointsRequest & request) const399 DescribeEndpointsOutcome MediaConvertClient::DescribeEndpoints(const DescribeEndpointsRequest& request) const
400 {
401   Aws::Http::URI uri = m_uri;
402   uri.AddPathSegments("/2017-08-29/endpoints");
403   return DescribeEndpointsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
404 }
405 
DescribeEndpointsCallable(const DescribeEndpointsRequest & request) const406 DescribeEndpointsOutcomeCallable MediaConvertClient::DescribeEndpointsCallable(const DescribeEndpointsRequest& request) const
407 {
408   auto task = Aws::MakeShared< std::packaged_task< DescribeEndpointsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeEndpoints(request); } );
409   auto packagedFunction = [task]() { (*task)(); };
410   m_executor->Submit(packagedFunction);
411   return task->get_future();
412 }
413 
DescribeEndpointsAsync(const DescribeEndpointsRequest & request,const DescribeEndpointsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const414 void MediaConvertClient::DescribeEndpointsAsync(const DescribeEndpointsRequest& request, const DescribeEndpointsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
415 {
416   m_executor->Submit( [this, request, handler, context](){ this->DescribeEndpointsAsyncHelper( request, handler, context ); } );
417 }
418 
DescribeEndpointsAsyncHelper(const DescribeEndpointsRequest & request,const DescribeEndpointsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const419 void MediaConvertClient::DescribeEndpointsAsyncHelper(const DescribeEndpointsRequest& request, const DescribeEndpointsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
420 {
421   handler(this, request, DescribeEndpoints(request), context);
422 }
423 
DisassociateCertificate(const DisassociateCertificateRequest & request) const424 DisassociateCertificateOutcome MediaConvertClient::DisassociateCertificate(const DisassociateCertificateRequest& request) const
425 {
426   if (!request.ArnHasBeenSet())
427   {
428     AWS_LOGSTREAM_ERROR("DisassociateCertificate", "Required field: Arn, is not set");
429     return DisassociateCertificateOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Arn]", false));
430   }
431   Aws::Http::URI uri = m_uri;
432   uri.AddPathSegments("/2017-08-29/certificates/");
433   uri.AddPathSegment(request.GetArn());
434   return DisassociateCertificateOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
435 }
436 
DisassociateCertificateCallable(const DisassociateCertificateRequest & request) const437 DisassociateCertificateOutcomeCallable MediaConvertClient::DisassociateCertificateCallable(const DisassociateCertificateRequest& request) const
438 {
439   auto task = Aws::MakeShared< std::packaged_task< DisassociateCertificateOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DisassociateCertificate(request); } );
440   auto packagedFunction = [task]() { (*task)(); };
441   m_executor->Submit(packagedFunction);
442   return task->get_future();
443 }
444 
DisassociateCertificateAsync(const DisassociateCertificateRequest & request,const DisassociateCertificateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const445 void MediaConvertClient::DisassociateCertificateAsync(const DisassociateCertificateRequest& request, const DisassociateCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
446 {
447   m_executor->Submit( [this, request, handler, context](){ this->DisassociateCertificateAsyncHelper( request, handler, context ); } );
448 }
449 
DisassociateCertificateAsyncHelper(const DisassociateCertificateRequest & request,const DisassociateCertificateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const450 void MediaConvertClient::DisassociateCertificateAsyncHelper(const DisassociateCertificateRequest& request, const DisassociateCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
451 {
452   handler(this, request, DisassociateCertificate(request), context);
453 }
454 
GetJob(const GetJobRequest & request) const455 GetJobOutcome MediaConvertClient::GetJob(const GetJobRequest& request) const
456 {
457   if (!request.IdHasBeenSet())
458   {
459     AWS_LOGSTREAM_ERROR("GetJob", "Required field: Id, is not set");
460     return GetJobOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Id]", false));
461   }
462   Aws::Http::URI uri = m_uri;
463   uri.AddPathSegments("/2017-08-29/jobs/");
464   uri.AddPathSegment(request.GetId());
465   return GetJobOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
466 }
467 
GetJobCallable(const GetJobRequest & request) const468 GetJobOutcomeCallable MediaConvertClient::GetJobCallable(const GetJobRequest& request) const
469 {
470   auto task = Aws::MakeShared< std::packaged_task< GetJobOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetJob(request); } );
471   auto packagedFunction = [task]() { (*task)(); };
472   m_executor->Submit(packagedFunction);
473   return task->get_future();
474 }
475 
GetJobAsync(const GetJobRequest & request,const GetJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const476 void MediaConvertClient::GetJobAsync(const GetJobRequest& request, const GetJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
477 {
478   m_executor->Submit( [this, request, handler, context](){ this->GetJobAsyncHelper( request, handler, context ); } );
479 }
480 
GetJobAsyncHelper(const GetJobRequest & request,const GetJobResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const481 void MediaConvertClient::GetJobAsyncHelper(const GetJobRequest& request, const GetJobResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
482 {
483   handler(this, request, GetJob(request), context);
484 }
485 
GetJobTemplate(const GetJobTemplateRequest & request) const486 GetJobTemplateOutcome MediaConvertClient::GetJobTemplate(const GetJobTemplateRequest& request) const
487 {
488   if (!request.NameHasBeenSet())
489   {
490     AWS_LOGSTREAM_ERROR("GetJobTemplate", "Required field: Name, is not set");
491     return GetJobTemplateOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
492   }
493   Aws::Http::URI uri = m_uri;
494   uri.AddPathSegments("/2017-08-29/jobTemplates/");
495   uri.AddPathSegment(request.GetName());
496   return GetJobTemplateOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
497 }
498 
GetJobTemplateCallable(const GetJobTemplateRequest & request) const499 GetJobTemplateOutcomeCallable MediaConvertClient::GetJobTemplateCallable(const GetJobTemplateRequest& request) const
500 {
501   auto task = Aws::MakeShared< std::packaged_task< GetJobTemplateOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetJobTemplate(request); } );
502   auto packagedFunction = [task]() { (*task)(); };
503   m_executor->Submit(packagedFunction);
504   return task->get_future();
505 }
506 
GetJobTemplateAsync(const GetJobTemplateRequest & request,const GetJobTemplateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const507 void MediaConvertClient::GetJobTemplateAsync(const GetJobTemplateRequest& request, const GetJobTemplateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
508 {
509   m_executor->Submit( [this, request, handler, context](){ this->GetJobTemplateAsyncHelper( request, handler, context ); } );
510 }
511 
GetJobTemplateAsyncHelper(const GetJobTemplateRequest & request,const GetJobTemplateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const512 void MediaConvertClient::GetJobTemplateAsyncHelper(const GetJobTemplateRequest& request, const GetJobTemplateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
513 {
514   handler(this, request, GetJobTemplate(request), context);
515 }
516 
GetPolicy(const GetPolicyRequest & request) const517 GetPolicyOutcome MediaConvertClient::GetPolicy(const GetPolicyRequest& request) const
518 {
519   Aws::Http::URI uri = m_uri;
520   uri.AddPathSegments("/2017-08-29/policy");
521   return GetPolicyOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
522 }
523 
GetPolicyCallable(const GetPolicyRequest & request) const524 GetPolicyOutcomeCallable MediaConvertClient::GetPolicyCallable(const GetPolicyRequest& request) const
525 {
526   auto task = Aws::MakeShared< std::packaged_task< GetPolicyOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetPolicy(request); } );
527   auto packagedFunction = [task]() { (*task)(); };
528   m_executor->Submit(packagedFunction);
529   return task->get_future();
530 }
531 
GetPolicyAsync(const GetPolicyRequest & request,const GetPolicyResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const532 void MediaConvertClient::GetPolicyAsync(const GetPolicyRequest& request, const GetPolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
533 {
534   m_executor->Submit( [this, request, handler, context](){ this->GetPolicyAsyncHelper( request, handler, context ); } );
535 }
536 
GetPolicyAsyncHelper(const GetPolicyRequest & request,const GetPolicyResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const537 void MediaConvertClient::GetPolicyAsyncHelper(const GetPolicyRequest& request, const GetPolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
538 {
539   handler(this, request, GetPolicy(request), context);
540 }
541 
GetPreset(const GetPresetRequest & request) const542 GetPresetOutcome MediaConvertClient::GetPreset(const GetPresetRequest& request) const
543 {
544   if (!request.NameHasBeenSet())
545   {
546     AWS_LOGSTREAM_ERROR("GetPreset", "Required field: Name, is not set");
547     return GetPresetOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
548   }
549   Aws::Http::URI uri = m_uri;
550   uri.AddPathSegments("/2017-08-29/presets/");
551   uri.AddPathSegment(request.GetName());
552   return GetPresetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
553 }
554 
GetPresetCallable(const GetPresetRequest & request) const555 GetPresetOutcomeCallable MediaConvertClient::GetPresetCallable(const GetPresetRequest& request) const
556 {
557   auto task = Aws::MakeShared< std::packaged_task< GetPresetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetPreset(request); } );
558   auto packagedFunction = [task]() { (*task)(); };
559   m_executor->Submit(packagedFunction);
560   return task->get_future();
561 }
562 
GetPresetAsync(const GetPresetRequest & request,const GetPresetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const563 void MediaConvertClient::GetPresetAsync(const GetPresetRequest& request, const GetPresetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
564 {
565   m_executor->Submit( [this, request, handler, context](){ this->GetPresetAsyncHelper( request, handler, context ); } );
566 }
567 
GetPresetAsyncHelper(const GetPresetRequest & request,const GetPresetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const568 void MediaConvertClient::GetPresetAsyncHelper(const GetPresetRequest& request, const GetPresetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
569 {
570   handler(this, request, GetPreset(request), context);
571 }
572 
GetQueue(const GetQueueRequest & request) const573 GetQueueOutcome MediaConvertClient::GetQueue(const GetQueueRequest& request) const
574 {
575   if (!request.NameHasBeenSet())
576   {
577     AWS_LOGSTREAM_ERROR("GetQueue", "Required field: Name, is not set");
578     return GetQueueOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
579   }
580   Aws::Http::URI uri = m_uri;
581   uri.AddPathSegments("/2017-08-29/queues/");
582   uri.AddPathSegment(request.GetName());
583   return GetQueueOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
584 }
585 
GetQueueCallable(const GetQueueRequest & request) const586 GetQueueOutcomeCallable MediaConvertClient::GetQueueCallable(const GetQueueRequest& request) const
587 {
588   auto task = Aws::MakeShared< std::packaged_task< GetQueueOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetQueue(request); } );
589   auto packagedFunction = [task]() { (*task)(); };
590   m_executor->Submit(packagedFunction);
591   return task->get_future();
592 }
593 
GetQueueAsync(const GetQueueRequest & request,const GetQueueResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const594 void MediaConvertClient::GetQueueAsync(const GetQueueRequest& request, const GetQueueResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
595 {
596   m_executor->Submit( [this, request, handler, context](){ this->GetQueueAsyncHelper( request, handler, context ); } );
597 }
598 
GetQueueAsyncHelper(const GetQueueRequest & request,const GetQueueResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const599 void MediaConvertClient::GetQueueAsyncHelper(const GetQueueRequest& request, const GetQueueResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
600 {
601   handler(this, request, GetQueue(request), context);
602 }
603 
ListJobTemplates(const ListJobTemplatesRequest & request) const604 ListJobTemplatesOutcome MediaConvertClient::ListJobTemplates(const ListJobTemplatesRequest& request) const
605 {
606   Aws::Http::URI uri = m_uri;
607   uri.AddPathSegments("/2017-08-29/jobTemplates");
608   return ListJobTemplatesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
609 }
610 
ListJobTemplatesCallable(const ListJobTemplatesRequest & request) const611 ListJobTemplatesOutcomeCallable MediaConvertClient::ListJobTemplatesCallable(const ListJobTemplatesRequest& request) const
612 {
613   auto task = Aws::MakeShared< std::packaged_task< ListJobTemplatesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListJobTemplates(request); } );
614   auto packagedFunction = [task]() { (*task)(); };
615   m_executor->Submit(packagedFunction);
616   return task->get_future();
617 }
618 
ListJobTemplatesAsync(const ListJobTemplatesRequest & request,const ListJobTemplatesResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const619 void MediaConvertClient::ListJobTemplatesAsync(const ListJobTemplatesRequest& request, const ListJobTemplatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
620 {
621   m_executor->Submit( [this, request, handler, context](){ this->ListJobTemplatesAsyncHelper( request, handler, context ); } );
622 }
623 
ListJobTemplatesAsyncHelper(const ListJobTemplatesRequest & request,const ListJobTemplatesResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const624 void MediaConvertClient::ListJobTemplatesAsyncHelper(const ListJobTemplatesRequest& request, const ListJobTemplatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
625 {
626   handler(this, request, ListJobTemplates(request), context);
627 }
628 
ListJobs(const ListJobsRequest & request) const629 ListJobsOutcome MediaConvertClient::ListJobs(const ListJobsRequest& request) const
630 {
631   Aws::Http::URI uri = m_uri;
632   uri.AddPathSegments("/2017-08-29/jobs");
633   return ListJobsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
634 }
635 
ListJobsCallable(const ListJobsRequest & request) const636 ListJobsOutcomeCallable MediaConvertClient::ListJobsCallable(const ListJobsRequest& request) const
637 {
638   auto task = Aws::MakeShared< std::packaged_task< ListJobsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListJobs(request); } );
639   auto packagedFunction = [task]() { (*task)(); };
640   m_executor->Submit(packagedFunction);
641   return task->get_future();
642 }
643 
ListJobsAsync(const ListJobsRequest & request,const ListJobsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const644 void MediaConvertClient::ListJobsAsync(const ListJobsRequest& request, const ListJobsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
645 {
646   m_executor->Submit( [this, request, handler, context](){ this->ListJobsAsyncHelper( request, handler, context ); } );
647 }
648 
ListJobsAsyncHelper(const ListJobsRequest & request,const ListJobsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const649 void MediaConvertClient::ListJobsAsyncHelper(const ListJobsRequest& request, const ListJobsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
650 {
651   handler(this, request, ListJobs(request), context);
652 }
653 
ListPresets(const ListPresetsRequest & request) const654 ListPresetsOutcome MediaConvertClient::ListPresets(const ListPresetsRequest& request) const
655 {
656   Aws::Http::URI uri = m_uri;
657   uri.AddPathSegments("/2017-08-29/presets");
658   return ListPresetsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
659 }
660 
ListPresetsCallable(const ListPresetsRequest & request) const661 ListPresetsOutcomeCallable MediaConvertClient::ListPresetsCallable(const ListPresetsRequest& request) const
662 {
663   auto task = Aws::MakeShared< std::packaged_task< ListPresetsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListPresets(request); } );
664   auto packagedFunction = [task]() { (*task)(); };
665   m_executor->Submit(packagedFunction);
666   return task->get_future();
667 }
668 
ListPresetsAsync(const ListPresetsRequest & request,const ListPresetsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const669 void MediaConvertClient::ListPresetsAsync(const ListPresetsRequest& request, const ListPresetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
670 {
671   m_executor->Submit( [this, request, handler, context](){ this->ListPresetsAsyncHelper( request, handler, context ); } );
672 }
673 
ListPresetsAsyncHelper(const ListPresetsRequest & request,const ListPresetsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const674 void MediaConvertClient::ListPresetsAsyncHelper(const ListPresetsRequest& request, const ListPresetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
675 {
676   handler(this, request, ListPresets(request), context);
677 }
678 
ListQueues(const ListQueuesRequest & request) const679 ListQueuesOutcome MediaConvertClient::ListQueues(const ListQueuesRequest& request) const
680 {
681   Aws::Http::URI uri = m_uri;
682   uri.AddPathSegments("/2017-08-29/queues");
683   return ListQueuesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
684 }
685 
ListQueuesCallable(const ListQueuesRequest & request) const686 ListQueuesOutcomeCallable MediaConvertClient::ListQueuesCallable(const ListQueuesRequest& request) const
687 {
688   auto task = Aws::MakeShared< std::packaged_task< ListQueuesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListQueues(request); } );
689   auto packagedFunction = [task]() { (*task)(); };
690   m_executor->Submit(packagedFunction);
691   return task->get_future();
692 }
693 
ListQueuesAsync(const ListQueuesRequest & request,const ListQueuesResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const694 void MediaConvertClient::ListQueuesAsync(const ListQueuesRequest& request, const ListQueuesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
695 {
696   m_executor->Submit( [this, request, handler, context](){ this->ListQueuesAsyncHelper( request, handler, context ); } );
697 }
698 
ListQueuesAsyncHelper(const ListQueuesRequest & request,const ListQueuesResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const699 void MediaConvertClient::ListQueuesAsyncHelper(const ListQueuesRequest& request, const ListQueuesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
700 {
701   handler(this, request, ListQueues(request), context);
702 }
703 
ListTagsForResource(const ListTagsForResourceRequest & request) const704 ListTagsForResourceOutcome MediaConvertClient::ListTagsForResource(const ListTagsForResourceRequest& request) const
705 {
706   if (!request.ArnHasBeenSet())
707   {
708     AWS_LOGSTREAM_ERROR("ListTagsForResource", "Required field: Arn, is not set");
709     return ListTagsForResourceOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Arn]", false));
710   }
711   Aws::Http::URI uri = m_uri;
712   uri.AddPathSegments("/2017-08-29/tags/");
713   uri.AddPathSegment(request.GetArn());
714   return ListTagsForResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
715 }
716 
ListTagsForResourceCallable(const ListTagsForResourceRequest & request) const717 ListTagsForResourceOutcomeCallable MediaConvertClient::ListTagsForResourceCallable(const ListTagsForResourceRequest& request) const
718 {
719   auto task = Aws::MakeShared< std::packaged_task< ListTagsForResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListTagsForResource(request); } );
720   auto packagedFunction = [task]() { (*task)(); };
721   m_executor->Submit(packagedFunction);
722   return task->get_future();
723 }
724 
ListTagsForResourceAsync(const ListTagsForResourceRequest & request,const ListTagsForResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const725 void MediaConvertClient::ListTagsForResourceAsync(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
726 {
727   m_executor->Submit( [this, request, handler, context](){ this->ListTagsForResourceAsyncHelper( request, handler, context ); } );
728 }
729 
ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest & request,const ListTagsForResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const730 void MediaConvertClient::ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
731 {
732   handler(this, request, ListTagsForResource(request), context);
733 }
734 
PutPolicy(const PutPolicyRequest & request) const735 PutPolicyOutcome MediaConvertClient::PutPolicy(const PutPolicyRequest& request) const
736 {
737   Aws::Http::URI uri = m_uri;
738   uri.AddPathSegments("/2017-08-29/policy");
739   return PutPolicyOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER));
740 }
741 
PutPolicyCallable(const PutPolicyRequest & request) const742 PutPolicyOutcomeCallable MediaConvertClient::PutPolicyCallable(const PutPolicyRequest& request) const
743 {
744   auto task = Aws::MakeShared< std::packaged_task< PutPolicyOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->PutPolicy(request); } );
745   auto packagedFunction = [task]() { (*task)(); };
746   m_executor->Submit(packagedFunction);
747   return task->get_future();
748 }
749 
PutPolicyAsync(const PutPolicyRequest & request,const PutPolicyResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const750 void MediaConvertClient::PutPolicyAsync(const PutPolicyRequest& request, const PutPolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
751 {
752   m_executor->Submit( [this, request, handler, context](){ this->PutPolicyAsyncHelper( request, handler, context ); } );
753 }
754 
PutPolicyAsyncHelper(const PutPolicyRequest & request,const PutPolicyResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const755 void MediaConvertClient::PutPolicyAsyncHelper(const PutPolicyRequest& request, const PutPolicyResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
756 {
757   handler(this, request, PutPolicy(request), context);
758 }
759 
TagResource(const TagResourceRequest & request) const760 TagResourceOutcome MediaConvertClient::TagResource(const TagResourceRequest& request) const
761 {
762   Aws::Http::URI uri = m_uri;
763   uri.AddPathSegments("/2017-08-29/tags");
764   return TagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
765 }
766 
TagResourceCallable(const TagResourceRequest & request) const767 TagResourceOutcomeCallable MediaConvertClient::TagResourceCallable(const TagResourceRequest& request) const
768 {
769   auto task = Aws::MakeShared< std::packaged_task< TagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->TagResource(request); } );
770   auto packagedFunction = [task]() { (*task)(); };
771   m_executor->Submit(packagedFunction);
772   return task->get_future();
773 }
774 
TagResourceAsync(const TagResourceRequest & request,const TagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const775 void MediaConvertClient::TagResourceAsync(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
776 {
777   m_executor->Submit( [this, request, handler, context](){ this->TagResourceAsyncHelper( request, handler, context ); } );
778 }
779 
TagResourceAsyncHelper(const TagResourceRequest & request,const TagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const780 void MediaConvertClient::TagResourceAsyncHelper(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
781 {
782   handler(this, request, TagResource(request), context);
783 }
784 
UntagResource(const UntagResourceRequest & request) const785 UntagResourceOutcome MediaConvertClient::UntagResource(const UntagResourceRequest& request) const
786 {
787   if (!request.ArnHasBeenSet())
788   {
789     AWS_LOGSTREAM_ERROR("UntagResource", "Required field: Arn, is not set");
790     return UntagResourceOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Arn]", false));
791   }
792   Aws::Http::URI uri = m_uri;
793   uri.AddPathSegments("/2017-08-29/tags/");
794   uri.AddPathSegment(request.GetArn());
795   return UntagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER));
796 }
797 
UntagResourceCallable(const UntagResourceRequest & request) const798 UntagResourceOutcomeCallable MediaConvertClient::UntagResourceCallable(const UntagResourceRequest& request) const
799 {
800   auto task = Aws::MakeShared< std::packaged_task< UntagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UntagResource(request); } );
801   auto packagedFunction = [task]() { (*task)(); };
802   m_executor->Submit(packagedFunction);
803   return task->get_future();
804 }
805 
UntagResourceAsync(const UntagResourceRequest & request,const UntagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const806 void MediaConvertClient::UntagResourceAsync(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
807 {
808   m_executor->Submit( [this, request, handler, context](){ this->UntagResourceAsyncHelper( request, handler, context ); } );
809 }
810 
UntagResourceAsyncHelper(const UntagResourceRequest & request,const UntagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const811 void MediaConvertClient::UntagResourceAsyncHelper(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
812 {
813   handler(this, request, UntagResource(request), context);
814 }
815 
UpdateJobTemplate(const UpdateJobTemplateRequest & request) const816 UpdateJobTemplateOutcome MediaConvertClient::UpdateJobTemplate(const UpdateJobTemplateRequest& request) const
817 {
818   if (!request.NameHasBeenSet())
819   {
820     AWS_LOGSTREAM_ERROR("UpdateJobTemplate", "Required field: Name, is not set");
821     return UpdateJobTemplateOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
822   }
823   Aws::Http::URI uri = m_uri;
824   uri.AddPathSegments("/2017-08-29/jobTemplates/");
825   uri.AddPathSegment(request.GetName());
826   return UpdateJobTemplateOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER));
827 }
828 
UpdateJobTemplateCallable(const UpdateJobTemplateRequest & request) const829 UpdateJobTemplateOutcomeCallable MediaConvertClient::UpdateJobTemplateCallable(const UpdateJobTemplateRequest& request) const
830 {
831   auto task = Aws::MakeShared< std::packaged_task< UpdateJobTemplateOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateJobTemplate(request); } );
832   auto packagedFunction = [task]() { (*task)(); };
833   m_executor->Submit(packagedFunction);
834   return task->get_future();
835 }
836 
UpdateJobTemplateAsync(const UpdateJobTemplateRequest & request,const UpdateJobTemplateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const837 void MediaConvertClient::UpdateJobTemplateAsync(const UpdateJobTemplateRequest& request, const UpdateJobTemplateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
838 {
839   m_executor->Submit( [this, request, handler, context](){ this->UpdateJobTemplateAsyncHelper( request, handler, context ); } );
840 }
841 
UpdateJobTemplateAsyncHelper(const UpdateJobTemplateRequest & request,const UpdateJobTemplateResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const842 void MediaConvertClient::UpdateJobTemplateAsyncHelper(const UpdateJobTemplateRequest& request, const UpdateJobTemplateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
843 {
844   handler(this, request, UpdateJobTemplate(request), context);
845 }
846 
UpdatePreset(const UpdatePresetRequest & request) const847 UpdatePresetOutcome MediaConvertClient::UpdatePreset(const UpdatePresetRequest& request) const
848 {
849   if (!request.NameHasBeenSet())
850   {
851     AWS_LOGSTREAM_ERROR("UpdatePreset", "Required field: Name, is not set");
852     return UpdatePresetOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
853   }
854   Aws::Http::URI uri = m_uri;
855   uri.AddPathSegments("/2017-08-29/presets/");
856   uri.AddPathSegment(request.GetName());
857   return UpdatePresetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER));
858 }
859 
UpdatePresetCallable(const UpdatePresetRequest & request) const860 UpdatePresetOutcomeCallable MediaConvertClient::UpdatePresetCallable(const UpdatePresetRequest& request) const
861 {
862   auto task = Aws::MakeShared< std::packaged_task< UpdatePresetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdatePreset(request); } );
863   auto packagedFunction = [task]() { (*task)(); };
864   m_executor->Submit(packagedFunction);
865   return task->get_future();
866 }
867 
UpdatePresetAsync(const UpdatePresetRequest & request,const UpdatePresetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const868 void MediaConvertClient::UpdatePresetAsync(const UpdatePresetRequest& request, const UpdatePresetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
869 {
870   m_executor->Submit( [this, request, handler, context](){ this->UpdatePresetAsyncHelper( request, handler, context ); } );
871 }
872 
UpdatePresetAsyncHelper(const UpdatePresetRequest & request,const UpdatePresetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const873 void MediaConvertClient::UpdatePresetAsyncHelper(const UpdatePresetRequest& request, const UpdatePresetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
874 {
875   handler(this, request, UpdatePreset(request), context);
876 }
877 
UpdateQueue(const UpdateQueueRequest & request) const878 UpdateQueueOutcome MediaConvertClient::UpdateQueue(const UpdateQueueRequest& request) const
879 {
880   if (!request.NameHasBeenSet())
881   {
882     AWS_LOGSTREAM_ERROR("UpdateQueue", "Required field: Name, is not set");
883     return UpdateQueueOutcome(Aws::Client::AWSError<MediaConvertErrors>(MediaConvertErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Name]", false));
884   }
885   Aws::Http::URI uri = m_uri;
886   uri.AddPathSegments("/2017-08-29/queues/");
887   uri.AddPathSegment(request.GetName());
888   return UpdateQueueOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER));
889 }
890 
UpdateQueueCallable(const UpdateQueueRequest & request) const891 UpdateQueueOutcomeCallable MediaConvertClient::UpdateQueueCallable(const UpdateQueueRequest& request) const
892 {
893   auto task = Aws::MakeShared< std::packaged_task< UpdateQueueOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateQueue(request); } );
894   auto packagedFunction = [task]() { (*task)(); };
895   m_executor->Submit(packagedFunction);
896   return task->get_future();
897 }
898 
UpdateQueueAsync(const UpdateQueueRequest & request,const UpdateQueueResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const899 void MediaConvertClient::UpdateQueueAsync(const UpdateQueueRequest& request, const UpdateQueueResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
900 {
901   m_executor->Submit( [this, request, handler, context](){ this->UpdateQueueAsyncHelper( request, handler, context ); } );
902 }
903 
UpdateQueueAsyncHelper(const UpdateQueueRequest & request,const UpdateQueueResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const904 void MediaConvertClient::UpdateQueueAsyncHelper(const UpdateQueueRequest& request, const UpdateQueueResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
905 {
906   handler(this, request, UpdateQueue(request), context);
907 }
908 
909