Skip to content

Commit a5361f8

Browse files
committed
Fixes serialization of requestless apis on json services
1 parent e7b854a commit a5361f8

File tree

69 files changed

+1803
-399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1803
-399
lines changed

generated/src/aws-cpp-sdk-acm/include/aws/acm/ACMClient.h

+9-7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <aws/core/client/AWSClientAsyncCRTP.h>
1111
#include <aws/core/utils/json/JsonSerializer.h>
1212
#include <aws/acm/ACMServiceClientModel.h>
13+
#include <aws/acm/model/GetAccountConfigurationRequest.h>
1314

1415
namespace Aws
1516
{
@@ -219,25 +220,26 @@ namespace ACM
219220
* href="http://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08/GetAccountConfiguration">AWS
220221
* API Reference</a></p>
221222
*/
222-
virtual Model::GetAccountConfigurationOutcome GetAccountConfiguration() const;
223+
virtual Model::GetAccountConfigurationOutcome GetAccountConfiguration(const Model::GetAccountConfigurationRequest& request = {}) const;
223224

224225
/**
225226
* A Callable wrapper for GetAccountConfiguration that returns a future to the operation so that it can be executed in parallel to other requests.
226227
*/
227-
template<typename = void>
228-
Model::GetAccountConfigurationOutcomeCallable GetAccountConfigurationCallable() const
228+
template<typename GetAccountConfigurationRequestT = Model::GetAccountConfigurationRequest>
229+
Model::GetAccountConfigurationOutcomeCallable GetAccountConfigurationCallable(const GetAccountConfigurationRequestT& request = {}) const
229230
{
230-
return SubmitCallable(&ACMClient::GetAccountConfiguration);
231+
return SubmitCallable(&ACMClient::GetAccountConfiguration, request);
231232
}
232233

233234
/**
234235
* An Async wrapper for GetAccountConfiguration that queues the request into a thread executor and triggers associated callback when operation has finished.
235236
*/
236-
template<typename = void>
237-
void GetAccountConfigurationAsync(const GetAccountConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
237+
template<typename GetAccountConfigurationRequestT = Model::GetAccountConfigurationRequest>
238+
void GetAccountConfigurationAsync(const GetAccountConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr, const GetAccountConfigurationRequestT& request = {}) const
238239
{
239-
return SubmitAsync(&ACMClient::GetAccountConfiguration, handler, context);
240+
return SubmitAsync(&ACMClient::GetAccountConfiguration, request, handler, context);
240241
}
242+
241243
/**
242244
* <p>Retrieves an Amazon-issued certificate and its certificate chain. The chain
243245
* consists of the certificate of the issuing CA and the intermediate certificates

generated/src/aws-cpp-sdk-acm/include/aws/acm/ACMServiceClientModel.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ namespace Aws
7171
class DeleteCertificateRequest;
7272
class DescribeCertificateRequest;
7373
class ExportCertificateRequest;
74+
class GetAccountConfigurationRequest;
7475
class GetCertificateRequest;
7576
class ImportCertificateRequest;
7677
class ListCertificatesRequest;
@@ -127,7 +128,7 @@ namespace Aws
127128
typedef std::function<void(const ACMClient*, const Model::DeleteCertificateRequest&, const Model::DeleteCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteCertificateResponseReceivedHandler;
128129
typedef std::function<void(const ACMClient*, const Model::DescribeCertificateRequest&, const Model::DescribeCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeCertificateResponseReceivedHandler;
129130
typedef std::function<void(const ACMClient*, const Model::ExportCertificateRequest&, const Model::ExportCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ExportCertificateResponseReceivedHandler;
130-
typedef std::function<void(const ACMClient*, const Model::GetAccountConfigurationOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetAccountConfigurationResponseReceivedHandler;
131+
typedef std::function<void(const ACMClient*, const Model::GetAccountConfigurationRequest&, const Model::GetAccountConfigurationOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetAccountConfigurationResponseReceivedHandler;
131132
typedef std::function<void(const ACMClient*, const Model::GetCertificateRequest&, const Model::GetCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetCertificateResponseReceivedHandler;
132133
typedef std::function<void(const ACMClient*, const Model::ImportCertificateRequest&, const Model::ImportCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ImportCertificateResponseReceivedHandler;
133134
typedef std::function<void(const ACMClient*, const Model::ListCertificatesRequest&, const Model::ListCertificatesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListCertificatesResponseReceivedHandler;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/acm/ACM_EXPORTS.h>
8+
#include <aws/acm/ACMRequest.h>
9+
10+
namespace Aws
11+
{
12+
namespace ACM
13+
{
14+
namespace Model
15+
{
16+
17+
/**
18+
*/
19+
class GetAccountConfigurationRequest : public ACMRequest
20+
{
21+
public:
22+
AWS_ACM_API GetAccountConfigurationRequest();
23+
24+
// Service request name is the Operation name which will send this request out,
25+
// each operation should has unique request name, so that we can get operation's name from this request.
26+
// Note: this is not true for response, multiple operations may have the same response name,
27+
// so we can not get operation's name from response.
28+
inline virtual const char* GetServiceRequestName() const override { return "GetAccountConfiguration"; }
29+
30+
AWS_ACM_API Aws::String SerializePayload() const override;
31+
32+
AWS_ACM_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
33+
34+
};
35+
36+
} // namespace Model
37+
} // namespace ACM
38+
} // namespace Aws

generated/src/aws-cpp-sdk-acm/source/ACMClient.cpp

+13-14
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <aws/acm/model/DeleteCertificateRequest.h>
2626
#include <aws/acm/model/DescribeCertificateRequest.h>
2727
#include <aws/acm/model/ExportCertificateRequest.h>
28+
#include <aws/acm/model/GetAccountConfigurationRequest.h>
2829
#include <aws/acm/model/GetCertificateRequest.h>
2930
#include <aws/acm/model/ImportCertificateRequest.h>
3031
#include <aws/acm/model/ListCertificatesRequest.h>
@@ -272,32 +273,30 @@ ExportCertificateOutcome ACMClient::ExportCertificate(const ExportCertificateReq
272273
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
273274
}
274275

275-
GetAccountConfigurationOutcome ACMClient::GetAccountConfiguration() const
276+
GetAccountConfigurationOutcome ACMClient::GetAccountConfiguration(const GetAccountConfigurationRequest& request) const
276277
{
277-
AWS_OPERATION_GUARD(GetAccountConfiguration);
278+
AWS_OPERATION_GUARD(GetAccountConfiguration);
279+
AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetAccountConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
278280
AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetAccountConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED);
279281
auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {});
280282
auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {});
281283
AWS_OPERATION_CHECK_PTR(meter, GetAccountConfiguration, CoreErrors, CoreErrors::NOT_INITIALIZED);
282284
auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetAccountConfiguration",
283-
{{ TracingUtils::SMITHY_METHOD_DIMENSION, "GetAccountConfiguration" }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }},
285+
{{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }},
284286
smithy::components::tracing::SpanKind::CLIENT);
285287
return TracingUtils::MakeCallWithTiming<GetAccountConfigurationOutcome>(
286288
[&]()-> GetAccountConfigurationOutcome {
287-
288-
AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetAccountConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
289-
const Aws::Vector<Aws::Endpoint::EndpointParameter> staticEndpointParameters;
290-
auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming<ResolveEndpointOutcome>(
291-
[&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(staticEndpointParameters); },
292-
TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC,
293-
*meter,
294-
{{TracingUtils::SMITHY_METHOD_DIMENSION, "GetAccountConfiguration"}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
295-
AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAccountConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage());
296-
return GetAccountConfigurationOutcome(MakeRequest(endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER, "GetAccountConfiguration"));
289+
auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming<ResolveEndpointOutcome>(
290+
[&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); },
291+
TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC,
292+
*meter,
293+
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
294+
AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetAccountConfiguration, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage());
295+
return GetAccountConfigurationOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
297296
},
298297
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
299298
*meter,
300-
{{TracingUtils::SMITHY_METHOD_DIMENSION, "GetAccountConfiguration"}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
299+
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
301300
}
302301

303302
GetCertificateOutcome ACMClient::GetCertificate(const GetCertificateRequest& request) const
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#include <aws/acm/model/GetAccountConfigurationRequest.h>
7+
#include <aws/core/utils/json/JsonSerializer.h>
8+
9+
#include <utility>
10+
11+
using namespace Aws::ACM::Model;
12+
using namespace Aws::Utils::Json;
13+
using namespace Aws::Utils;
14+
15+
GetAccountConfigurationRequest::GetAccountConfigurationRequest()
16+
{
17+
}
18+
19+
Aws::String GetAccountConfigurationRequest::SerializePayload() const
20+
{
21+
return "{}";
22+
}
23+
24+
Aws::Http::HeaderValueCollection GetAccountConfigurationRequest::GetRequestSpecificHeaders() const
25+
{
26+
Aws::Http::HeaderValueCollection headers;
27+
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CertificateManager.GetAccountConfiguration"));
28+
return headers;
29+
30+
}
31+
32+
33+
34+

generated/src/aws-cpp-sdk-config/include/aws/config/ConfigServiceClient.h

+9-7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <aws/core/client/AWSClientAsyncCRTP.h>
1111
#include <aws/core/utils/json/JsonSerializer.h>
1212
#include <aws/config/ConfigServiceServiceClientModel.h>
13+
#include <aws/config/model/GetComplianceSummaryByConfigRuleRequest.h>
1314

1415
namespace Aws
1516
{
@@ -1590,25 +1591,26 @@ namespace ConfigService
15901591
* href="http://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetComplianceSummaryByConfigRule">AWS
15911592
* API Reference</a></p>
15921593
*/
1593-
virtual Model::GetComplianceSummaryByConfigRuleOutcome GetComplianceSummaryByConfigRule() const;
1594+
virtual Model::GetComplianceSummaryByConfigRuleOutcome GetComplianceSummaryByConfigRule(const Model::GetComplianceSummaryByConfigRuleRequest& request = {}) const;
15941595

15951596
/**
15961597
* A Callable wrapper for GetComplianceSummaryByConfigRule that returns a future to the operation so that it can be executed in parallel to other requests.
15971598
*/
1598-
template<typename = void>
1599-
Model::GetComplianceSummaryByConfigRuleOutcomeCallable GetComplianceSummaryByConfigRuleCallable() const
1599+
template<typename GetComplianceSummaryByConfigRuleRequestT = Model::GetComplianceSummaryByConfigRuleRequest>
1600+
Model::GetComplianceSummaryByConfigRuleOutcomeCallable GetComplianceSummaryByConfigRuleCallable(const GetComplianceSummaryByConfigRuleRequestT& request = {}) const
16001601
{
1601-
return SubmitCallable(&ConfigServiceClient::GetComplianceSummaryByConfigRule);
1602+
return SubmitCallable(&ConfigServiceClient::GetComplianceSummaryByConfigRule, request);
16021603
}
16031604

16041605
/**
16051606
* An Async wrapper for GetComplianceSummaryByConfigRule that queues the request into a thread executor and triggers associated callback when operation has finished.
16061607
*/
1607-
template<typename = void>
1608-
void GetComplianceSummaryByConfigRuleAsync(const GetComplianceSummaryByConfigRuleResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
1608+
template<typename GetComplianceSummaryByConfigRuleRequestT = Model::GetComplianceSummaryByConfigRuleRequest>
1609+
void GetComplianceSummaryByConfigRuleAsync(const GetComplianceSummaryByConfigRuleResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr, const GetComplianceSummaryByConfigRuleRequestT& request = {}) const
16091610
{
1610-
return SubmitAsync(&ConfigServiceClient::GetComplianceSummaryByConfigRule, handler, context);
1611+
return SubmitAsync(&ConfigServiceClient::GetComplianceSummaryByConfigRule, request, handler, context);
16111612
}
1613+
16121614
/**
16131615
* <p>Returns the number of resources that are compliant and the number that are
16141616
* noncompliant. You can specify one or more resource types to get these numbers

generated/src/aws-cpp-sdk-config/include/aws/config/ConfigServiceServiceClientModel.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ namespace Aws
182182
class GetAggregateResourceConfigRequest;
183183
class GetComplianceDetailsByConfigRuleRequest;
184184
class GetComplianceDetailsByResourceRequest;
185+
class GetComplianceSummaryByConfigRuleRequest;
185186
class GetComplianceSummaryByResourceTypeRequest;
186187
class GetConformancePackComplianceDetailsRequest;
187188
class GetConformancePackComplianceSummaryRequest;
@@ -469,7 +470,7 @@ namespace Aws
469470
typedef std::function<void(const ConfigServiceClient*, const Model::GetAggregateResourceConfigRequest&, const Model::GetAggregateResourceConfigOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetAggregateResourceConfigResponseReceivedHandler;
470471
typedef std::function<void(const ConfigServiceClient*, const Model::GetComplianceDetailsByConfigRuleRequest&, const Model::GetComplianceDetailsByConfigRuleOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetComplianceDetailsByConfigRuleResponseReceivedHandler;
471472
typedef std::function<void(const ConfigServiceClient*, const Model::GetComplianceDetailsByResourceRequest&, const Model::GetComplianceDetailsByResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetComplianceDetailsByResourceResponseReceivedHandler;
472-
typedef std::function<void(const ConfigServiceClient*, const Model::GetComplianceSummaryByConfigRuleOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetComplianceSummaryByConfigRuleResponseReceivedHandler;
473+
typedef std::function<void(const ConfigServiceClient*, const Model::GetComplianceSummaryByConfigRuleRequest&, const Model::GetComplianceSummaryByConfigRuleOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetComplianceSummaryByConfigRuleResponseReceivedHandler;
473474
typedef std::function<void(const ConfigServiceClient*, const Model::GetComplianceSummaryByResourceTypeRequest&, const Model::GetComplianceSummaryByResourceTypeOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetComplianceSummaryByResourceTypeResponseReceivedHandler;
474475
typedef std::function<void(const ConfigServiceClient*, const Model::GetConformancePackComplianceDetailsRequest&, const Model::GetConformancePackComplianceDetailsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetConformancePackComplianceDetailsResponseReceivedHandler;
475476
typedef std::function<void(const ConfigServiceClient*, const Model::GetConformancePackComplianceSummaryRequest&, const Model::GetConformancePackComplianceSummaryOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetConformancePackComplianceSummaryResponseReceivedHandler;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/config/ConfigService_EXPORTS.h>
8+
#include <aws/config/ConfigServiceRequest.h>
9+
10+
namespace Aws
11+
{
12+
namespace ConfigService
13+
{
14+
namespace Model
15+
{
16+
17+
/**
18+
*/
19+
class GetComplianceSummaryByConfigRuleRequest : public ConfigServiceRequest
20+
{
21+
public:
22+
AWS_CONFIGSERVICE_API GetComplianceSummaryByConfigRuleRequest();
23+
24+
// Service request name is the Operation name which will send this request out,
25+
// each operation should has unique request name, so that we can get operation's name from this request.
26+
// Note: this is not true for response, multiple operations may have the same response name,
27+
// so we can not get operation's name from response.
28+
inline virtual const char* GetServiceRequestName() const override { return "GetComplianceSummaryByConfigRule"; }
29+
30+
AWS_CONFIGSERVICE_API Aws::String SerializePayload() const override;
31+
32+
AWS_CONFIGSERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
33+
34+
};
35+
36+
} // namespace Model
37+
} // namespace ConfigService
38+
} // namespace Aws

0 commit comments

Comments
 (0)