diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/CMakeLists.txt b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/CMakeLists.txt new file mode 100644 index 00000000000..1c05086a8e9 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/CMakeLists.txt @@ -0,0 +1,76 @@ +add_project(aws-cpp-sdk-query-compatible-json-rpc-10 "C++ SDK for the AWS query-compatible-json-rpc-10 service" aws-cpp-sdk-core) + +file(GLOB AWS_QUERY-COMPATIBLE-JSON-RPC-10_HEADERS + "include/aws/query-compatible-json-rpc-10/*.h" +) + +file(GLOB AWS_QUERY-COMPATIBLE-JSON-RPC-10_MODEL_HEADERS + "include/aws/query-compatible-json-rpc-10/model/*.h" +) + +file(GLOB AWS_QUERY-COMPATIBLE-JSON-RPC-10_SOURCE + "source/*.cpp" +) + +file(GLOB AWS_QUERY-COMPATIBLE-JSON-RPC-10_MODEL_SOURCE + "source/model/*.cpp" +) + +file(GLOB QUERY-COMPATIBLE-JSON-RPC-10_UNIFIED_HEADERS + ${AWS_QUERY-COMPATIBLE-JSON-RPC-10_HEADERS} + ${AWS_QUERY-COMPATIBLE-JSON-RPC-10_MODEL_HEADERS} +) + +file(GLOB QUERY-COMPATIBLE-JSON-RPC-10_UNITY_SRC + ${AWS_QUERY-COMPATIBLE-JSON-RPC-10_SOURCE} + ${AWS_QUERY-COMPATIBLE-JSON-RPC-10_MODEL_SOURCE} +) + +if(ENABLE_UNITY_BUILD) + enable_unity_build("QUERY-COMPATIBLE-JSON-RPC-10" QUERY-COMPATIBLE-JSON-RPC-10_UNITY_SRC) +endif() + +file(GLOB QUERY-COMPATIBLE-JSON-RPC-10_SRC + ${QUERY-COMPATIBLE-JSON-RPC-10_UNIFIED_HEADERS} + ${QUERY-COMPATIBLE-JSON-RPC-10_UNITY_SRC} +) + +if(WIN32) + #if we are compiling for visual studio, create a sane directory tree. + if(MSVC) + source_group("Header Files\\aws\\query-compatible-json-rpc-10" FILES ${AWS_QUERY-COMPATIBLE-JSON-RPC-10_HEADERS}) + source_group("Header Files\\aws\\query-compatible-json-rpc-10\\model" FILES ${AWS_QUERY-COMPATIBLE-JSON-RPC-10_MODEL_HEADERS}) + source_group("Source Files" FILES ${AWS_QUERY-COMPATIBLE-JSON-RPC-10_SOURCE}) + source_group("Source Files\\model" FILES ${AWS_QUERY-COMPATIBLE-JSON-RPC-10_MODEL_SOURCE}) + endif(MSVC) +endif() + +set(QUERY-COMPATIBLE-JSON-RPC-10_INCLUDES + "${CMAKE_CURRENT_SOURCE_DIR}/include/" +) + +add_library(${PROJECT_NAME} ${QUERY-COMPATIBLE-JSON-RPC-10_SRC}) +add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) + +set_compiler_flags(${PROJECT_NAME}) +set_compiler_warnings(${PROJECT_NAME}) + +if(USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS) + target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_QUERYCOMPATIBLEJSONRPC10_EXPORTS") +endif() + +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $) + +target_link_libraries(${PROJECT_NAME} PRIVATE ${PLATFORM_DEP_LIBS} ${PROJECT_LIBS}) + + +setup_install() + +install (FILES ${AWS_QUERY-COMPATIBLE-JSON-RPC-10_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/query-compatible-json-rpc-10) +install (FILES ${AWS_QUERY-COMPATIBLE-JSON-RPC-10_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/query-compatible-json-rpc-10/model) + +do_packaging() + + diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10Client.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10Client.h new file mode 100644 index 00000000000..210c5ffd969 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10Client.h @@ -0,0 +1,111 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ + class AWS_QUERYCOMPATIBLEJSONRPC10_API QueryCompatibleJSONRPC10Client : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods + { + public: + typedef Aws::Client::AWSJsonClient BASECLASS; + static const char* GetServiceName(); + static const char* GetAllocationTag(); + + typedef QueryCompatibleJSONRPC10ClientConfiguration ClientConfigurationType; + typedef QueryCompatibleJSONRPC10EndpointProvider EndpointProviderType; + + /** + * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config + * is not specified, it will be initialized to default values. + */ + QueryCompatibleJSONRPC10Client(const Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10ClientConfiguration& clientConfiguration = Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10ClientConfiguration(), + std::shared_ptr endpointProvider = nullptr); + + /** + * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config + * is not specified, it will be initialized to default values. + */ + QueryCompatibleJSONRPC10Client(const Aws::Auth::AWSCredentials& credentials, + std::shared_ptr endpointProvider = nullptr, + const Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10ClientConfiguration& clientConfiguration = Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10ClientConfiguration()); + + /** + * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, + * the default http client factory will be used + */ + QueryCompatibleJSONRPC10Client(const std::shared_ptr& credentialsProvider, + std::shared_ptr endpointProvider = nullptr, + const Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10ClientConfiguration& clientConfiguration = Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10ClientConfiguration()); + + + /* Legacy constructors due deprecation */ + /** + * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config + * is not specified, it will be initialized to default values. + */ + QueryCompatibleJSONRPC10Client(const Aws::Client::ClientConfiguration& clientConfiguration); + + /** + * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config + * is not specified, it will be initialized to default values. + */ + QueryCompatibleJSONRPC10Client(const Aws::Auth::AWSCredentials& credentials, + const Aws::Client::ClientConfiguration& clientConfiguration); + + /** + * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, + * the default http client factory will be used + */ + QueryCompatibleJSONRPC10Client(const std::shared_ptr& credentialsProvider, + const Aws::Client::ClientConfiguration& clientConfiguration); + + /* End of legacy constructors due deprecation */ + virtual ~QueryCompatibleJSONRPC10Client(); + + /** + * + */ + virtual Model::QueryCompatibleOperationOutcome QueryCompatibleOperation(const Model::QueryCompatibleOperationRequest& request = {}) const; + + /** + * A Callable wrapper for QueryCompatibleOperation that returns a future to the operation so that it can be executed in parallel to other requests. + */ + template + Model::QueryCompatibleOperationOutcomeCallable QueryCompatibleOperationCallable(const QueryCompatibleOperationRequestT& request = {}) const + { + return SubmitCallable(&QueryCompatibleJSONRPC10Client::QueryCompatibleOperation, request); + } + + /** + * An Async wrapper for QueryCompatibleOperation that queues the request into a thread executor and triggers associated callback when operation has finished. + */ + template + void QueryCompatibleOperationAsync(const QueryCompatibleOperationResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr, const QueryCompatibleOperationRequestT& request = {}) const + { + return SubmitAsync(&QueryCompatibleJSONRPC10Client::QueryCompatibleOperation, request, handler, context); + } + + + void OverrideEndpoint(const Aws::String& endpoint); + std::shared_ptr& accessEndpointProvider(); + private: + friend class Aws::Client::ClientWithAsyncTemplateMethods; + void init(const QueryCompatibleJSONRPC10ClientConfiguration& clientConfiguration); + + QueryCompatibleJSONRPC10ClientConfiguration m_clientConfiguration; + std::shared_ptr m_endpointProvider; + }; + +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10EndpointProvider.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10EndpointProvider.h new file mode 100644 index 00000000000..47a8f098d65 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10EndpointProvider.h @@ -0,0 +1,61 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +#include + + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ +namespace Endpoint +{ +using EndpointParameters = Aws::Endpoint::EndpointParameters; +using Aws::Endpoint::EndpointProviderBase; +using Aws::Endpoint::DefaultEndpointProvider; + +using QueryCompatibleJSONRPC10ClientContextParameters = Aws::Endpoint::ClientContextParameters; + +using QueryCompatibleJSONRPC10ClientConfiguration = Aws::Client::GenericClientConfiguration; +using QueryCompatibleJSONRPC10BuiltInParameters = Aws::Endpoint::BuiltInParameters; + +/** + * The type for the QueryCompatibleJSONRPC10 Client Endpoint Provider. + * Inherit from this Base class / "Interface" should you want to provide a custom endpoint provider. + * The SDK must use service-specific type for each service per specification. + */ +using QueryCompatibleJSONRPC10EndpointProviderBase = + EndpointProviderBase; + +using QueryCompatibleJSONRPC10DefaultEpProviderBase = + DefaultEndpointProvider; + +/** + * Default endpoint provider used for this service + */ +class AWS_QUERYCOMPATIBLEJSONRPC10_API QueryCompatibleJSONRPC10EndpointProvider : public QueryCompatibleJSONRPC10DefaultEpProviderBase +{ +public: + using QueryCompatibleJSONRPC10ResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; + + QueryCompatibleJSONRPC10EndpointProvider() + : QueryCompatibleJSONRPC10DefaultEpProviderBase(Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10EndpointRules::GetRulesBlob(), Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10EndpointRules::RulesBlobSize) + {} + + ~QueryCompatibleJSONRPC10EndpointProvider() + { + } +}; +} // namespace Endpoint +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10EndpointRules.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10EndpointRules.h new file mode 100644 index 00000000000..5fb82ed15c9 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10EndpointRules.h @@ -0,0 +1,23 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ +class QueryCompatibleJSONRPC10EndpointRules +{ +public: + static const size_t RulesBlobStrLen; + static const size_t RulesBlobSize; + + static const char* GetRulesBlob(); +}; +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10ErrorMarshaller.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10ErrorMarshaller.h new file mode 100644 index 00000000000..6fb2db8b27e --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10ErrorMarshaller.h @@ -0,0 +1,23 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once + +#include +#include + +namespace Aws +{ +namespace Client +{ + +class AWS_QUERYCOMPATIBLEJSONRPC10_API QueryCompatibleJSONRPC10ErrorMarshaller : public Aws::Client::JsonErrorMarshallerQueryCompatible +{ +public: + Aws::Client::AWSError FindErrorByName(const char* exceptionName) const override; +}; + +} // namespace Client +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10Errors.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10Errors.h new file mode 100644 index 00000000000..1037136c540 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10Errors.h @@ -0,0 +1,73 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once + +#include +#include +#include + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ +enum class QueryCompatibleJSONRPC10Errors +{ + //From Core// + ////////////////////////////////////////////////////////////////////////////////////////// + INCOMPLETE_SIGNATURE = 0, + INTERNAL_FAILURE = 1, + INVALID_ACTION = 2, + INVALID_CLIENT_TOKEN_ID = 3, + INVALID_PARAMETER_COMBINATION = 4, + INVALID_QUERY_PARAMETER = 5, + INVALID_PARAMETER_VALUE = 6, + MISSING_ACTION = 7, // SDK should never allow + MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow + MISSING_PARAMETER = 9, // SDK should never allow + OPT_IN_REQUIRED = 10, + REQUEST_EXPIRED = 11, + SERVICE_UNAVAILABLE = 12, + THROTTLING = 13, + VALIDATION = 14, + ACCESS_DENIED = 15, + RESOURCE_NOT_FOUND = 16, + UNRECOGNIZED_CLIENT = 17, + MALFORMED_QUERY_STRING = 18, + SLOW_DOWN = 19, + REQUEST_TIME_TOO_SKEWED = 20, + INVALID_SIGNATURE = 21, + SIGNATURE_DOES_NOT_MATCH = 22, + INVALID_ACCESS_KEY_ID = 23, + REQUEST_TIMEOUT = 24, + NETWORK_CONNECTION = 99, + + UNKNOWN = 100, + /////////////////////////////////////////////////////////////////////////////////////////// + + CUSTOM_CODE= static_cast(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1, + NO_CUSTOM_CODE +}; + +class AWS_QUERYCOMPATIBLEJSONRPC10_API QueryCompatibleJSONRPC10Error : public Aws::Client::AWSError +{ +public: + QueryCompatibleJSONRPC10Error() {} + QueryCompatibleJSONRPC10Error(const Aws::Client::AWSError& rhs) : Aws::Client::AWSError(rhs) {} + QueryCompatibleJSONRPC10Error(Aws::Client::AWSError&& rhs) : Aws::Client::AWSError(rhs) {} + QueryCompatibleJSONRPC10Error(const Aws::Client::AWSError& rhs) : Aws::Client::AWSError(rhs) {} + QueryCompatibleJSONRPC10Error(Aws::Client::AWSError&& rhs) : Aws::Client::AWSError(rhs) {} + + template + T GetModeledError(); +}; + +namespace QueryCompatibleJSONRPC10ErrorMapper +{ + AWS_QUERYCOMPATIBLEJSONRPC10_API Aws::Client::AWSError GetErrorForName(const char* errorName); +} + +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10Request.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10Request.h new file mode 100644 index 00000000000..81f07ab4f6c --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10Request.h @@ -0,0 +1,47 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ + class AWS_QUERYCOMPATIBLEJSONRPC10_API QueryCompatibleJSONRPC10Request : public Aws::AmazonSerializableWebServiceRequest + { + public: + using EndpointParameter = Aws::Endpoint::EndpointParameter; + using EndpointParameters = Aws::Endpoint::EndpointParameters; + + virtual ~QueryCompatibleJSONRPC10Request () {} + + void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); } + + inline Aws::Http::HeaderValueCollection GetHeaders() const override + { + auto headers = GetRequestSpecificHeaders(); + + if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0)) + { + headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_0 )); + headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::X_AMZN_QUERY_MODE,"true")); + } + headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2020-07-14")); + return headers; + } + + protected: + virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); } + + }; + + +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10ServiceClientModel.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10ServiceClientModel.h new file mode 100644 index 00000000000..5143915f8d4 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10ServiceClientModel.h @@ -0,0 +1,81 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once + +/* Generic header includes */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +/* End of generic header includes */ + +/* Service model headers required in QueryCompatibleJSONRPC10Client header */ +#include +#include +/* End of service model headers required in QueryCompatibleJSONRPC10Client header */ + +namespace Aws +{ + namespace Http + { + class HttpClient; + class HttpClientFactory; + } // namespace Http + + namespace Utils + { + template< typename R, typename E> class Outcome; + + namespace Threading + { + class Executor; + } // namespace Threading + } // namespace Utils + + namespace Auth + { + class AWSCredentials; + class AWSCredentialsProvider; + } // namespace Auth + + namespace Client + { + class RetryStrategy; + } // namespace Client + + namespace QueryCompatibleJSONRPC10 + { + using QueryCompatibleJSONRPC10ClientConfiguration = Aws::Client::GenericClientConfiguration; + using QueryCompatibleJSONRPC10EndpointProviderBase = Aws::QueryCompatibleJSONRPC10::Endpoint::QueryCompatibleJSONRPC10EndpointProviderBase; + using QueryCompatibleJSONRPC10EndpointProvider = Aws::QueryCompatibleJSONRPC10::Endpoint::QueryCompatibleJSONRPC10EndpointProvider; + + namespace Model + { + /* Service model forward declarations required in QueryCompatibleJSONRPC10Client header */ + class QueryCompatibleOperationRequest; + /* End of service model forward declarations required in QueryCompatibleJSONRPC10Client header */ + + /* Service model Outcome class definitions */ + typedef Aws::Utils::Outcome QueryCompatibleOperationOutcome; + /* End of service model Outcome class definitions */ + + /* Service model Outcome callable definitions */ + typedef std::future QueryCompatibleOperationOutcomeCallable; + /* End of service model Outcome callable definitions */ + } // namespace Model + + class QueryCompatibleJSONRPC10Client; + + /* Service model async handlers definitions */ + typedef std::function&) > QueryCompatibleOperationResponseReceivedHandler; + /* End of service model async handlers definitions */ + } // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10_EXPORTS.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10_EXPORTS.h new file mode 100644 index 00000000000..69b08b3ba2c --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/QueryCompatibleJSONRPC10_EXPORTS.h @@ -0,0 +1,32 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once + +#ifdef _MSC_VER + //disable windows complaining about max template size. + #pragma warning (disable : 4503) +#endif // _MSC_VER + +#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32) + #ifdef _MSC_VER + #pragma warning(disable : 4251) + #endif // _MSC_VER + + #ifdef USE_IMPORT_EXPORT + #ifdef AWS_QUERYCOMPATIBLEJSONRPC10_EXPORTS + #define AWS_QUERYCOMPATIBLEJSONRPC10_API __declspec(dllexport) + #else + #define AWS_QUERYCOMPATIBLEJSONRPC10_API __declspec(dllimport) + #endif /* AWS_QUERYCOMPATIBLEJSONRPC10_EXPORTS */ + #define AWS_QUERYCOMPATIBLEJSONRPC10_EXTERN + #else + #define AWS_QUERYCOMPATIBLEJSONRPC10_API + #define AWS_QUERYCOMPATIBLEJSONRPC10_EXTERN extern + #endif // USE_IMPORT_EXPORT +#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32) + #define AWS_QUERYCOMPATIBLEJSONRPC10_API + #define AWS_QUERYCOMPATIBLEJSONRPC10_EXTERN extern +#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32) diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/model/QueryCompatibleOperationRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/model/QueryCompatibleOperationRequest.h new file mode 100644 index 00000000000..0cfa4b6d20e --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/model/QueryCompatibleOperationRequest.h @@ -0,0 +1,38 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ +namespace Model +{ + + /** + */ + class QueryCompatibleOperationRequest : public QueryCompatibleJSONRPC10Request + { + public: + AWS_QUERYCOMPATIBLEJSONRPC10_API QueryCompatibleOperationRequest() = default; + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "QueryCompatibleOperation"; } + + AWS_QUERYCOMPATIBLEJSONRPC10_API Aws::String SerializePayload() const override; + + AWS_QUERYCOMPATIBLEJSONRPC10_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + }; + +} // namespace Model +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/model/ResponseMetadata.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/model/ResponseMetadata.h new file mode 100644 index 00000000000..11220182153 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/include/aws/query-compatible-json-rpc-10/model/ResponseMetadata.h @@ -0,0 +1,52 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include + +namespace Aws +{ +namespace Utils +{ +namespace Json +{ + class JsonValue; + class JsonView; +} // namespace Json +} // namespace Utils +namespace QueryCompatibleJSONRPC10 +{ +namespace Model +{ + + class ResponseMetadata + { + public: + AWS_QUERYCOMPATIBLEJSONRPC10_API ResponseMetadata() = default; + AWS_QUERYCOMPATIBLEJSONRPC10_API ResponseMetadata(Aws::Utils::Json::JsonView jsonValue); + AWS_QUERYCOMPATIBLEJSONRPC10_API ResponseMetadata& operator=(Aws::Utils::Json::JsonView jsonValue); + AWS_QUERYCOMPATIBLEJSONRPC10_API Aws::Utils::Json::JsonValue Jsonize() const; + + + ///@{ + + inline const Aws::String& GetRequestId() const { return m_requestId; } + inline bool RequestIdHasBeenSet() const { return m_requestIdHasBeenSet; } + template + void SetRequestId(RequestIdT&& value) { m_requestIdHasBeenSet = true; m_requestId = std::forward(value); } + template + ResponseMetadata& WithRequestId(RequestIdT&& value) { SetRequestId(std::forward(value)); return *this;} + ///@} + private: + + Aws::String m_requestId; + bool m_requestIdHasBeenSet = false; + }; + +} // namespace Model +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10Client.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10Client.cpp new file mode 100644 index 00000000000..0e0c51780a4 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10Client.cpp @@ -0,0 +1,193 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + + +using namespace Aws; +using namespace Aws::Auth; +using namespace Aws::Client; +using namespace Aws::QueryCompatibleJSONRPC10; +using namespace Aws::QueryCompatibleJSONRPC10::Model; +using namespace Aws::Http; +using namespace Aws::Utils::Json; +using namespace smithy::components::tracing; +using ResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; + +namespace Aws +{ + namespace QueryCompatibleJSONRPC10 + { + const char SERVICE_NAME[] = "query-compatible-jsonrpc10"; + const char ALLOCATION_TAG[] = "QueryCompatibleJSONRPC10Client"; + } +} +const char* QueryCompatibleJSONRPC10Client::GetServiceName() {return SERVICE_NAME;} +const char* QueryCompatibleJSONRPC10Client::GetAllocationTag() {return ALLOCATION_TAG;} + +QueryCompatibleJSONRPC10Client::QueryCompatibleJSONRPC10Client(const QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10ClientConfiguration& clientConfiguration, + std::shared_ptr endpointProvider) : + BASECLASS(clientConfiguration, + Aws::MakeShared(ALLOCATION_TAG, + Aws::MakeShared(ALLOCATION_TAG), + SERVICE_NAME, + Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) +{ + init(m_clientConfiguration); +} + +QueryCompatibleJSONRPC10Client::QueryCompatibleJSONRPC10Client(const AWSCredentials& credentials, + std::shared_ptr endpointProvider, + const QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10ClientConfiguration& clientConfiguration) : + BASECLASS(clientConfiguration, + Aws::MakeShared(ALLOCATION_TAG, + Aws::MakeShared(ALLOCATION_TAG, credentials), + SERVICE_NAME, + Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) +{ + init(m_clientConfiguration); +} + +QueryCompatibleJSONRPC10Client::QueryCompatibleJSONRPC10Client(const std::shared_ptr& credentialsProvider, + std::shared_ptr endpointProvider, + const QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10ClientConfiguration& clientConfiguration) : + BASECLASS(clientConfiguration, + Aws::MakeShared(ALLOCATION_TAG, + credentialsProvider, + SERVICE_NAME, + Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(endpointProvider ? std::move(endpointProvider) : Aws::MakeShared(ALLOCATION_TAG)) +{ + init(m_clientConfiguration); +} + + /* Legacy constructors due deprecation */ + QueryCompatibleJSONRPC10Client::QueryCompatibleJSONRPC10Client(const Client::ClientConfiguration& clientConfiguration) : + BASECLASS(clientConfiguration, + Aws::MakeShared(ALLOCATION_TAG, + Aws::MakeShared(ALLOCATION_TAG), + SERVICE_NAME, + Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) +{ + init(m_clientConfiguration); +} + +QueryCompatibleJSONRPC10Client::QueryCompatibleJSONRPC10Client(const AWSCredentials& credentials, + const Client::ClientConfiguration& clientConfiguration) : + BASECLASS(clientConfiguration, + Aws::MakeShared(ALLOCATION_TAG, + Aws::MakeShared(ALLOCATION_TAG, credentials), + SERVICE_NAME, + Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) +{ + init(m_clientConfiguration); +} + +QueryCompatibleJSONRPC10Client::QueryCompatibleJSONRPC10Client(const std::shared_ptr& credentialsProvider, + const Client::ClientConfiguration& clientConfiguration) : + BASECLASS(clientConfiguration, + Aws::MakeShared(ALLOCATION_TAG, + credentialsProvider, + SERVICE_NAME, + Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) +{ + init(m_clientConfiguration); +} + + /* End of legacy constructors due deprecation */ +QueryCompatibleJSONRPC10Client::~QueryCompatibleJSONRPC10Client() +{ + ShutdownSdkClient(this, -1); +} + +std::shared_ptr& QueryCompatibleJSONRPC10Client::accessEndpointProvider() +{ + return m_endpointProvider; +} + +void QueryCompatibleJSONRPC10Client::init(const QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10ClientConfiguration& config) +{ + AWSClient::SetServiceClientName("Query Compatible JSON RPC 10"); + if (!m_clientConfiguration.executor) { + if (!m_clientConfiguration.configFactories.executorCreateFn()) { + AWS_LOGSTREAM_FATAL(ALLOCATION_TAG, "Failed to initialize client: config is missing Executor or executorCreateFn"); + m_isInitialized = false; + return; + } + m_clientConfiguration.executor = m_clientConfiguration.configFactories.executorCreateFn(); + } + AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); + m_endpointProvider->InitBuiltInParameters(config); +} + +void QueryCompatibleJSONRPC10Client::OverrideEndpoint(const Aws::String& endpoint) +{ + AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); + m_endpointProvider->OverrideEndpoint(endpoint); +} + +QueryCompatibleOperationOutcome QueryCompatibleJSONRPC10Client::QueryCompatibleOperation(const QueryCompatibleOperationRequest& request) const +{ + AWS_OPERATION_GUARD(QueryCompatibleOperation); + AWS_OPERATION_CHECK_PTR(m_endpointProvider, QueryCompatibleOperation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); + AWS_OPERATION_CHECK_PTR(m_telemetryProvider, QueryCompatibleOperation, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(meter, QueryCompatibleOperation, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".QueryCompatibleOperation", + {{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }}, + smithy::components::tracing::SpanKind::CLIENT); + return TracingUtils::MakeCallWithTiming( + [&]()-> QueryCompatibleOperationOutcome { + auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming( + [&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); }, + TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC, + *meter, + {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); + AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, QueryCompatibleOperation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); + return QueryCompatibleOperationOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER)); + }, + TracingUtils::SMITHY_CLIENT_DURATION_METRIC, + *meter, + {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); +} + diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10EndpointProvider.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10EndpointProvider.cpp new file mode 100644 index 00000000000..1777a7dae76 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10EndpointProvider.cpp @@ -0,0 +1,16 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ +namespace Endpoint +{ +} // namespace Endpoint +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10EndpointRules.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10EndpointRules.cpp new file mode 100644 index 00000000000..26a7d376b76 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10EndpointRules.cpp @@ -0,0 +1,53 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ +const size_t QueryCompatibleJSONRPC10EndpointRules::RulesBlobStrLen = 672; +const size_t QueryCompatibleJSONRPC10EndpointRules::RulesBlobSize = 673; + +using RulesBlobT = Aws::Array; +static constexpr RulesBlobT RulesBlob = {{ +'{','"','v','e','r','s','i','o','n','"',':','"','1','.','0','"',',','"','p','a','r','a','m','e','t', +'e','r','s','"',':','{','"','R','e','g','i','o','n','"',':','{','"','b','u','i','l','t','I','n','"', +':','"','A','W','S',':',':','R','e','g','i','o','n','"',',','"','r','e','q','u','i','r','e','d','"', +':','t','r','u','e',',','"','d','o','c','u','m','e','n','t','a','t','i','o','n','"',':','"','T','h', +'e',' ','A','W','S',' ','r','e','g','i','o','n',' ','u','s','e','d',' ','t','o',' ','d','i','s','p', +'a','t','c','h',' ','t','h','e',' ','r','e','q','u','e','s','t',',',' ','i','f',' ','t','h','e',' ', +'e','n','d','p','o','i','n','t',' ','i','s',' ','n','o','t',' ','s','p','e','c','i','f','i','e','d', +'.','"',',','"','t','y','p','e','"',':','"','S','t','r','i','n','g','"','}',',','"','E','n','d','p', +'o','i','n','t','"',':','{','"','b','u','i','l','t','I','n','"',':','"','S','D','K',':',':','E','n', +'d','p','o','i','n','t','"',',','"','r','e','q','u','i','r','e','d','"',':','f','a','l','s','e',',', +'"','d','o','c','u','m','e','n','t','a','t','i','o','n','"',':','"','O','v','e','r','r','i','d','e', +' ','t','h','e',' ','e','n','d','p','o','i','n','t',' ','u','s','e','d',' ','t','o',' ','s','e','n', +'d',' ','t','h','i','s',' ','r','e','q','u','e','s','t','"',',','"','t','y','p','e','"',':','"','S', +'t','r','i','n','g','"','}','}',',','"','r','u','l','e','s','"',':','[','{','"','c','o','n','d','i', +'t','i','o','n','s','"',':','[','{','"','f','n','"',':','"','i','s','S','e','t','"',',','"','a','r', +'g','v','"',':','[','{','"','r','e','f','"',':','"','E','n','d','p','o','i','n','t','"','}',']','}', +']',',','"','t','y','p','e','"',':','"','e','n','d','p','o','i','n','t','"',',','"','e','n','d','p', +'o','i','n','t','"',':','{','"','u','r','l','"',':','{','"','r','e','f','"',':','"','E','n','d','p', +'o','i','n','t','"','}',',','"','p','r','o','p','e','r','t','i','e','s','"',':','{','}',',','"','h', +'e','a','d','e','r','s','"',':','{','}','}','}',',','{','"','c','o','n','d','i','t','i','o','n','s', +'"',':','[','{','"','f','n','"',':','"','a','w','s','.','p','a','r','t','i','t','i','o','n','"',',', +'"','a','r','g','v','"',':','[','{','"','r','e','f','"',':','"','R','e','g','i','o','n','"','}',']', +',','"','a','s','s','i','g','n','"',':','"','P','a','r','t','i','t','i','o','n','R','e','s','u','l', +'t','"','}',']',',','"','t','y','p','e','"',':','"','e','n','d','p','o','i','n','t','"',',','"','e', +'n','d','p','o','i','n','t','"',':','{','"','u','r','l','"',':','"','h','t','t','p',':','/','/','l', +'o','c','a','l','h','o','s','t',':','1','9','9','4','"',',','"','p','r','o','p','e','r','t','i','e', +'s','"',':','{','}',',','"','h','e','a','d','e','r','s','"',':','{','}','}','}',']','}','\0' +}}; + +const char* QueryCompatibleJSONRPC10EndpointRules::GetRulesBlob() +{ + return RulesBlob.data(); +} + +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10ErrorMarshaller.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10ErrorMarshaller.cpp new file mode 100644 index 00000000000..1f3025b506a --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10ErrorMarshaller.cpp @@ -0,0 +1,22 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::Client; +using namespace Aws::QueryCompatibleJSONRPC10; + +AWSError QueryCompatibleJSONRPC10ErrorMarshaller::FindErrorByName(const char* errorName) const +{ + AWSError error = QueryCompatibleJSONRPC10ErrorMapper::GetErrorForName(errorName); + if(error.GetErrorType() != CoreErrors::UNKNOWN) + { + return error; + } + + return AWSErrorMarshaller::FindErrorByName(errorName); +} \ No newline at end of file diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10Errors.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10Errors.cpp new file mode 100644 index 00000000000..9a5a0d61ffb --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10Errors.cpp @@ -0,0 +1,42 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::Client; +using namespace Aws::Utils; +using namespace Aws::QueryCompatibleJSONRPC10; + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ +namespace QueryCompatibleJSONRPC10ErrorMapper +{ + +static const int CUSTOM_CODE_HASH = HashingUtils::HashString("Customized"); +static const int NO_CUSTOM_CODE_HASH = HashingUtils::HashString("NoCustomCodeError"); + + +AWSError GetErrorForName(const char* errorName) +{ + int hashCode = HashingUtils::HashString(errorName); + + if (hashCode == CUSTOM_CODE_HASH) + { + return AWSError(static_cast(QueryCompatibleJSONRPC10Errors::CUSTOM_CODE), RetryableType::NOT_RETRYABLE); + } + else if (hashCode == NO_CUSTOM_CODE_HASH) + { + return AWSError(static_cast(QueryCompatibleJSONRPC10Errors::NO_CUSTOM_CODE), RetryableType::NOT_RETRYABLE); + } + return AWSError(CoreErrors::UNKNOWN, false); +} + +} // namespace QueryCompatibleJSONRPC10ErrorMapper +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10Request.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10Request.cpp new file mode 100644 index 00000000000..8e1447c6896 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/QueryCompatibleJSONRPC10Request.cpp @@ -0,0 +1,14 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + + +#include + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/model/QueryCompatibleOperationRequest.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/model/QueryCompatibleOperationRequest.cpp new file mode 100644 index 00000000000..ffcee78b43a --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/model/QueryCompatibleOperationRequest.cpp @@ -0,0 +1,30 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +#include + +using namespace Aws::QueryCompatibleJSONRPC10::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +Aws::String QueryCompatibleOperationRequest::SerializePayload() const +{ + return "{}"; +} + +Aws::Http::HeaderValueCollection QueryCompatibleOperationRequest::GetRequestSpecificHeaders() const +{ + Aws::Http::HeaderValueCollection headers; + headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "QueryCompatibleJsonRpc10.QueryCompatibleOperation")); + return headers; + +} + + + + diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/model/ResponseMetadata.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/model/ResponseMetadata.cpp new file mode 100644 index 00000000000..03c72c522b4 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-query-compatible-json-rpc-10/source/model/ResponseMetadata.cpp @@ -0,0 +1,42 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +#include + +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +namespace Aws +{ +namespace QueryCompatibleJSONRPC10 +{ +namespace Model +{ + +ResponseMetadata::ResponseMetadata(JsonView jsonValue) +{ + *this = jsonValue; +} + +ResponseMetadata& ResponseMetadata::operator =(JsonView jsonValue) +{ + AWS_UNREFERENCED_PARAM(jsonValue); + return *this; +} + +JsonValue ResponseMetadata::Jsonize() const +{ + JsonValue payload; + + return payload; +} + +} // namespace Model +} // namespace QueryCompatibleJSONRPC10 +} // namespace Aws diff --git a/generated/protocol-tests/tests/input/ec2/tests/QueryTimestampsTest.cpp b/generated/protocol-tests/tests/input/ec2/tests/QueryTimestampsTest.cpp index e85f1cce1c6..0fa1421c5e2 100644 --- a/generated/protocol-tests/tests/input/ec2/tests/QueryTimestampsTest.cpp +++ b/generated/protocol-tests/tests/input/ec2/tests/QueryTimestampsTest.cpp @@ -17,9 +17,9 @@ AWS_PROTOCOL_TEST(QueryTimestamps, Ec2TimestampsInput) { SetMockResponse(); QueryTimestampsRequest request; - request.SetNormalFormat(Aws::Utils::DateTime(1422172800L)); - request.SetEpochMember(Aws::Utils::DateTime(1422172800L)); - request.SetEpochTarget(Aws::Utils::DateTime(1422172800L)); + request.SetNormalFormat(Aws::Utils::DateTime(static_cast(1422172800))); + request.SetEpochMember(Aws::Utils::DateTime(static_cast(1422172800))); + request.SetEpochTarget(Aws::Utils::DateTime(static_cast(1422172800))); auto outcome = client.QueryTimestamps(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/json/tests/JsonUnionsTest.cpp b/generated/protocol-tests/tests/input/json/tests/JsonUnionsTest.cpp index f460c53a621..6fe0f80ab21 100644 --- a/generated/protocol-tests/tests/input/json/tests/JsonUnionsTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/JsonUnionsTest.cpp @@ -107,7 +107,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11SerializeTimestampUnionValue) { JsonUnionsRequest request; { MyUnion requestContents; - requestContents.SetTimestampValue(Aws::Utils::DateTime(1398796238L)); + requestContents.SetTimestampValue(Aws::Utils::DateTime(static_cast(1398796238))); request.SetContents(requestContents); } diff --git a/generated/protocol-tests/tests/input/json/tests/KitchenSinkOperationTest.cpp b/generated/protocol-tests/tests/input/json/tests/KitchenSinkOperationTest.cpp index 97ff95b97ad..79c0f57a213 100644 --- a/generated/protocol-tests/tests/input/json/tests/KitchenSinkOperationTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/KitchenSinkOperationTest.cpp @@ -188,7 +188,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_timestamp_shapes) { SetMockResponse(); KitchenSinkOperationRequest request; - request.SetTimestamp(Aws::Utils::DateTime(946845296L)); + request.SetTimestamp(Aws::Utils::DateTime(static_cast(946845296))); auto outcome = client.KitchenSinkOperation(request); ExpectedRequest expectedRq; @@ -207,7 +207,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_timestamp_shapes_with_iso8601 SetMockResponse(); KitchenSinkOperationRequest request; - request.SetIso8601Timestamp(Aws::Utils::DateTime(946845296L)); + request.SetIso8601Timestamp(Aws::Utils::DateTime(static_cast(946845296))); auto outcome = client.KitchenSinkOperation(request); ExpectedRequest expectedRq; @@ -226,7 +226,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_timestamp_shapes_with_httpdat SetMockResponse(); KitchenSinkOperationRequest request; - request.SetHttpdateTimestamp(Aws::Utils::DateTime(946845296L)); + request.SetHttpdateTimestamp(Aws::Utils::DateTime(static_cast(946845296))); auto outcome = client.KitchenSinkOperation(request); ExpectedRequest expectedRq; @@ -245,7 +245,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_timestamp_shapes_with_unixtim SetMockResponse(); KitchenSinkOperationRequest request; - request.SetUnixTimestamp(Aws::Utils::DateTime(946845296L)); + request.SetUnixTimestamp(Aws::Utils::DateTime(static_cast(946845296))); auto outcome = client.KitchenSinkOperation(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/json_1_0-query-compatible/CMakeLists.txt b/generated/protocol-tests/tests/input/json_1_0-query-compatible/CMakeLists.txt new file mode 100644 index 00000000000..e5f851e21ab --- /dev/null +++ b/generated/protocol-tests/tests/input/json_1_0-query-compatible/CMakeLists.txt @@ -0,0 +1,32 @@ +add_project(protocol-json_1_0-query-compatible-input-tests + "Tests for the protocol json of AWS C++ SDK" + testing-resources + aws-cpp-sdk-protocol-mock + aws-cpp-sdk-query-compatible-json-rpc-10 + aws-cpp-sdk-core) + +file(GLOB AWS_PROTOCOL_JSON_1_0_QUERY_COMPATIBLE_INPUT_TESTS_SRC + "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/tests/*.cpp" +) + +if(MSVC AND BUILD_SHARED_LIBS) + add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1) +endif() + +enable_testing() + +if(PLATFORM_ANDROID AND BUILD_SHARED_LIBS) + add_library(${PROJECT_NAME} "${AWS_PROTOCOL_JSON_1_0_QUERY_COMPATIBLE_INPUT_TESTS_SRC}") +else() + add_executable(${PROJECT_NAME} "${AWS_PROTOCOL_JSON_1_0_QUERY_COMPATIBLE_INPUT_TESTS_SRC}") +endif() + +set_compiler_flags(${PROJECT_NAME}) +set_compiler_warnings(${PROJECT_NAME}) + +target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBS}) + +if(NOT CMAKE_CROSSCOMPILING) + SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) +endif() \ No newline at end of file diff --git a/generated/protocol-tests/tests/input/json_1_0-query-compatible/RunTests.cpp b/generated/protocol-tests/tests/input/json_1_0-query-compatible/RunTests.cpp new file mode 100644 index 00000000000..1352141f979 --- /dev/null +++ b/generated/protocol-tests/tests/input/json_1_0-query-compatible/RunTests.cpp @@ -0,0 +1,30 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + + AWS_BEGIN_MEMORY_TEST_EX(options, 1024, 128); + Aws::Testing::InitPlatformTest(options); + Aws::Testing::ParseArgs(argc, argv); + + Aws::InitAPI(options); + Aws::Environment::SetEnv("AWS_EC2_METADATA_DISABLED", "true", true); + ::testing::InitGoogleTest(&argc, argv); + int exitCode = RUN_ALL_TESTS(); + Aws::ShutdownAPI(options); + + AWS_END_MEMORY_TEST_EX; + Aws::Testing::ShutdownPlatformTest(options); + return exitCode; +} diff --git a/generated/protocol-tests/tests/input/json_1_0-query-compatible/tests/QueryCompatibleOperationTest.cpp b/generated/protocol-tests/tests/input/json_1_0-query-compatible/tests/QueryCompatibleOperationTest.cpp new file mode 100644 index 00000000000..88606fb54e8 --- /dev/null +++ b/generated/protocol-tests/tests/input/json_1_0-query-compatible/tests/QueryCompatibleOperationTest.cpp @@ -0,0 +1,29 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using QueryCompatibleOperation = AWS_PROTOCOL_TEST_SUITE; +using QueryCompatibleJSONRPC10Client = Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10Client; +using namespace Aws::QueryCompatibleJSONRPC10::Model; + +AWS_PROTOCOL_TEST(QueryCompatibleOperation, QueryCompatibleAwsJson10CborSendsQueryModeHeader) { + QueryCompatibleJSONRPC10Client client(mockCredentials, mockConfig); + + SetMockResponse(); + + QueryCompatibleOperationRequest request; + + auto outcome = client.QueryCompatibleOperation(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "e30="; + expectedRq.uri = "/"; + expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.0)"}, {"X-Amz-Target", R"(QueryCompatibleJsonRpc10.QueryCompatibleOperation)"}, {"x-amzn-query-mode", R"(true)"}}; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} diff --git a/generated/protocol-tests/tests/input/json_1_0/tests/JsonUnionsTest.cpp b/generated/protocol-tests/tests/input/json_1_0/tests/JsonUnionsTest.cpp index 9401e858cf9..661e4f6014c 100644 --- a/generated/protocol-tests/tests/input/json_1_0/tests/JsonUnionsTest.cpp +++ b/generated/protocol-tests/tests/input/json_1_0/tests/JsonUnionsTest.cpp @@ -107,7 +107,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson10SerializeTimestampUnionValue) { JsonUnionsRequest request; { MyUnion requestContents; - requestContents.SetTimestampValue(Aws::Utils::DateTime(1398796238L)); + requestContents.SetTimestampValue(Aws::Utils::DateTime(static_cast(1398796238))); request.SetContents(requestContents); } diff --git a/generated/protocol-tests/tests/input/query/tests/QueryTimestampsTest.cpp b/generated/protocol-tests/tests/input/query/tests/QueryTimestampsTest.cpp index c13d4e5c7de..2b175473ced 100644 --- a/generated/protocol-tests/tests/input/query/tests/QueryTimestampsTest.cpp +++ b/generated/protocol-tests/tests/input/query/tests/QueryTimestampsTest.cpp @@ -17,9 +17,9 @@ AWS_PROTOCOL_TEST(QueryTimestamps, QueryTimestampsInput) { SetMockResponse(); QueryTimestampsRequest request; - request.SetNormalFormat(Aws::Utils::DateTime(1422172800L)); - request.SetEpochMember(Aws::Utils::DateTime(1422172800L)); - request.SetEpochTarget(Aws::Utils::DateTime(1422172800L)); + request.SetNormalFormat(Aws::Utils::DateTime(static_cast(1422172800))); + request.SetEpochMember(Aws::Utils::DateTime(static_cast(1422172800))); + request.SetEpochTarget(Aws::Utils::DateTime(static_cast(1422172800))); auto outcome = client.QueryTimestamps(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/rest-json/tests/AllQueryStringTypesTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/AllQueryStringTypesTest.cpp index faac33e8a0f..73876d5eb50 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/AllQueryStringTypesTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/AllQueryStringTypesTest.cpp @@ -31,8 +31,8 @@ AWS_PROTOCOL_TEST(AllQueryStringTypes, RestJsonAllQueryStringTypes) { request.SetQueryDoubleList({1.1, 2.1, 3.1}); request.SetQueryBoolean(true); request.SetQueryBooleanList({true, false, true}); - request.SetQueryTimestamp(Aws::Utils::DateTime(1L)); - request.SetQueryTimestampList({Aws::Utils::DateTime(1L), Aws::Utils::DateTime(2L), Aws::Utils::DateTime(3L)}); + request.SetQueryTimestamp(Aws::Utils::DateTime(static_cast(1))); + request.SetQueryTimestampList({Aws::Utils::DateTime(static_cast(1)), Aws::Utils::DateTime(static_cast(2)), Aws::Utils::DateTime(static_cast(3))}); request.SetQueryEnum(FooEnumMapper::GetFooEnumForName(R"e(Foo)e")); request.SetQueryEnumList({FooEnumMapper::GetFooEnumForName(R"e(Foo)e"), FooEnumMapper::GetFooEnumForName(R"e(Baz)e"), FooEnumMapper::GetFooEnumForName(R"e(Bar)e")}); request.SetQueryIntegerEnum(1); diff --git a/generated/protocol-tests/tests/input/rest-json/tests/HttpRequestWithLabelsAndTimestampFormatTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/HttpRequestWithLabelsAndTimestampFormatTest.cpp index d0abe09bbba..9ebbf9a7e17 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/HttpRequestWithLabelsAndTimestampFormatTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/HttpRequestWithLabelsAndTimestampFormatTest.cpp @@ -17,13 +17,13 @@ AWS_PROTOCOL_TEST(HttpRequestWithLabelsAndTimestampFormat, RestJsonHttpRequestWi SetMockResponse(); HttpRequestWithLabelsAndTimestampFormatRequest request; - request.SetMemberEpochSeconds(Aws::Utils::DateTime(1576540098L)); - request.SetMemberHttpDate(Aws::Utils::DateTime(1576540098L)); - request.SetMemberDateTime(Aws::Utils::DateTime(1576540098L)); - request.SetDefaultFormat(Aws::Utils::DateTime(1576540098L)); - request.SetTargetEpochSeconds(Aws::Utils::DateTime(1576540098L)); - request.SetTargetHttpDate(Aws::Utils::DateTime(1576540098L)); - request.SetTargetDateTime(Aws::Utils::DateTime(1576540098L)); + request.SetMemberEpochSeconds(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetMemberHttpDate(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetMemberDateTime(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetDefaultFormat(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetEpochSeconds(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetHttpDate(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetDateTime(Aws::Utils::DateTime(static_cast(1576540098))); auto outcome = client.HttpRequestWithLabelsAndTimestampFormat(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/rest-json/tests/HttpRequestWithLabelsTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/HttpRequestWithLabelsTest.cpp index a95d0bb7505..a5db042690e 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/HttpRequestWithLabelsTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/HttpRequestWithLabelsTest.cpp @@ -24,7 +24,7 @@ AWS_PROTOCOL_TEST(HttpRequestWithLabels, RestJsonInputWithHeadersAndAllParams) { request.SetFloat(4.1); request.SetDouble(5.1); request.SetBoolean(true); - request.SetTimestamp(Aws::Utils::DateTime(1576540098L)); + request.SetTimestamp(Aws::Utils::DateTime(static_cast(1576540098))); auto outcome = client.HttpRequestWithLabels(request); ExpectedRequest expectedRq; @@ -47,7 +47,7 @@ AWS_PROTOCOL_TEST(HttpRequestWithLabels, RestJsonHttpRequestLabelEscaping) { request.SetFloat(4.1); request.SetDouble(5.1); request.SetBoolean(true); - request.SetTimestamp(Aws::Utils::DateTime(1576540098L)); + request.SetTimestamp(Aws::Utils::DateTime(static_cast(1576540098))); auto outcome = client.HttpRequestWithLabels(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/rest-json/tests/InputAndOutputWithHeadersTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/InputAndOutputWithHeadersTest.cpp index 974e86af335..461da85b43e 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/InputAndOutputWithHeadersTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/InputAndOutputWithHeadersTest.cpp @@ -95,7 +95,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithTimestamp SetMockResponse(); InputAndOutputWithHeadersRequest request; - request.SetHeaderTimestampList({Aws::Utils::DateTime(1576540098L), Aws::Utils::DateTime(1576540098L)}); + request.SetHeaderTimestampList({Aws::Utils::DateTime(static_cast(1576540098)), Aws::Utils::DateTime(static_cast(1576540098))}); auto outcome = client.InputAndOutputWithHeaders(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/rest-json/tests/JsonListsTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/JsonListsTest.cpp index 3e7430cb8e8..0ef5e91591e 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/JsonListsTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/JsonListsTest.cpp @@ -21,7 +21,7 @@ AWS_PROTOCOL_TEST(JsonLists, RestJsonLists) { request.SetStringSet({R"(foo)", R"(bar)"}); request.SetIntegerList({1, 2}); request.SetBooleanList({true, false}); - request.SetTimestampList({Aws::Utils::DateTime(1398796238L), Aws::Utils::DateTime(1398796238L)}); + request.SetTimestampList({Aws::Utils::DateTime(static_cast(1398796238)), Aws::Utils::DateTime(static_cast(1398796238))}); request.SetEnumList({FooEnumMapper::GetFooEnumForName(R"e(Foo)e"), FooEnumMapper::GetFooEnumForName(R"e(0)e")}); request.SetIntEnumList({1, 2}); { diff --git a/generated/protocol-tests/tests/input/rest-json/tests/JsonTimestampsTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/JsonTimestampsTest.cpp index d941df4a519..0c81cfe6011 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/JsonTimestampsTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/JsonTimestampsTest.cpp @@ -17,7 +17,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestamps) { SetMockResponse(); JsonTimestampsRequest request; - request.SetNormal(Aws::Utils::DateTime(1398796238L)); + request.SetNormal(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.JsonTimestamps(request); ExpectedRequest expectedRq; @@ -35,7 +35,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithDateTimeFormat) { SetMockResponse(); JsonTimestampsRequest request; - request.SetDateTime(Aws::Utils::DateTime(1398796238L)); + request.SetDateTime(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.JsonTimestamps(request); ExpectedRequest expectedRq; @@ -53,7 +53,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithDateTimeOnTargetForm SetMockResponse(); JsonTimestampsRequest request; - request.SetDateTimeOnTarget(Aws::Utils::DateTime(1398796238L)); + request.SetDateTimeOnTarget(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.JsonTimestamps(request); ExpectedRequest expectedRq; @@ -71,7 +71,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithEpochSecondsFormat) SetMockResponse(); JsonTimestampsRequest request; - request.SetEpochSeconds(Aws::Utils::DateTime(1398796238L)); + request.SetEpochSeconds(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.JsonTimestamps(request); ExpectedRequest expectedRq; @@ -89,7 +89,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithEpochSecondsOnTarget SetMockResponse(); JsonTimestampsRequest request; - request.SetEpochSecondsOnTarget(Aws::Utils::DateTime(1398796238L)); + request.SetEpochSecondsOnTarget(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.JsonTimestamps(request); ExpectedRequest expectedRq; @@ -107,7 +107,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithHttpDateFormat) { SetMockResponse(); JsonTimestampsRequest request; - request.SetHttpDate(Aws::Utils::DateTime(1398796238L)); + request.SetHttpDate(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.JsonTimestamps(request); ExpectedRequest expectedRq; @@ -125,7 +125,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithHttpDateOnTargetForm SetMockResponse(); JsonTimestampsRequest request; - request.SetHttpDateOnTarget(Aws::Utils::DateTime(1398796238L)); + request.SetHttpDateOnTarget(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.JsonTimestamps(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/rest-json/tests/JsonUnionsTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/JsonUnionsTest.cpp index 0c5c9f114d3..4bcb4cde630 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/JsonUnionsTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/JsonUnionsTest.cpp @@ -107,7 +107,7 @@ AWS_PROTOCOL_TEST(JsonUnions, RestJsonSerializeTimestampUnionValue) { JsonUnionsRequest request; { MyUnion requestContents; - requestContents.SetTimestampValue(Aws::Utils::DateTime(1398796238L)); + requestContents.SetTimestampValue(Aws::Utils::DateTime(static_cast(1398796238))); request.SetContents(requestContents); } diff --git a/generated/protocol-tests/tests/input/rest-json/tests/TimestampFormatHeadersTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/TimestampFormatHeadersTest.cpp index a39c36a7a71..0a040eee552 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/TimestampFormatHeadersTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/TimestampFormatHeadersTest.cpp @@ -17,13 +17,13 @@ AWS_PROTOCOL_TEST(TimestampFormatHeaders, RestJsonTimestampFormatHeaders) { SetMockResponse(); TimestampFormatHeadersRequest request; - request.SetMemberEpochSeconds(Aws::Utils::DateTime(1576540098L)); - request.SetMemberHttpDate(Aws::Utils::DateTime(1576540098L)); - request.SetMemberDateTime(Aws::Utils::DateTime(1576540098L)); - request.SetDefaultFormat(Aws::Utils::DateTime(1576540098L)); - request.SetTargetEpochSeconds(Aws::Utils::DateTime(1576540098L)); - request.SetTargetHttpDate(Aws::Utils::DateTime(1576540098L)); - request.SetTargetDateTime(Aws::Utils::DateTime(1576540098L)); + request.SetMemberEpochSeconds(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetMemberHttpDate(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetMemberDateTime(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetDefaultFormat(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetEpochSeconds(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetHttpDate(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetDateTime(Aws::Utils::DateTime(static_cast(1576540098))); auto outcome = client.TimestampFormatHeaders(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/rest-xml/tests/AllQueryStringTypesTest.cpp b/generated/protocol-tests/tests/input/rest-xml/tests/AllQueryStringTypesTest.cpp index 07ef1206a3e..4eafdb155bd 100644 --- a/generated/protocol-tests/tests/input/rest-xml/tests/AllQueryStringTypesTest.cpp +++ b/generated/protocol-tests/tests/input/rest-xml/tests/AllQueryStringTypesTest.cpp @@ -31,8 +31,8 @@ AWS_PROTOCOL_TEST(AllQueryStringTypes, AllQueryStringTypes) { request.SetQueryDoubleList({1.1, 2.1, 3.1}); request.SetQueryBoolean(true); request.SetQueryBooleanList({true, false, true}); - request.SetQueryTimestamp(Aws::Utils::DateTime(1L)); - request.SetQueryTimestampList({Aws::Utils::DateTime(1L), Aws::Utils::DateTime(2L), Aws::Utils::DateTime(3L)}); + request.SetQueryTimestamp(Aws::Utils::DateTime(static_cast(1))); + request.SetQueryTimestampList({Aws::Utils::DateTime(static_cast(1)), Aws::Utils::DateTime(static_cast(2)), Aws::Utils::DateTime(static_cast(3))}); request.SetQueryEnum(FooEnumMapper::GetFooEnumForName(R"e(Foo)e")); request.SetQueryEnumList({FooEnumMapper::GetFooEnumForName(R"e(Foo)e"), FooEnumMapper::GetFooEnumForName(R"e(Baz)e"), FooEnumMapper::GetFooEnumForName(R"e(Bar)e")}); request.SetQueryIntegerEnum(1); diff --git a/generated/protocol-tests/tests/input/rest-xml/tests/HttpRequestWithLabelsAndTimestampFormatTest.cpp b/generated/protocol-tests/tests/input/rest-xml/tests/HttpRequestWithLabelsAndTimestampFormatTest.cpp index e40ee327695..b763cd23a6f 100644 --- a/generated/protocol-tests/tests/input/rest-xml/tests/HttpRequestWithLabelsAndTimestampFormatTest.cpp +++ b/generated/protocol-tests/tests/input/rest-xml/tests/HttpRequestWithLabelsAndTimestampFormatTest.cpp @@ -17,13 +17,13 @@ AWS_PROTOCOL_TEST(HttpRequestWithLabelsAndTimestampFormat, HttpRequestWithLabels SetMockResponse(); HttpRequestWithLabelsAndTimestampFormatRequest request; - request.SetMemberEpochSeconds(Aws::Utils::DateTime(1576540098L)); - request.SetMemberHttpDate(Aws::Utils::DateTime(1576540098L)); - request.SetMemberDateTime(Aws::Utils::DateTime(1576540098L)); - request.SetDefaultFormat(Aws::Utils::DateTime(1576540098L)); - request.SetTargetEpochSeconds(Aws::Utils::DateTime(1576540098L)); - request.SetTargetHttpDate(Aws::Utils::DateTime(1576540098L)); - request.SetTargetDateTime(Aws::Utils::DateTime(1576540098L)); + request.SetMemberEpochSeconds(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetMemberHttpDate(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetMemberDateTime(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetDefaultFormat(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetEpochSeconds(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetHttpDate(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetDateTime(Aws::Utils::DateTime(static_cast(1576540098))); auto outcome = client.HttpRequestWithLabelsAndTimestampFormat(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/rest-xml/tests/HttpRequestWithLabelsTest.cpp b/generated/protocol-tests/tests/input/rest-xml/tests/HttpRequestWithLabelsTest.cpp index 261822126c3..02b6716069a 100644 --- a/generated/protocol-tests/tests/input/rest-xml/tests/HttpRequestWithLabelsTest.cpp +++ b/generated/protocol-tests/tests/input/rest-xml/tests/HttpRequestWithLabelsTest.cpp @@ -24,7 +24,7 @@ AWS_PROTOCOL_TEST(HttpRequestWithLabels, InputWithHeadersAndAllParams) { request.SetFloat(4.1); request.SetDouble(5.1); request.SetBoolean(true); - request.SetTimestamp(Aws::Utils::DateTime(1576540098L)); + request.SetTimestamp(Aws::Utils::DateTime(static_cast(1576540098))); auto outcome = client.HttpRequestWithLabels(request); ExpectedRequest expectedRq; @@ -47,7 +47,7 @@ AWS_PROTOCOL_TEST(HttpRequestWithLabels, HttpRequestLabelEscaping) { request.SetFloat(4.1); request.SetDouble(5.1); request.SetBoolean(true); - request.SetTimestamp(Aws::Utils::DateTime(1576540098L)); + request.SetTimestamp(Aws::Utils::DateTime(static_cast(1576540098))); auto outcome = client.HttpRequestWithLabels(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/rest-xml/tests/InputAndOutputWithHeadersTest.cpp b/generated/protocol-tests/tests/input/rest-xml/tests/InputAndOutputWithHeadersTest.cpp index 9a1a87dc529..1d794f59958 100644 --- a/generated/protocol-tests/tests/input/rest-xml/tests/InputAndOutputWithHeadersTest.cpp +++ b/generated/protocol-tests/tests/input/rest-xml/tests/InputAndOutputWithHeadersTest.cpp @@ -78,7 +78,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, InputAndOutputWithTimestampHeaders) SetMockResponse(); InputAndOutputWithHeadersRequest request; - request.SetHeaderTimestampList({Aws::Utils::DateTime(1576540098L), Aws::Utils::DateTime(1576540098L)}); + request.SetHeaderTimestampList({Aws::Utils::DateTime(static_cast(1576540098)), Aws::Utils::DateTime(static_cast(1576540098))}); auto outcome = client.InputAndOutputWithHeaders(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/rest-xml/tests/TimestampFormatHeadersTest.cpp b/generated/protocol-tests/tests/input/rest-xml/tests/TimestampFormatHeadersTest.cpp index dc63dd526cf..dd7b105a458 100644 --- a/generated/protocol-tests/tests/input/rest-xml/tests/TimestampFormatHeadersTest.cpp +++ b/generated/protocol-tests/tests/input/rest-xml/tests/TimestampFormatHeadersTest.cpp @@ -17,13 +17,13 @@ AWS_PROTOCOL_TEST(TimestampFormatHeaders, TimestampFormatHeaders) { SetMockResponse(); TimestampFormatHeadersRequest request; - request.SetMemberEpochSeconds(Aws::Utils::DateTime(1576540098L)); - request.SetMemberHttpDate(Aws::Utils::DateTime(1576540098L)); - request.SetMemberDateTime(Aws::Utils::DateTime(1576540098L)); - request.SetDefaultFormat(Aws::Utils::DateTime(1576540098L)); - request.SetTargetEpochSeconds(Aws::Utils::DateTime(1576540098L)); - request.SetTargetHttpDate(Aws::Utils::DateTime(1576540098L)); - request.SetTargetDateTime(Aws::Utils::DateTime(1576540098L)); + request.SetMemberEpochSeconds(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetMemberHttpDate(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetMemberDateTime(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetDefaultFormat(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetEpochSeconds(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetHttpDate(Aws::Utils::DateTime(static_cast(1576540098))); + request.SetTargetDateTime(Aws::Utils::DateTime(static_cast(1576540098))); auto outcome = client.TimestampFormatHeaders(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/input/rest-xml/tests/XmlListsTest.cpp b/generated/protocol-tests/tests/input/rest-xml/tests/XmlListsTest.cpp index 5616417076a..db90e811613 100644 --- a/generated/protocol-tests/tests/input/rest-xml/tests/XmlListsTest.cpp +++ b/generated/protocol-tests/tests/input/rest-xml/tests/XmlListsTest.cpp @@ -21,7 +21,7 @@ AWS_PROTOCOL_TEST(XmlLists, XmlLists) { request.SetStringSet({R"(foo)", R"(bar)"}); request.SetIntegerList({1, 2}); request.SetBooleanList({true, false}); - request.SetTimestampList({Aws::Utils::DateTime(1398796238L), Aws::Utils::DateTime(1398796238L)}); + request.SetTimestampList({Aws::Utils::DateTime(static_cast(1398796238)), Aws::Utils::DateTime(static_cast(1398796238))}); request.SetEnumList({FooEnumMapper::GetFooEnumForName(R"e(Foo)e"), FooEnumMapper::GetFooEnumForName(R"e(0)e")}); request.SetIntEnumList({1, 2}); { diff --git a/generated/protocol-tests/tests/input/rest-xml/tests/XmlTimestampsTest.cpp b/generated/protocol-tests/tests/input/rest-xml/tests/XmlTimestampsTest.cpp index 6a6b6ddaa12..fafd5e0c757 100644 --- a/generated/protocol-tests/tests/input/rest-xml/tests/XmlTimestampsTest.cpp +++ b/generated/protocol-tests/tests/input/rest-xml/tests/XmlTimestampsTest.cpp @@ -17,7 +17,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestamps) { SetMockResponse(); XmlTimestampsRequest request; - request.SetNormal(Aws::Utils::DateTime(1398796238L)); + request.SetNormal(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.XmlTimestamps(request); ExpectedRequest expectedRq; @@ -35,7 +35,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithDateTimeFormat) { SetMockResponse(); XmlTimestampsRequest request; - request.SetDateTime(Aws::Utils::DateTime(1398796238L)); + request.SetDateTime(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.XmlTimestamps(request); ExpectedRequest expectedRq; @@ -53,7 +53,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithDateTimeOnTargetFormat) { SetMockResponse(); XmlTimestampsRequest request; - request.SetDateTimeOnTarget(Aws::Utils::DateTime(1398796238L)); + request.SetDateTimeOnTarget(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.XmlTimestamps(request); ExpectedRequest expectedRq; @@ -71,7 +71,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithEpochSecondsFormat) { SetMockResponse(); XmlTimestampsRequest request; - request.SetEpochSeconds(Aws::Utils::DateTime(1398796238L)); + request.SetEpochSeconds(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.XmlTimestamps(request); ExpectedRequest expectedRq; @@ -89,7 +89,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithEpochSecondsOnTargetFormat) { SetMockResponse(); XmlTimestampsRequest request; - request.SetEpochSecondsOnTarget(Aws::Utils::DateTime(1398796238L)); + request.SetEpochSecondsOnTarget(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.XmlTimestamps(request); ExpectedRequest expectedRq; @@ -107,7 +107,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithHttpDateFormat) { SetMockResponse(); XmlTimestampsRequest request; - request.SetHttpDate(Aws::Utils::DateTime(1398796238L)); + request.SetHttpDate(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.XmlTimestamps(request); ExpectedRequest expectedRq; @@ -125,7 +125,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithHttpDateOnTargetFormat) { SetMockResponse(); XmlTimestampsRequest request; - request.SetHttpDateOnTarget(Aws::Utils::DateTime(1398796238L)); + request.SetHttpDateOnTarget(Aws::Utils::DateTime(static_cast(1398796238))); auto outcome = client.XmlTimestamps(request); ExpectedRequest expectedRq; diff --git a/generated/protocol-tests/tests/output/ec2/tests/DatetimeOffsetsTest.cpp b/generated/protocol-tests/tests/output/ec2/tests/DatetimeOffsetsTest.cpp index 1440c3a8bb2..28ac1cfd9bd 100644 --- a/generated/protocol-tests/tests/output/ec2/tests/DatetimeOffsetsTest.cpp +++ b/generated/protocol-tests/tests/output/ec2/tests/DatetimeOffsetsTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(DatetimeOffsets, Ec2QueryDateTimeWithNegativeOffset) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const DatetimeOffsetsResponse& result = outcome.GetResult(); /* expectedResult = R"( {"datetime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDatetime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDatetime()); } AWS_PROTOCOL_TEST(DatetimeOffsets, Ec2QueryDateTimeWithPositiveOffset) { @@ -46,5 +46,5 @@ AWS_PROTOCOL_TEST(DatetimeOffsets, Ec2QueryDateTimeWithPositiveOffset) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const DatetimeOffsetsResponse& result = outcome.GetResult(); /* expectedResult = R"( {"datetime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDatetime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDatetime()); } diff --git a/generated/protocol-tests/tests/output/ec2/tests/XmlListsTest.cpp b/generated/protocol-tests/tests/output/ec2/tests/XmlListsTest.cpp index c15f94ddbd7..20be4113a44 100644 --- a/generated/protocol-tests/tests/output/ec2/tests/XmlListsTest.cpp +++ b/generated/protocol-tests/tests/output/ec2/tests/XmlListsTest.cpp @@ -45,8 +45,8 @@ AWS_PROTOCOL_TEST(XmlLists, Ec2XmlLists) { EXPECT_EQ(false, resultBooleanListItem.at(1)); const Aws::Vector& resultTimestampListItem = result.GetTimestampList(); EXPECT_EQ(2U, resultTimestampListItem.size()); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultTimestampListItem.at(0)); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultTimestampListItem.at(1)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultTimestampListItem.at(0)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultTimestampListItem.at(1)); const Aws::Vector& resultEnumListItem = result.GetEnumList(); EXPECT_EQ(2U, resultEnumListItem.size()); EXPECT_EQ(FooEnumMapper::GetFooEnumForName(R"e(Foo)e"), resultEnumListItem.at(0)); diff --git a/generated/protocol-tests/tests/output/ec2/tests/XmlTimestampsTest.cpp b/generated/protocol-tests/tests/output/ec2/tests/XmlTimestampsTest.cpp index 1c3b6c34b85..c6e014c4306 100644 --- a/generated/protocol-tests/tests/output/ec2/tests/XmlTimestampsTest.cpp +++ b/generated/protocol-tests/tests/output/ec2/tests/XmlTimestampsTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestamps) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResponse& result = outcome.GetResult(); /* expectedResult = R"( {"normal":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetNormal()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetNormal()); } AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithDateTimeFormat) { @@ -46,7 +46,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithDateTimeFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResponse& result = outcome.GetResult(); /* expectedResult = R"( {"dateTime":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetDateTime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetDateTime()); } AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithDateTimeOnTargetFormat) { @@ -65,7 +65,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithDateTimeOnTargetFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResponse& result = outcome.GetResult(); /* expectedResult = R"( {"dateTimeOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetDateTimeOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetDateTimeOnTarget()); } AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithEpochSecondsFormat) { @@ -84,7 +84,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithEpochSecondsFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResponse& result = outcome.GetResult(); /* expectedResult = R"( {"epochSeconds":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetEpochSeconds()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetEpochSeconds()); } AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithEpochSecondsOnTargetFormat) { @@ -103,7 +103,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithEpochSecondsOnTargetFormat) AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResponse& result = outcome.GetResult(); /* expectedResult = R"( {"epochSecondsOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetEpochSecondsOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetEpochSecondsOnTarget()); } AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithHttpDateFormat) { @@ -122,7 +122,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithHttpDateFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResponse& result = outcome.GetResult(); /* expectedResult = R"( {"httpDate":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetHttpDate()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetHttpDate()); } AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithHttpDateOnTargetFormat) { @@ -141,5 +141,5 @@ AWS_PROTOCOL_TEST(XmlTimestamps, Ec2XmlTimestampsWithHttpDateOnTargetFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResponse& result = outcome.GetResult(); /* expectedResult = R"( {"httpDateOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetHttpDateOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetHttpDateOnTarget()); } diff --git a/generated/protocol-tests/tests/output/json/tests/DatetimeOffsetsTest.cpp b/generated/protocol-tests/tests/output/json/tests/DatetimeOffsetsTest.cpp index fa2f59a1b65..e8c89a6c4ca 100644 --- a/generated/protocol-tests/tests/output/json/tests/DatetimeOffsetsTest.cpp +++ b/generated/protocol-tests/tests/output/json/tests/DatetimeOffsetsTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(DatetimeOffsets, AwsJson11DateTimeWithNegativeOffset) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const DatetimeOffsetsResult& result = outcome.GetResult(); /* expectedResult = R"( {"datetime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDatetime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDatetime()); } AWS_PROTOCOL_TEST(DatetimeOffsets, AwsJson11DateTimeWithPositiveOffset) { @@ -46,5 +46,5 @@ AWS_PROTOCOL_TEST(DatetimeOffsets, AwsJson11DateTimeWithPositiveOffset) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const DatetimeOffsetsResult& result = outcome.GetResult(); /* expectedResult = R"( {"datetime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDatetime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDatetime()); } diff --git a/generated/protocol-tests/tests/output/json/tests/JsonUnionsTest.cpp b/generated/protocol-tests/tests/output/json/tests/JsonUnionsTest.cpp index 4370177be1f..81e7f8dc77c 100644 --- a/generated/protocol-tests/tests/output/json/tests/JsonUnionsTest.cpp +++ b/generated/protocol-tests/tests/output/json/tests/JsonUnionsTest.cpp @@ -117,7 +117,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11DeserializeTimestampUnionValue) { /* expectedResult = R"( {"contents":{"timestampValue":1398796238}} )" */ { const MyUnion& resultContents = result.GetContents(); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultContents.GetTimestampValue()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultContents.GetTimestampValue()); } } diff --git a/generated/protocol-tests/tests/output/json/tests/KitchenSinkOperationTest.cpp b/generated/protocol-tests/tests/output/json/tests/KitchenSinkOperationTest.cpp index 953e863925d..a1e2938e979 100644 --- a/generated/protocol-tests/tests/output/json/tests/KitchenSinkOperationTest.cpp +++ b/generated/protocol-tests/tests/output/json/tests/KitchenSinkOperationTest.cpp @@ -196,7 +196,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, parses_timestamp_shapes) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const KitchenSinkOperationResult& result = outcome.GetResult(); /* expectedResult = R"( {"Timestamp":946845296} )" */ - EXPECT_EQ(Aws::Utils::DateTime(946845296L), result.GetTimestamp()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(946845296)), result.GetTimestamp()); } AWS_PROTOCOL_TEST(KitchenSinkOperation, parses_iso8601_timestamps) { @@ -215,7 +215,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, parses_iso8601_timestamps) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const KitchenSinkOperationResult& result = outcome.GetResult(); /* expectedResult = R"( {"Iso8601Timestamp":946845296} )" */ - EXPECT_EQ(Aws::Utils::DateTime(946845296L), result.GetIso8601Timestamp()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(946845296)), result.GetIso8601Timestamp()); } AWS_PROTOCOL_TEST(KitchenSinkOperation, parses_httpdate_timestamps) { @@ -234,7 +234,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, parses_httpdate_timestamps) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const KitchenSinkOperationResult& result = outcome.GetResult(); /* expectedResult = R"( {"HttpdateTimestamp":946845296} )" */ - EXPECT_EQ(Aws::Utils::DateTime(946845296L), result.GetHttpdateTimestamp()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(946845296)), result.GetHttpdateTimestamp()); } AWS_PROTOCOL_TEST(KitchenSinkOperation, parses_list_shapes) { diff --git a/generated/protocol-tests/tests/output/json_1_0-query-compatible/CMakeLists.txt b/generated/protocol-tests/tests/output/json_1_0-query-compatible/CMakeLists.txt new file mode 100644 index 00000000000..7c8476cf1eb --- /dev/null +++ b/generated/protocol-tests/tests/output/json_1_0-query-compatible/CMakeLists.txt @@ -0,0 +1,32 @@ +add_project(protocol-json_1_0-query-compatible-output-tests + "Tests for the protocol json of AWS C++ SDK" + testing-resources + aws-cpp-sdk-protocol-mock + aws-cpp-sdk-query-compatible-json-rpc-10 + aws-cpp-sdk-core) + +file(GLOB AWS_PROTOCOL_JSON_1_0_QUERY_COMPATIBLE_OUTPUT_TESTS_SRC + "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/tests/*.cpp" +) + +if(MSVC AND BUILD_SHARED_LIBS) + add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1) +endif() + +enable_testing() + +if(PLATFORM_ANDROID AND BUILD_SHARED_LIBS) + add_library(${PROJECT_NAME} "${AWS_PROTOCOL_JSON_1_0_QUERY_COMPATIBLE_OUTPUT_TESTS_SRC}") +else() + add_executable(${PROJECT_NAME} "${AWS_PROTOCOL_JSON_1_0_QUERY_COMPATIBLE_OUTPUT_TESTS_SRC}") +endif() + +set_compiler_flags(${PROJECT_NAME}) +set_compiler_warnings(${PROJECT_NAME}) + +target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBS}) + +if(NOT CMAKE_CROSSCOMPILING) + SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) +endif() \ No newline at end of file diff --git a/generated/protocol-tests/tests/output/json_1_0-query-compatible/RunTests.cpp b/generated/protocol-tests/tests/output/json_1_0-query-compatible/RunTests.cpp new file mode 100644 index 00000000000..1352141f979 --- /dev/null +++ b/generated/protocol-tests/tests/output/json_1_0-query-compatible/RunTests.cpp @@ -0,0 +1,30 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + + AWS_BEGIN_MEMORY_TEST_EX(options, 1024, 128); + Aws::Testing::InitPlatformTest(options); + Aws::Testing::ParseArgs(argc, argv); + + Aws::InitAPI(options); + Aws::Environment::SetEnv("AWS_EC2_METADATA_DISABLED", "true", true); + ::testing::InitGoogleTest(&argc, argv); + int exitCode = RUN_ALL_TESTS(); + Aws::ShutdownAPI(options); + + AWS_END_MEMORY_TEST_EX; + Aws::Testing::ShutdownPlatformTest(options); + return exitCode; +} diff --git a/generated/protocol-tests/tests/output/json_1_0-query-compatible/tests/QueryCompatibleOperation0Test.cpp b/generated/protocol-tests/tests/output/json_1_0-query-compatible/tests/QueryCompatibleOperation0Test.cpp new file mode 100644 index 00000000000..1e1e66fe08e --- /dev/null +++ b/generated/protocol-tests/tests/output/json_1_0-query-compatible/tests/QueryCompatibleOperation0Test.cpp @@ -0,0 +1,28 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using QueryCompatibleOperation0 = AWS_PROTOCOL_TEST_SUITE; +using QueryCompatibleJSONRPC10Client = Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10Client; +using namespace Aws::QueryCompatibleJSONRPC10::Model; + +AWS_PROTOCOL_TEST(QueryCompatibleOperation0, QueryCompatibleAwsJson10CustomCodeError) { + QueryCompatibleJSONRPC10Client client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 400; + mockRs.headers = {{"Content-Type", R"(application/x-amz-json-1.0)"}, {"x-amzn-query-error", R"(Customized;Sender)"}}; + mockRs.body = "ewogICAgIl9fdHlwZSI6ICJhd3MucHJvdG9jb2x0ZXN0cy5qc29uMTAjQ3VzdG9tQ29kZUVycm9yIiwKICAgICJNZXNzYWdlIjogIkhpIgp9"; + SetMockResponse(mockRs); + + QueryCompatibleOperationRequest request; + + auto outcome = client.QueryCompatibleOperation(request); + ValidateRequestSent(); + ASSERT_FALSE(outcome.IsSuccess()); +} diff --git a/generated/protocol-tests/tests/output/json_1_0-query-compatible/tests/QueryCompatibleOperationTest.cpp b/generated/protocol-tests/tests/output/json_1_0-query-compatible/tests/QueryCompatibleOperationTest.cpp new file mode 100644 index 00000000000..c3e41d30ceb --- /dev/null +++ b/generated/protocol-tests/tests/output/json_1_0-query-compatible/tests/QueryCompatibleOperationTest.cpp @@ -0,0 +1,28 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using QueryCompatibleOperation = AWS_PROTOCOL_TEST_SUITE; +using QueryCompatibleJSONRPC10Client = Aws::QueryCompatibleJSONRPC10::QueryCompatibleJSONRPC10Client; +using namespace Aws::QueryCompatibleJSONRPC10::Model; + +AWS_PROTOCOL_TEST(QueryCompatibleOperation, QueryCompatibleAwsJson10CborNoCustomCodeError) { + QueryCompatibleJSONRPC10Client client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 400; + mockRs.headers = {{"Content-Type", R"(application/x-amz-json-1.0)"}}; + mockRs.body = "ewogICAgIl9fdHlwZSI6ICJhd3MucHJvdG9jb2x0ZXN0cy5qc29uMTAjTm9DdXN0b21Db2RlRXJyb3IiLAogICAgIk1lc3NhZ2UiOiAiSGkiCn0="; + SetMockResponse(mockRs); + + QueryCompatibleOperationRequest request; + + auto outcome = client.QueryCompatibleOperation(request); + ValidateRequestSent(); + ASSERT_FALSE(outcome.IsSuccess()); +} diff --git a/generated/protocol-tests/tests/output/json_1_0/tests/JsonUnionsTest.cpp b/generated/protocol-tests/tests/output/json_1_0/tests/JsonUnionsTest.cpp index a3ad2580f0b..f29c47c984f 100644 --- a/generated/protocol-tests/tests/output/json_1_0/tests/JsonUnionsTest.cpp +++ b/generated/protocol-tests/tests/output/json_1_0/tests/JsonUnionsTest.cpp @@ -117,7 +117,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson10DeserializeTimestampUnionValue) { /* expectedResult = R"( {"contents":{"timestampValue":1398796238}} )" */ { const MyUnion& resultContents = result.GetContents(); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultContents.GetTimestampValue()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultContents.GetTimestampValue()); } } diff --git a/generated/protocol-tests/tests/output/query/tests/DatetimeOffsetsTest.cpp b/generated/protocol-tests/tests/output/query/tests/DatetimeOffsetsTest.cpp index 62c7d3e9a1c..cab67240e5c 100644 --- a/generated/protocol-tests/tests/output/query/tests/DatetimeOffsetsTest.cpp +++ b/generated/protocol-tests/tests/output/query/tests/DatetimeOffsetsTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(DatetimeOffsets, AwsQueryDateTimeWithNegativeOffset) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const DatetimeOffsetsResult& result = outcome.GetResult(); /* expectedResult = R"( {"datetime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDatetime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDatetime()); } AWS_PROTOCOL_TEST(DatetimeOffsets, AwsQueryDateTimeWithPositiveOffset) { @@ -46,5 +46,5 @@ AWS_PROTOCOL_TEST(DatetimeOffsets, AwsQueryDateTimeWithPositiveOffset) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const DatetimeOffsetsResult& result = outcome.GetResult(); /* expectedResult = R"( {"datetime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDatetime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDatetime()); } diff --git a/generated/protocol-tests/tests/output/query/tests/XmlListsTest.cpp b/generated/protocol-tests/tests/output/query/tests/XmlListsTest.cpp index 06d74ab5226..5dc853e3118 100644 --- a/generated/protocol-tests/tests/output/query/tests/XmlListsTest.cpp +++ b/generated/protocol-tests/tests/output/query/tests/XmlListsTest.cpp @@ -45,8 +45,8 @@ AWS_PROTOCOL_TEST(XmlLists, QueryXmlLists) { EXPECT_EQ(false, resultBooleanListItem.at(1)); const Aws::Vector& resultTimestampListItem = result.GetTimestampList(); EXPECT_EQ(2U, resultTimestampListItem.size()); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultTimestampListItem.at(0)); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultTimestampListItem.at(1)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultTimestampListItem.at(0)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultTimestampListItem.at(1)); const Aws::Vector& resultEnumListItem = result.GetEnumList(); EXPECT_EQ(2U, resultEnumListItem.size()); EXPECT_EQ(FooEnumMapper::GetFooEnumForName(R"e(Foo)e"), resultEnumListItem.at(0)); diff --git a/generated/protocol-tests/tests/output/query/tests/XmlTimestampsTest.cpp b/generated/protocol-tests/tests/output/query/tests/XmlTimestampsTest.cpp index fb5d5eef166..874e7aaf512 100644 --- a/generated/protocol-tests/tests/output/query/tests/XmlTimestampsTest.cpp +++ b/generated/protocol-tests/tests/output/query/tests/XmlTimestampsTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestamps) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"normal":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetNormal()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetNormal()); } AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithDateTimeFormat) { @@ -46,7 +46,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithDateTimeFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"dateTime":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetDateTime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetDateTime()); } AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithDateTimeOnTargetFormat) { @@ -65,7 +65,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithDateTimeOnTargetFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"dateTimeOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetDateTimeOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetDateTimeOnTarget()); } AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithEpochSecondsFormat) { @@ -84,7 +84,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithEpochSecondsFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"epochSeconds":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetEpochSeconds()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetEpochSeconds()); } AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithEpochSecondsOnTargetFormat) { @@ -103,7 +103,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithEpochSecondsOnTargetForma AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"epochSecondsOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetEpochSecondsOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetEpochSecondsOnTarget()); } AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithHttpDateFormat) { @@ -122,7 +122,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithHttpDateFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"httpDate":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetHttpDate()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetHttpDate()); } AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithHttpDateOnTargetFormat) { @@ -141,5 +141,5 @@ AWS_PROTOCOL_TEST(XmlTimestamps, QueryXmlTimestampsWithHttpDateOnTargetFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"httpDateOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetHttpDateOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetHttpDateOnTarget()); } diff --git a/generated/protocol-tests/tests/output/rest-json/tests/DatetimeOffsetsTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/DatetimeOffsetsTest.cpp index 8264012035f..c34290d9181 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/DatetimeOffsetsTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/DatetimeOffsetsTest.cpp @@ -26,7 +26,7 @@ AWS_PROTOCOL_TEST(DatetimeOffsets, RestJsonDateTimeWithNegativeOffset) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const DatetimeOffsetsResult& result = outcome.GetResult(); /* expectedResult = R"( {"datetime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDatetime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDatetime()); } AWS_PROTOCOL_TEST(DatetimeOffsets, RestJsonDateTimeWithPositiveOffset) { @@ -44,5 +44,5 @@ AWS_PROTOCOL_TEST(DatetimeOffsets, RestJsonDateTimeWithPositiveOffset) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const DatetimeOffsetsResult& result = outcome.GetResult(); /* expectedResult = R"( {"datetime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDatetime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDatetime()); } diff --git a/generated/protocol-tests/tests/output/rest-json/tests/InputAndOutputWithHeadersTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/InputAndOutputWithHeadersTest.cpp index 0b3139e2607..40421ac1a68 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/InputAndOutputWithHeadersTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/InputAndOutputWithHeadersTest.cpp @@ -130,8 +130,8 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithTimestamp /* expectedResult = R"( {"headerTimestampList":[1576540098,1576540098]} )" */ const Aws::Vector& resultHeaderTimestampListItem = result.GetHeaderTimestampList(); EXPECT_EQ(2U, resultHeaderTimestampListItem.size()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), resultHeaderTimestampListItem.at(0)); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), resultHeaderTimestampListItem.at(1)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), resultHeaderTimestampListItem.at(0)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), resultHeaderTimestampListItem.at(1)); } AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithEnumHeaders) { diff --git a/generated/protocol-tests/tests/output/rest-json/tests/JsonListsTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/JsonListsTest.cpp index 2627acf1f66..256a20ae5c7 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/JsonListsTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/JsonListsTest.cpp @@ -45,8 +45,8 @@ AWS_PROTOCOL_TEST(JsonLists, RestJsonLists) { EXPECT_EQ(false, resultBooleanListItem.at(1)); const Aws::Vector& resultTimestampListItem = result.GetTimestampList(); EXPECT_EQ(2U, resultTimestampListItem.size()); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultTimestampListItem.at(0)); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultTimestampListItem.at(1)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultTimestampListItem.at(0)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultTimestampListItem.at(1)); const Aws::Vector& resultEnumListItem = result.GetEnumList(); EXPECT_EQ(2U, resultEnumListItem.size()); EXPECT_EQ(FooEnumMapper::GetFooEnumForName(R"e(Foo)e"), resultEnumListItem.at(0)); diff --git a/generated/protocol-tests/tests/output/rest-json/tests/JsonTimestampsTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/JsonTimestampsTest.cpp index 0f9d87f1ed0..dcfa6d7c806 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/JsonTimestampsTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/JsonTimestampsTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestamps) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const JsonTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"normal":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetNormal()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetNormal()); } AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithDateTimeFormat) { @@ -46,7 +46,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithDateTimeFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const JsonTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"dateTime":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetDateTime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetDateTime()); } AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithDateTimeOnTargetFormat) { @@ -65,7 +65,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithDateTimeOnTargetForm AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const JsonTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"dateTimeOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetDateTimeOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetDateTimeOnTarget()); } AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithEpochSecondsFormat) { @@ -84,7 +84,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithEpochSecondsFormat) AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const JsonTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"epochSeconds":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetEpochSeconds()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetEpochSeconds()); } AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat) { @@ -103,7 +103,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithEpochSecondsOnTarget AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const JsonTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"epochSecondsOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetEpochSecondsOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetEpochSecondsOnTarget()); } AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithHttpDateFormat) { @@ -122,7 +122,7 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithHttpDateFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const JsonTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"httpDate":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetHttpDate()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetHttpDate()); } AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithHttpDateOnTargetFormat) { @@ -141,5 +141,5 @@ AWS_PROTOCOL_TEST(JsonTimestamps, RestJsonJsonTimestampsWithHttpDateOnTargetForm AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const JsonTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"httpDateOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetHttpDateOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetHttpDateOnTarget()); } diff --git a/generated/protocol-tests/tests/output/rest-json/tests/JsonUnionsTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/JsonUnionsTest.cpp index a9ad7f87a7e..40968485572 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/JsonUnionsTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/JsonUnionsTest.cpp @@ -117,7 +117,7 @@ AWS_PROTOCOL_TEST(JsonUnions, RestJsonDeserializeTimestampUnionValue) { /* expectedResult = R"( {"contents":{"timestampValue":1398796238}} )" */ { const MyUnion& resultContents = result.GetContents(); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultContents.GetTimestampValue()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultContents.GetTimestampValue()); } } diff --git a/generated/protocol-tests/tests/output/rest-json/tests/TimestampFormatHeadersTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/TimestampFormatHeadersTest.cpp index d3422d1660e..33ab61e0e6e 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/TimestampFormatHeadersTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/TimestampFormatHeadersTest.cpp @@ -26,11 +26,11 @@ AWS_PROTOCOL_TEST(TimestampFormatHeaders, RestJsonTimestampFormatHeaders) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const TimestampFormatHeadersResult& result = outcome.GetResult(); /* expectedResult = R"( {"memberEpochSeconds":1576540098,"memberHttpDate":1576540098,"memberDateTime":1576540098,"defaultFormat":1576540098,"targetEpochSeconds":1576540098,"targetHttpDate":1576540098,"targetDateTime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetMemberEpochSeconds()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetMemberHttpDate()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetMemberDateTime()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDefaultFormat()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetTargetEpochSeconds()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetTargetHttpDate()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetTargetDateTime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetMemberEpochSeconds()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetMemberHttpDate()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetMemberDateTime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDefaultFormat()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetTargetEpochSeconds()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetTargetHttpDate()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetTargetDateTime()); } diff --git a/generated/protocol-tests/tests/output/rest-xml/tests/DatetimeOffsetsTest.cpp b/generated/protocol-tests/tests/output/rest-xml/tests/DatetimeOffsetsTest.cpp index 39379164106..1a1f86f7a28 100644 --- a/generated/protocol-tests/tests/output/rest-xml/tests/DatetimeOffsetsTest.cpp +++ b/generated/protocol-tests/tests/output/rest-xml/tests/DatetimeOffsetsTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(DatetimeOffsets, RestXmlDateTimeWithNegativeOffset) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const DatetimeOffsetsResult& result = outcome.GetResult(); /* expectedResult = R"( {"datetime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDatetime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDatetime()); } AWS_PROTOCOL_TEST(DatetimeOffsets, RestXmlDateTimeWithPositiveOffset) { @@ -46,5 +46,5 @@ AWS_PROTOCOL_TEST(DatetimeOffsets, RestXmlDateTimeWithPositiveOffset) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const DatetimeOffsetsResult& result = outcome.GetResult(); /* expectedResult = R"( {"datetime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDatetime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDatetime()); } diff --git a/generated/protocol-tests/tests/output/rest-xml/tests/InputAndOutputWithHeadersTest.cpp b/generated/protocol-tests/tests/output/rest-xml/tests/InputAndOutputWithHeadersTest.cpp index d6dfa348920..3712f5ad128 100644 --- a/generated/protocol-tests/tests/output/rest-xml/tests/InputAndOutputWithHeadersTest.cpp +++ b/generated/protocol-tests/tests/output/rest-xml/tests/InputAndOutputWithHeadersTest.cpp @@ -108,8 +108,8 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, InputAndOutputWithTimestampHeaders) /* expectedResult = R"( {"headerTimestampList":[1576540098,1576540098]} )" */ const Aws::Vector& resultHeaderTimestampListItem = result.GetHeaderTimestampList(); EXPECT_EQ(2U, resultHeaderTimestampListItem.size()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), resultHeaderTimestampListItem.at(0)); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), resultHeaderTimestampListItem.at(1)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), resultHeaderTimestampListItem.at(0)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), resultHeaderTimestampListItem.at(1)); } AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, InputAndOutputWithEnumHeaders) { diff --git a/generated/protocol-tests/tests/output/rest-xml/tests/TimestampFormatHeadersTest.cpp b/generated/protocol-tests/tests/output/rest-xml/tests/TimestampFormatHeadersTest.cpp index eb20785c4b9..d55b96d110b 100644 --- a/generated/protocol-tests/tests/output/rest-xml/tests/TimestampFormatHeadersTest.cpp +++ b/generated/protocol-tests/tests/output/rest-xml/tests/TimestampFormatHeadersTest.cpp @@ -26,11 +26,11 @@ AWS_PROTOCOL_TEST(TimestampFormatHeaders, TimestampFormatHeaders) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const TimestampFormatHeadersResult& result = outcome.GetResult(); /* expectedResult = R"( {"memberEpochSeconds":1576540098,"memberHttpDate":1576540098,"memberDateTime":1576540098,"defaultFormat":1576540098,"targetEpochSeconds":1576540098,"targetHttpDate":1576540098,"targetDateTime":1576540098} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetMemberEpochSeconds()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetMemberHttpDate()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetMemberDateTime()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetDefaultFormat()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetTargetEpochSeconds()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetTargetHttpDate()); - EXPECT_EQ(Aws::Utils::DateTime(1576540098L), result.GetTargetDateTime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetMemberEpochSeconds()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetMemberHttpDate()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetMemberDateTime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetDefaultFormat()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetTargetEpochSeconds()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetTargetHttpDate()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1576540098)), result.GetTargetDateTime()); } diff --git a/generated/protocol-tests/tests/output/rest-xml/tests/XmlListsTest.cpp b/generated/protocol-tests/tests/output/rest-xml/tests/XmlListsTest.cpp index d9b07aa828c..c0c1094299a 100644 --- a/generated/protocol-tests/tests/output/rest-xml/tests/XmlListsTest.cpp +++ b/generated/protocol-tests/tests/output/rest-xml/tests/XmlListsTest.cpp @@ -45,8 +45,8 @@ AWS_PROTOCOL_TEST(XmlLists, XmlLists) { EXPECT_EQ(false, resultBooleanListItem.at(1)); const Aws::Vector& resultTimestampListItem = result.GetTimestampList(); EXPECT_EQ(2U, resultTimestampListItem.size()); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultTimestampListItem.at(0)); - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), resultTimestampListItem.at(1)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultTimestampListItem.at(0)); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), resultTimestampListItem.at(1)); const Aws::Vector& resultEnumListItem = result.GetEnumList(); EXPECT_EQ(2U, resultEnumListItem.size()); EXPECT_EQ(FooEnumMapper::GetFooEnumForName(R"e(Foo)e"), resultEnumListItem.at(0)); diff --git a/generated/protocol-tests/tests/output/rest-xml/tests/XmlTimestampsTest.cpp b/generated/protocol-tests/tests/output/rest-xml/tests/XmlTimestampsTest.cpp index e528f75f2c4..547315b347c 100644 --- a/generated/protocol-tests/tests/output/rest-xml/tests/XmlTimestampsTest.cpp +++ b/generated/protocol-tests/tests/output/rest-xml/tests/XmlTimestampsTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestamps) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"normal":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetNormal()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetNormal()); } AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithDateTimeFormat) { @@ -46,7 +46,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithDateTimeFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"dateTime":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetDateTime()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetDateTime()); } AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithDateTimeOnTargetFormat) { @@ -65,7 +65,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithDateTimeOnTargetFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"dateTimeOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetDateTimeOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetDateTimeOnTarget()); } AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithEpochSecondsFormat) { @@ -84,7 +84,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithEpochSecondsFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"epochSeconds":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetEpochSeconds()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetEpochSeconds()); } AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithEpochSecondsOnTargetFormat) { @@ -103,7 +103,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithEpochSecondsOnTargetFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"epochSecondsOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetEpochSecondsOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetEpochSecondsOnTarget()); } AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithHttpDateFormat) { @@ -122,7 +122,7 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithHttpDateFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"httpDate":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetHttpDate()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetHttpDate()); } AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithHttpDateOnTargetFormat) { @@ -141,5 +141,5 @@ AWS_PROTOCOL_TEST(XmlTimestamps, XmlTimestampsWithHttpDateOnTargetFormat) { AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const XmlTimestampsResult& result = outcome.GetResult(); /* expectedResult = R"( {"httpDateOnTarget":1398796238} )" */ - EXPECT_EQ(Aws::Utils::DateTime(1398796238L), result.GetHttpDateOnTarget()); + EXPECT_EQ(Aws::Utils::DateTime(static_cast(1398796238)), result.GetHttpDateOnTarget()); } diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SerializeSingleParameterMacro.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SerializeSingleParameterMacro.vm index 29000f9fe8e..7d9aee8d345 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SerializeSingleParameterMacro.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SerializeSingleParameterMacro.vm @@ -21,7 +21,7 @@ R"(${value.asText()})"## #elseif($shape.blob) Aws::String(R"(${value.asText()})")## #elseif($shape.timeStamp) -Aws::Utils::DateTime(${value}L)## +Aws::Utils::DateTime(static_cast(${value}))## #elseif($shape.enum) ${shape.name}Mapper::Get${shape.name}ForName(R"e(${value.asText()})e")## #elseif($shape.list) diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateSingleParameterMacro.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateSingleParameterMacro.vm index f3043b7dab7..4120a387d78 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateSingleParameterMacro.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateSingleParameterMacro.vm @@ -25,7 +25,7 @@ Aws::Utils::ByteBuffer(R"(${value.asText()})")## #if($macro.tsVal.contains(".") || $macro.tsVal.contains("E")) Aws::Utils::DateTime(${value})## #else -Aws::Utils::DateTime(${value}L)## +Aws::Utils::DateTime(static_cast(${value}))## #end #elseif($shape.enum) ${shape.name}Mapper::Get${shape.name}ForName(R"e(${value.asText()})e")## diff --git a/tools/code-generation/protocol-tests/api-descriptions/query-compatible-json-rpc-10-2020-07-14.normal.json b/tools/code-generation/protocol-tests/api-descriptions/query-compatible-json-rpc-10-2020-07-14.normal.json new file mode 100644 index 00000000000..3dfa5871a3a --- /dev/null +++ b/tools/code-generation/protocol-tests/api-descriptions/query-compatible-json-rpc-10-2020-07-14.normal.json @@ -0,0 +1,54 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2020-07-14", + "auth":["aws.auth#sigv4"], + "awsQueryCompatible":{}, + "endpointPrefix":"query-compatible-jsonrpc10", + "jsonVersion":"1.0", + "protocol":"json", + "protocols":["json"], + "serviceFullName":"Query Compatible Json 1.0 Protocol Service", + "serviceId":"Query Compatible JSON RPC 10", + "signatureVersion":"v4", + "signingName":"query-compatible-jsonrpc10", + "targetPrefix":"QueryCompatibleJsonRpc10", + "uid":"query-compatible-json-rpc-10-2020-07-14" + }, + "operations":{ + "QueryCompatibleOperation":{ + "name":"QueryCompatibleOperation", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "errors":[ + {"shape":"CustomCodeError"}, + {"shape":"NoCustomCodeError"} + ], + "idempotent":true + } + }, + "shapes":{ + "CustomCodeError":{ + "type":"structure", + "members":{ + "message":{"shape":"String"} + }, + "error":{ + "code":"Customized", + "httpStatusCode":402, + "senderFault":true + }, + "exception":true + }, + "NoCustomCodeError":{ + "type":"structure", + "members":{ + "message":{"shape":"String"} + }, + "exception":true + }, + "String":{"type":"string"} + } +} diff --git a/tools/code-generation/protocol-tests/input/json_1_0-query-compatible.json b/tools/code-generation/protocol-tests/input/json_1_0-query-compatible.json new file mode 100644 index 00000000000..170d1e7414c --- /dev/null +++ b/tools/code-generation/protocol-tests/input/json_1_0-query-compatible.json @@ -0,0 +1,50 @@ +[ + { + "description": "Test cases for QueryCompatibleOperation operation", + "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "awsQueryCompatible": {}, + "endpointPrefix": "querycompatiblejsonrpc10", + "jsonVersion": "1.0", + "protocol": "json", + "protocols": [ + "json" + ], + "serviceFullName": "QueryCompatibleJsonRpc10", + "serviceId": "Query Compatible JSON RPC 10", + "signatureVersion": "v4", + "signingName": "QueryCompatibleJsonRpc10", + "targetPrefix": "QueryCompatibleJsonRpc10", + "uid": "query-compatible-json-rpc-10-2020-07-14" + }, + "shapes": {}, + "cases": [ + { + "id": "QueryCompatibleAwsJson10CborSendsQueryModeHeader", + "given": { + "name": "QueryCompatibleOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "idempotent": true + }, + "description": "Clients for query-compatible services MUST send the x-amzn-query-mode header.", + "params": {}, + "serialized": { + "method": "POST", + "uri": "/", + "body": "{}", + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "X-Amz-Target": "QueryCompatibleJsonRpc10.QueryCompatibleOperation", + "x-amzn-query-mode": "true" + } + } + } + ] + } +] diff --git a/tools/code-generation/protocol-tests/output/json_1_0-query-compatible.json b/tools/code-generation/protocol-tests/output/json_1_0-query-compatible.json new file mode 100644 index 00000000000..6aac40832c3 --- /dev/null +++ b/tools/code-generation/protocol-tests/output/json_1_0-query-compatible.json @@ -0,0 +1,142 @@ +[ + { + "description": "Test cases for QueryCompatibleOperation operation", + "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "awsQueryCompatible": {}, + "endpointPrefix": "querycompatiblejsonrpc10", + "jsonVersion": "1.0", + "protocol": "json", + "protocols": [ + "json" + ], + "serviceFullName": "QueryCompatibleJsonRpc10", + "serviceId": "Query Compatible JSON RPC 10", + "signatureVersion": "v4", + "signingName": "QueryCompatibleJsonRpc10", + "targetPrefix": "QueryCompatibleJsonRpc10", + "uid": "query-compatible-json-rpc-10-2020-07-14" + }, + "shapes": { + "NoCustomCodeError": { + "type": "structure", + "members": { + "message": { + "shape": "String" + } + }, + "exception": true + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "id": "QueryCompatibleAwsJson10CborNoCustomCodeError", + "given": { + "name": "QueryCompatibleOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "idempotent": true, + "errors": [ + { + "shape": "NoCustomCodeError" + } + ] + }, + "description": "Parses simple errors with no query error code", + "errorCode": "NoCustomCodeError", + "errorMessage": "Hi", + "error": { + "message": "Hi" + }, + "response": { + "status_code": 400, + "headers": { + "Content-Type": "application/x-amz-json-1.0" + }, + "body": "{\n \"__type\": \"aws.protocoltests.json10#NoCustomCodeError\",\n \"Message\": \"Hi\"\n}" + } + } + ] + }, + { + "description": "Test cases for QueryCompatibleOperation operation", + "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "awsQueryCompatible": {}, + "endpointPrefix": "querycompatiblejsonrpc10", + "jsonVersion": "1.0", + "protocol": "json", + "protocols": [ + "json" + ], + "serviceFullName": "QueryCompatibleJsonRpc10", + "serviceId": "Query Compatible JSON RPC 10", + "signatureVersion": "v4", + "signingName": "QueryCompatibleJsonRpc10", + "targetPrefix": "QueryCompatibleJsonRpc10", + "uid": "query-compatible-json-rpc-10-2020-07-14" + }, + "shapes": { + "CustomCodeError": { + "type": "structure", + "members": { + "message": { + "shape": "String" + } + }, + "error": { + "code": "Customized", + "httpStatusCode": 402, + "senderFault": true + }, + "exception": true + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "id": "QueryCompatibleAwsJson10CustomCodeError", + "given": { + "name": "QueryCompatibleOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "idempotent": true, + "errors": [ + { + "shape": "CustomCodeError" + } + ] + }, + "description": "Parses simple errors with query error code", + "errorCode": "Customized", + "errorMessage": "Hi", + "error": { + "message": "Hi" + }, + "response": { + "status_code": 400, + "headers": { + "Content-Type": "application/x-amz-json-1.0", + "x-amzn-query-error": "Customized;Sender" + }, + "body": "{\n \"__type\": \"aws.protocoltests.json10#CustomCodeError\",\n \"Message\": \"Hi\"\n}" + } + } + ] + } +]