Skip to content

Commit 87e263d

Browse files
[ProtocolTests] query sub object serialization refactor (#3331)
* [ProtocolTests] query sub object serialization refactor * [ProtocolTests] query nested element serialization * Codegen for #3331
1 parent 9f9831c commit 87e263d

File tree

1,091 files changed

+4645
-4277
lines changed

Some content is hidden

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

1,091 files changed

+4645
-4277
lines changed

generated/protocol-tests/test-clients/aws-cpp-sdk-ec2-protocol/source/model/QueryTimestampsRequest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Aws::String QueryTimestampsRequest::SerializePayload() const
2828

2929
if(m_epochMemberHasBeenSet)
3030
{
31-
ss << "epochMember=" << StringUtils::URLEncode(m_epochMember.ToGmtString(Aws::Utils::DateFormat::$CppViewHelper.computeTimestampFormatInQueryString($member.value.shape)).c_str()) << "&";
31+
ss << "epochMember=" << StringUtils::to_string(m_epochMember.Seconds()) << "&";
3232
}
3333

3434
if(m_epochTargetHasBeenSet)
3535
{
36-
ss << "epochTarget=" << StringUtils::URLEncode(m_epochTarget.ToGmtString(Aws::Utils::DateFormat::$CppViewHelper.computeTimestampFormatInQueryString($member.value.shape)).c_str()) << "&";
36+
ss << "epochTarget=" << StringUtils::to_string(m_epochTarget.Seconds()) << "&";
3737
}
3838

3939
ss << "Version=2020-01-08";

generated/protocol-tests/test-clients/aws-cpp-sdk-ec2-protocol/source/model/SimpleInputParamsRequest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ Aws::String SimpleInputParamsRequest::SerializePayload() const
6767

6868
if(m_quxHasBeenSet)
6969
{
70-
ss << "Qux=" << HashingUtils::Base64Encode(m_qux) << "&";
70+
ss << "Qux=" << StringUtils::URLEncode(HashingUtils::Base64Encode(m_qux).c_str()) << "&";
7171
}
7272

7373
if(m_fooEnumHasBeenSet)
7474
{
75-
ss << "FooEnum=" << FooEnumMapper::GetNameForFooEnum(m_fooEnum) << "&";
75+
ss << "FooEnum=" << StringUtils::URLEncode(FooEnumMapper::GetNameForFooEnum(m_fooEnum)) << "&";
7676
}
7777

7878
if(m_hasQueryNameHasBeenSet)

generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/JsonProtocolClient.h

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,21 @@
66
#pragma once
77
#include <aws/json-protocol/JsonProtocol_EXPORTS.h>
88
#include <aws/core/client/ClientConfiguration.h>
9+
#include <aws/core/client/AWSClient.h>
910
#include <aws/core/client/AWSClientAsyncCRTP.h>
11+
#include <aws/core/utils/json/JsonSerializer.h>
1012
#include <aws/json-protocol/JsonProtocolServiceClientModel.h>
11-
#include <smithy/client/AwsSmithyClient.h>
12-
#include <smithy/identity/auth/built-in/SigV4AuthSchemeResolver.h>
13-
#include <smithy/identity/auth/built-in/SigV4AuthScheme.h>
14-
#include <smithy/client/serializer/JsonOutcomeSerializer.h>
15-
#include <aws/json-protocol/JsonProtocolErrorMarshaller.h>
1613

1714
namespace Aws
1815
{
1916
namespace JsonProtocol
2017
{
21-
AWS_JSONPROTOCOL_API extern const char SERVICE_NAME[];
22-
class AWS_JSONPROTOCOL_API JsonProtocolClient : smithy::client::AwsSmithyClientT<Aws::JsonProtocol::SERVICE_NAME,
23-
Aws::JsonProtocol::JsonProtocolClientConfiguration,
24-
smithy::SigV4AuthSchemeResolver<>,
25-
Aws::Crt::Variant<smithy::SigV4AuthScheme>,
26-
JsonProtocolEndpointProviderBase,
27-
smithy::client::JsonOutcomeSerializer,
28-
smithy::client::JsonOutcome,
29-
Aws::Client::JsonProtocolErrorMarshaller>,
30-
Aws::Client::ClientWithAsyncTemplateMethods<JsonProtocolClient>
18+
class AWS_JSONPROTOCOL_API JsonProtocolClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods<JsonProtocolClient>
3119
{
3220
public:
21+
typedef Aws::Client::AWSJsonClient BASECLASS;
3322
static const char* GetServiceName();
3423
static const char* GetAllocationTag();
35-
inline const char* GetServiceClientName() const override { return "Json Protocol"; }
3624

3725
typedef JsonProtocolClientConfiguration ClientConfigurationType;
3826
typedef JsonProtocolEndpointProvider EndpointProviderType;
@@ -502,7 +490,10 @@ namespace JsonProtocol
502490
std::shared_ptr<JsonProtocolEndpointProviderBase>& accessEndpointProvider();
503491
private:
504492
friend class Aws::Client::ClientWithAsyncTemplateMethods<JsonProtocolClient>;
493+
void init(const JsonProtocolClientConfiguration& clientConfiguration);
505494

495+
JsonProtocolClientConfiguration m_clientConfiguration;
496+
std::shared_ptr<JsonProtocolEndpointProviderBase> m_endpointProvider;
506497
};
507498

508499
} // namespace JsonProtocol

generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/JsonProtocolClient.cpp

Lines changed: 273 additions & 187 deletions
Large diffs are not rendered by default.

generated/protocol-tests/test-clients/aws-cpp-sdk-json-rpc-10/include/aws/json-rpc-10/JSONRPC10Client.h

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,21 @@
66
#pragma once
77
#include <aws/json-rpc-10/JSONRPC10_EXPORTS.h>
88
#include <aws/core/client/ClientConfiguration.h>
9+
#include <aws/core/client/AWSClient.h>
910
#include <aws/core/client/AWSClientAsyncCRTP.h>
11+
#include <aws/core/utils/json/JsonSerializer.h>
1012
#include <aws/json-rpc-10/JSONRPC10ServiceClientModel.h>
11-
#include <smithy/client/AwsSmithyClient.h>
12-
#include <smithy/identity/auth/built-in/SigV4AuthSchemeResolver.h>
13-
#include <smithy/identity/auth/built-in/SigV4AuthScheme.h>
14-
#include <smithy/client/serializer/JsonOutcomeSerializer.h>
15-
#include <aws/json-rpc-10/JSONRPC10ErrorMarshaller.h>
1613

1714
namespace Aws
1815
{
1916
namespace JSONRPC10
2017
{
21-
AWS_JSONRPC10_API extern const char SERVICE_NAME[];
22-
class AWS_JSONRPC10_API JSONRPC10Client : smithy::client::AwsSmithyClientT<Aws::JSONRPC10::SERVICE_NAME,
23-
Aws::JSONRPC10::JSONRPC10ClientConfiguration,
24-
smithy::SigV4AuthSchemeResolver<>,
25-
Aws::Crt::Variant<smithy::SigV4AuthScheme>,
26-
JSONRPC10EndpointProviderBase,
27-
smithy::client::JsonOutcomeSerializer,
28-
smithy::client::JsonOutcome,
29-
Aws::Client::JSONRPC10ErrorMarshaller>,
30-
Aws::Client::ClientWithAsyncTemplateMethods<JSONRPC10Client>
18+
class AWS_JSONRPC10_API JSONRPC10Client : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods<JSONRPC10Client>
3119
{
3220
public:
21+
typedef Aws::Client::AWSJsonClient BASECLASS;
3322
static const char* GetServiceName();
3423
static const char* GetAllocationTag();
35-
inline const char* GetServiceClientName() const override { return "JSON RPC 10"; }
3624

3725
typedef JSONRPC10ClientConfiguration ClientConfigurationType;
3826
typedef JSONRPC10EndpointProvider EndpointProviderType;
@@ -370,7 +358,10 @@ namespace JSONRPC10
370358
std::shared_ptr<JSONRPC10EndpointProviderBase>& accessEndpointProvider();
371359
private:
372360
friend class Aws::Client::ClientWithAsyncTemplateMethods<JSONRPC10Client>;
361+
void init(const JSONRPC10ClientConfiguration& clientConfiguration);
373362

363+
JSONRPC10ClientConfiguration m_clientConfiguration;
364+
std::shared_ptr<JSONRPC10EndpointProviderBase> m_endpointProvider;
374365
};
375366

376367
} // namespace JSONRPC10

0 commit comments

Comments
 (0)