diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/JsonProtocolClient.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/JsonProtocolClient.h index 2381c6fae2d6..e038ec49e4a7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/JsonProtocolClient.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/JsonProtocolClient.h @@ -516,8 +516,33 @@ class AWS_JSONPROTOCOL_API JsonProtocolClient : public Aws::Client::AWSJsonClien return SubmitAsync(&JsonProtocolClient::SimpleScalarProperties, request, handler, context); } - void OverrideEndpoint(const Aws::String& endpoint); - std::shared_ptr& accessEndpointProvider(); + /** + * + */ + virtual Model::SparseNullsOperationOutcome SparseNullsOperation(const Model::SparseNullsOperationRequest& request = {}) const; + + /** + * A Callable wrapper for SparseNullsOperation that returns a future to the operation so that it can be executed in parallel to other + * requests. + */ + template + Model::SparseNullsOperationOutcomeCallable SparseNullsOperationCallable(const SparseNullsOperationRequestT& request = {}) const { + return SubmitCallable(&JsonProtocolClient::SparseNullsOperation, request); + } + + /** + * An Async wrapper for SparseNullsOperation that queues the request into a thread executor and triggers associated callback when + * operation has finished. + */ + template + void SparseNullsOperationAsync(const SparseNullsOperationResponseReceivedHandler& handler, + const std::shared_ptr& context = nullptr, + const SparseNullsOperationRequestT& request = {}) const { + return SubmitAsync(&JsonProtocolClient::SparseNullsOperation, request, handler, context); + } + + virtual void OverrideEndpoint(const Aws::String& endpoint); + virtual std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/JsonProtocolServiceClientModel.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/JsonProtocolServiceClientModel.h index 04f67d731085..3590f73855ce 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/JsonProtocolServiceClientModel.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/JsonProtocolServiceClientModel.h @@ -48,6 +48,8 @@ #include #include #include +#include +#include /* End of service model headers required in JsonProtocolClient header */ namespace Aws { @@ -98,6 +100,7 @@ class OperationWithOptionalInputOutputRequest; class PutAndGetInlineDocumentsRequest; class PutWithContentEncodingRequest; class SimpleScalarPropertiesRequest; +class SparseNullsOperationRequest; /* End of service model forward declarations required in JsonProtocolClient header */ /* Service model Outcome class definitions */ @@ -118,6 +121,7 @@ typedef Aws::Utils::Outcome PutAndGetInlineDocumentsOutcome; typedef Aws::Utils::Outcome PutWithContentEncodingOutcome; typedef Aws::Utils::Outcome SimpleScalarPropertiesOutcome; +typedef Aws::Utils::Outcome SparseNullsOperationOutcome; /* End of service model Outcome class definitions */ /* Service model Outcome callable definitions */ @@ -138,6 +142,7 @@ typedef std::future OperationWithOption typedef std::future PutAndGetInlineDocumentsOutcomeCallable; typedef std::future PutWithContentEncodingOutcomeCallable; typedef std::future SimpleScalarPropertiesOutcomeCallable; +typedef std::future SparseNullsOperationOutcomeCallable; /* End of service model Outcome callable definitions */ } // namespace Model @@ -197,6 +202,9 @@ typedef std::function&)> SimpleScalarPropertiesResponseReceivedHandler; +typedef std::function&)> + SparseNullsOperationResponseReceivedHandler; /* End of service model async handlers definitions */ } // namespace JsonProtocol } // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ComplexError.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ComplexError.h index 46593b6e1ced..4bcfd12d6892 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ComplexError.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ComplexError.h @@ -65,9 +65,9 @@ class ComplexError { ///@} private: Aws::String m_topLevel; - bool m_topLevelHasBeenSet = false; ComplexNestedErrorData m_nested; + bool m_topLevelHasBeenSet = false; bool m_nestedHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ContentTypeParametersResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ContentTypeParametersResult.h index 6948acc3660e..aff9d6c88994 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ContentTypeParametersResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ContentTypeParametersResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -40,8 +41,11 @@ class ContentTypeParametersResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/DatetimeOffsetsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/DatetimeOffsetsResult.h index ffd050ee6983..a5ffb1a49c37 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/DatetimeOffsetsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/DatetimeOffsetsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class DatetimeOffsetsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::DateTime m_datetime{}; - bool m_datetimeHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_datetimeHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ErrorWithMembers.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ErrorWithMembers.h index 1635071bc0fa..ffa4b474ba69 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ErrorWithMembers.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/ErrorWithMembers.h @@ -154,24 +154,24 @@ class ErrorWithMembers { ///@} private: Aws::String m_code; - bool m_codeHasBeenSet = false; KitchenSink m_complexData; - bool m_complexDataHasBeenSet = false; int m_integerField{0}; - bool m_integerFieldHasBeenSet = false; Aws::Vector m_listField; - bool m_listFieldHasBeenSet = false; Aws::Map m_mapField; - bool m_mapFieldHasBeenSet = false; Aws::String m_message; - bool m_messageHasBeenSet = false; Aws::String m_stringField; + bool m_codeHasBeenSet = false; + bool m_complexDataHasBeenSet = false; + bool m_integerFieldHasBeenSet = false; + bool m_listFieldHasBeenSet = false; + bool m_mapFieldHasBeenSet = false; + bool m_messageHasBeenSet = false; bool m_stringFieldHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/FractionalSecondsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/FractionalSecondsResult.h index 70d8b5f8f306..06692f7acc66 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/FractionalSecondsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/FractionalSecondsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class FractionalSecondsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::DateTime m_datetime{}; - bool m_datetimeHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_datetimeHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/GreetingWithErrorsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/GreetingWithErrorsResult.h index 6e2142d41a0b..f8afaf5f532c 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/GreetingWithErrorsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/GreetingWithErrorsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -55,11 +56,14 @@ class GreetingWithErrorsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_greeting; - bool m_greetingHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_greetingHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonEnumsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonEnumsRequest.h index 6ad5dddbac6b..15d396a72435 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonEnumsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonEnumsRequest.h @@ -155,24 +155,24 @@ class JsonEnumsRequest : public JsonProtocolRequest { ///@} private: FooEnum m_fooEnum1{FooEnum::NOT_SET}; - bool m_fooEnum1HasBeenSet = false; FooEnum m_fooEnum2{FooEnum::NOT_SET}; - bool m_fooEnum2HasBeenSet = false; FooEnum m_fooEnum3{FooEnum::NOT_SET}; - bool m_fooEnum3HasBeenSet = false; Aws::Vector m_fooEnumList; - bool m_fooEnumListHasBeenSet = false; Aws::Vector m_fooEnumSet; - bool m_fooEnumSetHasBeenSet = false; Aws::Map m_fooEnumMap; - bool m_fooEnumMapHasBeenSet = false; Aws::String m_requestId; + bool m_fooEnum1HasBeenSet = false; + bool m_fooEnum2HasBeenSet = false; + bool m_fooEnum3HasBeenSet = false; + bool m_fooEnumListHasBeenSet = false; + bool m_fooEnumSetHasBeenSet = false; + bool m_fooEnumMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonEnumsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonEnumsResult.h index b530b52add1e..ed9bd37eaca0 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonEnumsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonEnumsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -142,26 +143,29 @@ class JsonEnumsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: FooEnum m_fooEnum1{FooEnum::NOT_SET}; - bool m_fooEnum1HasBeenSet = false; FooEnum m_fooEnum2{FooEnum::NOT_SET}; - bool m_fooEnum2HasBeenSet = false; FooEnum m_fooEnum3{FooEnum::NOT_SET}; - bool m_fooEnum3HasBeenSet = false; Aws::Vector m_fooEnumList; - bool m_fooEnumListHasBeenSet = false; Aws::Vector m_fooEnumSet; - bool m_fooEnumSetHasBeenSet = false; Aws::Map m_fooEnumMap; - bool m_fooEnumMapHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_fooEnum1HasBeenSet = false; + bool m_fooEnum2HasBeenSet = false; + bool m_fooEnum3HasBeenSet = false; + bool m_fooEnumListHasBeenSet = false; + bool m_fooEnumSetHasBeenSet = false; + bool m_fooEnumMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonIntEnumsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonIntEnumsRequest.h index d12f3c6c9c1d..2579bb54611c 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonIntEnumsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonIntEnumsRequest.h @@ -154,24 +154,24 @@ class JsonIntEnumsRequest : public JsonProtocolRequest { ///@} private: int m_intEnum1{0}; - bool m_intEnum1HasBeenSet = false; int m_intEnum2{0}; - bool m_intEnum2HasBeenSet = false; int m_intEnum3{0}; - bool m_intEnum3HasBeenSet = false; Aws::Vector m_intEnumList; - bool m_intEnumListHasBeenSet = false; Aws::Vector m_intEnumSet; - bool m_intEnumSetHasBeenSet = false; Aws::Map m_intEnumMap; - bool m_intEnumMapHasBeenSet = false; Aws::String m_requestId; + bool m_intEnum1HasBeenSet = false; + bool m_intEnum2HasBeenSet = false; + bool m_intEnum3HasBeenSet = false; + bool m_intEnumListHasBeenSet = false; + bool m_intEnumSetHasBeenSet = false; + bool m_intEnumMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonIntEnumsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonIntEnumsResult.h index 84e6cdfe2970..c6b5915dedad 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonIntEnumsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonIntEnumsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -141,26 +142,29 @@ class JsonIntEnumsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: int m_intEnum1{0}; - bool m_intEnum1HasBeenSet = false; int m_intEnum2{0}; - bool m_intEnum2HasBeenSet = false; int m_intEnum3{0}; - bool m_intEnum3HasBeenSet = false; Aws::Vector m_intEnumList; - bool m_intEnumListHasBeenSet = false; Aws::Vector m_intEnumSet; - bool m_intEnumSetHasBeenSet = false; Aws::Map m_intEnumMap; - bool m_intEnumMapHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_intEnum1HasBeenSet = false; + bool m_intEnum2HasBeenSet = false; + bool m_intEnum3HasBeenSet = false; + bool m_intEnumListHasBeenSet = false; + bool m_intEnumSetHasBeenSet = false; + bool m_intEnumMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonUnionsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonUnionsRequest.h index ca239690c0ee..06e05f641b9f 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonUnionsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonUnionsRequest.h @@ -68,9 +68,9 @@ class JsonUnionsRequest : public JsonProtocolRequest { ///@} private: MyUnion m_contents; - bool m_contentsHasBeenSet = false; Aws::String m_requestId; + bool m_contentsHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonUnionsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonUnionsResult.h index fa60c18aa915..8ee0df509d54 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonUnionsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/JsonUnionsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -62,11 +63,14 @@ class JsonUnionsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: MyUnion m_contents; - bool m_contentsHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_contentsHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSink.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSink.h index 5de6bc9a3d71..828a0f976544 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSink.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSink.h @@ -516,84 +516,84 @@ class KitchenSink { ///@} private: Aws::Utils::ByteBuffer m_blob{}; - bool m_blobHasBeenSet = false; bool m_boolean{false}; - bool m_booleanHasBeenSet = false; double m_double{0.0}; - bool m_doubleHasBeenSet = false; EmptyStruct m_emptyStruct; - bool m_emptyStructHasBeenSet = false; double m_float{0.0}; - bool m_floatHasBeenSet = false; Aws::Utils::DateTime m_httpdateTimestamp{}; - bool m_httpdateTimestampHasBeenSet = false; int m_integer{0}; - bool m_integerHasBeenSet = false; Aws::Utils::DateTime m_iso8601Timestamp{}; - bool m_iso8601TimestampHasBeenSet = false; Aws::String m_jsonValue; - bool m_jsonValueHasBeenSet = false; Aws::Vector> m_listOfLists; - bool m_listOfListsHasBeenSet = false; Aws::Vector> m_listOfMapsOfStrings; - bool m_listOfMapsOfStringsHasBeenSet = false; Aws::Vector m_listOfStrings; - bool m_listOfStringsHasBeenSet = false; Aws::Vector m_listOfStructs; - bool m_listOfStructsHasBeenSet = false; long long m_long{0}; - bool m_longHasBeenSet = false; Aws::Map> m_mapOfListsOfStrings; - bool m_mapOfListsOfStringsHasBeenSet = false; Aws::Map> m_mapOfMaps; - bool m_mapOfMapsHasBeenSet = false; Aws::Map m_mapOfStrings; - bool m_mapOfStringsHasBeenSet = false; Aws::Map m_mapOfStructs; - bool m_mapOfStructsHasBeenSet = false; Aws::Vector m_recursiveList; - bool m_recursiveListHasBeenSet = false; Aws::Map m_recursiveMap; - bool m_recursiveMapHasBeenSet = false; std::shared_ptr m_recursiveStruct; - bool m_recursiveStructHasBeenSet = false; SimpleStruct m_simpleStruct; - bool m_simpleStructHasBeenSet = false; Aws::String m_string; - bool m_stringHasBeenSet = false; StructWithJsonName m_structWithJsonName; - bool m_structWithJsonNameHasBeenSet = false; Aws::Utils::DateTime m_timestamp{}; - bool m_timestampHasBeenSet = false; Aws::Utils::DateTime m_unixTimestamp{}; - bool m_unixTimestampHasBeenSet = false; Aws::String m_requestId; + bool m_blobHasBeenSet = false; + bool m_booleanHasBeenSet = false; + bool m_doubleHasBeenSet = false; + bool m_emptyStructHasBeenSet = false; + bool m_floatHasBeenSet = false; + bool m_httpdateTimestampHasBeenSet = false; + bool m_integerHasBeenSet = false; + bool m_iso8601TimestampHasBeenSet = false; + bool m_jsonValueHasBeenSet = false; + bool m_listOfListsHasBeenSet = false; + bool m_listOfMapsOfStringsHasBeenSet = false; + bool m_listOfStringsHasBeenSet = false; + bool m_listOfStructsHasBeenSet = false; + bool m_longHasBeenSet = false; + bool m_mapOfListsOfStringsHasBeenSet = false; + bool m_mapOfMapsHasBeenSet = false; + bool m_mapOfStringsHasBeenSet = false; + bool m_mapOfStructsHasBeenSet = false; + bool m_recursiveListHasBeenSet = false; + bool m_recursiveMapHasBeenSet = false; + bool m_recursiveStructHasBeenSet = false; + bool m_simpleStructHasBeenSet = false; + bool m_stringHasBeenSet = false; + bool m_structWithJsonNameHasBeenSet = false; + bool m_timestampHasBeenSet = false; + bool m_unixTimestampHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSinkOperationRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSinkOperationRequest.h index ef6f587c5ed0..265e5ba1ab26 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSinkOperationRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSinkOperationRequest.h @@ -521,84 +521,84 @@ class KitchenSinkOperationRequest : public JsonProtocolRequest { ///@} private: Aws::Utils::ByteBuffer m_blob{}; - bool m_blobHasBeenSet = false; bool m_boolean{false}; - bool m_booleanHasBeenSet = false; double m_double{0.0}; - bool m_doubleHasBeenSet = false; EmptyStruct m_emptyStruct; - bool m_emptyStructHasBeenSet = false; double m_float{0.0}; - bool m_floatHasBeenSet = false; Aws::Utils::DateTime m_httpdateTimestamp{}; - bool m_httpdateTimestampHasBeenSet = false; int m_integer{0}; - bool m_integerHasBeenSet = false; Aws::Utils::DateTime m_iso8601Timestamp{}; - bool m_iso8601TimestampHasBeenSet = false; Aws::String m_jsonValue; - bool m_jsonValueHasBeenSet = false; Aws::Vector> m_listOfLists; - bool m_listOfListsHasBeenSet = false; Aws::Vector> m_listOfMapsOfStrings; - bool m_listOfMapsOfStringsHasBeenSet = false; Aws::Vector m_listOfStrings; - bool m_listOfStringsHasBeenSet = false; Aws::Vector m_listOfStructs; - bool m_listOfStructsHasBeenSet = false; long long m_long{0}; - bool m_longHasBeenSet = false; Aws::Map> m_mapOfListsOfStrings; - bool m_mapOfListsOfStringsHasBeenSet = false; Aws::Map> m_mapOfMaps; - bool m_mapOfMapsHasBeenSet = false; Aws::Map m_mapOfStrings; - bool m_mapOfStringsHasBeenSet = false; Aws::Map m_mapOfStructs; - bool m_mapOfStructsHasBeenSet = false; Aws::Vector m_recursiveList; - bool m_recursiveListHasBeenSet = false; Aws::Map m_recursiveMap; - bool m_recursiveMapHasBeenSet = false; KitchenSink m_recursiveStruct; - bool m_recursiveStructHasBeenSet = false; SimpleStruct m_simpleStruct; - bool m_simpleStructHasBeenSet = false; Aws::String m_string; - bool m_stringHasBeenSet = false; StructWithJsonName m_structWithJsonName; - bool m_structWithJsonNameHasBeenSet = false; Aws::Utils::DateTime m_timestamp{}; - bool m_timestampHasBeenSet = false; Aws::Utils::DateTime m_unixTimestamp{}; - bool m_unixTimestampHasBeenSet = false; Aws::String m_requestId; + bool m_blobHasBeenSet = false; + bool m_booleanHasBeenSet = false; + bool m_doubleHasBeenSet = false; + bool m_emptyStructHasBeenSet = false; + bool m_floatHasBeenSet = false; + bool m_httpdateTimestampHasBeenSet = false; + bool m_integerHasBeenSet = false; + bool m_iso8601TimestampHasBeenSet = false; + bool m_jsonValueHasBeenSet = false; + bool m_listOfListsHasBeenSet = false; + bool m_listOfMapsOfStringsHasBeenSet = false; + bool m_listOfStringsHasBeenSet = false; + bool m_listOfStructsHasBeenSet = false; + bool m_longHasBeenSet = false; + bool m_mapOfListsOfStringsHasBeenSet = false; + bool m_mapOfMapsHasBeenSet = false; + bool m_mapOfStringsHasBeenSet = false; + bool m_mapOfStructsHasBeenSet = false; + bool m_recursiveListHasBeenSet = false; + bool m_recursiveMapHasBeenSet = false; + bool m_recursiveStructHasBeenSet = false; + bool m_simpleStructHasBeenSet = false; + bool m_stringHasBeenSet = false; + bool m_structWithJsonNameHasBeenSet = false; + bool m_timestampHasBeenSet = false; + bool m_unixTimestampHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSinkOperationResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSinkOperationResult.h index edc76931c602..d28ed84ed3ad 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSinkOperationResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/KitchenSinkOperationResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -488,86 +489,89 @@ class KitchenSinkOperationResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::ByteBuffer m_blob{}; - bool m_blobHasBeenSet = false; bool m_boolean{false}; - bool m_booleanHasBeenSet = false; double m_double{0.0}; - bool m_doubleHasBeenSet = false; EmptyStruct m_emptyStruct; - bool m_emptyStructHasBeenSet = false; double m_float{0.0}; - bool m_floatHasBeenSet = false; Aws::Utils::DateTime m_httpdateTimestamp{}; - bool m_httpdateTimestampHasBeenSet = false; int m_integer{0}; - bool m_integerHasBeenSet = false; Aws::Utils::DateTime m_iso8601Timestamp{}; - bool m_iso8601TimestampHasBeenSet = false; Aws::String m_jsonValue; - bool m_jsonValueHasBeenSet = false; Aws::Vector> m_listOfLists; - bool m_listOfListsHasBeenSet = false; Aws::Vector> m_listOfMapsOfStrings; - bool m_listOfMapsOfStringsHasBeenSet = false; Aws::Vector m_listOfStrings; - bool m_listOfStringsHasBeenSet = false; Aws::Vector m_listOfStructs; - bool m_listOfStructsHasBeenSet = false; long long m_long{0}; - bool m_longHasBeenSet = false; Aws::Map> m_mapOfListsOfStrings; - bool m_mapOfListsOfStringsHasBeenSet = false; Aws::Map> m_mapOfMaps; - bool m_mapOfMapsHasBeenSet = false; Aws::Map m_mapOfStrings; - bool m_mapOfStringsHasBeenSet = false; Aws::Map m_mapOfStructs; - bool m_mapOfStructsHasBeenSet = false; Aws::Vector m_recursiveList; - bool m_recursiveListHasBeenSet = false; Aws::Map m_recursiveMap; - bool m_recursiveMapHasBeenSet = false; KitchenSink m_recursiveStruct; - bool m_recursiveStructHasBeenSet = false; SimpleStruct m_simpleStruct; - bool m_simpleStructHasBeenSet = false; Aws::String m_string; - bool m_stringHasBeenSet = false; StructWithJsonName m_structWithJsonName; - bool m_structWithJsonNameHasBeenSet = false; Aws::Utils::DateTime m_timestamp{}; - bool m_timestampHasBeenSet = false; Aws::Utils::DateTime m_unixTimestamp{}; - bool m_unixTimestampHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_blobHasBeenSet = false; + bool m_booleanHasBeenSet = false; + bool m_doubleHasBeenSet = false; + bool m_emptyStructHasBeenSet = false; + bool m_floatHasBeenSet = false; + bool m_httpdateTimestampHasBeenSet = false; + bool m_integerHasBeenSet = false; + bool m_iso8601TimestampHasBeenSet = false; + bool m_jsonValueHasBeenSet = false; + bool m_listOfListsHasBeenSet = false; + bool m_listOfMapsOfStringsHasBeenSet = false; + bool m_listOfStringsHasBeenSet = false; + bool m_listOfStructsHasBeenSet = false; + bool m_longHasBeenSet = false; + bool m_mapOfListsOfStringsHasBeenSet = false; + bool m_mapOfMapsHasBeenSet = false; + bool m_mapOfStringsHasBeenSet = false; + bool m_mapOfStructsHasBeenSet = false; + bool m_recursiveListHasBeenSet = false; + bool m_recursiveMapHasBeenSet = false; + bool m_recursiveStructHasBeenSet = false; + bool m_simpleStructHasBeenSet = false; + bool m_stringHasBeenSet = false; + bool m_structWithJsonNameHasBeenSet = false; + bool m_timestampHasBeenSet = false; + bool m_unixTimestampHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/MyUnion.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/MyUnion.h index cdea1083e45b..0327bb3c5297 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/MyUnion.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/MyUnion.h @@ -189,30 +189,30 @@ class MyUnion { ///@} private: Aws::String m_stringValue; - bool m_stringValueHasBeenSet = false; bool m_booleanValue{false}; - bool m_booleanValueHasBeenSet = false; int m_numberValue{0}; - bool m_numberValueHasBeenSet = false; Aws::Utils::ByteBuffer m_blobValue{}; - bool m_blobValueHasBeenSet = false; Aws::Utils::DateTime m_timestampValue{}; - bool m_timestampValueHasBeenSet = false; FooEnum m_enumValue{FooEnum::NOT_SET}; - bool m_enumValueHasBeenSet = false; Aws::Vector m_listValue; - bool m_listValueHasBeenSet = false; Aws::Map m_mapValue; - bool m_mapValueHasBeenSet = false; GreetingStruct m_structureValue; + bool m_stringValueHasBeenSet = false; + bool m_booleanValueHasBeenSet = false; + bool m_numberValueHasBeenSet = false; + bool m_blobValueHasBeenSet = false; + bool m_timestampValueHasBeenSet = false; + bool m_enumValueHasBeenSet = false; + bool m_listValueHasBeenSet = false; + bool m_mapValueHasBeenSet = false; bool m_structureValueHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/NullOperationRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/NullOperationRequest.h index ce46d44e91ca..99b64face4d5 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/NullOperationRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/NullOperationRequest.h @@ -63,9 +63,9 @@ class NullOperationRequest : public JsonProtocolRequest { ///@} private: Aws::String m_string; - bool m_stringHasBeenSet = false; Aws::String m_requestId; + bool m_stringHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/NullOperationResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/NullOperationResult.h index 99ae743618b1..063d730695fa 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/NullOperationResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/NullOperationResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -55,11 +56,14 @@ class NullOperationResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_string; - bool m_stringHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_stringHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/OperationWithOptionalInputOutputResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/OperationWithOptionalInputOutputResult.h index f84580d8d115..02844f0d5d50 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/OperationWithOptionalInputOutputResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/OperationWithOptionalInputOutputResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -56,11 +57,14 @@ class OperationWithOptionalInputOutputResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_value; - bool m_valueHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_valueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutAndGetInlineDocumentsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutAndGetInlineDocumentsRequest.h index a9e44fbe6221..1eeeab0c24b9 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutAndGetInlineDocumentsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutAndGetInlineDocumentsRequest.h @@ -64,9 +64,9 @@ class PutAndGetInlineDocumentsRequest : public JsonProtocolRequest { ///@} private: Aws::Utils::Document m_inlineDocument; - bool m_inlineDocumentHasBeenSet = false; Aws::String m_requestId; + bool m_inlineDocumentHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutAndGetInlineDocumentsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutAndGetInlineDocumentsResult.h index 64a3c26d932f..5f463133dc1f 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutAndGetInlineDocumentsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutAndGetInlineDocumentsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class PutAndGetInlineDocumentsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::Document m_inlineDocument; - bool m_inlineDocumentHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_inlineDocumentHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutWithContentEncodingRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutWithContentEncodingRequest.h index 42e44df09a47..fe10ef063faa 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutWithContentEncodingRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/PutWithContentEncodingRequest.h @@ -67,9 +67,9 @@ class PutWithContentEncodingRequest : public JsonProtocolRequest { ///@} private: Aws::String m_encoding; - bool m_encodingHasBeenSet = false; Aws::String m_data; + bool m_encodingHasBeenSet = false; bool m_dataHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SimpleScalarPropertiesRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SimpleScalarPropertiesRequest.h index 7f5a95426442..939a2334a108 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SimpleScalarPropertiesRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SimpleScalarPropertiesRequest.h @@ -75,12 +75,12 @@ class SimpleScalarPropertiesRequest : public JsonProtocolRequest { ///@} private: double m_floatValue{0.0}; - bool m_floatValueHasBeenSet = false; double m_doubleValue{0.0}; - bool m_doubleValueHasBeenSet = false; Aws::String m_requestId; + bool m_floatValueHasBeenSet = false; + bool m_doubleValueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SimpleScalarPropertiesResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SimpleScalarPropertiesResult.h index 03f8a932beec..a26405817be8 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SimpleScalarPropertiesResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SimpleScalarPropertiesResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -66,14 +67,17 @@ class SimpleScalarPropertiesResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: double m_floatValue{0.0}; - bool m_floatValueHasBeenSet = false; double m_doubleValue{0.0}; - bool m_doubleValueHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_floatValueHasBeenSet = false; + bool m_doubleValueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SparseNullsOperationRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SparseNullsOperationRequest.h new file mode 100644 index 000000000000..f2c687b8e88c --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SparseNullsOperationRequest.h @@ -0,0 +1,118 @@ +/** + * 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 JsonProtocol { +namespace Model { + +/** + */ +class SparseNullsOperationRequest : public JsonProtocolRequest { + public: + AWS_JSONPROTOCOL_API SparseNullsOperationRequest() = 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 "SparseNullsOperation"; } + + AWS_JSONPROTOCOL_API Aws::String SerializePayload() const override; + + AWS_JSONPROTOCOL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + ///@{ + + inline const Aws::Vector>& GetSparseStringList() const { return m_sparseStringList; } + inline bool SparseStringListHasBeenSet() const { return m_sparseStringListHasBeenSet; } + template >> + void SetSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList = std::forward(value); + } + template >> + SparseNullsOperationRequest& WithSparseStringList(SparseStringListT&& value) { + SetSparseStringList(std::forward(value)); + return *this; + } + template + SparseNullsOperationRequest& AddSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.emplace_back(std::forward(value)); + return *this; + } + inline SparseNullsOperationRequest& AddSparseStringList(Aws::Crt::Optional value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.push_back(value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseStringMap() const { return m_sparseStringMap; } + inline bool SparseStringMapHasBeenSet() const { return m_sparseStringMapHasBeenSet; } + template >> + void SetSparseStringMap(SparseStringMapT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap = std::forward(value); + } + template >> + SparseNullsOperationRequest& WithSparseStringMap(SparseStringMapT&& value) { + SetSparseStringMap(std::forward(value)); + return *this; + } + template > + SparseNullsOperationRequest& AddSparseStringMap(SparseStringMapKeyT&& key, SparseStringMapValueT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline SparseNullsOperationRequest& AddSparseStringMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + 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 + SparseNullsOperationRequest& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + private: + Aws::Vector> m_sparseStringList; + + Aws::Map> m_sparseStringMap; + + Aws::String m_requestId; + bool m_sparseStringListHasBeenSet = false; + bool m_sparseStringMapHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace JsonProtocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SparseNullsOperationResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SparseNullsOperationResult.h new file mode 100644 index 000000000000..2b5c06f8953f --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/include/aws/json-protocol/model/SparseNullsOperationResult.h @@ -0,0 +1,115 @@ +/** + * 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 { +template +class AmazonWebServiceResult; + +namespace Utils { +namespace Json { +class JsonValue; +} // namespace Json +} // namespace Utils +namespace JsonProtocol { +namespace Model { +class SparseNullsOperationResult { + public: + AWS_JSONPROTOCOL_API SparseNullsOperationResult() = default; + AWS_JSONPROTOCOL_API SparseNullsOperationResult(const Aws::AmazonWebServiceResult& result); + AWS_JSONPROTOCOL_API SparseNullsOperationResult& operator=(const Aws::AmazonWebServiceResult& result); + + ///@{ + + inline const Aws::Vector>& GetSparseStringList() const { return m_sparseStringList; } + template >> + void SetSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList = std::forward(value); + } + template >> + SparseNullsOperationResult& WithSparseStringList(SparseStringListT&& value) { + SetSparseStringList(std::forward(value)); + return *this; + } + template + SparseNullsOperationResult& AddSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.emplace_back(std::forward(value)); + return *this; + } + inline SparseNullsOperationResult& AddSparseStringList(Aws::Crt::Optional value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.push_back(value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseStringMap() const { return m_sparseStringMap; } + template >> + void SetSparseStringMap(SparseStringMapT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap = std::forward(value); + } + template >> + SparseNullsOperationResult& WithSparseStringMap(SparseStringMapT&& value) { + SetSparseStringMap(std::forward(value)); + return *this; + } + template > + SparseNullsOperationResult& AddSparseStringMap(SparseStringMapKeyT&& key, SparseStringMapValueT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline SparseNullsOperationResult& AddSparseStringMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetRequestId() const { return m_requestId; } + template + void SetRequestId(RequestIdT&& value) { + m_requestIdHasBeenSet = true; + m_requestId = std::forward(value); + } + template + SparseNullsOperationResult& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + + private: + Aws::Vector> m_sparseStringList; + + Aws::Map> m_sparseStringMap; + + Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_sparseStringListHasBeenSet = false; + bool m_sparseStringMapHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace JsonProtocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/JsonProtocolClient.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/JsonProtocolClient.cpp index e2b56d26e61e..d934debdb40e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/JsonProtocolClient.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/JsonProtocolClient.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include using namespace Aws; @@ -96,7 +97,7 @@ JsonProtocolClient::JsonProtocolClient(const std::shared_ptr( ALLOCATION_TAG, @@ -108,7 +109,7 @@ JsonProtocolClient::JsonProtocolClient(const Client::ClientConfiguration& client init(m_clientConfiguration); } -JsonProtocolClient::JsonProtocolClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) +JsonProtocolClient::JsonProtocolClient(const AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), @@ -119,7 +120,7 @@ JsonProtocolClient::JsonProtocolClient(const AWSCredentials& credentials, const } JsonProtocolClient::JsonProtocolClient(const std::shared_ptr& credentialsProvider, - const Client::ClientConfiguration& clientConfiguration) + const Aws::Client::ClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), @@ -145,7 +146,7 @@ void JsonProtocolClient::init(const JsonProtocol::JsonProtocolClientConfiguratio m_clientConfiguration.executor = m_clientConfiguration.configFactories.executorCreateFn(); } AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); - m_endpointProvider->InitBuiltInParameters(config); + m_endpointProvider->InitBuiltInParameters(config, "jsonprotocol"); } void JsonProtocolClient::OverrideEndpoint(const Aws::String& endpoint) { @@ -652,3 +653,32 @@ SimpleScalarPropertiesOutcome JsonProtocolClient::SimpleScalarProperties(const S {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } + +SparseNullsOperationOutcome JsonProtocolClient::SparseNullsOperation(const SparseNullsOperationRequest& request) const { + AWS_OPERATION_GUARD(SparseNullsOperation); + AWS_OPERATION_CHECK_PTR(m_endpointProvider, SparseNullsOperation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); + AWS_OPERATION_CHECK_PTR(m_telemetryProvider, SparseNullsOperation, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(meter, SparseNullsOperation, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".SparseNullsOperation", + {{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( + [&]() -> SparseNullsOperationOutcome { + 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, SparseNullsOperation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, + endpointResolutionOutcome.GetError().GetMessage()); + return SparseNullsOperationOutcome( + 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-json-protocol/source/model/ContentTypeParametersResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/ContentTypeParametersResult.cpp index d8322fba84f0..3e4127e59d99 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/ContentTypeParametersResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/ContentTypeParametersResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; ContentTypeParametersResult::ContentTypeParametersResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ContentTypeParametersResult& ContentTypeParametersResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/DatetimeOffsetsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/DatetimeOffsetsResult.cpp index f48fc2445c35..7e0bc2ff1047 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/DatetimeOffsetsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/DatetimeOffsetsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; DatetimeOffsetsResult::DatetimeOffsetsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DatetimeOffsetsResult& DatetimeOffsetsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("datetime")) { m_datetime = jsonValue.GetString("datetime"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/FractionalSecondsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/FractionalSecondsResult.cpp index f930f08fe989..c75fc9691eee 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/FractionalSecondsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/FractionalSecondsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; FractionalSecondsResult::FractionalSecondsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } FractionalSecondsResult& FractionalSecondsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("datetime")) { m_datetime = jsonValue.GetString("datetime"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/GreetingWithErrorsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/GreetingWithErrorsResult.cpp index 2459773d4474..fcc47c10f724 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/GreetingWithErrorsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/GreetingWithErrorsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; GreetingWithErrorsResult::GreetingWithErrorsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } GreetingWithErrorsResult& GreetingWithErrorsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("greeting")) { m_greeting = jsonValue.GetString("greeting"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonEnumsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonEnumsResult.cpp index 31c9e95fd28c..1fcd748200af 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonEnumsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonEnumsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; JsonEnumsResult::JsonEnumsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } JsonEnumsResult& JsonEnumsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("fooEnum1")) { m_fooEnum1 = FooEnumMapper::GetFooEnumForName(jsonValue.GetString("fooEnum1")); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonIntEnumsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonIntEnumsResult.cpp index b88039f448d4..912715a6fda4 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonIntEnumsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonIntEnumsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; JsonIntEnumsResult::JsonIntEnumsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } JsonIntEnumsResult& JsonIntEnumsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("intEnum1")) { m_intEnum1 = jsonValue.GetInteger("intEnum1"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonUnionsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonUnionsResult.cpp index 3971bdd6469d..a8410410c630 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonUnionsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/JsonUnionsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; JsonUnionsResult::JsonUnionsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } JsonUnionsResult& JsonUnionsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("contents")) { m_contents = jsonValue.GetObject("contents"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/KitchenSink.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/KitchenSink.cpp index ed133999ed77..1bf53625c084 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/KitchenSink.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/KitchenSink.cpp @@ -59,13 +59,13 @@ KitchenSink& KitchenSink::operator=(JsonView jsonValue) { if (jsonValue.ValueExists("ListOfLists")) { Aws::Utils::Array listOfListsJsonList = jsonValue.GetArray("ListOfLists"); for (unsigned listOfListsIndex = 0; listOfListsIndex < listOfListsJsonList.GetLength(); ++listOfListsIndex) { - Aws::Utils::Array listOfStringsJsonList = listOfListsJsonList[listOfListsIndex].AsArray(); - Aws::Vector listOfStringsList; - listOfStringsList.reserve((size_t)listOfStringsJsonList.GetLength()); - for (unsigned listOfStringsIndex = 0; listOfStringsIndex < listOfStringsJsonList.GetLength(); ++listOfStringsIndex) { - listOfStringsList.push_back(listOfStringsJsonList[listOfStringsIndex].AsString()); + Aws::Utils::Array listOfStrings2JsonList = listOfListsJsonList[listOfListsIndex].AsArray(); + Aws::Vector listOfStrings2List; + listOfStrings2List.reserve((size_t)listOfStrings2JsonList.GetLength()); + for (unsigned listOfStrings2Index = 0; listOfStrings2Index < listOfStrings2JsonList.GetLength(); ++listOfStrings2Index) { + listOfStrings2List.push_back(listOfStrings2JsonList[listOfStrings2Index].AsString()); } - m_listOfLists.push_back(std::move(listOfStringsList)); + m_listOfLists.push_back(std::move(listOfStrings2List)); } m_listOfListsHasBeenSet = true; } @@ -73,12 +73,12 @@ KitchenSink& KitchenSink::operator=(JsonView jsonValue) { Aws::Utils::Array listOfMapsOfStringsJsonList = jsonValue.GetArray("ListOfMapsOfStrings"); for (unsigned listOfMapsOfStringsIndex = 0; listOfMapsOfStringsIndex < listOfMapsOfStringsJsonList.GetLength(); ++listOfMapsOfStringsIndex) { - Aws::Map mapOfStringsJsonMap = listOfMapsOfStringsJsonList[listOfMapsOfStringsIndex].GetAllObjects(); - Aws::Map mapOfStringsMap; - for (auto& mapOfStringsItem : mapOfStringsJsonMap) { - mapOfStringsMap[mapOfStringsItem.first] = mapOfStringsItem.second.AsString(); + Aws::Map mapOfStrings2JsonMap = listOfMapsOfStringsJsonList[listOfMapsOfStringsIndex].GetAllObjects(); + Aws::Map mapOfStrings2Map; + for (auto& mapOfStrings2Item : mapOfStrings2JsonMap) { + mapOfStrings2Map[mapOfStrings2Item.first] = mapOfStrings2Item.second.AsString(); } - m_listOfMapsOfStrings.push_back(std::move(mapOfStringsMap)); + m_listOfMapsOfStrings.push_back(std::move(mapOfStrings2Map)); } m_listOfMapsOfStringsHasBeenSet = true; } @@ -103,25 +103,25 @@ KitchenSink& KitchenSink::operator=(JsonView jsonValue) { if (jsonValue.ValueExists("MapOfListsOfStrings")) { Aws::Map mapOfListsOfStringsJsonMap = jsonValue.GetObject("MapOfListsOfStrings").GetAllObjects(); for (auto& mapOfListsOfStringsItem : mapOfListsOfStringsJsonMap) { - Aws::Utils::Array listOfStringsJsonList = mapOfListsOfStringsItem.second.AsArray(); - Aws::Vector listOfStringsList; - listOfStringsList.reserve((size_t)listOfStringsJsonList.GetLength()); - for (unsigned listOfStringsIndex = 0; listOfStringsIndex < listOfStringsJsonList.GetLength(); ++listOfStringsIndex) { - listOfStringsList.push_back(listOfStringsJsonList[listOfStringsIndex].AsString()); + Aws::Utils::Array listOfStrings2JsonList = mapOfListsOfStringsItem.second.AsArray(); + Aws::Vector listOfStrings2List; + listOfStrings2List.reserve((size_t)listOfStrings2JsonList.GetLength()); + for (unsigned listOfStrings2Index = 0; listOfStrings2Index < listOfStrings2JsonList.GetLength(); ++listOfStrings2Index) { + listOfStrings2List.push_back(listOfStrings2JsonList[listOfStrings2Index].AsString()); } - m_mapOfListsOfStrings[mapOfListsOfStringsItem.first] = std::move(listOfStringsList); + m_mapOfListsOfStrings[mapOfListsOfStringsItem.first] = std::move(listOfStrings2List); } m_mapOfListsOfStringsHasBeenSet = true; } if (jsonValue.ValueExists("MapOfMaps")) { Aws::Map mapOfMapsJsonMap = jsonValue.GetObject("MapOfMaps").GetAllObjects(); for (auto& mapOfMapsItem : mapOfMapsJsonMap) { - Aws::Map mapOfStringsJsonMap = mapOfMapsItem.second.GetAllObjects(); - Aws::Map mapOfStringsMap; - for (auto& mapOfStringsItem : mapOfStringsJsonMap) { - mapOfStringsMap[mapOfStringsItem.first] = mapOfStringsItem.second.AsString(); + Aws::Map mapOfStrings2JsonMap = mapOfMapsItem.second.GetAllObjects(); + Aws::Map mapOfStrings2Map; + for (auto& mapOfStrings2Item : mapOfStrings2JsonMap) { + mapOfStrings2Map[mapOfStrings2Item.first] = mapOfStrings2Item.second.AsString(); } - m_mapOfMaps[mapOfMapsItem.first] = std::move(mapOfStringsMap); + m_mapOfMaps[mapOfMapsItem.first] = std::move(mapOfStrings2Map); } m_mapOfMapsHasBeenSet = true; } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/KitchenSinkOperationResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/KitchenSinkOperationResult.cpp index 590ec492e13d..acda89a3b375 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/KitchenSinkOperationResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/KitchenSinkOperationResult.cpp @@ -21,6 +21,7 @@ using namespace Aws; KitchenSinkOperationResult::KitchenSinkOperationResult(const Aws::AmazonWebServiceResult& result) { *this = result; } KitchenSinkOperationResult& KitchenSinkOperationResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("Blob")) { m_blob = HashingUtils::Base64Decode(jsonValue.GetString("Blob")); @@ -61,13 +62,13 @@ KitchenSinkOperationResult& KitchenSinkOperationResult::operator=(const Aws::Ama if (jsonValue.ValueExists("ListOfLists")) { Aws::Utils::Array listOfListsJsonList = jsonValue.GetArray("ListOfLists"); for (unsigned listOfListsIndex = 0; listOfListsIndex < listOfListsJsonList.GetLength(); ++listOfListsIndex) { - Aws::Utils::Array listOfStringsJsonList = listOfListsJsonList[listOfListsIndex].AsArray(); - Aws::Vector listOfStringsList; - listOfStringsList.reserve((size_t)listOfStringsJsonList.GetLength()); - for (unsigned listOfStringsIndex = 0; listOfStringsIndex < listOfStringsJsonList.GetLength(); ++listOfStringsIndex) { - listOfStringsList.push_back(listOfStringsJsonList[listOfStringsIndex].AsString()); + Aws::Utils::Array listOfStrings2JsonList = listOfListsJsonList[listOfListsIndex].AsArray(); + Aws::Vector listOfStrings2List; + listOfStrings2List.reserve((size_t)listOfStrings2JsonList.GetLength()); + for (unsigned listOfStrings2Index = 0; listOfStrings2Index < listOfStrings2JsonList.GetLength(); ++listOfStrings2Index) { + listOfStrings2List.push_back(listOfStrings2JsonList[listOfStrings2Index].AsString()); } - m_listOfLists.push_back(std::move(listOfStringsList)); + m_listOfLists.push_back(std::move(listOfStrings2List)); } m_listOfListsHasBeenSet = true; } @@ -75,12 +76,12 @@ KitchenSinkOperationResult& KitchenSinkOperationResult::operator=(const Aws::Ama Aws::Utils::Array listOfMapsOfStringsJsonList = jsonValue.GetArray("ListOfMapsOfStrings"); for (unsigned listOfMapsOfStringsIndex = 0; listOfMapsOfStringsIndex < listOfMapsOfStringsJsonList.GetLength(); ++listOfMapsOfStringsIndex) { - Aws::Map mapOfStringsJsonMap = listOfMapsOfStringsJsonList[listOfMapsOfStringsIndex].GetAllObjects(); - Aws::Map mapOfStringsMap; - for (auto& mapOfStringsItem : mapOfStringsJsonMap) { - mapOfStringsMap[mapOfStringsItem.first] = mapOfStringsItem.second.AsString(); + Aws::Map mapOfStrings2JsonMap = listOfMapsOfStringsJsonList[listOfMapsOfStringsIndex].GetAllObjects(); + Aws::Map mapOfStrings2Map; + for (auto& mapOfStrings2Item : mapOfStrings2JsonMap) { + mapOfStrings2Map[mapOfStrings2Item.first] = mapOfStrings2Item.second.AsString(); } - m_listOfMapsOfStrings.push_back(std::move(mapOfStringsMap)); + m_listOfMapsOfStrings.push_back(std::move(mapOfStrings2Map)); } m_listOfMapsOfStringsHasBeenSet = true; } @@ -105,25 +106,25 @@ KitchenSinkOperationResult& KitchenSinkOperationResult::operator=(const Aws::Ama if (jsonValue.ValueExists("MapOfListsOfStrings")) { Aws::Map mapOfListsOfStringsJsonMap = jsonValue.GetObject("MapOfListsOfStrings").GetAllObjects(); for (auto& mapOfListsOfStringsItem : mapOfListsOfStringsJsonMap) { - Aws::Utils::Array listOfStringsJsonList = mapOfListsOfStringsItem.second.AsArray(); - Aws::Vector listOfStringsList; - listOfStringsList.reserve((size_t)listOfStringsJsonList.GetLength()); - for (unsigned listOfStringsIndex = 0; listOfStringsIndex < listOfStringsJsonList.GetLength(); ++listOfStringsIndex) { - listOfStringsList.push_back(listOfStringsJsonList[listOfStringsIndex].AsString()); + Aws::Utils::Array listOfStrings2JsonList = mapOfListsOfStringsItem.second.AsArray(); + Aws::Vector listOfStrings2List; + listOfStrings2List.reserve((size_t)listOfStrings2JsonList.GetLength()); + for (unsigned listOfStrings2Index = 0; listOfStrings2Index < listOfStrings2JsonList.GetLength(); ++listOfStrings2Index) { + listOfStrings2List.push_back(listOfStrings2JsonList[listOfStrings2Index].AsString()); } - m_mapOfListsOfStrings[mapOfListsOfStringsItem.first] = std::move(listOfStringsList); + m_mapOfListsOfStrings[mapOfListsOfStringsItem.first] = std::move(listOfStrings2List); } m_mapOfListsOfStringsHasBeenSet = true; } if (jsonValue.ValueExists("MapOfMaps")) { Aws::Map mapOfMapsJsonMap = jsonValue.GetObject("MapOfMaps").GetAllObjects(); for (auto& mapOfMapsItem : mapOfMapsJsonMap) { - Aws::Map mapOfStringsJsonMap = mapOfMapsItem.second.GetAllObjects(); - Aws::Map mapOfStringsMap; - for (auto& mapOfStringsItem : mapOfStringsJsonMap) { - mapOfStringsMap[mapOfStringsItem.first] = mapOfStringsItem.second.AsString(); + Aws::Map mapOfStrings2JsonMap = mapOfMapsItem.second.GetAllObjects(); + Aws::Map mapOfStrings2Map; + for (auto& mapOfStrings2Item : mapOfStrings2JsonMap) { + mapOfStrings2Map[mapOfStrings2Item.first] = mapOfStrings2Item.second.AsString(); } - m_mapOfMaps[mapOfMapsItem.first] = std::move(mapOfStringsMap); + m_mapOfMaps[mapOfMapsItem.first] = std::move(mapOfStrings2Map); } m_mapOfMapsHasBeenSet = true; } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/NullOperationResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/NullOperationResult.cpp index 19a3ecfad730..5d7bfca3ac15 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/NullOperationResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/NullOperationResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; NullOperationResult::NullOperationResult(const Aws::AmazonWebServiceResult& result) { *this = result; } NullOperationResult& NullOperationResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("string")) { m_string = jsonValue.GetString("string"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/OperationWithOptionalInputOutputResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/OperationWithOptionalInputOutputResult.cpp index 74cd21586e89..88658bcab14e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/OperationWithOptionalInputOutputResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/OperationWithOptionalInputOutputResult.cpp @@ -23,6 +23,7 @@ OperationWithOptionalInputOutputResult::OperationWithOptionalInputOutputResult(c OperationWithOptionalInputOutputResult& OperationWithOptionalInputOutputResult::operator=( const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("Value")) { m_value = jsonValue.GetString("Value"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/PutAndGetInlineDocumentsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/PutAndGetInlineDocumentsResult.cpp index 597c7b6b0888..63a84e4f4c24 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/PutAndGetInlineDocumentsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/PutAndGetInlineDocumentsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; PutAndGetInlineDocumentsResult::PutAndGetInlineDocumentsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } PutAndGetInlineDocumentsResult& PutAndGetInlineDocumentsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("inlineDocument")) { m_inlineDocument = jsonValue.GetObject("inlineDocument"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/SimpleScalarPropertiesResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/SimpleScalarPropertiesResult.cpp index 3a19ee3ccd07..8f5ef67f6cbf 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/SimpleScalarPropertiesResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/SimpleScalarPropertiesResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; SimpleScalarPropertiesResult::SimpleScalarPropertiesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } SimpleScalarPropertiesResult& SimpleScalarPropertiesResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("floatValue")) { m_floatValue = jsonValue.GetDouble("floatValue"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/SparseNullsOperationRequest.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/SparseNullsOperationRequest.cpp new file mode 100644 index 000000000000..127675dbffd2 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/SparseNullsOperationRequest.cpp @@ -0,0 +1,57 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +#include + +using namespace Aws::JsonProtocol::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +Aws::String SparseNullsOperationRequest::SerializePayload() const { + JsonValue payload; + + if (m_sparseStringListHasBeenSet) { + Aws::Utils::Array sparseStringListJsonList(m_sparseStringList.size()); + for (unsigned sparseStringListIndex = 0; sparseStringListIndex < sparseStringListJsonList.GetLength(); ++sparseStringListIndex) { + if (!m_sparseStringList[sparseStringListIndex].has_value()) { + sparseStringListJsonList[sparseStringListIndex].AsNull(); + continue; + } + sparseStringListJsonList[sparseStringListIndex].AsString(*m_sparseStringList[sparseStringListIndex]); + } + payload.WithArray("sparseStringList", std::move(sparseStringListJsonList)); + } + + if (m_sparseStringMapHasBeenSet) { + JsonValue sparseStringMapJsonMap; + for (auto& sparseStringMapItem : m_sparseStringMap) { + if (!sparseStringMapItem.second.has_value()) { + sparseStringMapJsonMap.WithNull(sparseStringMapItem.first); + continue; + } + sparseStringMapJsonMap.WithString(sparseStringMapItem.first, *sparseStringMapItem.second); + } + payload.WithObject("sparseStringMap", std::move(sparseStringMapJsonMap)); + } + + return payload.View().WriteReadable(); +} + +Aws::Http::HeaderValueCollection SparseNullsOperationRequest::GetRequestSpecificHeaders() const { + Aws::Http::HeaderValueCollection headers; + headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "JsonProtocol.SparseNullsOperation")); + Aws::StringStream ss; + if (m_requestIdHasBeenSet) { + ss << m_requestId; + headers.emplace("x-amzn-requestid", ss.str()); + ss.str(""); + } + + return headers; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/SparseNullsOperationResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/SparseNullsOperationResult.cpp new file mode 100644 index 000000000000..0232e130ea9d --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-json-protocol/source/model/SparseNullsOperationResult.cpp @@ -0,0 +1,56 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::JsonProtocol::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; +using namespace Aws; + +SparseNullsOperationResult::SparseNullsOperationResult(const Aws::AmazonWebServiceResult& result) { *this = result; } + +SparseNullsOperationResult& SparseNullsOperationResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + JsonView jsonValue = result.GetPayload().View(); + if (jsonValue.ValueExists("sparseStringList")) { + Aws::Utils::Array sparseStringListJsonList = jsonValue.GetArray("sparseStringList"); + for (unsigned sparseStringListIndex = 0; sparseStringListIndex < sparseStringListJsonList.GetLength(); ++sparseStringListIndex) { + if (sparseStringListJsonList[sparseStringListIndex].IsNull()) { + m_sparseStringList.emplace_back(); + continue; + } + m_sparseStringList.emplace_back(sparseStringListJsonList[sparseStringListIndex].AsString()); + } + m_sparseStringListHasBeenSet = true; + } + if (jsonValue.ValueExists("sparseStringMap")) { + Aws::Map sparseStringMapJsonMap = jsonValue.GetObject("sparseStringMap").GetAllObjects(); + for (auto& sparseStringMapItem : sparseStringMapJsonMap) { + if (sparseStringMapItem.second.IsNull()) { + m_sparseStringMap[sparseStringMapItem.first]; + continue; + } + m_sparseStringMap[sparseStringMapItem.first] = sparseStringMapItem.second.AsString(); + } + m_sparseStringMapHasBeenSet = true; + } + + const auto& headers = result.GetHeaderValueCollection(); + const auto& requestIdIter = headers.find("x-amzn-requestid"); + if (requestIdIter != headers.end()) { + m_requestId = requestIdIter->second; + m_requestIdHasBeenSet = true; + } + + return *this; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/RestJsonProtocolClient.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/RestJsonProtocolClient.h index 751a868a9faf..b34544147821 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/RestJsonProtocolClient.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/RestJsonProtocolClient.h @@ -13,9 +13,6 @@ namespace Aws { namespace RestJsonProtocol { -/** - *

A REST JSON service that sends JSON requests and responses.

- */ class AWS_RESTJSONPROTOCOL_API RestJsonProtocolClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods { public: @@ -490,6 +487,34 @@ class AWS_RESTJSONPROTOCOL_API RestJsonProtocolClient : public Aws::Client::AWSJ return SubmitAsync(&RestJsonProtocolClient::HttpChecksumRequired, request, handler, context); } + /** + *

Clients that perform this test extract all headers from the + * response.

See Also:

AWS + * API Reference

+ */ + virtual Model::HttpEmptyPrefixHeadersOutcome HttpEmptyPrefixHeaders(const Model::HttpEmptyPrefixHeadersRequest& request = {}) const; + + /** + * A Callable wrapper for HttpEmptyPrefixHeaders that returns a future to the operation so that it can be executed in parallel to other + * requests. + */ + template + Model::HttpEmptyPrefixHeadersOutcomeCallable HttpEmptyPrefixHeadersCallable(const HttpEmptyPrefixHeadersRequestT& request = {}) const { + return SubmitCallable(&RestJsonProtocolClient::HttpEmptyPrefixHeaders, request); + } + + /** + * An Async wrapper for HttpEmptyPrefixHeaders that queues the request into a thread executor and triggers associated callback when + * operation has finished. + */ + template + void HttpEmptyPrefixHeadersAsync(const HttpEmptyPrefixHeadersResponseReceivedHandler& handler, + const std::shared_ptr& context = nullptr, + const HttpEmptyPrefixHeadersRequestT& request = {}) const { + return SubmitAsync(&RestJsonProtocolClient::HttpEmptyPrefixHeaders, request, handler, context); + } + /** * */ @@ -658,6 +683,36 @@ class AWS_RESTJSONPROTOCOL_API RestJsonProtocolClient : public Aws::Client::AWSJ return SubmitAsync(&RestJsonProtocolClient::HttpPrefixHeadersInResponse, request, handler, context); } + /** + *

This example tests httpQueryParams when no other query parameters + * exist.

See Also:

AWS + * API Reference

+ */ + virtual Model::HttpQueryParamsOnlyOperationOutcome HttpQueryParamsOnlyOperation( + const Model::HttpQueryParamsOnlyOperationRequest& request = {}) const; + + /** + * A Callable wrapper for HttpQueryParamsOnlyOperation that returns a future to the operation so that it can be executed in parallel to + * other requests. + */ + template + Model::HttpQueryParamsOnlyOperationOutcomeCallable HttpQueryParamsOnlyOperationCallable( + const HttpQueryParamsOnlyOperationRequestT& request = {}) const { + return SubmitCallable(&RestJsonProtocolClient::HttpQueryParamsOnlyOperation, request); + } + + /** + * An Async wrapper for HttpQueryParamsOnlyOperation that queues the request into a thread executor and triggers associated callback when + * operation has finished. + */ + template + void HttpQueryParamsOnlyOperationAsync(const HttpQueryParamsOnlyOperationResponseReceivedHandler& handler, + const std::shared_ptr& context = nullptr, + const HttpQueryParamsOnlyOperationRequestT& request = {}) const { + return SubmitAsync(&RestJsonProtocolClient::HttpQueryParamsOnlyOperation, request, handler, context); + } + /** * */ @@ -1540,6 +1595,56 @@ class AWS_RESTJSONPROTOCOL_API RestJsonProtocolClient : public Aws::Client::AWSJ return SubmitAsync(&RestJsonProtocolClient::SimpleScalarProperties, request, handler, context); } + /** + * + */ + virtual Model::SparseJsonListsOutcome SparseJsonLists(const Model::SparseJsonListsRequest& request = {}) const; + + /** + * A Callable wrapper for SparseJsonLists that returns a future to the operation so that it can be executed in parallel to other requests. + */ + template + Model::SparseJsonListsOutcomeCallable SparseJsonListsCallable(const SparseJsonListsRequestT& request = {}) const { + return SubmitCallable(&RestJsonProtocolClient::SparseJsonLists, request); + } + + /** + * An Async wrapper for SparseJsonLists that queues the request into a thread executor and triggers associated callback when operation has + * finished. + */ + template + void SparseJsonListsAsync(const SparseJsonListsResponseReceivedHandler& handler, + const std::shared_ptr& context = nullptr, + const SparseJsonListsRequestT& request = {}) const { + return SubmitAsync(&RestJsonProtocolClient::SparseJsonLists, request, handler, context); + } + + /** + *

This example tests sparse map serialization.

See Also:

AWS + * API Reference

+ */ + virtual Model::SparseJsonMapsOutcome SparseJsonMaps(const Model::SparseJsonMapsRequest& request = {}) const; + + /** + * A Callable wrapper for SparseJsonMaps that returns a future to the operation so that it can be executed in parallel to other requests. + */ + template + Model::SparseJsonMapsOutcomeCallable SparseJsonMapsCallable(const SparseJsonMapsRequestT& request = {}) const { + return SubmitCallable(&RestJsonProtocolClient::SparseJsonMaps, request); + } + + /** + * An Async wrapper for SparseJsonMaps that queues the request into a thread executor and triggers associated callback when operation has + * finished. + */ + template + void SparseJsonMapsAsync(const SparseJsonMapsResponseReceivedHandler& handler, + const std::shared_ptr& context = nullptr, + const SparseJsonMapsRequestT& request = {}) const { + return SubmitAsync(&RestJsonProtocolClient::SparseJsonMaps, request, handler, context); + } + /** *

This example operation serializes a structure in the HTTP body.

It * should ensure Content-Type: application/json is used in all requests and that an @@ -1806,8 +1911,8 @@ class AWS_RESTJSONPROTOCOL_API RestJsonProtocolClient : public Aws::Client::AWSJ return SubmitAsync(&RestJsonProtocolClient::UnitInputAndOutput, request, handler, context); } - void OverrideEndpoint(const Aws::String& endpoint); - std::shared_ptr& accessEndpointProvider(); + virtual void OverrideEndpoint(const Aws::String& endpoint); + virtual std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/RestJsonProtocolServiceClientModel.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/RestJsonProtocolServiceClientModel.h index 4a8b8df6e875..f617eb104184 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/RestJsonProtocolServiceClientModel.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/RestJsonProtocolServiceClientModel.h @@ -42,6 +42,8 @@ #include #include #include +#include +#include #include #include #include @@ -54,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -101,6 +104,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -166,12 +173,14 @@ class FractionalSecondsRequest; class GreetingWithErrorsRequest; class HostWithPathOperationRequest; class HttpChecksumRequiredRequest; +class HttpEmptyPrefixHeadersRequest; class HttpEnumPayloadRequest; class HttpPayloadTraitsRequest; class HttpPayloadWithStructureRequest; class HttpPayloadWithUnionRequest; class HttpPrefixHeadersRequest; class HttpPrefixHeadersInResponseRequest; +class HttpQueryParamsOnlyOperationRequest; class HttpRequestWithFloatLabelsRequest; class HttpRequestWithGreedyLabelInPathRequest; class HttpRequestWithLabelsRequest; @@ -204,6 +213,8 @@ class RecursiveShapesRequest; class ResponseCodeHttpFallbackRequest; class ResponseCodeRequiredRequest; class SimpleScalarPropertiesRequest; +class SparseJsonListsRequest; +class SparseJsonMapsRequest; class TestBodyStructureRequest; class TestGetNoInputNoPayloadRequest; class TestGetNoPayloadRequest; @@ -231,12 +242,14 @@ typedef Aws::Utils::Outcome Frac typedef Aws::Utils::Outcome GreetingWithErrorsOutcome; typedef Aws::Utils::Outcome HostWithPathOperationOutcome; typedef Aws::Utils::Outcome HttpChecksumRequiredOutcome; +typedef Aws::Utils::Outcome HttpEmptyPrefixHeadersOutcome; typedef Aws::Utils::Outcome HttpEnumPayloadOutcome; typedef Aws::Utils::Outcome HttpPayloadTraitsOutcome; typedef Aws::Utils::Outcome HttpPayloadWithStructureOutcome; typedef Aws::Utils::Outcome HttpPayloadWithUnionOutcome; typedef Aws::Utils::Outcome HttpPrefixHeadersOutcome; typedef Aws::Utils::Outcome HttpPrefixHeadersInResponseOutcome; +typedef Aws::Utils::Outcome HttpQueryParamsOnlyOperationOutcome; typedef Aws::Utils::Outcome HttpRequestWithFloatLabelsOutcome; typedef Aws::Utils::Outcome HttpRequestWithGreedyLabelInPathOutcome; typedef Aws::Utils::Outcome HttpRequestWithLabelsOutcome; @@ -269,6 +282,8 @@ typedef Aws::Utils::Outcome Recurs typedef Aws::Utils::Outcome ResponseCodeHttpFallbackOutcome; typedef Aws::Utils::Outcome ResponseCodeRequiredOutcome; typedef Aws::Utils::Outcome SimpleScalarPropertiesOutcome; +typedef Aws::Utils::Outcome SparseJsonListsOutcome; +typedef Aws::Utils::Outcome SparseJsonMapsOutcome; typedef Aws::Utils::Outcome TestBodyStructureOutcome; typedef Aws::Utils::Outcome TestGetNoInputNoPayloadOutcome; typedef Aws::Utils::Outcome TestGetNoPayloadOutcome; @@ -296,12 +311,14 @@ typedef std::future FractionalSecondsOutcomeCallable; typedef std::future GreetingWithErrorsOutcomeCallable; typedef std::future HostWithPathOperationOutcomeCallable; typedef std::future HttpChecksumRequiredOutcomeCallable; +typedef std::future HttpEmptyPrefixHeadersOutcomeCallable; typedef std::future HttpEnumPayloadOutcomeCallable; typedef std::future HttpPayloadTraitsOutcomeCallable; typedef std::future HttpPayloadWithStructureOutcomeCallable; typedef std::future HttpPayloadWithUnionOutcomeCallable; typedef std::future HttpPrefixHeadersOutcomeCallable; typedef std::future HttpPrefixHeadersInResponseOutcomeCallable; +typedef std::future HttpQueryParamsOnlyOperationOutcomeCallable; typedef std::future HttpRequestWithFloatLabelsOutcomeCallable; typedef std::future HttpRequestWithGreedyLabelInPathOutcomeCallable; typedef std::future HttpRequestWithLabelsOutcomeCallable; @@ -334,6 +351,8 @@ typedef std::future RecursiveShapesOutcomeCallable; typedef std::future ResponseCodeHttpFallbackOutcomeCallable; typedef std::future ResponseCodeRequiredOutcomeCallable; typedef std::future SimpleScalarPropertiesOutcomeCallable; +typedef std::future SparseJsonListsOutcomeCallable; +typedef std::future SparseJsonMapsOutcomeCallable; typedef std::future TestBodyStructureOutcomeCallable; typedef std::future TestGetNoInputNoPayloadOutcomeCallable; typedef std::future TestGetNoPayloadOutcomeCallable; @@ -396,6 +415,9 @@ typedef std::function&)> HttpChecksumRequiredResponseReceivedHandler; +typedef std::function&)> + HttpEmptyPrefixHeadersResponseReceivedHandler; typedef std::function&)> HttpEnumPayloadResponseReceivedHandler; @@ -414,6 +436,10 @@ typedef std::function&)> HttpPrefixHeadersInResponseResponseReceivedHandler; +typedef std::function&)> + HttpQueryParamsOnlyOperationResponseReceivedHandler; typedef std::function&)> HttpRequestWithFloatLabelsResponseReceivedHandler; @@ -514,6 +540,12 @@ typedef std::function&)> SimpleScalarPropertiesResponseReceivedHandler; +typedef std::function&)> + SparseJsonListsResponseReceivedHandler; +typedef std::function&)> + SparseJsonMapsResponseReceivedHandler; typedef std::function&)> TestBodyStructureResponseReceivedHandler; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/AllQueryStringTypesRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/AllQueryStringTypesRequest.h index 9b86665b2f0a..4dca511b898e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/AllQueryStringTypesRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/AllQueryStringTypesRequest.h @@ -414,66 +414,66 @@ class AllQueryStringTypesRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_queryString; - bool m_queryStringHasBeenSet = false; Aws::Vector m_queryStringList; - bool m_queryStringListHasBeenSet = false; Aws::Vector m_queryStringSet; - bool m_queryStringSetHasBeenSet = false; int m_queryByte{0}; - bool m_queryByteHasBeenSet = false; int m_queryShort{0}; - bool m_queryShortHasBeenSet = false; int m_queryInteger{0}; - bool m_queryIntegerHasBeenSet = false; Aws::Vector m_queryIntegerList; - bool m_queryIntegerListHasBeenSet = false; Aws::Vector m_queryIntegerSet; - bool m_queryIntegerSetHasBeenSet = false; long long m_queryLong{0}; - bool m_queryLongHasBeenSet = false; double m_queryFloat{0.0}; - bool m_queryFloatHasBeenSet = false; double m_queryDouble{0.0}; - bool m_queryDoubleHasBeenSet = false; Aws::Vector m_queryDoubleList; - bool m_queryDoubleListHasBeenSet = false; bool m_queryBoolean{false}; - bool m_queryBooleanHasBeenSet = false; Aws::Vector m_queryBooleanList; - bool m_queryBooleanListHasBeenSet = false; Aws::Utils::DateTime m_queryTimestamp{}; - bool m_queryTimestampHasBeenSet = false; Aws::Vector m_queryTimestampList; - bool m_queryTimestampListHasBeenSet = false; FooEnum m_queryEnum{FooEnum::NOT_SET}; - bool m_queryEnumHasBeenSet = false; Aws::Vector m_queryEnumList; - bool m_queryEnumListHasBeenSet = false; int m_queryIntegerEnum{0}; - bool m_queryIntegerEnumHasBeenSet = false; Aws::Vector m_queryIntegerEnumList; - bool m_queryIntegerEnumListHasBeenSet = false; Aws::Map> m_queryParamsMapOfStringList; + bool m_queryStringHasBeenSet = false; + bool m_queryStringListHasBeenSet = false; + bool m_queryStringSetHasBeenSet = false; + bool m_queryByteHasBeenSet = false; + bool m_queryShortHasBeenSet = false; + bool m_queryIntegerHasBeenSet = false; + bool m_queryIntegerListHasBeenSet = false; + bool m_queryIntegerSetHasBeenSet = false; + bool m_queryLongHasBeenSet = false; + bool m_queryFloatHasBeenSet = false; + bool m_queryDoubleHasBeenSet = false; + bool m_queryDoubleListHasBeenSet = false; + bool m_queryBooleanHasBeenSet = false; + bool m_queryBooleanListHasBeenSet = false; + bool m_queryTimestampHasBeenSet = false; + bool m_queryTimestampListHasBeenSet = false; + bool m_queryEnumHasBeenSet = false; + bool m_queryEnumListHasBeenSet = false; + bool m_queryIntegerEnumHasBeenSet = false; + bool m_queryIntegerEnumListHasBeenSet = false; bool m_queryParamsMapOfStringListHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ComplexError.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ComplexError.h index ca877eaabbba..953e3fa795fd 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ComplexError.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ComplexError.h @@ -81,12 +81,12 @@ class ComplexError { ///@} private: Aws::String m_header; - bool m_headerHasBeenSet = false; Aws::String m_topLevel; - bool m_topLevelHasBeenSet = false; ComplexNestedErrorData m_nested; + bool m_headerHasBeenSet = false; + bool m_topLevelHasBeenSet = false; bool m_nestedHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ConstantAndVariableQueryStringRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ConstantAndVariableQueryStringRequest.h index ada1548c92c1..b837505a19eb 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ConstantAndVariableQueryStringRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ConstantAndVariableQueryStringRequest.h @@ -66,9 +66,9 @@ class ConstantAndVariableQueryStringRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_baz; - bool m_bazHasBeenSet = false; Aws::String m_maybeSet; + bool m_bazHasBeenSet = false; bool m_maybeSetHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ContentTypeParametersResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ContentTypeParametersResult.h index 5f8e3d9bb354..2356e4427d75 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ContentTypeParametersResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ContentTypeParametersResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -40,8 +41,11 @@ class ContentTypeParametersResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DatetimeOffsetsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DatetimeOffsetsResult.h index fdbe7555c9c4..4c4511837246 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DatetimeOffsetsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DatetimeOffsetsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class DatetimeOffsetsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::DateTime m_datetime{}; - bool m_datetimeHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_datetimeHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsMapValueRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsMapValueRequest.h index b30d1be7067d..b11590ab44a7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsMapValueRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsMapValueRequest.h @@ -71,9 +71,9 @@ class DocumentTypeAsMapValueRequest : public RestJsonProtocolRequest { ///@} private: Aws::Map m_docValuedMap; - bool m_docValuedMapHasBeenSet = false; Aws::String m_requestId; + bool m_docValuedMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsMapValueResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsMapValueResult.h index 243e8a8f94fe..6373e0958425 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsMapValueResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsMapValueResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -63,11 +64,14 @@ class DocumentTypeAsMapValueResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Map m_docValuedMap; - bool m_docValuedMapHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_docValuedMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsPayloadRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsPayloadRequest.h index 70c32fd30ba0..2d540428f7a3 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsPayloadRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsPayloadRequest.h @@ -64,9 +64,9 @@ class DocumentTypeAsPayloadRequest : public RestJsonProtocolRequest { ///@} private: Aws::Utils::Document m_documentValue; - bool m_documentValueHasBeenSet = false; Aws::String m_requestId; + bool m_documentValueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsPayloadResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsPayloadResult.h index 098fb3eb1110..1b40258d8b56 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsPayloadResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeAsPayloadResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class DocumentTypeAsPayloadResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::Document m_documentValue; - bool m_documentValueHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_documentValueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeRequest.h index b8695018d09b..0bc40de752b7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeRequest.h @@ -80,12 +80,12 @@ class DocumentTypeRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_stringValue; - bool m_stringValueHasBeenSet = false; Aws::Utils::Document m_documentValue; - bool m_documentValueHasBeenSet = false; Aws::String m_requestId; + bool m_stringValueHasBeenSet = false; + bool m_documentValueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeResult.h index b26063dbb6a8..591a10ce95eb 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/DocumentTypeResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -71,14 +72,17 @@ class DocumentTypeResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_stringValue; - bool m_stringValueHasBeenSet = false; Aws::Utils::Document m_documentValue; - bool m_documentValueHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_stringValueHasBeenSet = false; + bool m_documentValueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/EmptyInputAndEmptyOutputResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/EmptyInputAndEmptyOutputResult.h index 7a036eb013bf..24f749705352 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/EmptyInputAndEmptyOutputResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/EmptyInputAndEmptyOutputResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -41,8 +42,11 @@ class EmptyInputAndEmptyOutputResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/FractionalSecondsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/FractionalSecondsResult.h index 2774023e6862..a15238547db7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/FractionalSecondsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/FractionalSecondsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class FractionalSecondsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::DateTime m_datetime{}; - bool m_datetimeHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_datetimeHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/GreetingWithErrorsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/GreetingWithErrorsResult.h index ad1f0b65a275..47fdd9471d0d 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/GreetingWithErrorsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/GreetingWithErrorsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -55,11 +56,14 @@ class GreetingWithErrorsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_greeting; - bool m_greetingHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_greetingHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpChecksumRequiredRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpChecksumRequiredRequest.h index 7f44af8cbc30..9dca2dc77487 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpChecksumRequiredRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpChecksumRequiredRequest.h @@ -65,9 +65,9 @@ class HttpChecksumRequiredRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::String m_requestId; + bool m_fooHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpChecksumRequiredResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpChecksumRequiredResult.h index ff3c610b4ab8..5ab987e0d275 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpChecksumRequiredResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpChecksumRequiredResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -55,11 +56,14 @@ class HttpChecksumRequiredResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_fooHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEmptyPrefixHeadersRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEmptyPrefixHeadersRequest.h new file mode 100644 index 000000000000..03117d2df05e --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEmptyPrefixHeadersRequest.h @@ -0,0 +1,81 @@ +/** + * 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 RestJsonProtocol { +namespace Model { + +/** + */ +class HttpEmptyPrefixHeadersRequest : public RestJsonProtocolRequest { + public: + AWS_RESTJSONPROTOCOL_API HttpEmptyPrefixHeadersRequest() = 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 "HttpEmptyPrefixHeaders"; } + + AWS_RESTJSONPROTOCOL_API Aws::String SerializePayload() const override; + + AWS_RESTJSONPROTOCOL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + ///@{ + + inline const Aws::Map& GetPrefixHeaders() const { return m_prefixHeaders; } + inline bool PrefixHeadersHasBeenSet() const { return m_prefixHeadersHasBeenSet; } + template > + void SetPrefixHeaders(PrefixHeadersT&& value) { + m_prefixHeadersHasBeenSet = true; + m_prefixHeaders = std::forward(value); + } + template > + HttpEmptyPrefixHeadersRequest& WithPrefixHeaders(PrefixHeadersT&& value) { + SetPrefixHeaders(std::forward(value)); + return *this; + } + template + HttpEmptyPrefixHeadersRequest& AddPrefixHeaders(PrefixHeadersKeyT&& key, PrefixHeadersValueT&& value) { + m_prefixHeadersHasBeenSet = true; + m_prefixHeaders.emplace(std::forward(key), std::forward(value)); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetSpecificHeader() const { return m_specificHeader; } + inline bool SpecificHeaderHasBeenSet() const { return m_specificHeaderHasBeenSet; } + template + void SetSpecificHeader(SpecificHeaderT&& value) { + m_specificHeaderHasBeenSet = true; + m_specificHeader = std::forward(value); + } + template + HttpEmptyPrefixHeadersRequest& WithSpecificHeader(SpecificHeaderT&& value) { + SetSpecificHeader(std::forward(value)); + return *this; + } + ///@} + private: + Aws::Map m_prefixHeaders; + + Aws::String m_specificHeader; + bool m_prefixHeadersHasBeenSet = false; + bool m_specificHeaderHasBeenSet = false; +}; + +} // namespace Model +} // namespace RestJsonProtocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEmptyPrefixHeadersResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEmptyPrefixHeadersResult.h new file mode 100644 index 000000000000..26d55e66657b --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEmptyPrefixHeadersResult.h @@ -0,0 +1,97 @@ +/** + * 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 { +template +class AmazonWebServiceResult; + +namespace Utils { +namespace Json { +class JsonValue; +} // namespace Json +} // namespace Utils +namespace RestJsonProtocol { +namespace Model { +class HttpEmptyPrefixHeadersResult { + public: + AWS_RESTJSONPROTOCOL_API HttpEmptyPrefixHeadersResult() = default; + AWS_RESTJSONPROTOCOL_API HttpEmptyPrefixHeadersResult(const Aws::AmazonWebServiceResult& result); + AWS_RESTJSONPROTOCOL_API HttpEmptyPrefixHeadersResult& operator=(const Aws::AmazonWebServiceResult& result); + + ///@{ + + inline const Aws::Map& GetPrefixHeaders() const { return m_prefixHeaders; } + template > + void SetPrefixHeaders(PrefixHeadersT&& value) { + m_prefixHeadersHasBeenSet = true; + m_prefixHeaders = std::forward(value); + } + template > + HttpEmptyPrefixHeadersResult& WithPrefixHeaders(PrefixHeadersT&& value) { + SetPrefixHeaders(std::forward(value)); + return *this; + } + template + HttpEmptyPrefixHeadersResult& AddPrefixHeaders(PrefixHeadersKeyT&& key, PrefixHeadersValueT&& value) { + m_prefixHeadersHasBeenSet = true; + m_prefixHeaders.emplace(std::forward(key), std::forward(value)); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetSpecificHeader() const { return m_specificHeader; } + template + void SetSpecificHeader(SpecificHeaderT&& value) { + m_specificHeaderHasBeenSet = true; + m_specificHeader = std::forward(value); + } + template + HttpEmptyPrefixHeadersResult& WithSpecificHeader(SpecificHeaderT&& value) { + SetSpecificHeader(std::forward(value)); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetRequestId() const { return m_requestId; } + template + void SetRequestId(RequestIdT&& value) { + m_requestIdHasBeenSet = true; + m_requestId = std::forward(value); + } + template + HttpEmptyPrefixHeadersResult& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + + private: + Aws::Map m_prefixHeaders; + + Aws::String m_specificHeader; + + Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_prefixHeadersHasBeenSet = false; + bool m_specificHeaderHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace RestJsonProtocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEnumPayloadRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEnumPayloadRequest.h index a9e1570e232c..73a0de6e5973 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEnumPayloadRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEnumPayloadRequest.h @@ -62,9 +62,9 @@ class HttpEnumPayloadRequest : public RestJsonProtocolRequest { ///@} private: StringEnum m_payload{StringEnum::NOT_SET}; - bool m_payloadHasBeenSet = false; Aws::String m_requestId; + bool m_payloadHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEnumPayloadResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEnumPayloadResult.h index 372ec5dd0e9a..cb34280f55ae 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEnumPayloadResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpEnumPayloadResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -54,11 +55,14 @@ class HttpEnumPayloadResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: StringEnum m_payload{StringEnum::NOT_SET}; - bool m_payloadHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_payloadHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadTraitsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadTraitsRequest.h index 1ebe75bfa15e..26af1538689f 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadTraitsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadTraitsRequest.h @@ -62,9 +62,9 @@ class HttpPayloadTraitsRequest : public StreamingRestJsonProtocolRequest { ///@} private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::String m_requestId; + bool m_fooHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadTraitsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadTraitsResult.h index 6967184f0521..c4cbc03bce8a 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadTraitsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadTraitsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -66,14 +67,17 @@ class HttpPayloadTraitsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::Utils::Stream::ResponseStream m_blob{}; - bool m_blobHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_fooHasBeenSet = false; + bool m_blobHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithStructureRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithStructureRequest.h index 69706862cc0e..7497a62ae708 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithStructureRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithStructureRequest.h @@ -64,9 +64,9 @@ class HttpPayloadWithStructureRequest : public RestJsonProtocolRequest { ///@} private: NestedPayload m_nested; - bool m_nestedHasBeenSet = false; Aws::String m_requestId; + bool m_nestedHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithStructureResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithStructureResult.h index aaefce33bbbb..531e22872da9 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithStructureResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithStructureResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -57,11 +58,14 @@ class HttpPayloadWithStructureResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: NestedPayload m_nested; - bool m_nestedHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_nestedHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithUnionRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithUnionRequest.h index cdab398b498f..17eb7e8d2f18 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithUnionRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithUnionRequest.h @@ -64,9 +64,9 @@ class HttpPayloadWithUnionRequest : public RestJsonProtocolRequest { ///@} private: UnionPayload m_nested; - bool m_nestedHasBeenSet = false; Aws::String m_requestId; + bool m_nestedHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithUnionResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithUnionResult.h index 4b677be5bde5..6edad3fb70ca 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithUnionResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPayloadWithUnionResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class HttpPayloadWithUnionResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: UnionPayload m_nested; - bool m_nestedHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_nestedHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersInResponseResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersInResponseResult.h index d64dc49b95a6..f4b4189e2457 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersInResponseResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersInResponseResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -63,11 +64,14 @@ class HttpPrefixHeadersInResponseResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Map m_prefixHeaders; - bool m_prefixHeadersHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_prefixHeadersHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersRequest.h index 154d208adaea..d2fa727ff227 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersRequest.h @@ -70,9 +70,9 @@ class HttpPrefixHeadersRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::Map m_fooMap; + bool m_fooHasBeenSet = false; bool m_fooMapHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersResult.h index 669442a079f4..356d25ae0d0a 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpPrefixHeadersResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -77,14 +78,17 @@ class HttpPrefixHeadersResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::Map m_fooMap; - bool m_fooMapHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_fooHasBeenSet = false; + bool m_fooMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpQueryParamsOnlyOperationRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpQueryParamsOnlyOperationRequest.h new file mode 100644 index 000000000000..0502da13a233 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpQueryParamsOnlyOperationRequest.h @@ -0,0 +1,65 @@ +/** + * 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 Http { +class URI; +} // namespace Http +namespace RestJsonProtocol { +namespace Model { + +/** + */ +class HttpQueryParamsOnlyOperationRequest : public RestJsonProtocolRequest { + public: + AWS_RESTJSONPROTOCOL_API HttpQueryParamsOnlyOperationRequest() = 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 "HttpQueryParamsOnlyOperation"; } + + AWS_RESTJSONPROTOCOL_API Aws::String SerializePayload() const override; + + AWS_RESTJSONPROTOCOL_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; + + ///@{ + + inline const Aws::Map& GetQueryMap() const { return m_queryMap; } + inline bool QueryMapHasBeenSet() const { return m_queryMapHasBeenSet; } + template > + void SetQueryMap(QueryMapT&& value) { + m_queryMapHasBeenSet = true; + m_queryMap = std::forward(value); + } + template > + HttpQueryParamsOnlyOperationRequest& WithQueryMap(QueryMapT&& value) { + SetQueryMap(std::forward(value)); + return *this; + } + template + HttpQueryParamsOnlyOperationRequest& AddQueryMap(QueryMapKeyT&& key, QueryMapValueT&& value) { + m_queryMapHasBeenSet = true; + m_queryMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + ///@} + private: + Aws::Map m_queryMap; + bool m_queryMapHasBeenSet = false; +}; + +} // namespace Model +} // namespace RestJsonProtocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithFloatLabelsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithFloatLabelsRequest.h index 0d4294c376b3..a200f32e4d8a 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithFloatLabelsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithFloatLabelsRequest.h @@ -54,9 +54,9 @@ class HttpRequestWithFloatLabelsRequest : public RestJsonProtocolRequest { ///@} private: double m_float{0.0}; - bool m_floatHasBeenSet = false; double m_double{0.0}; + bool m_floatHasBeenSet = false; bool m_doubleHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithGreedyLabelInPathRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithGreedyLabelInPathRequest.h index 223a2fcd934d..e3a151315938 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithGreedyLabelInPathRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithGreedyLabelInPathRequest.h @@ -61,9 +61,9 @@ class HttpRequestWithGreedyLabelInPathRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::String m_baz; + bool m_fooHasBeenSet = false; bool m_bazHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithLabelsAndTimestampFormatRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithLabelsAndTimestampFormatRequest.h index 3fee9760023d..1427a4a1ce34 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithLabelsAndTimestampFormatRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithLabelsAndTimestampFormatRequest.h @@ -141,24 +141,24 @@ class HttpRequestWithLabelsAndTimestampFormatRequest : public RestJsonProtocolRe ///@} private: Aws::Utils::DateTime m_memberEpochSeconds{}; - bool m_memberEpochSecondsHasBeenSet = false; Aws::Utils::DateTime m_memberHttpDate{}; - bool m_memberHttpDateHasBeenSet = false; Aws::Utils::DateTime m_memberDateTime{}; - bool m_memberDateTimeHasBeenSet = false; Aws::Utils::DateTime m_defaultFormat{}; - bool m_defaultFormatHasBeenSet = false; Aws::Utils::DateTime m_targetEpochSeconds{}; - bool m_targetEpochSecondsHasBeenSet = false; Aws::Utils::DateTime m_targetHttpDate{}; - bool m_targetHttpDateHasBeenSet = false; Aws::Utils::DateTime m_targetDateTime{}; + bool m_memberEpochSecondsHasBeenSet = false; + bool m_memberHttpDateHasBeenSet = false; + bool m_memberDateTimeHasBeenSet = false; + bool m_defaultFormatHasBeenSet = false; + bool m_targetEpochSecondsHasBeenSet = false; + bool m_targetHttpDateHasBeenSet = false; bool m_targetDateTimeHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithLabelsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithLabelsRequest.h index 48fe954a2d90..81ffc38047f8 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithLabelsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpRequestWithLabelsRequest.h @@ -151,27 +151,27 @@ class HttpRequestWithLabelsRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_string; - bool m_stringHasBeenSet = false; int m_short{0}; - bool m_shortHasBeenSet = false; int m_integer{0}; - bool m_integerHasBeenSet = false; long long m_long{0}; - bool m_longHasBeenSet = false; double m_float{0.0}; - bool m_floatHasBeenSet = false; double m_double{0.0}; - bool m_doubleHasBeenSet = false; bool m_boolean{false}; - bool m_booleanHasBeenSet = false; Aws::Utils::DateTime m_timestamp{}; + bool m_stringHasBeenSet = false; + bool m_shortHasBeenSet = false; + bool m_integerHasBeenSet = false; + bool m_longHasBeenSet = false; + bool m_floatHasBeenSet = false; + bool m_doubleHasBeenSet = false; + bool m_booleanHasBeenSet = false; bool m_timestampHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpResponseCodeResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpResponseCodeResult.h index 7a6e48a9e212..03d74cfa7e71 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpResponseCodeResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpResponseCodeResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -53,11 +54,14 @@ class HttpResponseCodeResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: int m_status{0}; - bool m_statusHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_statusHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpStringPayloadResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpStringPayloadResult.h index bee1bd6f429a..89d94bb142d9 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpStringPayloadResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/HttpStringPayloadResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -50,11 +51,14 @@ class HttpStringPayloadResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::Stream::ResponseStream m_payload; - bool m_payloadHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_payloadHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/IgnoreQueryParamsInResponseResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/IgnoreQueryParamsInResponseResult.h index ec2b957bae9b..adc0a55048d5 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/IgnoreQueryParamsInResponseResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/IgnoreQueryParamsInResponseResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -56,11 +57,14 @@ class IgnoreQueryParamsInResponseResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_baz; - bool m_bazHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_bazHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/InputAndOutputWithHeadersRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/InputAndOutputWithHeadersRequest.h index 3397809b93de..791b5260300e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/InputAndOutputWithHeadersRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/InputAndOutputWithHeadersRequest.h @@ -356,60 +356,60 @@ class InputAndOutputWithHeadersRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_headerString; - bool m_headerStringHasBeenSet = false; int m_headerByte{0}; - bool m_headerByteHasBeenSet = false; int m_headerShort{0}; - bool m_headerShortHasBeenSet = false; int m_headerInteger{0}; - bool m_headerIntegerHasBeenSet = false; long long m_headerLong{0}; - bool m_headerLongHasBeenSet = false; double m_headerFloat{0.0}; - bool m_headerFloatHasBeenSet = false; double m_headerDouble{0.0}; - bool m_headerDoubleHasBeenSet = false; bool m_headerTrueBool{false}; - bool m_headerTrueBoolHasBeenSet = false; bool m_headerFalseBool{false}; - bool m_headerFalseBoolHasBeenSet = false; Aws::Vector m_headerStringList; - bool m_headerStringListHasBeenSet = false; Aws::Vector m_headerStringSet; - bool m_headerStringSetHasBeenSet = false; Aws::Vector m_headerIntegerList; - bool m_headerIntegerListHasBeenSet = false; Aws::Vector m_headerBooleanList; - bool m_headerBooleanListHasBeenSet = false; Aws::Vector m_headerTimestampList; - bool m_headerTimestampListHasBeenSet = false; FooEnum m_headerEnum{FooEnum::NOT_SET}; - bool m_headerEnumHasBeenSet = false; Aws::Vector m_headerEnumList; - bool m_headerEnumListHasBeenSet = false; int m_headerIntegerEnum{0}; - bool m_headerIntegerEnumHasBeenSet = false; Aws::Vector m_headerIntegerEnumList; - bool m_headerIntegerEnumListHasBeenSet = false; Aws::String m_requestId; + bool m_headerStringHasBeenSet = false; + bool m_headerByteHasBeenSet = false; + bool m_headerShortHasBeenSet = false; + bool m_headerIntegerHasBeenSet = false; + bool m_headerLongHasBeenSet = false; + bool m_headerFloatHasBeenSet = false; + bool m_headerDoubleHasBeenSet = false; + bool m_headerTrueBoolHasBeenSet = false; + bool m_headerFalseBoolHasBeenSet = false; + bool m_headerStringListHasBeenSet = false; + bool m_headerStringSetHasBeenSet = false; + bool m_headerIntegerListHasBeenSet = false; + bool m_headerBooleanListHasBeenSet = false; + bool m_headerTimestampListHasBeenSet = false; + bool m_headerEnumHasBeenSet = false; + bool m_headerEnumListHasBeenSet = false; + bool m_headerIntegerEnumHasBeenSet = false; + bool m_headerIntegerEnumListHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/InputAndOutputWithHeadersResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/InputAndOutputWithHeadersResult.h index b09cdfa95601..b166a0d095d1 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/InputAndOutputWithHeadersResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/InputAndOutputWithHeadersResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -332,62 +333,65 @@ class InputAndOutputWithHeadersResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_headerString; - bool m_headerStringHasBeenSet = false; int m_headerByte{0}; - bool m_headerByteHasBeenSet = false; int m_headerShort{0}; - bool m_headerShortHasBeenSet = false; int m_headerInteger{0}; - bool m_headerIntegerHasBeenSet = false; long long m_headerLong{0}; - bool m_headerLongHasBeenSet = false; double m_headerFloat{0.0}; - bool m_headerFloatHasBeenSet = false; double m_headerDouble{0.0}; - bool m_headerDoubleHasBeenSet = false; bool m_headerTrueBool{false}; - bool m_headerTrueBoolHasBeenSet = false; bool m_headerFalseBool{false}; - bool m_headerFalseBoolHasBeenSet = false; Aws::Vector m_headerStringList; - bool m_headerStringListHasBeenSet = false; Aws::Vector m_headerStringSet; - bool m_headerStringSetHasBeenSet = false; Aws::Vector m_headerIntegerList; - bool m_headerIntegerListHasBeenSet = false; Aws::Vector m_headerBooleanList; - bool m_headerBooleanListHasBeenSet = false; Aws::Vector m_headerTimestampList; - bool m_headerTimestampListHasBeenSet = false; FooEnum m_headerEnum{FooEnum::NOT_SET}; - bool m_headerEnumHasBeenSet = false; Aws::Vector m_headerEnumList; - bool m_headerEnumListHasBeenSet = false; int m_headerIntegerEnum{0}; - bool m_headerIntegerEnumHasBeenSet = false; Aws::Vector m_headerIntegerEnumList; - bool m_headerIntegerEnumListHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_headerStringHasBeenSet = false; + bool m_headerByteHasBeenSet = false; + bool m_headerShortHasBeenSet = false; + bool m_headerIntegerHasBeenSet = false; + bool m_headerLongHasBeenSet = false; + bool m_headerFloatHasBeenSet = false; + bool m_headerDoubleHasBeenSet = false; + bool m_headerTrueBoolHasBeenSet = false; + bool m_headerFalseBoolHasBeenSet = false; + bool m_headerStringListHasBeenSet = false; + bool m_headerStringSetHasBeenSet = false; + bool m_headerIntegerListHasBeenSet = false; + bool m_headerBooleanListHasBeenSet = false; + bool m_headerTimestampListHasBeenSet = false; + bool m_headerEnumHasBeenSet = false; + bool m_headerEnumListHasBeenSet = false; + bool m_headerIntegerEnumHasBeenSet = false; + bool m_headerIntegerEnumListHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonBlobsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonBlobsRequest.h index 5c108b27b943..e5c16e1c8ad0 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonBlobsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonBlobsRequest.h @@ -64,9 +64,9 @@ class JsonBlobsRequest : public RestJsonProtocolRequest { ///@} private: Aws::Utils::ByteBuffer m_data{}; - bool m_dataHasBeenSet = false; Aws::String m_requestId; + bool m_dataHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonBlobsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonBlobsResult.h index 3817c22bed5e..a5c71e4d25db 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonBlobsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonBlobsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class JsonBlobsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::ByteBuffer m_data{}; - bool m_dataHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_dataHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonEnumsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonEnumsRequest.h index 2f92939ab089..167f523c7e9e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonEnumsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonEnumsRequest.h @@ -155,24 +155,24 @@ class JsonEnumsRequest : public RestJsonProtocolRequest { ///@} private: FooEnum m_fooEnum1{FooEnum::NOT_SET}; - bool m_fooEnum1HasBeenSet = false; FooEnum m_fooEnum2{FooEnum::NOT_SET}; - bool m_fooEnum2HasBeenSet = false; FooEnum m_fooEnum3{FooEnum::NOT_SET}; - bool m_fooEnum3HasBeenSet = false; Aws::Vector m_fooEnumList; - bool m_fooEnumListHasBeenSet = false; Aws::Vector m_fooEnumSet; - bool m_fooEnumSetHasBeenSet = false; Aws::Map m_fooEnumMap; - bool m_fooEnumMapHasBeenSet = false; Aws::String m_requestId; + bool m_fooEnum1HasBeenSet = false; + bool m_fooEnum2HasBeenSet = false; + bool m_fooEnum3HasBeenSet = false; + bool m_fooEnumListHasBeenSet = false; + bool m_fooEnumSetHasBeenSet = false; + bool m_fooEnumMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonEnumsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonEnumsResult.h index e79eed9de6d5..d50f48f4cd90 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonEnumsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonEnumsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -142,26 +143,29 @@ class JsonEnumsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: FooEnum m_fooEnum1{FooEnum::NOT_SET}; - bool m_fooEnum1HasBeenSet = false; FooEnum m_fooEnum2{FooEnum::NOT_SET}; - bool m_fooEnum2HasBeenSet = false; FooEnum m_fooEnum3{FooEnum::NOT_SET}; - bool m_fooEnum3HasBeenSet = false; Aws::Vector m_fooEnumList; - bool m_fooEnumListHasBeenSet = false; Aws::Vector m_fooEnumSet; - bool m_fooEnumSetHasBeenSet = false; Aws::Map m_fooEnumMap; - bool m_fooEnumMapHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_fooEnum1HasBeenSet = false; + bool m_fooEnum2HasBeenSet = false; + bool m_fooEnum3HasBeenSet = false; + bool m_fooEnumListHasBeenSet = false; + bool m_fooEnumSetHasBeenSet = false; + bool m_fooEnumMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonIntEnumsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonIntEnumsRequest.h index 8df40bc17f4c..7b2914041c66 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonIntEnumsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonIntEnumsRequest.h @@ -154,24 +154,24 @@ class JsonIntEnumsRequest : public RestJsonProtocolRequest { ///@} private: int m_integerEnum1{0}; - bool m_integerEnum1HasBeenSet = false; int m_integerEnum2{0}; - bool m_integerEnum2HasBeenSet = false; int m_integerEnum3{0}; - bool m_integerEnum3HasBeenSet = false; Aws::Vector m_integerEnumList; - bool m_integerEnumListHasBeenSet = false; Aws::Vector m_integerEnumSet; - bool m_integerEnumSetHasBeenSet = false; Aws::Map m_integerEnumMap; - bool m_integerEnumMapHasBeenSet = false; Aws::String m_requestId; + bool m_integerEnum1HasBeenSet = false; + bool m_integerEnum2HasBeenSet = false; + bool m_integerEnum3HasBeenSet = false; + bool m_integerEnumListHasBeenSet = false; + bool m_integerEnumSetHasBeenSet = false; + bool m_integerEnumMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonIntEnumsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonIntEnumsResult.h index bc015bcf2cac..c582ced12ee1 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonIntEnumsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonIntEnumsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -141,26 +142,29 @@ class JsonIntEnumsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: int m_integerEnum1{0}; - bool m_integerEnum1HasBeenSet = false; int m_integerEnum2{0}; - bool m_integerEnum2HasBeenSet = false; int m_integerEnum3{0}; - bool m_integerEnum3HasBeenSet = false; Aws::Vector m_integerEnumList; - bool m_integerEnumListHasBeenSet = false; Aws::Vector m_integerEnumSet; - bool m_integerEnumSetHasBeenSet = false; Aws::Map m_integerEnumMap; - bool m_integerEnumMapHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_integerEnum1HasBeenSet = false; + bool m_integerEnum2HasBeenSet = false; + bool m_integerEnum3HasBeenSet = false; + bool m_integerEnumListHasBeenSet = false; + bool m_integerEnumSetHasBeenSet = false; + bool m_integerEnumMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonListsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonListsRequest.h index af858b6d72b0..cc4452206203 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonListsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonListsRequest.h @@ -245,33 +245,33 @@ class JsonListsRequest : public RestJsonProtocolRequest { ///@} private: Aws::Vector m_stringList; - bool m_stringListHasBeenSet = false; Aws::Vector m_stringSet; - bool m_stringSetHasBeenSet = false; Aws::Vector m_integerList; - bool m_integerListHasBeenSet = false; Aws::Vector m_booleanList; - bool m_booleanListHasBeenSet = false; Aws::Vector m_timestampList; - bool m_timestampListHasBeenSet = false; Aws::Vector m_enumList; - bool m_enumListHasBeenSet = false; Aws::Vector m_intEnumList; - bool m_intEnumListHasBeenSet = false; Aws::Vector> m_nestedStringList; - bool m_nestedStringListHasBeenSet = false; Aws::Vector m_structureList; - bool m_structureListHasBeenSet = false; Aws::String m_requestId; + bool m_stringListHasBeenSet = false; + bool m_stringSetHasBeenSet = false; + bool m_integerListHasBeenSet = false; + bool m_booleanListHasBeenSet = false; + bool m_timestampListHasBeenSet = false; + bool m_enumListHasBeenSet = false; + bool m_intEnumListHasBeenSet = false; + bool m_nestedStringListHasBeenSet = false; + bool m_structureListHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonListsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonListsResult.h index ff686f1f8a3a..bb4caef73c80 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonListsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonListsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -229,35 +230,38 @@ class JsonListsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Vector m_stringList; - bool m_stringListHasBeenSet = false; Aws::Vector m_stringSet; - bool m_stringSetHasBeenSet = false; Aws::Vector m_integerList; - bool m_integerListHasBeenSet = false; Aws::Vector m_booleanList; - bool m_booleanListHasBeenSet = false; Aws::Vector m_timestampList; - bool m_timestampListHasBeenSet = false; Aws::Vector m_enumList; - bool m_enumListHasBeenSet = false; Aws::Vector m_intEnumList; - bool m_intEnumListHasBeenSet = false; Aws::Vector> m_nestedStringList; - bool m_nestedStringListHasBeenSet = false; Aws::Vector m_structureList; - bool m_structureListHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_stringListHasBeenSet = false; + bool m_stringSetHasBeenSet = false; + bool m_integerListHasBeenSet = false; + bool m_booleanListHasBeenSet = false; + bool m_timestampListHasBeenSet = false; + bool m_enumListHasBeenSet = false; + bool m_intEnumListHasBeenSet = false; + bool m_nestedStringListHasBeenSet = false; + bool m_structureListHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonMapsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonMapsRequest.h index 9cef9dd7306d..b4d09490b6a9 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonMapsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonMapsRequest.h @@ -158,21 +158,21 @@ class JsonMapsRequest : public RestJsonProtocolRequest { ///@} private: Aws::Map m_denseStructMap; - bool m_denseStructMapHasBeenSet = false; Aws::Map m_denseNumberMap; - bool m_denseNumberMapHasBeenSet = false; Aws::Map m_denseBooleanMap; - bool m_denseBooleanMapHasBeenSet = false; Aws::Map m_denseStringMap; - bool m_denseStringMapHasBeenSet = false; Aws::Map> m_denseSetMap; - bool m_denseSetMapHasBeenSet = false; Aws::String m_requestId; + bool m_denseStructMapHasBeenSet = false; + bool m_denseNumberMapHasBeenSet = false; + bool m_denseBooleanMapHasBeenSet = false; + bool m_denseStringMapHasBeenSet = false; + bool m_denseSetMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonMapsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonMapsResult.h index 7d044b7f7f79..4518352d8658 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonMapsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonMapsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -146,23 +147,26 @@ class JsonMapsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Map m_denseStructMap; - bool m_denseStructMapHasBeenSet = false; Aws::Map m_denseNumberMap; - bool m_denseNumberMapHasBeenSet = false; Aws::Map m_denseBooleanMap; - bool m_denseBooleanMapHasBeenSet = false; Aws::Map m_denseStringMap; - bool m_denseStringMapHasBeenSet = false; Aws::Map> m_denseSetMap; - bool m_denseSetMapHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_denseStructMapHasBeenSet = false; + bool m_denseNumberMapHasBeenSet = false; + bool m_denseBooleanMapHasBeenSet = false; + bool m_denseStringMapHasBeenSet = false; + bool m_denseSetMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonTimestampsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonTimestampsRequest.h index f5e7fffb7c1f..e0c3effb402e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonTimestampsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonTimestampsRequest.h @@ -160,27 +160,27 @@ class JsonTimestampsRequest : public RestJsonProtocolRequest { ///@} private: Aws::Utils::DateTime m_normal{}; - bool m_normalHasBeenSet = false; Aws::Utils::DateTime m_dateTime{}; - bool m_dateTimeHasBeenSet = false; Aws::Utils::DateTime m_dateTimeOnTarget{}; - bool m_dateTimeOnTargetHasBeenSet = false; Aws::Utils::DateTime m_epochSeconds{}; - bool m_epochSecondsHasBeenSet = false; Aws::Utils::DateTime m_epochSecondsOnTarget{}; - bool m_epochSecondsOnTargetHasBeenSet = false; Aws::Utils::DateTime m_httpDate{}; - bool m_httpDateHasBeenSet = false; Aws::Utils::DateTime m_httpDateOnTarget{}; - bool m_httpDateOnTargetHasBeenSet = false; Aws::String m_requestId; + bool m_normalHasBeenSet = false; + bool m_dateTimeHasBeenSet = false; + bool m_dateTimeOnTargetHasBeenSet = false; + bool m_epochSecondsHasBeenSet = false; + bool m_epochSecondsOnTargetHasBeenSet = false; + bool m_httpDateHasBeenSet = false; + bool m_httpDateOnTargetHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonTimestampsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonTimestampsResult.h index 519730bec922..7d53b953fdd7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonTimestampsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonTimestampsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -146,29 +147,32 @@ class JsonTimestampsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::DateTime m_normal{}; - bool m_normalHasBeenSet = false; Aws::Utils::DateTime m_dateTime{}; - bool m_dateTimeHasBeenSet = false; Aws::Utils::DateTime m_dateTimeOnTarget{}; - bool m_dateTimeOnTargetHasBeenSet = false; Aws::Utils::DateTime m_epochSeconds{}; - bool m_epochSecondsHasBeenSet = false; Aws::Utils::DateTime m_epochSecondsOnTarget{}; - bool m_epochSecondsOnTargetHasBeenSet = false; Aws::Utils::DateTime m_httpDate{}; - bool m_httpDateHasBeenSet = false; Aws::Utils::DateTime m_httpDateOnTarget{}; - bool m_httpDateOnTargetHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_normalHasBeenSet = false; + bool m_dateTimeHasBeenSet = false; + bool m_dateTimeOnTargetHasBeenSet = false; + bool m_epochSecondsHasBeenSet = false; + bool m_epochSecondsOnTargetHasBeenSet = false; + bool m_httpDateHasBeenSet = false; + bool m_httpDateOnTargetHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonUnionsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonUnionsRequest.h index a52efabf095a..c34c30b4eae3 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonUnionsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonUnionsRequest.h @@ -68,9 +68,9 @@ class JsonUnionsRequest : public RestJsonProtocolRequest { ///@} private: MyUnion m_contents; - bool m_contentsHasBeenSet = false; Aws::String m_requestId; + bool m_contentsHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonUnionsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonUnionsResult.h index 46914bc4a155..a25814301bc7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonUnionsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/JsonUnionsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -62,11 +63,14 @@ class JsonUnionsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: MyUnion m_contents; - bool m_contentsHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_contentsHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/MediaTypeHeaderResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/MediaTypeHeaderResult.h index 88f8d347ee3f..88e242ecd755 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/MediaTypeHeaderResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/MediaTypeHeaderResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -55,11 +56,14 @@ class MediaTypeHeaderResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_json; - bool m_jsonHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_jsonHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/MyUnion.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/MyUnion.h index 9168bd4cbf3e..c85fd347de30 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/MyUnion.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/MyUnion.h @@ -206,33 +206,33 @@ class MyUnion { ///@} private: Aws::String m_stringValue; - bool m_stringValueHasBeenSet = false; bool m_booleanValue{false}; - bool m_booleanValueHasBeenSet = false; int m_numberValue{0}; - bool m_numberValueHasBeenSet = false; Aws::Utils::ByteBuffer m_blobValue{}; - bool m_blobValueHasBeenSet = false; Aws::Utils::DateTime m_timestampValue{}; - bool m_timestampValueHasBeenSet = false; FooEnum m_enumValue{FooEnum::NOT_SET}; - bool m_enumValueHasBeenSet = false; Aws::Vector m_listValue; - bool m_listValueHasBeenSet = false; Aws::Map m_mapValue; - bool m_mapValueHasBeenSet = false; GreetingStruct m_structureValue; - bool m_structureValueHasBeenSet = false; RenamedGreeting m_renamedStructureValue; + bool m_stringValueHasBeenSet = false; + bool m_booleanValueHasBeenSet = false; + bool m_numberValueHasBeenSet = false; + bool m_blobValueHasBeenSet = false; + bool m_timestampValueHasBeenSet = false; + bool m_enumValueHasBeenSet = false; + bool m_listValueHasBeenSet = false; + bool m_mapValueHasBeenSet = false; + bool m_structureValueHasBeenSet = false; bool m_renamedStructureValueHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NestedPayload.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NestedPayload.h index 81e5d28461fe..c4ea8fb77386 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NestedPayload.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NestedPayload.h @@ -59,9 +59,9 @@ class NestedPayload { ///@} private: Aws::String m_greeting; - bool m_greetingHasBeenSet = false; Aws::String m_name; + bool m_greetingHasBeenSet = false; bool m_nameHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NoInputAndOutputResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NoInputAndOutputResult.h index 5a2f33933dce..01066d39216e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NoInputAndOutputResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NoInputAndOutputResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -40,8 +41,11 @@ class NoInputAndOutputResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersClientRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersClientRequest.h index 745aaf1d9a0a..e037b8ff96ad 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersClientRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersClientRequest.h @@ -102,15 +102,15 @@ class NullAndEmptyHeadersClientRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_a; - bool m_aHasBeenSet = false; Aws::String m_b; - bool m_bHasBeenSet = false; Aws::Vector m_c; - bool m_cHasBeenSet = false; Aws::String m_requestId; + bool m_aHasBeenSet = false; + bool m_bHasBeenSet = false; + bool m_cHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersClientResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersClientResult.h index f2f3b3aba036..4da4e08698bb 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersClientResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersClientResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -93,17 +94,20 @@ class NullAndEmptyHeadersClientResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_a; - bool m_aHasBeenSet = false; Aws::String m_b; - bool m_bHasBeenSet = false; Aws::Vector m_c; - bool m_cHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_aHasBeenSet = false; + bool m_bHasBeenSet = false; + bool m_cHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersServerRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersServerRequest.h index d9f24d9e3fe6..5022b50bebbb 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersServerRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersServerRequest.h @@ -102,15 +102,15 @@ class NullAndEmptyHeadersServerRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_a; - bool m_aHasBeenSet = false; Aws::String m_b; - bool m_bHasBeenSet = false; Aws::Vector m_c; - bool m_cHasBeenSet = false; Aws::String m_requestId; + bool m_aHasBeenSet = false; + bool m_bHasBeenSet = false; + bool m_cHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersServerResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersServerResult.h index 5c47d985bd8f..40199fe7ff6d 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersServerResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/NullAndEmptyHeadersServerResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -93,17 +94,20 @@ class NullAndEmptyHeadersServerResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_a; - bool m_aHasBeenSet = false; Aws::String m_b; - bool m_bHasBeenSet = false; Aws::Vector m_c; - bool m_cHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_aHasBeenSet = false; + bool m_bHasBeenSet = false; + bool m_cHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/OmitsNullSerializesEmptyStringRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/OmitsNullSerializesEmptyStringRequest.h index 1eaa16a8cff3..94e9ff9cd36f 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/OmitsNullSerializesEmptyStringRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/OmitsNullSerializesEmptyStringRequest.h @@ -66,9 +66,9 @@ class OmitsNullSerializesEmptyStringRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_nullValue; - bool m_nullValueHasBeenSet = false; Aws::String m_emptyString; + bool m_nullValueHasBeenSet = false; bool m_emptyStringHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/OmitsSerializingEmptyListsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/OmitsSerializingEmptyListsRequest.h index 6d1dae0c14b7..1783658b0420 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/OmitsSerializingEmptyListsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/OmitsSerializingEmptyListsRequest.h @@ -186,24 +186,24 @@ class OmitsSerializingEmptyListsRequest : public RestJsonProtocolRequest { ///@} private: Aws::Vector m_queryStringList; - bool m_queryStringListHasBeenSet = false; Aws::Vector m_queryIntegerList; - bool m_queryIntegerListHasBeenSet = false; Aws::Vector m_queryDoubleList; - bool m_queryDoubleListHasBeenSet = false; Aws::Vector m_queryBooleanList; - bool m_queryBooleanListHasBeenSet = false; Aws::Vector m_queryTimestampList; - bool m_queryTimestampListHasBeenSet = false; Aws::Vector m_queryEnumList; - bool m_queryEnumListHasBeenSet = false; Aws::Vector m_queryIntegerEnumList; + bool m_queryStringListHasBeenSet = false; + bool m_queryIntegerListHasBeenSet = false; + bool m_queryDoubleListHasBeenSet = false; + bool m_queryBooleanListHasBeenSet = false; + bool m_queryTimestampListHasBeenSet = false; + bool m_queryEnumListHasBeenSet = false; bool m_queryIntegerEnumListHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/PostUnionWithJsonNameResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/PostUnionWithJsonNameResult.h index ac53cba4dbc0..0a4bc58360b3 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/PostUnionWithJsonNameResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/PostUnionWithJsonNameResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class PostUnionWithJsonNameResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: UnionWithJsonName m_value; - bool m_valueHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_valueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/PutWithContentEncodingRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/PutWithContentEncodingRequest.h index 3173dcb5d49a..74891b3db386 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/PutWithContentEncodingRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/PutWithContentEncodingRequest.h @@ -67,9 +67,9 @@ class PutWithContentEncodingRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_encoding; - bool m_encodingHasBeenSet = false; Aws::String m_data; + bool m_encodingHasBeenSet = false; bool m_dataHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/QueryParamsAsStringListMapRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/QueryParamsAsStringListMapRequest.h index ba9305ecbe1a..fef2a4d90ddb 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/QueryParamsAsStringListMapRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/QueryParamsAsStringListMapRequest.h @@ -74,9 +74,9 @@ class QueryParamsAsStringListMapRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_qux; - bool m_quxHasBeenSet = false; Aws::Map> m_foo; + bool m_quxHasBeenSet = false; bool m_fooHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/QueryPrecedenceRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/QueryPrecedenceRequest.h index 129fd0e74dca..cbe099a84528 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/QueryPrecedenceRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/QueryPrecedenceRequest.h @@ -73,9 +73,9 @@ class QueryPrecedenceRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::Map m_baz; + bool m_fooHasBeenSet = false; bool m_bazHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesInputOutputNested1.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesInputOutputNested1.h index c7086f735257..2bf1ee38e602 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesInputOutputNested1.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesInputOutputNested1.h @@ -61,9 +61,9 @@ class RecursiveShapesInputOutputNested1 { ///@} private: Aws::String m_foo; - bool m_fooHasBeenSet = false; std::shared_ptr m_nested; + bool m_fooHasBeenSet = false; bool m_nestedHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesInputOutputNested2.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesInputOutputNested2.h index 285c6e475fd6..6f64d70a2950 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesInputOutputNested2.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesInputOutputNested2.h @@ -62,9 +62,9 @@ class RecursiveShapesInputOutputNested2 { ///@} private: Aws::String m_bar; - bool m_barHasBeenSet = false; std::shared_ptr m_recursiveMember; + bool m_barHasBeenSet = false; bool m_recursiveMemberHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesRequest.h index 6143be85f1c1..7a14f7827652 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesRequest.h @@ -64,9 +64,9 @@ class RecursiveShapesRequest : public RestJsonProtocolRequest { ///@} private: RecursiveShapesInputOutputNested1 m_nested; - bool m_nestedHasBeenSet = false; Aws::String m_requestId; + bool m_nestedHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesResult.h index b311349a2232..b8c5a494573b 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/RecursiveShapesResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class RecursiveShapesResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: RecursiveShapesInputOutputNested1 m_nested; - bool m_nestedHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_nestedHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ResponseCodeHttpFallbackResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ResponseCodeHttpFallbackResult.h index 9bdcbf41106b..66fd903a4af7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ResponseCodeHttpFallbackResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ResponseCodeHttpFallbackResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -41,8 +42,11 @@ class ResponseCodeHttpFallbackResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ResponseCodeRequiredResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ResponseCodeRequiredResult.h index ee686c21dbbe..76bc49c0537d 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ResponseCodeRequiredResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/ResponseCodeRequiredResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -53,11 +54,14 @@ class ResponseCodeRequiredResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: int m_responseCode{0}; - bool m_responseCodeHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_responseCodeHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SimpleScalarPropertiesRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SimpleScalarPropertiesRequest.h index f59e591e32c1..35ef925cdef6 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SimpleScalarPropertiesRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SimpleScalarPropertiesRequest.h @@ -191,36 +191,36 @@ class SimpleScalarPropertiesRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::String m_stringValue; - bool m_stringValueHasBeenSet = false; bool m_trueBooleanValue{false}; - bool m_trueBooleanValueHasBeenSet = false; bool m_falseBooleanValue{false}; - bool m_falseBooleanValueHasBeenSet = false; int m_byteValue{0}; - bool m_byteValueHasBeenSet = false; int m_shortValue{0}; - bool m_shortValueHasBeenSet = false; int m_integerValue{0}; - bool m_integerValueHasBeenSet = false; long long m_longValue{0}; - bool m_longValueHasBeenSet = false; double m_floatValue{0.0}; - bool m_floatValueHasBeenSet = false; double m_doubleValue{0.0}; - bool m_doubleValueHasBeenSet = false; Aws::String m_requestId; + bool m_fooHasBeenSet = false; + bool m_stringValueHasBeenSet = false; + bool m_trueBooleanValueHasBeenSet = false; + bool m_falseBooleanValueHasBeenSet = false; + bool m_byteValueHasBeenSet = false; + bool m_shortValueHasBeenSet = false; + bool m_integerValueHasBeenSet = false; + bool m_longValueHasBeenSet = false; + bool m_floatValueHasBeenSet = false; + bool m_doubleValueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SimpleScalarPropertiesResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SimpleScalarPropertiesResult.h index ee483916f0f8..06ce23b55383 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SimpleScalarPropertiesResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SimpleScalarPropertiesResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -174,38 +175,41 @@ class SimpleScalarPropertiesResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::String m_stringValue; - bool m_stringValueHasBeenSet = false; bool m_trueBooleanValue{false}; - bool m_trueBooleanValueHasBeenSet = false; bool m_falseBooleanValue{false}; - bool m_falseBooleanValueHasBeenSet = false; int m_byteValue{0}; - bool m_byteValueHasBeenSet = false; int m_shortValue{0}; - bool m_shortValueHasBeenSet = false; int m_integerValue{0}; - bool m_integerValueHasBeenSet = false; long long m_longValue{0}; - bool m_longValueHasBeenSet = false; double m_floatValue{0.0}; - bool m_floatValueHasBeenSet = false; double m_doubleValue{0.0}; - bool m_doubleValueHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_fooHasBeenSet = false; + bool m_stringValueHasBeenSet = false; + bool m_trueBooleanValueHasBeenSet = false; + bool m_falseBooleanValueHasBeenSet = false; + bool m_byteValueHasBeenSet = false; + bool m_shortValueHasBeenSet = false; + bool m_integerValueHasBeenSet = false; + bool m_longValueHasBeenSet = false; + bool m_floatValueHasBeenSet = false; + bool m_doubleValueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonListsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonListsRequest.h new file mode 100644 index 000000000000..1dcc9e736295 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonListsRequest.h @@ -0,0 +1,116 @@ +/** + * 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 RestJsonProtocol { +namespace Model { + +/** + */ +class SparseJsonListsRequest : public RestJsonProtocolRequest { + public: + AWS_RESTJSONPROTOCOL_API SparseJsonListsRequest() = 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 "SparseJsonLists"; } + + AWS_RESTJSONPROTOCOL_API Aws::String SerializePayload() const override; + + AWS_RESTJSONPROTOCOL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + ///@{ + + inline const Aws::Vector>& GetSparseStringList() const { return m_sparseStringList; } + inline bool SparseStringListHasBeenSet() const { return m_sparseStringListHasBeenSet; } + template >> + void SetSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList = std::forward(value); + } + template >> + SparseJsonListsRequest& WithSparseStringList(SparseStringListT&& value) { + SetSparseStringList(std::forward(value)); + return *this; + } + template + SparseJsonListsRequest& AddSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.emplace_back(std::forward(value)); + return *this; + } + inline SparseJsonListsRequest& AddSparseStringList(Aws::Crt::Optional value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.push_back(value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Vector>& GetSparseShortList() const { return m_sparseShortList; } + inline bool SparseShortListHasBeenSet() const { return m_sparseShortListHasBeenSet; } + template >> + void SetSparseShortList(SparseShortListT&& value) { + m_sparseShortListHasBeenSet = true; + m_sparseShortList = std::forward(value); + } + template >> + SparseJsonListsRequest& WithSparseShortList(SparseShortListT&& value) { + SetSparseShortList(std::forward(value)); + return *this; + } + inline SparseJsonListsRequest& AddSparseShortList(int value) { + m_sparseShortListHasBeenSet = true; + m_sparseShortList.push_back(value); + return *this; + } + inline SparseJsonListsRequest& AddSparseShortList(Aws::Crt::Optional value) { + m_sparseShortListHasBeenSet = true; + m_sparseShortList.push_back(value); + return *this; + } + ///@} + + ///@{ + + 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 + SparseJsonListsRequest& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + private: + Aws::Vector> m_sparseStringList; + + Aws::Vector> m_sparseShortList; + + Aws::String m_requestId; + bool m_sparseStringListHasBeenSet = false; + bool m_sparseShortListHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace RestJsonProtocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonListsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonListsResult.h new file mode 100644 index 000000000000..3c33213b17a3 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonListsResult.h @@ -0,0 +1,113 @@ +/** + * 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 { +template +class AmazonWebServiceResult; + +namespace Utils { +namespace Json { +class JsonValue; +} // namespace Json +} // namespace Utils +namespace RestJsonProtocol { +namespace Model { +class SparseJsonListsResult { + public: + AWS_RESTJSONPROTOCOL_API SparseJsonListsResult() = default; + AWS_RESTJSONPROTOCOL_API SparseJsonListsResult(const Aws::AmazonWebServiceResult& result); + AWS_RESTJSONPROTOCOL_API SparseJsonListsResult& operator=(const Aws::AmazonWebServiceResult& result); + + ///@{ + + inline const Aws::Vector>& GetSparseStringList() const { return m_sparseStringList; } + template >> + void SetSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList = std::forward(value); + } + template >> + SparseJsonListsResult& WithSparseStringList(SparseStringListT&& value) { + SetSparseStringList(std::forward(value)); + return *this; + } + template + SparseJsonListsResult& AddSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.emplace_back(std::forward(value)); + return *this; + } + inline SparseJsonListsResult& AddSparseStringList(Aws::Crt::Optional value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.push_back(value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Vector>& GetSparseShortList() const { return m_sparseShortList; } + template >> + void SetSparseShortList(SparseShortListT&& value) { + m_sparseShortListHasBeenSet = true; + m_sparseShortList = std::forward(value); + } + template >> + SparseJsonListsResult& WithSparseShortList(SparseShortListT&& value) { + SetSparseShortList(std::forward(value)); + return *this; + } + inline SparseJsonListsResult& AddSparseShortList(int value) { + m_sparseShortListHasBeenSet = true; + m_sparseShortList.push_back(value); + return *this; + } + inline SparseJsonListsResult& AddSparseShortList(Aws::Crt::Optional value) { + m_sparseShortListHasBeenSet = true; + m_sparseShortList.push_back(value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetRequestId() const { return m_requestId; } + template + void SetRequestId(RequestIdT&& value) { + m_requestIdHasBeenSet = true; + m_requestId = std::forward(value); + } + template + SparseJsonListsResult& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + + private: + Aws::Vector> m_sparseStringList; + + Aws::Vector> m_sparseShortList; + + Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_sparseStringListHasBeenSet = false; + bool m_sparseShortListHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace RestJsonProtocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonMapsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonMapsRequest.h new file mode 100644 index 000000000000..1cf19a89c099 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonMapsRequest.h @@ -0,0 +1,207 @@ +/** + * 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 + +#include + +namespace Aws { +namespace RestJsonProtocol { +namespace Model { + +/** + */ +class SparseJsonMapsRequest : public RestJsonProtocolRequest { + public: + AWS_RESTJSONPROTOCOL_API SparseJsonMapsRequest() = 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 "SparseJsonMaps"; } + + AWS_RESTJSONPROTOCOL_API Aws::String SerializePayload() const override; + + AWS_RESTJSONPROTOCOL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + ///@{ + + inline const Aws::Map>& GetSparseStructMap() const { return m_sparseStructMap; } + inline bool SparseStructMapHasBeenSet() const { return m_sparseStructMapHasBeenSet; } + template >> + void SetSparseStructMap(SparseStructMapT&& value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap = std::forward(value); + } + template >> + SparseJsonMapsRequest& WithSparseStructMap(SparseStructMapT&& value) { + SetSparseStructMap(std::forward(value)); + return *this; + } + template > + SparseJsonMapsRequest& AddSparseStructMap(SparseStructMapKeyT&& key, SparseStructMapValueT&& value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline SparseJsonMapsRequest& AddSparseStructMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseNumberMap() const { return m_sparseNumberMap; } + inline bool SparseNumberMapHasBeenSet() const { return m_sparseNumberMapHasBeenSet; } + template >> + void SetSparseNumberMap(SparseNumberMapT&& value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap = std::forward(value); + } + template >> + SparseJsonMapsRequest& WithSparseNumberMap(SparseNumberMapT&& value) { + SetSparseNumberMap(std::forward(value)); + return *this; + } + inline SparseJsonMapsRequest& AddSparseNumberMap(Aws::String key, int value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap.emplace(key, value); + return *this; + } + inline SparseJsonMapsRequest& AddSparseNumberMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseBooleanMap() const { return m_sparseBooleanMap; } + inline bool SparseBooleanMapHasBeenSet() const { return m_sparseBooleanMapHasBeenSet; } + template >> + void SetSparseBooleanMap(SparseBooleanMapT&& value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap = std::forward(value); + } + template >> + SparseJsonMapsRequest& WithSparseBooleanMap(SparseBooleanMapT&& value) { + SetSparseBooleanMap(std::forward(value)); + return *this; + } + inline SparseJsonMapsRequest& AddSparseBooleanMap(Aws::String key, bool value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap.emplace(key, value); + return *this; + } + inline SparseJsonMapsRequest& AddSparseBooleanMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseStringMap() const { return m_sparseStringMap; } + inline bool SparseStringMapHasBeenSet() const { return m_sparseStringMapHasBeenSet; } + template >> + void SetSparseStringMap(SparseStringMapT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap = std::forward(value); + } + template >> + SparseJsonMapsRequest& WithSparseStringMap(SparseStringMapT&& value) { + SetSparseStringMap(std::forward(value)); + return *this; + } + template > + SparseJsonMapsRequest& AddSparseStringMap(SparseStringMapKeyT&& key, SparseStringMapValueT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline SparseJsonMapsRequest& AddSparseStringMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>>& GetSparseSetMap() const { return m_sparseSetMap; } + inline bool SparseSetMapHasBeenSet() const { return m_sparseSetMapHasBeenSet; } + template >>> + void SetSparseSetMap(SparseSetMapT&& value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap = std::forward(value); + } + template >>> + SparseJsonMapsRequest& WithSparseSetMap(SparseSetMapT&& value) { + SetSparseSetMap(std::forward(value)); + return *this; + } + template >> + SparseJsonMapsRequest& AddSparseSetMap(SparseSetMapKeyT&& key, SparseSetMapValueT&& value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline SparseJsonMapsRequest& AddSparseSetMap(Aws::String key, Aws::Crt::Optional> value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + 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 + SparseJsonMapsRequest& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + private: + Aws::Map> m_sparseStructMap; + + Aws::Map> m_sparseNumberMap; + + Aws::Map> m_sparseBooleanMap; + + Aws::Map> m_sparseStringMap; + + Aws::Map>> m_sparseSetMap; + + Aws::String m_requestId; + bool m_sparseStructMapHasBeenSet = false; + bool m_sparseNumberMapHasBeenSet = false; + bool m_sparseBooleanMapHasBeenSet = false; + bool m_sparseStringMapHasBeenSet = false; + bool m_sparseSetMapHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace RestJsonProtocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonMapsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonMapsResult.h new file mode 100644 index 000000000000..f381da81cf4a --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/SparseJsonMapsResult.h @@ -0,0 +1,201 @@ +/** + * 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 + +#include + +namespace Aws { +template +class AmazonWebServiceResult; + +namespace Utils { +namespace Json { +class JsonValue; +} // namespace Json +} // namespace Utils +namespace RestJsonProtocol { +namespace Model { +class SparseJsonMapsResult { + public: + AWS_RESTJSONPROTOCOL_API SparseJsonMapsResult() = default; + AWS_RESTJSONPROTOCOL_API SparseJsonMapsResult(const Aws::AmazonWebServiceResult& result); + AWS_RESTJSONPROTOCOL_API SparseJsonMapsResult& operator=(const Aws::AmazonWebServiceResult& result); + + ///@{ + + inline const Aws::Map>& GetSparseStructMap() const { return m_sparseStructMap; } + template >> + void SetSparseStructMap(SparseStructMapT&& value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap = std::forward(value); + } + template >> + SparseJsonMapsResult& WithSparseStructMap(SparseStructMapT&& value) { + SetSparseStructMap(std::forward(value)); + return *this; + } + template > + SparseJsonMapsResult& AddSparseStructMap(SparseStructMapKeyT&& key, SparseStructMapValueT&& value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline SparseJsonMapsResult& AddSparseStructMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseNumberMap() const { return m_sparseNumberMap; } + template >> + void SetSparseNumberMap(SparseNumberMapT&& value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap = std::forward(value); + } + template >> + SparseJsonMapsResult& WithSparseNumberMap(SparseNumberMapT&& value) { + SetSparseNumberMap(std::forward(value)); + return *this; + } + inline SparseJsonMapsResult& AddSparseNumberMap(Aws::String key, int value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap.emplace(key, value); + return *this; + } + inline SparseJsonMapsResult& AddSparseNumberMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseBooleanMap() const { return m_sparseBooleanMap; } + template >> + void SetSparseBooleanMap(SparseBooleanMapT&& value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap = std::forward(value); + } + template >> + SparseJsonMapsResult& WithSparseBooleanMap(SparseBooleanMapT&& value) { + SetSparseBooleanMap(std::forward(value)); + return *this; + } + inline SparseJsonMapsResult& AddSparseBooleanMap(Aws::String key, bool value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap.emplace(key, value); + return *this; + } + inline SparseJsonMapsResult& AddSparseBooleanMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseStringMap() const { return m_sparseStringMap; } + template >> + void SetSparseStringMap(SparseStringMapT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap = std::forward(value); + } + template >> + SparseJsonMapsResult& WithSparseStringMap(SparseStringMapT&& value) { + SetSparseStringMap(std::forward(value)); + return *this; + } + template > + SparseJsonMapsResult& AddSparseStringMap(SparseStringMapKeyT&& key, SparseStringMapValueT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline SparseJsonMapsResult& AddSparseStringMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>>& GetSparseSetMap() const { return m_sparseSetMap; } + template >>> + void SetSparseSetMap(SparseSetMapT&& value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap = std::forward(value); + } + template >>> + SparseJsonMapsResult& WithSparseSetMap(SparseSetMapT&& value) { + SetSparseSetMap(std::forward(value)); + return *this; + } + template >> + SparseJsonMapsResult& AddSparseSetMap(SparseSetMapKeyT&& key, SparseSetMapValueT&& value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline SparseJsonMapsResult& AddSparseSetMap(Aws::String key, Aws::Crt::Optional> value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetRequestId() const { return m_requestId; } + template + void SetRequestId(RequestIdT&& value) { + m_requestIdHasBeenSet = true; + m_requestId = std::forward(value); + } + template + SparseJsonMapsResult& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + + private: + Aws::Map> m_sparseStructMap; + + Aws::Map> m_sparseNumberMap; + + Aws::Map> m_sparseBooleanMap; + + Aws::Map> m_sparseStringMap; + + Aws::Map>> m_sparseSetMap; + + Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_sparseStructMapHasBeenSet = false; + bool m_sparseNumberMapHasBeenSet = false; + bool m_sparseBooleanMapHasBeenSet = false; + bool m_sparseStringMapHasBeenSet = false; + bool m_sparseSetMapHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace RestJsonProtocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/StructureListMember.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/StructureListMember.h index fea95c7a2f2e..187eafd9ed99 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/StructureListMember.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/StructureListMember.h @@ -59,9 +59,9 @@ class StructureListMember { ///@} private: Aws::String m_a; - bool m_aHasBeenSet = false; Aws::String m_b; + bool m_aHasBeenSet = false; bool m_bHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestBodyStructureRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestBodyStructureRequest.h index ba6bd086a25c..48d3b6e7ece3 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestBodyStructureRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestBodyStructureRequest.h @@ -80,12 +80,12 @@ class TestBodyStructureRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_testId; - bool m_testIdHasBeenSet = false; TestConfig m_testConfig; - bool m_testConfigHasBeenSet = false; Aws::String m_requestId; + bool m_testIdHasBeenSet = false; + bool m_testConfigHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestBodyStructureResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestBodyStructureResult.h index 20cad8f11753..ce2c0f298b43 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestBodyStructureResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestBodyStructureResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -71,14 +72,17 @@ class TestBodyStructureResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_testId; - bool m_testIdHasBeenSet = false; TestConfig m_testConfig; - bool m_testConfigHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_testIdHasBeenSet = false; + bool m_testConfigHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoInputNoPayloadResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoInputNoPayloadResult.h index 907bad0e9d32..8a6b4ed499ca 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoInputNoPayloadResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoInputNoPayloadResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -55,11 +56,14 @@ class TestGetNoInputNoPayloadResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_testId; - bool m_testIdHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_testIdHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoPayloadRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoPayloadRequest.h index 6cce4d3b8a5d..3f47f1755ef2 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoPayloadRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoPayloadRequest.h @@ -63,9 +63,9 @@ class TestGetNoPayloadRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_testId; - bool m_testIdHasBeenSet = false; Aws::String m_requestId; + bool m_testIdHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoPayloadResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoPayloadResult.h index b2c950e8a206..3fb15c3bd03b 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoPayloadResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestGetNoPayloadResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -55,11 +56,14 @@ class TestGetNoPayloadResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_testId; - bool m_testIdHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_testIdHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadBlobResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadBlobResult.h index bf03d971494a..3339029bd364 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadBlobResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadBlobResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -51,11 +52,14 @@ class TestPayloadBlobResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::Stream::ResponseStream m_data{}; - bool m_dataHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_dataHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadStructureRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadStructureRequest.h index 2d3a4e0433dd..0cc69fb7aaa6 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadStructureRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadStructureRequest.h @@ -80,12 +80,12 @@ class TestPayloadStructureRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_testId; - bool m_testIdHasBeenSet = false; PayloadConfig m_payloadConfig; - bool m_payloadConfigHasBeenSet = false; Aws::String m_requestId; + bool m_testIdHasBeenSet = false; + bool m_payloadConfigHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadStructureResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadStructureResult.h index a6da2f2863e7..d9b49e5fe527 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadStructureResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPayloadStructureResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -71,14 +72,17 @@ class TestPayloadStructureResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_testId; - bool m_testIdHasBeenSet = false; PayloadConfig m_payloadConfig; - bool m_payloadConfigHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_testIdHasBeenSet = false; + bool m_payloadConfigHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoInputNoPayloadResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoInputNoPayloadResult.h index c744d3f9e45f..182dc9d29136 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoInputNoPayloadResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoInputNoPayloadResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -56,11 +57,14 @@ class TestPostNoInputNoPayloadResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_testId; - bool m_testIdHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_testIdHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoPayloadRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoPayloadRequest.h index 8cd9c0117dbb..24f414331253 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoPayloadRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoPayloadRequest.h @@ -63,9 +63,9 @@ class TestPostNoPayloadRequest : public RestJsonProtocolRequest { ///@} private: Aws::String m_testId; - bool m_testIdHasBeenSet = false; Aws::String m_requestId; + bool m_testIdHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoPayloadResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoPayloadResult.h index 8d3eed808022..b967007ff072 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoPayloadResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TestPostNoPayloadResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include @@ -55,11 +56,14 @@ class TestPostNoPayloadResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_testId; - bool m_testIdHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_testIdHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TimestampFormatHeadersRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TimestampFormatHeadersRequest.h index 8075cbf93088..08b951e2e9e3 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TimestampFormatHeadersRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TimestampFormatHeadersRequest.h @@ -160,27 +160,27 @@ class TimestampFormatHeadersRequest : public RestJsonProtocolRequest { ///@} private: Aws::Utils::DateTime m_memberEpochSeconds{}; - bool m_memberEpochSecondsHasBeenSet = false; Aws::Utils::DateTime m_memberHttpDate{}; - bool m_memberHttpDateHasBeenSet = false; Aws::Utils::DateTime m_memberDateTime{}; - bool m_memberDateTimeHasBeenSet = false; Aws::Utils::DateTime m_defaultFormat{}; - bool m_defaultFormatHasBeenSet = false; Aws::Utils::DateTime m_targetEpochSeconds{}; - bool m_targetEpochSecondsHasBeenSet = false; Aws::Utils::DateTime m_targetHttpDate{}; - bool m_targetHttpDateHasBeenSet = false; Aws::Utils::DateTime m_targetDateTime{}; - bool m_targetDateTimeHasBeenSet = false; Aws::String m_requestId; + bool m_memberEpochSecondsHasBeenSet = false; + bool m_memberHttpDateHasBeenSet = false; + bool m_memberDateTimeHasBeenSet = false; + bool m_defaultFormatHasBeenSet = false; + bool m_targetEpochSecondsHasBeenSet = false; + bool m_targetHttpDateHasBeenSet = false; + bool m_targetDateTimeHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TimestampFormatHeadersResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TimestampFormatHeadersResult.h index 590fac9832f7..9d34fe4c34e7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TimestampFormatHeadersResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/TimestampFormatHeadersResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -146,29 +147,32 @@ class TimestampFormatHeadersResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::DateTime m_memberEpochSeconds{}; - bool m_memberEpochSecondsHasBeenSet = false; Aws::Utils::DateTime m_memberHttpDate{}; - bool m_memberHttpDateHasBeenSet = false; Aws::Utils::DateTime m_memberDateTime{}; - bool m_memberDateTimeHasBeenSet = false; Aws::Utils::DateTime m_defaultFormat{}; - bool m_defaultFormatHasBeenSet = false; Aws::Utils::DateTime m_targetEpochSeconds{}; - bool m_targetEpochSecondsHasBeenSet = false; Aws::Utils::DateTime m_targetHttpDate{}; - bool m_targetHttpDateHasBeenSet = false; Aws::Utils::DateTime m_targetDateTime{}; - bool m_targetDateTimeHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_memberEpochSecondsHasBeenSet = false; + bool m_memberHttpDateHasBeenSet = false; + bool m_memberDateTimeHasBeenSet = false; + bool m_defaultFormatHasBeenSet = false; + bool m_targetEpochSecondsHasBeenSet = false; + bool m_targetHttpDateHasBeenSet = false; + bool m_targetDateTimeHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/UnionWithJsonName.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/UnionWithJsonName.h index 78efba41c37a..2999dfc41ff2 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/UnionWithJsonName.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/include/aws/rest-json-protocol/model/UnionWithJsonName.h @@ -75,12 +75,12 @@ class UnionWithJsonName { ///@} private: Aws::String m_foo; - bool m_fooHasBeenSet = false; Aws::String m_bar; - bool m_barHasBeenSet = false; Aws::String m_baz; + bool m_fooHasBeenSet = false; + bool m_barHasBeenSet = false; bool m_bazHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/RestJsonProtocolClient.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/RestJsonProtocolClient.cpp index b7cf08057a98..6bd07d88bf17 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/RestJsonProtocolClient.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/RestJsonProtocolClient.cpp @@ -35,12 +35,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -73,6 +75,8 @@ #include #include #include +#include +#include #include #include #include @@ -145,7 +149,7 @@ RestJsonProtocolClient::RestJsonProtocolClient(const std::shared_ptr( ALLOCATION_TAG, @@ -157,7 +161,8 @@ RestJsonProtocolClient::RestJsonProtocolClient(const Client::ClientConfiguration init(m_clientConfiguration); } -RestJsonProtocolClient::RestJsonProtocolClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) +RestJsonProtocolClient::RestJsonProtocolClient(const AWSCredentials& credentials, + const Aws::Client::ClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared( ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), SERVICE_NAME, @@ -169,7 +174,7 @@ RestJsonProtocolClient::RestJsonProtocolClient(const AWSCredentials& credentials } RestJsonProtocolClient::RestJsonProtocolClient(const std::shared_ptr& credentialsProvider, - const Client::ClientConfiguration& clientConfiguration) + const Aws::Client::ClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), @@ -195,7 +200,7 @@ void RestJsonProtocolClient::init(const RestJsonProtocol::RestJsonProtocolClient m_clientConfiguration.executor = m_clientConfiguration.configFactories.executorCreateFn(); } AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); - m_endpointProvider->InitBuiltInParameters(config); + m_endpointProvider->InitBuiltInParameters(config, "restjson"); } void RestJsonProtocolClient::OverrideEndpoint(const Aws::String& endpoint) { @@ -672,6 +677,36 @@ HttpChecksumRequiredOutcome RestJsonProtocolClient::HttpChecksumRequired(const H {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } +HttpEmptyPrefixHeadersOutcome RestJsonProtocolClient::HttpEmptyPrefixHeaders(const HttpEmptyPrefixHeadersRequest& request) const { + AWS_OPERATION_GUARD(HttpEmptyPrefixHeaders); + AWS_OPERATION_CHECK_PTR(m_endpointProvider, HttpEmptyPrefixHeaders, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); + AWS_OPERATION_CHECK_PTR(m_telemetryProvider, HttpEmptyPrefixHeaders, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(meter, HttpEmptyPrefixHeaders, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".HttpEmptyPrefixHeaders", + {{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( + [&]() -> HttpEmptyPrefixHeadersOutcome { + 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, HttpEmptyPrefixHeaders, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, + endpointResolutionOutcome.GetError().GetMessage()); + endpointResolutionOutcome.GetResult().AddPathSegments("/HttpEmptyPrefixHeaders"); + return HttpEmptyPrefixHeadersOutcome( + MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + }, + TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, + {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, + {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); +} + HttpEnumPayloadOutcome RestJsonProtocolClient::HttpEnumPayload(const HttpEnumPayloadRequest& request) const { AWS_OPERATION_GUARD(HttpEnumPayload); AWS_OPERATION_CHECK_PTR(m_endpointProvider, HttpEnumPayload, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); @@ -853,6 +888,37 @@ HttpPrefixHeadersInResponseOutcome RestJsonProtocolClient::HttpPrefixHeadersInRe {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } +HttpQueryParamsOnlyOperationOutcome RestJsonProtocolClient::HttpQueryParamsOnlyOperation( + const HttpQueryParamsOnlyOperationRequest& request) const { + AWS_OPERATION_GUARD(HttpQueryParamsOnlyOperation); + AWS_OPERATION_CHECK_PTR(m_endpointProvider, HttpQueryParamsOnlyOperation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); + AWS_OPERATION_CHECK_PTR(m_telemetryProvider, HttpQueryParamsOnlyOperation, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(meter, HttpQueryParamsOnlyOperation, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".HttpQueryParamsOnlyOperation", + {{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( + [&]() -> HttpQueryParamsOnlyOperationOutcome { + 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, HttpQueryParamsOnlyOperation, CoreErrors, + CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage()); + endpointResolutionOutcome.GetResult().AddPathSegments("/http-query-params-only"); + return HttpQueryParamsOnlyOperationOutcome( + MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER)); + }, + TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, + {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, + {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); +} + HttpRequestWithFloatLabelsOutcome RestJsonProtocolClient::HttpRequestWithFloatLabels( const HttpRequestWithFloatLabelsRequest& request) const { AWS_OPERATION_GUARD(HttpRequestWithFloatLabels); @@ -1944,6 +2010,66 @@ SimpleScalarPropertiesOutcome RestJsonProtocolClient::SimpleScalarProperties(con {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } +SparseJsonListsOutcome RestJsonProtocolClient::SparseJsonLists(const SparseJsonListsRequest& request) const { + AWS_OPERATION_GUARD(SparseJsonLists); + AWS_OPERATION_CHECK_PTR(m_endpointProvider, SparseJsonLists, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); + AWS_OPERATION_CHECK_PTR(m_telemetryProvider, SparseJsonLists, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(meter, SparseJsonLists, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".SparseJsonLists", + {{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( + [&]() -> SparseJsonListsOutcome { + 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, SparseJsonLists, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, + endpointResolutionOutcome.GetError().GetMessage()); + endpointResolutionOutcome.GetResult().AddPathSegments("/SparseJsonLists"); + return SparseJsonListsOutcome( + MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER)); + }, + TracingUtils::SMITHY_CLIENT_DURATION_METRIC, *meter, + {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, + {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); +} + +SparseJsonMapsOutcome RestJsonProtocolClient::SparseJsonMaps(const SparseJsonMapsRequest& request) const { + AWS_OPERATION_GUARD(SparseJsonMaps); + AWS_OPERATION_CHECK_PTR(m_endpointProvider, SparseJsonMaps, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); + AWS_OPERATION_CHECK_PTR(m_telemetryProvider, SparseJsonMaps, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(meter, SparseJsonMaps, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".SparseJsonMaps", + {{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( + [&]() -> SparseJsonMapsOutcome { + 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, SparseJsonMaps, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, + endpointResolutionOutcome.GetError().GetMessage()); + endpointResolutionOutcome.GetResult().AddPathSegments("/SparseJsonMaps"); + return SparseJsonMapsOutcome( + 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()}}); +} + TestBodyStructureOutcome RestJsonProtocolClient::TestBodyStructure(const TestBodyStructureRequest& request) const { AWS_OPERATION_GUARD(TestBodyStructure); AWS_OPERATION_CHECK_PTR(m_endpointProvider, TestBodyStructure, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ContentTypeParametersResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ContentTypeParametersResult.cpp index 6da8bac13e67..cc7dd9b6b3c7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ContentTypeParametersResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ContentTypeParametersResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; ContentTypeParametersResult::ContentTypeParametersResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ContentTypeParametersResult& ContentTypeParametersResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DatetimeOffsetsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DatetimeOffsetsResult.cpp index 70a61f2c2150..4b017b2c5991 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DatetimeOffsetsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DatetimeOffsetsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; DatetimeOffsetsResult::DatetimeOffsetsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DatetimeOffsetsResult& DatetimeOffsetsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("datetime")) { m_datetime = jsonValue.GetString("datetime"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeAsMapValueResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeAsMapValueResult.cpp index feee8d48c84e..100bcfcb7419 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeAsMapValueResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeAsMapValueResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; DocumentTypeAsMapValueResult::DocumentTypeAsMapValueResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DocumentTypeAsMapValueResult& DocumentTypeAsMapValueResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("docValuedMap")) { Aws::Map docValuedMapJsonMap = jsonValue.GetObject("docValuedMap").GetAllObjects(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeAsPayloadResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeAsPayloadResult.cpp index ed41a2610fef..a078194ced3d 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeAsPayloadResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeAsPayloadResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; DocumentTypeAsPayloadResult::DocumentTypeAsPayloadResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DocumentTypeAsPayloadResult& DocumentTypeAsPayloadResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); m_documentValue = jsonValue; m_documentValueHasBeenSet = true; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeResult.cpp index 23f24786d4df..d98657e74b3a 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/DocumentTypeResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; DocumentTypeResult::DocumentTypeResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DocumentTypeResult& DocumentTypeResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("stringValue")) { m_stringValue = jsonValue.GetString("stringValue"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/EmptyInputAndEmptyOutputResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/EmptyInputAndEmptyOutputResult.cpp index 91878da61362..0124d80f8a2e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/EmptyInputAndEmptyOutputResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/EmptyInputAndEmptyOutputResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; EmptyInputAndEmptyOutputResult::EmptyInputAndEmptyOutputResult(const Aws::AmazonWebServiceResult& result) { *this = result; } EmptyInputAndEmptyOutputResult& EmptyInputAndEmptyOutputResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/FractionalSecondsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/FractionalSecondsResult.cpp index 424fba90e069..7febba69fc26 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/FractionalSecondsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/FractionalSecondsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; FractionalSecondsResult::FractionalSecondsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } FractionalSecondsResult& FractionalSecondsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("datetime")) { m_datetime = jsonValue.GetString("datetime"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/GreetingWithErrorsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/GreetingWithErrorsResult.cpp index 32f10089425d..9a03c45d6e40 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/GreetingWithErrorsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/GreetingWithErrorsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; GreetingWithErrorsResult::GreetingWithErrorsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } GreetingWithErrorsResult& GreetingWithErrorsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpChecksumRequiredResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpChecksumRequiredResult.cpp index d41043ee23b4..d09b02f19825 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpChecksumRequiredResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpChecksumRequiredResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; HttpChecksumRequiredResult::HttpChecksumRequiredResult(const Aws::AmazonWebServiceResult& result) { *this = result; } HttpChecksumRequiredResult& HttpChecksumRequiredResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("foo")) { m_foo = jsonValue.GetString("foo"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpEmptyPrefixHeadersRequest.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpEmptyPrefixHeadersRequest.cpp new file mode 100644 index 000000000000..9115dd848159 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpEmptyPrefixHeadersRequest.cpp @@ -0,0 +1,36 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +#include + +using namespace Aws::RestJsonProtocol::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +Aws::String HttpEmptyPrefixHeadersRequest::SerializePayload() const { return {}; } + +Aws::Http::HeaderValueCollection HttpEmptyPrefixHeadersRequest::GetRequestSpecificHeaders() const { + Aws::Http::HeaderValueCollection headers; + Aws::StringStream ss; + if (m_prefixHeadersHasBeenSet) { + for (const auto& item : m_prefixHeaders) { + ss << "" << item.first; + headers.emplace(ss.str(), item.second); + ss.str(""); + } + } + + if (m_specificHeaderHasBeenSet) { + ss << m_specificHeader; + headers.emplace("hello", ss.str()); + ss.str(""); + } + + return headers; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpEmptyPrefixHeadersResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpEmptyPrefixHeadersResult.cpp new file mode 100644 index 000000000000..d4e4a6e6e5f8 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpEmptyPrefixHeadersResult.cpp @@ -0,0 +1,50 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::RestJsonProtocol::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; +using namespace Aws; + +HttpEmptyPrefixHeadersResult::HttpEmptyPrefixHeadersResult(const Aws::AmazonWebServiceResult& result) { *this = result; } + +HttpEmptyPrefixHeadersResult& HttpEmptyPrefixHeadersResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + AWS_UNREFERENCED_PARAM(result); + + const auto& headers = result.GetHeaderValueCollection(); + std::size_t prefixSize = sizeof("") - 1; // subtract the NULL terminator out + for (const auto& item : headers) { + std::size_t foundPrefix = item.first.find(""); + + if (foundPrefix != std::string::npos) { + m_prefixHeaders[item.first.substr(prefixSize)] = item.second; + m_prefixHeadersHasBeenSet = true; + } + } + + const auto& specificHeaderIter = headers.find("hello"); + if (specificHeaderIter != headers.end()) { + m_specificHeader = specificHeaderIter->second; + m_specificHeaderHasBeenSet = true; + } + + const auto& requestIdIter = headers.find("x-amzn-requestid"); + if (requestIdIter != headers.end()) { + m_requestId = requestIdIter->second; + m_requestIdHasBeenSet = true; + } + + return *this; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpEnumPayloadResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpEnumPayloadResult.cpp index 4008c6431fff..6957a5a23f1f 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpEnumPayloadResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpEnumPayloadResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; HttpEnumPayloadResult::HttpEnumPayloadResult(const Aws::AmazonWebServiceResult& result) { *this = result; } HttpEnumPayloadResult& HttpEnumPayloadResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); m_payload = StringEnumMapper::GetStringEnumForName(jsonValue.GetString("payload")); m_payloadHasBeenSet = true; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadTraitsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadTraitsResult.cpp index c675bc120237..b24e032f7d45 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadTraitsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadTraitsResult.cpp @@ -19,6 +19,7 @@ using namespace Aws; HttpPayloadTraitsResult::HttpPayloadTraitsResult(Aws::AmazonWebServiceResult&& result) { *this = std::move(result); } HttpPayloadTraitsResult& HttpPayloadTraitsResult::operator=(Aws::AmazonWebServiceResult&& result) { + m_HttpResponseCode = result.GetResponseCode(); m_blob = result.TakeOwnershipOfPayload(); m_blobHasBeenSet = true; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadWithStructureResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadWithStructureResult.cpp index c3a6631b73c0..77d197bfd2e2 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadWithStructureResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadWithStructureResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; HttpPayloadWithStructureResult::HttpPayloadWithStructureResult(const Aws::AmazonWebServiceResult& result) { *this = result; } HttpPayloadWithStructureResult& HttpPayloadWithStructureResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); m_nested = jsonValue; m_nestedHasBeenSet = true; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadWithUnionResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadWithUnionResult.cpp index 7cb6957299df..1ec0a0010f34 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadWithUnionResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPayloadWithUnionResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; HttpPayloadWithUnionResult::HttpPayloadWithUnionResult(const Aws::AmazonWebServiceResult& result) { *this = result; } HttpPayloadWithUnionResult& HttpPayloadWithUnionResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); m_nested = jsonValue; m_nestedHasBeenSet = true; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPrefixHeadersInResponseResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPrefixHeadersInResponseResult.cpp index af567fdb6c4b..670f2d06b9ae 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPrefixHeadersInResponseResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPrefixHeadersInResponseResult.cpp @@ -22,6 +22,7 @@ HttpPrefixHeadersInResponseResult::HttpPrefixHeadersInResponseResult(const Aws:: } HttpPrefixHeadersInResponseResult& HttpPrefixHeadersInResponseResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPrefixHeadersResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPrefixHeadersResult.cpp index beca759fb98d..76e053d51407 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPrefixHeadersResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpPrefixHeadersResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; HttpPrefixHeadersResult::HttpPrefixHeadersResult(const Aws::AmazonWebServiceResult& result) { *this = result; } HttpPrefixHeadersResult& HttpPrefixHeadersResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpQueryParamsOnlyOperationRequest.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpQueryParamsOnlyOperationRequest.cpp new file mode 100644 index 000000000000..7f10ea22cbb0 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpQueryParamsOnlyOperationRequest.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 + +#include + +using namespace Aws::RestJsonProtocol::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; +using namespace Aws::Http; + +Aws::String HttpQueryParamsOnlyOperationRequest::SerializePayload() const { return {}; } + +void HttpQueryParamsOnlyOperationRequest::AddQueryStringParameters(URI& uri) const { + Aws::StringStream ss; + if (m_queryMapHasBeenSet) { + for (auto& item : m_queryMap) { + ss << item.second; + uri.AddQueryStringParameter(item.first.c_str(), ss.str()); + ss.str(""); + } + } +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpResponseCodeResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpResponseCodeResult.cpp index 7cff9941e937..f79ec31849d4 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpResponseCodeResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpResponseCodeResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; HttpResponseCodeResult::HttpResponseCodeResult(const Aws::AmazonWebServiceResult& result) { *this = result; } HttpResponseCodeResult& HttpResponseCodeResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpStringPayloadResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpStringPayloadResult.cpp index 3f97bbc931c5..57eb2846937c 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpStringPayloadResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/HttpStringPayloadResult.cpp @@ -18,6 +18,7 @@ using namespace Aws; HttpStringPayloadResult::HttpStringPayloadResult(Aws::AmazonWebServiceResult&& result) { *this = std::move(result); } HttpStringPayloadResult& HttpStringPayloadResult::operator=(Aws::AmazonWebServiceResult&& result) { + m_HttpResponseCode = result.GetResponseCode(); m_payload = result.TakeOwnershipOfPayload(); m_payloadHasBeenSet = true; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/IgnoreQueryParamsInResponseResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/IgnoreQueryParamsInResponseResult.cpp index c587b6e23cc0..c971945dcefa 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/IgnoreQueryParamsInResponseResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/IgnoreQueryParamsInResponseResult.cpp @@ -22,6 +22,7 @@ IgnoreQueryParamsInResponseResult::IgnoreQueryParamsInResponseResult(const Aws:: } IgnoreQueryParamsInResponseResult& IgnoreQueryParamsInResponseResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/InputAndOutputWithHeadersResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/InputAndOutputWithHeadersResult.cpp index c6c44f5ec8f8..438791c2ca5c 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/InputAndOutputWithHeadersResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/InputAndOutputWithHeadersResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; InputAndOutputWithHeadersResult::InputAndOutputWithHeadersResult(const Aws::AmazonWebServiceResult& result) { *this = result; } InputAndOutputWithHeadersResult& InputAndOutputWithHeadersResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonBlobsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonBlobsResult.cpp index 510603b1736e..74564835ec6d 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonBlobsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonBlobsResult.cpp @@ -21,6 +21,7 @@ using namespace Aws; JsonBlobsResult::JsonBlobsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } JsonBlobsResult& JsonBlobsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("data")) { m_data = HashingUtils::Base64Decode(jsonValue.GetString("data")); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonEnumsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonEnumsResult.cpp index 18fae410dae6..5b181e0255ea 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonEnumsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonEnumsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; JsonEnumsResult::JsonEnumsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } JsonEnumsResult& JsonEnumsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("fooEnum1")) { m_fooEnum1 = FooEnumMapper::GetFooEnumForName(jsonValue.GetString("fooEnum1")); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonIntEnumsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonIntEnumsResult.cpp index 7e4ef80717c8..38c0f9cdd17a 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonIntEnumsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonIntEnumsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; JsonIntEnumsResult::JsonIntEnumsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } JsonIntEnumsResult& JsonIntEnumsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("integerEnum1")) { m_integerEnum1 = jsonValue.GetInteger("integerEnum1"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonListsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonListsResult.cpp index c637500d727c..bef836f0ba74 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonListsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonListsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; JsonListsResult::JsonListsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } JsonListsResult& JsonListsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("stringList")) { Aws::Utils::Array stringListJsonList = jsonValue.GetArray("stringList"); @@ -73,13 +74,13 @@ JsonListsResult& JsonListsResult::operator=(const Aws::AmazonWebServiceResult nestedStringListJsonList = jsonValue.GetArray("nestedStringList"); for (unsigned nestedStringListIndex = 0; nestedStringListIndex < nestedStringListJsonList.GetLength(); ++nestedStringListIndex) { - Aws::Utils::Array stringListJsonList = nestedStringListJsonList[nestedStringListIndex].AsArray(); - Aws::Vector stringListList; - stringListList.reserve((size_t)stringListJsonList.GetLength()); - for (unsigned stringListIndex = 0; stringListIndex < stringListJsonList.GetLength(); ++stringListIndex) { - stringListList.push_back(stringListJsonList[stringListIndex].AsString()); + Aws::Utils::Array stringList2JsonList = nestedStringListJsonList[nestedStringListIndex].AsArray(); + Aws::Vector stringList2List; + stringList2List.reserve((size_t)stringList2JsonList.GetLength()); + for (unsigned stringList2Index = 0; stringList2Index < stringList2JsonList.GetLength(); ++stringList2Index) { + stringList2List.push_back(stringList2JsonList[stringList2Index].AsString()); } - m_nestedStringList.push_back(std::move(stringListList)); + m_nestedStringList.push_back(std::move(stringList2List)); } m_nestedStringListHasBeenSet = true; } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonMapsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonMapsResult.cpp index ddf859262536..8f419fde2534 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonMapsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonMapsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; JsonMapsResult::JsonMapsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } JsonMapsResult& JsonMapsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("denseStructMap")) { Aws::Map denseStructMapJsonMap = jsonValue.GetObject("denseStructMap").GetAllObjects(); @@ -52,13 +53,13 @@ JsonMapsResult& JsonMapsResult::operator=(const Aws::AmazonWebServiceResult denseSetMapJsonMap = jsonValue.GetObject("denseSetMap").GetAllObjects(); for (auto& denseSetMapItem : denseSetMapJsonMap) { - Aws::Utils::Array stringSetJsonList = denseSetMapItem.second.AsArray(); - Aws::Vector stringSetList; - stringSetList.reserve((size_t)stringSetJsonList.GetLength()); - for (unsigned stringSetIndex = 0; stringSetIndex < stringSetJsonList.GetLength(); ++stringSetIndex) { - stringSetList.push_back(stringSetJsonList[stringSetIndex].AsString()); + Aws::Utils::Array stringSet2JsonList = denseSetMapItem.second.AsArray(); + Aws::Vector stringSet2List; + stringSet2List.reserve((size_t)stringSet2JsonList.GetLength()); + for (unsigned stringSet2Index = 0; stringSet2Index < stringSet2JsonList.GetLength(); ++stringSet2Index) { + stringSet2List.push_back(stringSet2JsonList[stringSet2Index].AsString()); } - m_denseSetMap[denseSetMapItem.first] = std::move(stringSetList); + m_denseSetMap[denseSetMapItem.first] = std::move(stringSet2List); } m_denseSetMapHasBeenSet = true; } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonTimestampsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonTimestampsResult.cpp index 22f8baee8c4c..1d6e046d63a0 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonTimestampsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonTimestampsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; JsonTimestampsResult::JsonTimestampsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } JsonTimestampsResult& JsonTimestampsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("normal")) { m_normal = jsonValue.GetDouble("normal"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonUnionsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonUnionsResult.cpp index 54040201f1d3..163f250ec582 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonUnionsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/JsonUnionsResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; JsonUnionsResult::JsonUnionsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } JsonUnionsResult& JsonUnionsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("contents")) { m_contents = jsonValue.GetObject("contents"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/MediaTypeHeaderResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/MediaTypeHeaderResult.cpp index ee30fc57daf7..0df4e5c6486a 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/MediaTypeHeaderResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/MediaTypeHeaderResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; MediaTypeHeaderResult::MediaTypeHeaderResult(const Aws::AmazonWebServiceResult& result) { *this = result; } MediaTypeHeaderResult& MediaTypeHeaderResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NoInputAndOutputResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NoInputAndOutputResult.cpp index 9d14c6791d68..dc23e05df59e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NoInputAndOutputResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NoInputAndOutputResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; NoInputAndOutputResult::NoInputAndOutputResult(const Aws::AmazonWebServiceResult& result) { *this = result; } NoInputAndOutputResult& NoInputAndOutputResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NullAndEmptyHeadersClientResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NullAndEmptyHeadersClientResult.cpp index 7b7fa52f89ec..b59e93884158 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NullAndEmptyHeadersClientResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NullAndEmptyHeadersClientResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; NullAndEmptyHeadersClientResult::NullAndEmptyHeadersClientResult(const Aws::AmazonWebServiceResult& result) { *this = result; } NullAndEmptyHeadersClientResult& NullAndEmptyHeadersClientResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NullAndEmptyHeadersServerResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NullAndEmptyHeadersServerResult.cpp index a79dfefa52a6..a983cff1618f 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NullAndEmptyHeadersServerResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/NullAndEmptyHeadersServerResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; NullAndEmptyHeadersServerResult::NullAndEmptyHeadersServerResult(const Aws::AmazonWebServiceResult& result) { *this = result; } NullAndEmptyHeadersServerResult& NullAndEmptyHeadersServerResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/PostUnionWithJsonNameResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/PostUnionWithJsonNameResult.cpp index 891e8296203d..cd2df22897dd 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/PostUnionWithJsonNameResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/PostUnionWithJsonNameResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; PostUnionWithJsonNameResult::PostUnionWithJsonNameResult(const Aws::AmazonWebServiceResult& result) { *this = result; } PostUnionWithJsonNameResult& PostUnionWithJsonNameResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("value")) { m_value = jsonValue.GetObject("value"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/RecursiveShapesResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/RecursiveShapesResult.cpp index a964e0be2b7e..6e255b5e97b6 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/RecursiveShapesResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/RecursiveShapesResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; RecursiveShapesResult::RecursiveShapesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } RecursiveShapesResult& RecursiveShapesResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("nested")) { m_nested = jsonValue.GetObject("nested"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ResponseCodeHttpFallbackResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ResponseCodeHttpFallbackResult.cpp index 8cc4e8b0cd09..b71ba0653dc6 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ResponseCodeHttpFallbackResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ResponseCodeHttpFallbackResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; ResponseCodeHttpFallbackResult::ResponseCodeHttpFallbackResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ResponseCodeHttpFallbackResult& ResponseCodeHttpFallbackResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ResponseCodeRequiredResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ResponseCodeRequiredResult.cpp index 48d93f11e8f6..0967301dd743 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ResponseCodeRequiredResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/ResponseCodeRequiredResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; ResponseCodeRequiredResult::ResponseCodeRequiredResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ResponseCodeRequiredResult& ResponseCodeRequiredResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SimpleScalarPropertiesResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SimpleScalarPropertiesResult.cpp index bf3ebf3d9efe..4fa1f14c05bd 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SimpleScalarPropertiesResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SimpleScalarPropertiesResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; SimpleScalarPropertiesResult::SimpleScalarPropertiesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } SimpleScalarPropertiesResult& SimpleScalarPropertiesResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("stringValue")) { m_stringValue = jsonValue.GetString("stringValue"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonListsRequest.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonListsRequest.cpp new file mode 100644 index 000000000000..49d95a8c3e4d --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonListsRequest.cpp @@ -0,0 +1,56 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +#include + +using namespace Aws::RestJsonProtocol::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +Aws::String SparseJsonListsRequest::SerializePayload() const { + JsonValue payload; + + if (m_sparseStringListHasBeenSet) { + Aws::Utils::Array sparseStringListJsonList(m_sparseStringList.size()); + for (unsigned sparseStringListIndex = 0; sparseStringListIndex < sparseStringListJsonList.GetLength(); ++sparseStringListIndex) { + if (!m_sparseStringList[sparseStringListIndex].has_value()) { + sparseStringListJsonList[sparseStringListIndex].AsNull(); + continue; + } + sparseStringListJsonList[sparseStringListIndex].AsString(*m_sparseStringList[sparseStringListIndex]); + } + payload.WithArray("sparseStringList", std::move(sparseStringListJsonList)); + } + + if (m_sparseShortListHasBeenSet) { + Aws::Utils::Array sparseShortListJsonList(m_sparseShortList.size()); + for (unsigned sparseShortListIndex = 0; sparseShortListIndex < sparseShortListJsonList.GetLength(); ++sparseShortListIndex) { + if (!m_sparseShortList[sparseShortListIndex].has_value()) { + sparseShortListJsonList[sparseShortListIndex].AsNull(); + continue; + } + sparseShortListJsonList[sparseShortListIndex].AsInteger(*m_sparseShortList[sparseShortListIndex]); + } + payload.WithArray("sparseShortList", std::move(sparseShortListJsonList)); + } + + return payload.View().WriteReadable(); +} + +Aws::Http::HeaderValueCollection SparseJsonListsRequest::GetRequestSpecificHeaders() const { + Aws::Http::HeaderValueCollection headers; + Aws::StringStream ss; + if (m_requestIdHasBeenSet) { + ss << m_requestId; + headers.emplace("x-amzn-requestid", ss.str()); + ss.str(""); + } + + return headers; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonListsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonListsResult.cpp new file mode 100644 index 000000000000..81300423a16d --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonListsResult.cpp @@ -0,0 +1,56 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::RestJsonProtocol::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; +using namespace Aws; + +SparseJsonListsResult::SparseJsonListsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } + +SparseJsonListsResult& SparseJsonListsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + JsonView jsonValue = result.GetPayload().View(); + if (jsonValue.ValueExists("sparseStringList")) { + Aws::Utils::Array sparseStringListJsonList = jsonValue.GetArray("sparseStringList"); + for (unsigned sparseStringListIndex = 0; sparseStringListIndex < sparseStringListJsonList.GetLength(); ++sparseStringListIndex) { + if (sparseStringListJsonList[sparseStringListIndex].IsNull()) { + m_sparseStringList.emplace_back(); + continue; + } + m_sparseStringList.emplace_back(sparseStringListJsonList[sparseStringListIndex].AsString()); + } + m_sparseStringListHasBeenSet = true; + } + if (jsonValue.ValueExists("sparseShortList")) { + Aws::Utils::Array sparseShortListJsonList = jsonValue.GetArray("sparseShortList"); + for (unsigned sparseShortListIndex = 0; sparseShortListIndex < sparseShortListJsonList.GetLength(); ++sparseShortListIndex) { + if (sparseShortListJsonList[sparseShortListIndex].IsNull()) { + m_sparseShortList.emplace_back(); + continue; + } + m_sparseShortList.emplace_back(sparseShortListJsonList[sparseShortListIndex].AsInteger()); + } + m_sparseShortListHasBeenSet = true; + } + + const auto& headers = result.GetHeaderValueCollection(); + const auto& requestIdIter = headers.find("x-amzn-requestid"); + if (requestIdIter != headers.end()) { + m_requestId = requestIdIter->second; + m_requestIdHasBeenSet = true; + } + + return *this; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonMapsRequest.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonMapsRequest.cpp new file mode 100644 index 000000000000..6f7b097a37ed --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonMapsRequest.cpp @@ -0,0 +1,96 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +#include + +using namespace Aws::RestJsonProtocol::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +Aws::String SparseJsonMapsRequest::SerializePayload() const { + JsonValue payload; + + if (m_sparseStructMapHasBeenSet) { + JsonValue sparseStructMapJsonMap; + for (auto& sparseStructMapItem : m_sparseStructMap) { + if (!sparseStructMapItem.second.has_value()) { + sparseStructMapJsonMap.WithNull(sparseStructMapItem.first); + continue; + } + sparseStructMapJsonMap.WithObject(sparseStructMapItem.first, sparseStructMapItem.second->Jsonize()); + } + payload.WithObject("sparseStructMap", std::move(sparseStructMapJsonMap)); + } + + if (m_sparseNumberMapHasBeenSet) { + JsonValue sparseNumberMapJsonMap; + for (auto& sparseNumberMapItem : m_sparseNumberMap) { + if (!sparseNumberMapItem.second.has_value()) { + sparseNumberMapJsonMap.WithNull(sparseNumberMapItem.first); + continue; + } + sparseNumberMapJsonMap.WithInteger(sparseNumberMapItem.first, *sparseNumberMapItem.second); + } + payload.WithObject("sparseNumberMap", std::move(sparseNumberMapJsonMap)); + } + + if (m_sparseBooleanMapHasBeenSet) { + JsonValue sparseBooleanMapJsonMap; + for (auto& sparseBooleanMapItem : m_sparseBooleanMap) { + if (!sparseBooleanMapItem.second.has_value()) { + sparseBooleanMapJsonMap.WithNull(sparseBooleanMapItem.first); + continue; + } + sparseBooleanMapJsonMap.WithBool(sparseBooleanMapItem.first, *sparseBooleanMapItem.second); + } + payload.WithObject("sparseBooleanMap", std::move(sparseBooleanMapJsonMap)); + } + + if (m_sparseStringMapHasBeenSet) { + JsonValue sparseStringMapJsonMap; + for (auto& sparseStringMapItem : m_sparseStringMap) { + if (!sparseStringMapItem.second.has_value()) { + sparseStringMapJsonMap.WithNull(sparseStringMapItem.first); + continue; + } + sparseStringMapJsonMap.WithString(sparseStringMapItem.first, *sparseStringMapItem.second); + } + payload.WithObject("sparseStringMap", std::move(sparseStringMapJsonMap)); + } + + if (m_sparseSetMapHasBeenSet) { + JsonValue sparseSetMapJsonMap; + for (auto& sparseSetMapItem : m_sparseSetMap) { + if (!sparseSetMapItem.second.has_value()) { + sparseSetMapJsonMap.WithNull(sparseSetMapItem.first); + continue; + } + Aws::Utils::Array stringSetJsonList((*sparseSetMapItem.second).size()); + for (unsigned stringSetIndex = 0; stringSetIndex < stringSetJsonList.GetLength(); ++stringSetIndex) { + stringSetJsonList[stringSetIndex].AsString((*sparseSetMapItem.second)[stringSetIndex]); + } + sparseSetMapJsonMap.WithArray(sparseSetMapItem.first, std::move(stringSetJsonList)); + } + payload.WithObject("sparseSetMap", std::move(sparseSetMapJsonMap)); + } + + return payload.View().WriteReadable(); +} + +Aws::Http::HeaderValueCollection SparseJsonMapsRequest::GetRequestSpecificHeaders() const { + Aws::Http::HeaderValueCollection headers; + Aws::StringStream ss; + if (m_requestIdHasBeenSet) { + ss << m_requestId; + headers.emplace("x-amzn-requestid", ss.str()); + ss.str(""); + } + + return headers; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonMapsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonMapsResult.cpp new file mode 100644 index 000000000000..6f0b232812cb --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/SparseJsonMapsResult.cpp @@ -0,0 +1,95 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::RestJsonProtocol::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; +using namespace Aws; + +SparseJsonMapsResult::SparseJsonMapsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } + +SparseJsonMapsResult& SparseJsonMapsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + JsonView jsonValue = result.GetPayload().View(); + if (jsonValue.ValueExists("sparseStructMap")) { + Aws::Map sparseStructMapJsonMap = jsonValue.GetObject("sparseStructMap").GetAllObjects(); + for (auto& sparseStructMapItem : sparseStructMapJsonMap) { + if (sparseStructMapItem.second.IsNull()) { + m_sparseStructMap[sparseStructMapItem.first]; + continue; + } + m_sparseStructMap[sparseStructMapItem.first] = sparseStructMapItem.second.AsObject(); + } + m_sparseStructMapHasBeenSet = true; + } + if (jsonValue.ValueExists("sparseNumberMap")) { + Aws::Map sparseNumberMapJsonMap = jsonValue.GetObject("sparseNumberMap").GetAllObjects(); + for (auto& sparseNumberMapItem : sparseNumberMapJsonMap) { + if (sparseNumberMapItem.second.IsNull()) { + m_sparseNumberMap[sparseNumberMapItem.first]; + continue; + } + m_sparseNumberMap[sparseNumberMapItem.first] = sparseNumberMapItem.second.AsInteger(); + } + m_sparseNumberMapHasBeenSet = true; + } + if (jsonValue.ValueExists("sparseBooleanMap")) { + Aws::Map sparseBooleanMapJsonMap = jsonValue.GetObject("sparseBooleanMap").GetAllObjects(); + for (auto& sparseBooleanMapItem : sparseBooleanMapJsonMap) { + if (sparseBooleanMapItem.second.IsNull()) { + m_sparseBooleanMap[sparseBooleanMapItem.first]; + continue; + } + m_sparseBooleanMap[sparseBooleanMapItem.first] = sparseBooleanMapItem.second.AsBool(); + } + m_sparseBooleanMapHasBeenSet = true; + } + if (jsonValue.ValueExists("sparseStringMap")) { + Aws::Map sparseStringMapJsonMap = jsonValue.GetObject("sparseStringMap").GetAllObjects(); + for (auto& sparseStringMapItem : sparseStringMapJsonMap) { + if (sparseStringMapItem.second.IsNull()) { + m_sparseStringMap[sparseStringMapItem.first]; + continue; + } + m_sparseStringMap[sparseStringMapItem.first] = sparseStringMapItem.second.AsString(); + } + m_sparseStringMapHasBeenSet = true; + } + if (jsonValue.ValueExists("sparseSetMap")) { + Aws::Map sparseSetMapJsonMap = jsonValue.GetObject("sparseSetMap").GetAllObjects(); + for (auto& sparseSetMapItem : sparseSetMapJsonMap) { + if (sparseSetMapItem.second.IsNull()) { + m_sparseSetMap[sparseSetMapItem.first]; + continue; + } + Aws::Utils::Array stringSet2JsonList = sparseSetMapItem.second.AsArray(); + Aws::Vector stringSet2List; + stringSet2List.reserve((size_t)stringSet2JsonList.GetLength()); + for (unsigned stringSet2Index = 0; stringSet2Index < stringSet2JsonList.GetLength(); ++stringSet2Index) { + stringSet2List.push_back(stringSet2JsonList[stringSet2Index].AsString()); + } + m_sparseSetMap[sparseSetMapItem.first] = std::move(stringSet2List); + } + m_sparseSetMapHasBeenSet = true; + } + + const auto& headers = result.GetHeaderValueCollection(); + const auto& requestIdIter = headers.find("x-amzn-requestid"); + if (requestIdIter != headers.end()) { + m_requestId = requestIdIter->second; + m_requestIdHasBeenSet = true; + } + + return *this; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestBodyStructureResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestBodyStructureResult.cpp index 9778ac4e40c9..fb4eb926d1bb 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestBodyStructureResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestBodyStructureResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; TestBodyStructureResult::TestBodyStructureResult(const Aws::AmazonWebServiceResult& result) { *this = result; } TestBodyStructureResult& TestBodyStructureResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); if (jsonValue.ValueExists("testConfig")) { m_testConfig = jsonValue.GetObject("testConfig"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestGetNoInputNoPayloadResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestGetNoInputNoPayloadResult.cpp index e6427eaff063..6360f9bd6658 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestGetNoInputNoPayloadResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestGetNoInputNoPayloadResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; TestGetNoInputNoPayloadResult::TestGetNoInputNoPayloadResult(const Aws::AmazonWebServiceResult& result) { *this = result; } TestGetNoInputNoPayloadResult& TestGetNoInputNoPayloadResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestGetNoPayloadResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestGetNoPayloadResult.cpp index 6d77118f62b2..f7393683628e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestGetNoPayloadResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestGetNoPayloadResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; TestGetNoPayloadResult::TestGetNoPayloadResult(const Aws::AmazonWebServiceResult& result) { *this = result; } TestGetNoPayloadResult& TestGetNoPayloadResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPayloadBlobResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPayloadBlobResult.cpp index be54f1073c45..b597a48b16bf 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPayloadBlobResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPayloadBlobResult.cpp @@ -19,6 +19,7 @@ using namespace Aws; TestPayloadBlobResult::TestPayloadBlobResult(Aws::AmazonWebServiceResult&& result) { *this = std::move(result); } TestPayloadBlobResult& TestPayloadBlobResult::operator=(Aws::AmazonWebServiceResult&& result) { + m_HttpResponseCode = result.GetResponseCode(); m_data = result.TakeOwnershipOfPayload(); m_dataHasBeenSet = true; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPayloadStructureResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPayloadStructureResult.cpp index dea1705ae3db..461c1b921b3d 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPayloadStructureResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPayloadStructureResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; TestPayloadStructureResult::TestPayloadStructureResult(const Aws::AmazonWebServiceResult& result) { *this = result; } TestPayloadStructureResult& TestPayloadStructureResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); JsonView jsonValue = result.GetPayload().View(); m_payloadConfig = jsonValue; m_payloadConfigHasBeenSet = true; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPostNoInputNoPayloadResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPostNoInputNoPayloadResult.cpp index 973e022bef30..a70affc6184a 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPostNoInputNoPayloadResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPostNoInputNoPayloadResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; TestPostNoInputNoPayloadResult::TestPostNoInputNoPayloadResult(const Aws::AmazonWebServiceResult& result) { *this = result; } TestPostNoInputNoPayloadResult& TestPostNoInputNoPayloadResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPostNoPayloadResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPostNoPayloadResult.cpp index 809ec08171ea..473d13e74405 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPostNoPayloadResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TestPostNoPayloadResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; TestPostNoPayloadResult::TestPostNoPayloadResult(const Aws::AmazonWebServiceResult& result) { *this = result; } TestPostNoPayloadResult& TestPostNoPayloadResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TimestampFormatHeadersResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TimestampFormatHeadersResult.cpp index 87b691cc9ba0..b94a46a17713 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TimestampFormatHeadersResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rest-json-protocol/source/model/TimestampFormatHeadersResult.cpp @@ -20,6 +20,7 @@ using namespace Aws; TimestampFormatHeadersResult::TimestampFormatHeadersResult(const Aws::AmazonWebServiceResult& result) { *this = result; } TimestampFormatHeadersResult& TimestampFormatHeadersResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); AWS_UNREFERENCED_PARAM(result); const auto& headers = result.GetHeaderValueCollection(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/RpcV2ProtocolClient.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/RpcV2ProtocolClient.h index 343620559b89..b3bd34961186 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/RpcV2ProtocolClient.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/RpcV2ProtocolClient.h @@ -305,6 +305,31 @@ class AWS_RPCV2PROTOCOL_API RpcV2ProtocolClient : public Aws::Client::AWSRpcV2Cb return SubmitAsync(&RpcV2ProtocolClient::RpcV2CborLists, request, handler, context); } + /** + * + */ + virtual Model::RpcV2CborSparseMapsOutcome RpcV2CborSparseMaps(const Model::RpcV2CborSparseMapsRequest& request = {}) const; + + /** + * A Callable wrapper for RpcV2CborSparseMaps that returns a future to the operation so that it can be executed in parallel to other + * requests. + */ + template + Model::RpcV2CborSparseMapsOutcomeCallable RpcV2CborSparseMapsCallable(const RpcV2CborSparseMapsRequestT& request = {}) const { + return SubmitCallable(&RpcV2ProtocolClient::RpcV2CborSparseMaps, request); + } + + /** + * An Async wrapper for RpcV2CborSparseMaps that queues the request into a thread executor and triggers associated callback when operation + * has finished. + */ + template + void RpcV2CborSparseMapsAsync(const RpcV2CborSparseMapsResponseReceivedHandler& handler, + const std::shared_ptr& context = nullptr, + const RpcV2CborSparseMapsRequestT& request = {}) const { + return SubmitAsync(&RpcV2ProtocolClient::RpcV2CborSparseMaps, request, handler, context); + } + /** * */ @@ -330,8 +355,33 @@ class AWS_RPCV2PROTOCOL_API RpcV2ProtocolClient : public Aws::Client::AWSRpcV2Cb return SubmitAsync(&RpcV2ProtocolClient::SimpleScalarProperties, request, handler, context); } - void OverrideEndpoint(const Aws::String& endpoint); - std::shared_ptr& accessEndpointProvider(); + /** + * + */ + virtual Model::SparseNullsOperationOutcome SparseNullsOperation(const Model::SparseNullsOperationRequest& request = {}) const; + + /** + * A Callable wrapper for SparseNullsOperation that returns a future to the operation so that it can be executed in parallel to other + * requests. + */ + template + Model::SparseNullsOperationOutcomeCallable SparseNullsOperationCallable(const SparseNullsOperationRequestT& request = {}) const { + return SubmitCallable(&RpcV2ProtocolClient::SparseNullsOperation, request); + } + + /** + * An Async wrapper for SparseNullsOperation that queues the request into a thread executor and triggers associated callback when + * operation has finished. + */ + template + void SparseNullsOperationAsync(const SparseNullsOperationResponseReceivedHandler& handler, + const std::shared_ptr& context = nullptr, + const SparseNullsOperationRequestT& request = {}) const { + return SubmitAsync(&RpcV2ProtocolClient::SparseNullsOperation, request, handler, context); + } + + virtual void OverrideEndpoint(const Aws::String& endpoint); + virtual std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/RpcV2ProtocolServiceClientModel.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/RpcV2ProtocolServiceClientModel.h index f5a811e04566..490a6a30c2db 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/RpcV2ProtocolServiceClientModel.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/RpcV2ProtocolServiceClientModel.h @@ -37,8 +37,12 @@ #include #include #include +#include +#include #include #include +#include +#include /* End of service model headers required in RpcV2ProtocolClient header */ namespace Aws { @@ -81,7 +85,9 @@ class OptionalInputOutputRequest; class RecursiveShapesRequest; class RpcV2CborDenseMapsRequest; class RpcV2CborListsRequest; +class RpcV2CborSparseMapsRequest; class SimpleScalarPropertiesRequest; +class SparseNullsOperationRequest; /* End of service model forward declarations required in RpcV2ProtocolClient header */ /* Service model Outcome class definitions */ @@ -94,7 +100,9 @@ typedef Aws::Utils::Outcome Optio typedef Aws::Utils::Outcome RecursiveShapesOutcome; typedef Aws::Utils::Outcome RpcV2CborDenseMapsOutcome; typedef Aws::Utils::Outcome RpcV2CborListsOutcome; +typedef Aws::Utils::Outcome RpcV2CborSparseMapsOutcome; typedef Aws::Utils::Outcome SimpleScalarPropertiesOutcome; +typedef Aws::Utils::Outcome SparseNullsOperationOutcome; /* End of service model Outcome class definitions */ /* Service model Outcome callable definitions */ @@ -107,7 +115,9 @@ typedef std::future OptionalInputOutputOutcomeCallab typedef std::future RecursiveShapesOutcomeCallable; typedef std::future RpcV2CborDenseMapsOutcomeCallable; typedef std::future RpcV2CborListsOutcomeCallable; +typedef std::future RpcV2CborSparseMapsOutcomeCallable; typedef std::future SimpleScalarPropertiesOutcomeCallable; +typedef std::future SparseNullsOperationOutcomeCallable; /* End of service model Outcome callable definitions */ } // namespace Model @@ -141,9 +151,15 @@ typedef std::function&)> RpcV2CborListsResponseReceivedHandler; +typedef std::function&)> + RpcV2CborSparseMapsResponseReceivedHandler; typedef std::function&)> SimpleScalarPropertiesResponseReceivedHandler; +typedef std::function&)> + SparseNullsOperationResponseReceivedHandler; /* End of service model async handlers definitions */ } // namespace RpcV2Protocol } // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ComplexError.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ComplexError.h index 8689d2427fed..cce89cbf7390 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ComplexError.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ComplexError.h @@ -65,9 +65,9 @@ class ComplexError { ///@} private: Aws::String m_topLevel; - bool m_topLevelHasBeenSet = false; ComplexNestedErrorData m_nested; + bool m_topLevelHasBeenSet = false; bool m_nestedHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/EmptyInputOutputResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/EmptyInputOutputResult.h index 732e1d5c8520..186ae9dc99d2 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/EmptyInputOutputResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/EmptyInputOutputResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -40,8 +41,11 @@ class EmptyInputOutputResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/Float16Result.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/Float16Result.h index 7cab1a5dbf48..27eb1ec0f3ee 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/Float16Result.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/Float16Result.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -53,11 +54,14 @@ class Float16Result { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: double m_value{0.0}; - bool m_valueHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_valueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/FractionalSecondsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/FractionalSecondsResult.h index 686c97e9fba4..3b2c7c751379 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/FractionalSecondsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/FractionalSecondsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class FractionalSecondsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Utils::DateTime m_datetime{}; - bool m_datetimeHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_datetimeHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/GreetingWithErrorsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/GreetingWithErrorsResult.h index 544152a31900..598347295ffb 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/GreetingWithErrorsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/GreetingWithErrorsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -55,11 +56,14 @@ class GreetingWithErrorsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_greeting; - bool m_greetingHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_greetingHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/OptionalInputOutputRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/OptionalInputOutputRequest.h index 951fd8bff889..7e31f68708a1 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/OptionalInputOutputRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/OptionalInputOutputRequest.h @@ -63,9 +63,9 @@ class OptionalInputOutputRequest : public RpcV2ProtocolRequest { ///@} private: Aws::String m_value; - bool m_valueHasBeenSet = false; Aws::String m_requestId; + bool m_valueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/OptionalInputOutputResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/OptionalInputOutputResult.h index cf7aae590287..6cae9a3cf550 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/OptionalInputOutputResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/OptionalInputOutputResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -55,11 +56,14 @@ class OptionalInputOutputResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::String m_value; - bool m_valueHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_valueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesInputOutputNested1.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesInputOutputNested1.h index bef3e7ba8e07..131b677f1df6 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesInputOutputNested1.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesInputOutputNested1.h @@ -61,9 +61,9 @@ class RecursiveShapesInputOutputNested1 { ///@} private: Aws::String m_foo; - bool m_fooHasBeenSet = false; std::shared_ptr m_nested; + bool m_fooHasBeenSet = false; bool m_nestedHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesInputOutputNested2.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesInputOutputNested2.h index 762f139e1e19..b4fe373bddf8 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesInputOutputNested2.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesInputOutputNested2.h @@ -62,9 +62,9 @@ class RecursiveShapesInputOutputNested2 { ///@} private: Aws::String m_bar; - bool m_barHasBeenSet = false; std::shared_ptr m_recursiveMember; + bool m_barHasBeenSet = false; bool m_recursiveMemberHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesRequest.h index c881bb526f87..1a5f8975eb61 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesRequest.h @@ -64,9 +64,9 @@ class RecursiveShapesRequest : public RpcV2ProtocolRequest { ///@} private: RecursiveShapesInputOutputNested1 m_nested; - bool m_nestedHasBeenSet = false; Aws::String m_requestId; + bool m_nestedHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesResult.h index 319537a3df37..0615b479e29a 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RecursiveShapesResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -56,11 +57,14 @@ class RecursiveShapesResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: RecursiveShapesInputOutputNested1 m_nested; - bool m_nestedHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_nestedHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborDenseMapsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborDenseMapsRequest.h index 2a9faf0a5baf..35548308c5b7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborDenseMapsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborDenseMapsRequest.h @@ -158,21 +158,21 @@ class RpcV2CborDenseMapsRequest : public RpcV2ProtocolRequest { ///@} private: Aws::Map m_denseStructMap; - bool m_denseStructMapHasBeenSet = false; Aws::Map m_denseNumberMap; - bool m_denseNumberMapHasBeenSet = false; Aws::Map m_denseBooleanMap; - bool m_denseBooleanMapHasBeenSet = false; Aws::Map m_denseStringMap; - bool m_denseStringMapHasBeenSet = false; Aws::Map> m_denseSetMap; - bool m_denseSetMapHasBeenSet = false; Aws::String m_requestId; + bool m_denseStructMapHasBeenSet = false; + bool m_denseNumberMapHasBeenSet = false; + bool m_denseBooleanMapHasBeenSet = false; + bool m_denseStringMapHasBeenSet = false; + bool m_denseSetMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborDenseMapsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborDenseMapsResult.h index 756777946799..3e913f8778e1 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborDenseMapsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborDenseMapsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -146,23 +147,26 @@ class RpcV2CborDenseMapsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Map m_denseStructMap; - bool m_denseStructMapHasBeenSet = false; Aws::Map m_denseNumberMap; - bool m_denseNumberMapHasBeenSet = false; Aws::Map m_denseBooleanMap; - bool m_denseBooleanMapHasBeenSet = false; Aws::Map m_denseStringMap; - bool m_denseStringMapHasBeenSet = false; Aws::Map> m_denseSetMap; - bool m_denseSetMapHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_denseStructMapHasBeenSet = false; + bool m_denseNumberMapHasBeenSet = false; + bool m_denseBooleanMapHasBeenSet = false; + bool m_denseStringMapHasBeenSet = false; + bool m_denseSetMapHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborListsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborListsRequest.h index 85ff0bba3b99..dc798d70aa8c 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborListsRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborListsRequest.h @@ -268,36 +268,36 @@ class RpcV2CborListsRequest : public RpcV2ProtocolRequest { ///@} private: Aws::Vector m_stringList; - bool m_stringListHasBeenSet = false; Aws::Vector m_stringSet; - bool m_stringSetHasBeenSet = false; Aws::Vector m_integerList; - bool m_integerListHasBeenSet = false; Aws::Vector m_booleanList; - bool m_booleanListHasBeenSet = false; Aws::Vector m_timestampList; - bool m_timestampListHasBeenSet = false; Aws::Vector m_enumList; - bool m_enumListHasBeenSet = false; Aws::Vector m_intEnumList; - bool m_intEnumListHasBeenSet = false; Aws::Vector> m_nestedStringList; - bool m_nestedStringListHasBeenSet = false; Aws::Vector m_structureList; - bool m_structureListHasBeenSet = false; Aws::Vector m_blobList; - bool m_blobListHasBeenSet = false; Aws::String m_requestId; + bool m_stringListHasBeenSet = false; + bool m_stringSetHasBeenSet = false; + bool m_integerListHasBeenSet = false; + bool m_booleanListHasBeenSet = false; + bool m_timestampListHasBeenSet = false; + bool m_enumListHasBeenSet = false; + bool m_intEnumListHasBeenSet = false; + bool m_nestedStringListHasBeenSet = false; + bool m_structureListHasBeenSet = false; + bool m_blobListHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborListsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborListsResult.h index 32c8831e6e68..73a97445b58c 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborListsResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborListsResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -251,38 +252,41 @@ class RpcV2CborListsResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: Aws::Vector m_stringList; - bool m_stringListHasBeenSet = false; Aws::Vector m_stringSet; - bool m_stringSetHasBeenSet = false; Aws::Vector m_integerList; - bool m_integerListHasBeenSet = false; Aws::Vector m_booleanList; - bool m_booleanListHasBeenSet = false; Aws::Vector m_timestampList; - bool m_timestampListHasBeenSet = false; Aws::Vector m_enumList; - bool m_enumListHasBeenSet = false; Aws::Vector m_intEnumList; - bool m_intEnumListHasBeenSet = false; Aws::Vector> m_nestedStringList; - bool m_nestedStringListHasBeenSet = false; Aws::Vector m_structureList; - bool m_structureListHasBeenSet = false; Aws::Vector m_blobList; - bool m_blobListHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_stringListHasBeenSet = false; + bool m_stringSetHasBeenSet = false; + bool m_integerListHasBeenSet = false; + bool m_booleanListHasBeenSet = false; + bool m_timestampListHasBeenSet = false; + bool m_enumListHasBeenSet = false; + bool m_intEnumListHasBeenSet = false; + bool m_nestedStringListHasBeenSet = false; + bool m_structureListHasBeenSet = false; + bool m_blobListHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborSparseMapsRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborSparseMapsRequest.h new file mode 100644 index 000000000000..f0e95fdc9217 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborSparseMapsRequest.h @@ -0,0 +1,207 @@ +/** + * 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 + +#include + +namespace Aws { +namespace RpcV2Protocol { +namespace Model { + +/** + */ +class RpcV2CborSparseMapsRequest : public RpcV2ProtocolRequest { + public: + AWS_RPCV2PROTOCOL_API RpcV2CborSparseMapsRequest() = 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 "RpcV2CborSparseMaps"; } + + AWS_RPCV2PROTOCOL_API Aws::String SerializePayload() const override; + + AWS_RPCV2PROTOCOL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + ///@{ + + inline const Aws::Map>& GetSparseStructMap() const { return m_sparseStructMap; } + inline bool SparseStructMapHasBeenSet() const { return m_sparseStructMapHasBeenSet; } + template >> + void SetSparseStructMap(SparseStructMapT&& value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap = std::forward(value); + } + template >> + RpcV2CborSparseMapsRequest& WithSparseStructMap(SparseStructMapT&& value) { + SetSparseStructMap(std::forward(value)); + return *this; + } + template > + RpcV2CborSparseMapsRequest& AddSparseStructMap(SparseStructMapKeyT&& key, SparseStructMapValueT&& value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline RpcV2CborSparseMapsRequest& AddSparseStructMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseNumberMap() const { return m_sparseNumberMap; } + inline bool SparseNumberMapHasBeenSet() const { return m_sparseNumberMapHasBeenSet; } + template >> + void SetSparseNumberMap(SparseNumberMapT&& value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap = std::forward(value); + } + template >> + RpcV2CborSparseMapsRequest& WithSparseNumberMap(SparseNumberMapT&& value) { + SetSparseNumberMap(std::forward(value)); + return *this; + } + inline RpcV2CborSparseMapsRequest& AddSparseNumberMap(Aws::String key, int value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap.emplace(key, value); + return *this; + } + inline RpcV2CborSparseMapsRequest& AddSparseNumberMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseBooleanMap() const { return m_sparseBooleanMap; } + inline bool SparseBooleanMapHasBeenSet() const { return m_sparseBooleanMapHasBeenSet; } + template >> + void SetSparseBooleanMap(SparseBooleanMapT&& value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap = std::forward(value); + } + template >> + RpcV2CborSparseMapsRequest& WithSparseBooleanMap(SparseBooleanMapT&& value) { + SetSparseBooleanMap(std::forward(value)); + return *this; + } + inline RpcV2CborSparseMapsRequest& AddSparseBooleanMap(Aws::String key, bool value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap.emplace(key, value); + return *this; + } + inline RpcV2CborSparseMapsRequest& AddSparseBooleanMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseStringMap() const { return m_sparseStringMap; } + inline bool SparseStringMapHasBeenSet() const { return m_sparseStringMapHasBeenSet; } + template >> + void SetSparseStringMap(SparseStringMapT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap = std::forward(value); + } + template >> + RpcV2CborSparseMapsRequest& WithSparseStringMap(SparseStringMapT&& value) { + SetSparseStringMap(std::forward(value)); + return *this; + } + template > + RpcV2CborSparseMapsRequest& AddSparseStringMap(SparseStringMapKeyT&& key, SparseStringMapValueT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline RpcV2CborSparseMapsRequest& AddSparseStringMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>>& GetSparseSetMap() const { return m_sparseSetMap; } + inline bool SparseSetMapHasBeenSet() const { return m_sparseSetMapHasBeenSet; } + template >>> + void SetSparseSetMap(SparseSetMapT&& value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap = std::forward(value); + } + template >>> + RpcV2CborSparseMapsRequest& WithSparseSetMap(SparseSetMapT&& value) { + SetSparseSetMap(std::forward(value)); + return *this; + } + template >> + RpcV2CborSparseMapsRequest& AddSparseSetMap(SparseSetMapKeyT&& key, SparseSetMapValueT&& value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline RpcV2CborSparseMapsRequest& AddSparseSetMap(Aws::String key, Aws::Crt::Optional> value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + 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 + RpcV2CborSparseMapsRequest& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + private: + Aws::Map> m_sparseStructMap; + + Aws::Map> m_sparseNumberMap; + + Aws::Map> m_sparseBooleanMap; + + Aws::Map> m_sparseStringMap; + + Aws::Map>> m_sparseSetMap; + + Aws::String m_requestId; + bool m_sparseStructMapHasBeenSet = false; + bool m_sparseNumberMapHasBeenSet = false; + bool m_sparseBooleanMapHasBeenSet = false; + bool m_sparseStringMapHasBeenSet = false; + bool m_sparseSetMapHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace RpcV2Protocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborSparseMapsResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborSparseMapsResult.h new file mode 100644 index 000000000000..e2f93163907d --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/RpcV2CborSparseMapsResult.h @@ -0,0 +1,201 @@ +/** + * 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 +#include + +#include +namespace Aws { +template +class AmazonWebServiceResult; + +namespace Utils { +namespace Cbor { +class CborValue; +} // namespace Cbor +} // namespace Utils +namespace RpcV2Protocol { +namespace Model { +class RpcV2CborSparseMapsResult { + public: + AWS_RPCV2PROTOCOL_API RpcV2CborSparseMapsResult() = default; + AWS_RPCV2PROTOCOL_API RpcV2CborSparseMapsResult(const Aws::AmazonWebServiceResult& result); + AWS_RPCV2PROTOCOL_API RpcV2CborSparseMapsResult& operator=(const Aws::AmazonWebServiceResult& result); + + ///@{ + + inline const Aws::Map>& GetSparseStructMap() const { return m_sparseStructMap; } + template >> + void SetSparseStructMap(SparseStructMapT&& value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap = std::forward(value); + } + template >> + RpcV2CborSparseMapsResult& WithSparseStructMap(SparseStructMapT&& value) { + SetSparseStructMap(std::forward(value)); + return *this; + } + template > + RpcV2CborSparseMapsResult& AddSparseStructMap(SparseStructMapKeyT&& key, SparseStructMapValueT&& value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline RpcV2CborSparseMapsResult& AddSparseStructMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStructMapHasBeenSet = true; + m_sparseStructMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseNumberMap() const { return m_sparseNumberMap; } + template >> + void SetSparseNumberMap(SparseNumberMapT&& value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap = std::forward(value); + } + template >> + RpcV2CborSparseMapsResult& WithSparseNumberMap(SparseNumberMapT&& value) { + SetSparseNumberMap(std::forward(value)); + return *this; + } + inline RpcV2CborSparseMapsResult& AddSparseNumberMap(Aws::String key, int64_t value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap.emplace(key, value); + return *this; + } + inline RpcV2CborSparseMapsResult& AddSparseNumberMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseNumberMapHasBeenSet = true; + m_sparseNumberMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseBooleanMap() const { return m_sparseBooleanMap; } + template >> + void SetSparseBooleanMap(SparseBooleanMapT&& value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap = std::forward(value); + } + template >> + RpcV2CborSparseMapsResult& WithSparseBooleanMap(SparseBooleanMapT&& value) { + SetSparseBooleanMap(std::forward(value)); + return *this; + } + inline RpcV2CborSparseMapsResult& AddSparseBooleanMap(Aws::String key, bool value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap.emplace(key, value); + return *this; + } + inline RpcV2CborSparseMapsResult& AddSparseBooleanMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseBooleanMapHasBeenSet = true; + m_sparseBooleanMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseStringMap() const { return m_sparseStringMap; } + template >> + void SetSparseStringMap(SparseStringMapT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap = std::forward(value); + } + template >> + RpcV2CborSparseMapsResult& WithSparseStringMap(SparseStringMapT&& value) { + SetSparseStringMap(std::forward(value)); + return *this; + } + template > + RpcV2CborSparseMapsResult& AddSparseStringMap(SparseStringMapKeyT&& key, SparseStringMapValueT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline RpcV2CborSparseMapsResult& AddSparseStringMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>>& GetSparseSetMap() const { return m_sparseSetMap; } + template >>> + void SetSparseSetMap(SparseSetMapT&& value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap = std::forward(value); + } + template >>> + RpcV2CborSparseMapsResult& WithSparseSetMap(SparseSetMapT&& value) { + SetSparseSetMap(std::forward(value)); + return *this; + } + template >> + RpcV2CborSparseMapsResult& AddSparseSetMap(SparseSetMapKeyT&& key, SparseSetMapValueT&& value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline RpcV2CborSparseMapsResult& AddSparseSetMap(Aws::String key, Aws::Crt::Optional> value) { + m_sparseSetMapHasBeenSet = true; + m_sparseSetMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetRequestId() const { return m_requestId; } + template + void SetRequestId(RequestIdT&& value) { + m_requestIdHasBeenSet = true; + m_requestId = std::forward(value); + } + template + RpcV2CborSparseMapsResult& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + + private: + Aws::Map> m_sparseStructMap; + + Aws::Map> m_sparseNumberMap; + + Aws::Map> m_sparseBooleanMap; + + Aws::Map> m_sparseStringMap; + + Aws::Map>> m_sparseSetMap; + + Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_sparseStructMapHasBeenSet = false; + bool m_sparseNumberMapHasBeenSet = false; + bool m_sparseBooleanMapHasBeenSet = false; + bool m_sparseStringMapHasBeenSet = false; + bool m_sparseSetMapHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace RpcV2Protocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SimpleScalarPropertiesRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SimpleScalarPropertiesRequest.h index 8e3642a11962..80502b019d5c 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SimpleScalarPropertiesRequest.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SimpleScalarPropertiesRequest.h @@ -192,36 +192,36 @@ class SimpleScalarPropertiesRequest : public RpcV2ProtocolRequest { ///@} private: bool m_trueBooleanValue{false}; - bool m_trueBooleanValueHasBeenSet = false; bool m_falseBooleanValue{false}; - bool m_falseBooleanValueHasBeenSet = false; int m_byteValue{0}; - bool m_byteValueHasBeenSet = false; double m_doubleValue{0.0}; - bool m_doubleValueHasBeenSet = false; double m_floatValue{0.0}; - bool m_floatValueHasBeenSet = false; int m_integerValue{0}; - bool m_integerValueHasBeenSet = false; long long m_longValue{0}; - bool m_longValueHasBeenSet = false; int m_shortValue{0}; - bool m_shortValueHasBeenSet = false; Aws::String m_stringValue; - bool m_stringValueHasBeenSet = false; Aws::Utils::ByteBuffer m_blobValue{}; - bool m_blobValueHasBeenSet = false; Aws::String m_requestId; + bool m_trueBooleanValueHasBeenSet = false; + bool m_falseBooleanValueHasBeenSet = false; + bool m_byteValueHasBeenSet = false; + bool m_doubleValueHasBeenSet = false; + bool m_floatValueHasBeenSet = false; + bool m_integerValueHasBeenSet = false; + bool m_longValueHasBeenSet = false; + bool m_shortValueHasBeenSet = false; + bool m_stringValueHasBeenSet = false; + bool m_blobValueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SimpleScalarPropertiesResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SimpleScalarPropertiesResult.h index 17b240a1a162..e6ff6be1170c 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SimpleScalarPropertiesResult.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SimpleScalarPropertiesResult.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -175,38 +176,41 @@ class SimpleScalarPropertiesResult { return *this; } ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + private: bool m_trueBooleanValue{false}; - bool m_trueBooleanValueHasBeenSet = false; bool m_falseBooleanValue{false}; - bool m_falseBooleanValueHasBeenSet = false; int64_t m_byteValue{0}; - bool m_byteValueHasBeenSet = false; double m_doubleValue{0.0}; - bool m_doubleValueHasBeenSet = false; double m_floatValue{0.0}; - bool m_floatValueHasBeenSet = false; int64_t m_integerValue{0}; - bool m_integerValueHasBeenSet = false; long long m_longValue{0}; - bool m_longValueHasBeenSet = false; int64_t m_shortValue{0}; - bool m_shortValueHasBeenSet = false; Aws::String m_stringValue; - bool m_stringValueHasBeenSet = false; Aws::Utils::ByteBuffer m_blobValue{}; - bool m_blobValueHasBeenSet = false; Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_trueBooleanValueHasBeenSet = false; + bool m_falseBooleanValueHasBeenSet = false; + bool m_byteValueHasBeenSet = false; + bool m_doubleValueHasBeenSet = false; + bool m_floatValueHasBeenSet = false; + bool m_integerValueHasBeenSet = false; + bool m_longValueHasBeenSet = false; + bool m_shortValueHasBeenSet = false; + bool m_stringValueHasBeenSet = false; + bool m_blobValueHasBeenSet = false; bool m_requestIdHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SparseNullsOperationRequest.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SparseNullsOperationRequest.h new file mode 100644 index 000000000000..ec3549676763 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SparseNullsOperationRequest.h @@ -0,0 +1,118 @@ +/** + * 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 RpcV2Protocol { +namespace Model { + +/** + */ +class SparseNullsOperationRequest : public RpcV2ProtocolRequest { + public: + AWS_RPCV2PROTOCOL_API SparseNullsOperationRequest() = 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 "SparseNullsOperation"; } + + AWS_RPCV2PROTOCOL_API Aws::String SerializePayload() const override; + + AWS_RPCV2PROTOCOL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + ///@{ + + inline const Aws::Vector>& GetSparseStringList() const { return m_sparseStringList; } + inline bool SparseStringListHasBeenSet() const { return m_sparseStringListHasBeenSet; } + template >> + void SetSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList = std::forward(value); + } + template >> + SparseNullsOperationRequest& WithSparseStringList(SparseStringListT&& value) { + SetSparseStringList(std::forward(value)); + return *this; + } + template + SparseNullsOperationRequest& AddSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.emplace_back(std::forward(value)); + return *this; + } + inline SparseNullsOperationRequest& AddSparseStringList(Aws::Crt::Optional value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.push_back(value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseStringMap() const { return m_sparseStringMap; } + inline bool SparseStringMapHasBeenSet() const { return m_sparseStringMapHasBeenSet; } + template >> + void SetSparseStringMap(SparseStringMapT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap = std::forward(value); + } + template >> + SparseNullsOperationRequest& WithSparseStringMap(SparseStringMapT&& value) { + SetSparseStringMap(std::forward(value)); + return *this; + } + template > + SparseNullsOperationRequest& AddSparseStringMap(SparseStringMapKeyT&& key, SparseStringMapValueT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline SparseNullsOperationRequest& AddSparseStringMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + 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 + SparseNullsOperationRequest& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + private: + Aws::Vector> m_sparseStringList; + + Aws::Map> m_sparseStringMap; + + Aws::String m_requestId; + bool m_sparseStringListHasBeenSet = false; + bool m_sparseStringMapHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace RpcV2Protocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SparseNullsOperationResult.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SparseNullsOperationResult.h new file mode 100644 index 000000000000..5bdb9898814c --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/SparseNullsOperationResult.h @@ -0,0 +1,115 @@ +/** + * 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 + +#include +namespace Aws { +template +class AmazonWebServiceResult; + +namespace Utils { +namespace Cbor { +class CborValue; +} // namespace Cbor +} // namespace Utils +namespace RpcV2Protocol { +namespace Model { +class SparseNullsOperationResult { + public: + AWS_RPCV2PROTOCOL_API SparseNullsOperationResult() = default; + AWS_RPCV2PROTOCOL_API SparseNullsOperationResult(const Aws::AmazonWebServiceResult& result); + AWS_RPCV2PROTOCOL_API SparseNullsOperationResult& operator=(const Aws::AmazonWebServiceResult& result); + + ///@{ + + inline const Aws::Vector>& GetSparseStringList() const { return m_sparseStringList; } + template >> + void SetSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList = std::forward(value); + } + template >> + SparseNullsOperationResult& WithSparseStringList(SparseStringListT&& value) { + SetSparseStringList(std::forward(value)); + return *this; + } + template + SparseNullsOperationResult& AddSparseStringList(SparseStringListT&& value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.emplace_back(std::forward(value)); + return *this; + } + inline SparseNullsOperationResult& AddSparseStringList(Aws::Crt::Optional value) { + m_sparseStringListHasBeenSet = true; + m_sparseStringList.push_back(value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::Map>& GetSparseStringMap() const { return m_sparseStringMap; } + template >> + void SetSparseStringMap(SparseStringMapT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap = std::forward(value); + } + template >> + SparseNullsOperationResult& WithSparseStringMap(SparseStringMapT&& value) { + SetSparseStringMap(std::forward(value)); + return *this; + } + template > + SparseNullsOperationResult& AddSparseStringMap(SparseStringMapKeyT&& key, SparseStringMapValueT&& value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(std::forward(key), std::forward(value)); + return *this; + } + inline SparseNullsOperationResult& AddSparseStringMap(Aws::String key, Aws::Crt::Optional value) { + m_sparseStringMapHasBeenSet = true; + m_sparseStringMap.emplace(key, value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetRequestId() const { return m_requestId; } + template + void SetRequestId(RequestIdT&& value) { + m_requestIdHasBeenSet = true; + m_requestId = std::forward(value); + } + template + SparseNullsOperationResult& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } + + private: + Aws::Vector> m_sparseStringList; + + Aws::Map> m_sparseStringMap; + + Aws::String m_requestId; + Aws::Http::HttpResponseCode m_HttpResponseCode; + bool m_sparseStringListHasBeenSet = false; + bool m_sparseStringMapHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace RpcV2Protocol +} // namespace Aws diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/StructureListMember.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/StructureListMember.h index cdb0531f832d..d95cb98c3c3e 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/StructureListMember.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/StructureListMember.h @@ -59,9 +59,9 @@ class StructureListMember { ///@} private: Aws::String m_a; - bool m_aHasBeenSet = false; Aws::String m_b; + bool m_aHasBeenSet = false; bool m_bHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ValidationException.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ValidationException.h index 95da40c9112e..182c308112d0 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ValidationException.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ValidationException.h @@ -80,9 +80,9 @@ class ValidationException { ///@} private: Aws::String m_message; - bool m_messageHasBeenSet = false; Aws::Vector m_fieldList; + bool m_messageHasBeenSet = false; bool m_fieldListHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ValidationExceptionField.h b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ValidationExceptionField.h index 8d53537aa109..07c86d61f0e7 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ValidationExceptionField.h +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/include/aws/rpcv2protocol/model/ValidationExceptionField.h @@ -70,9 +70,9 @@ class ValidationExceptionField { ///@} private: Aws::String m_path; - bool m_pathHasBeenSet = false; Aws::String m_message; + bool m_pathHasBeenSet = false; bool m_messageHasBeenSet = false; }; diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/RpcV2ProtocolClient.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/RpcV2ProtocolClient.cpp index 11434b064fbb..10bca7bfeadd 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/RpcV2ProtocolClient.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/RpcV2ProtocolClient.cpp @@ -29,7 +29,9 @@ #include #include #include +#include #include +#include #include using namespace Aws; @@ -89,7 +91,7 @@ RpcV2ProtocolClient::RpcV2ProtocolClient(const std::shared_ptr( ALLOCATION_TAG, @@ -101,7 +103,7 @@ RpcV2ProtocolClient::RpcV2ProtocolClient(const Client::ClientConfiguration& clie init(m_clientConfiguration); } -RpcV2ProtocolClient::RpcV2ProtocolClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) +RpcV2ProtocolClient::RpcV2ProtocolClient(const AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), @@ -112,7 +114,7 @@ RpcV2ProtocolClient::RpcV2ProtocolClient(const AWSCredentials& credentials, cons } RpcV2ProtocolClient::RpcV2ProtocolClient(const std::shared_ptr& credentialsProvider, - const Client::ClientConfiguration& clientConfiguration) + const Aws::Client::ClientConfiguration& clientConfiguration) : BASECLASS(clientConfiguration, Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), @@ -138,7 +140,7 @@ void RpcV2ProtocolClient::init(const RpcV2Protocol::RpcV2ProtocolClientConfigura m_clientConfiguration.executor = m_clientConfiguration.configFactories.executorCreateFn(); } AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); - m_endpointProvider->InitBuiltInParameters(config); + m_endpointProvider->InitBuiltInParameters(config, "rpcv2protocol"); } void RpcV2ProtocolClient::OverrideEndpoint(const Aws::String& endpoint) { @@ -417,6 +419,36 @@ RpcV2CborListsOutcome RpcV2ProtocolClient::RpcV2CborLists(const RpcV2CborListsRe {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } +RpcV2CborSparseMapsOutcome RpcV2ProtocolClient::RpcV2CborSparseMaps(const RpcV2CborSparseMapsRequest& request) const { + AWS_OPERATION_GUARD(RpcV2CborSparseMaps); + AWS_OPERATION_CHECK_PTR(m_endpointProvider, RpcV2CborSparseMaps, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); + AWS_OPERATION_CHECK_PTR(m_telemetryProvider, RpcV2CborSparseMaps, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(meter, RpcV2CborSparseMaps, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".RpcV2CborSparseMaps", + {{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( + [&]() -> RpcV2CborSparseMapsOutcome { + 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, RpcV2CborSparseMaps, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, + endpointResolutionOutcome.GetError().GetMessage()); + endpointResolutionOutcome.GetResult().AddPathSegments("/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"); + return RpcV2CborSparseMapsOutcome( + 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()}}); +} + SimpleScalarPropertiesOutcome RpcV2ProtocolClient::SimpleScalarProperties(const SimpleScalarPropertiesRequest& request) const { AWS_OPERATION_GUARD(SimpleScalarProperties); AWS_OPERATION_CHECK_PTR(m_endpointProvider, SimpleScalarProperties, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); @@ -446,3 +478,33 @@ SimpleScalarPropertiesOutcome RpcV2ProtocolClient::SimpleScalarProperties(const {{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); } + +SparseNullsOperationOutcome RpcV2ProtocolClient::SparseNullsOperation(const SparseNullsOperationRequest& request) const { + AWS_OPERATION_GUARD(SparseNullsOperation); + AWS_OPERATION_CHECK_PTR(m_endpointProvider, SparseNullsOperation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); + AWS_OPERATION_CHECK_PTR(m_telemetryProvider, SparseNullsOperation, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(meter, SparseNullsOperation, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".SparseNullsOperation", + {{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( + [&]() -> SparseNullsOperationOutcome { + 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, SparseNullsOperation, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, + endpointResolutionOutcome.GetError().GetMessage()); + endpointResolutionOutcome.GetResult().AddPathSegments("/service/RpcV2Protocol/operation/SparseNullsOperation"); + return SparseNullsOperationOutcome( + 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-rpcv2protocol/source/model/ComplexError.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ComplexError.cpp index 57723d288284..e81297f9058b 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ComplexError.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ComplexError.cpp @@ -63,9 +63,7 @@ ComplexError& ComplexError::operator=(const std::shared_ptrConsumeNextWholeDataItem(); } @@ -125,9 +123,7 @@ ComplexError& ComplexError::operator=(const std::shared_ptrConsumeNextWholeDataItem(); } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ComplexNestedErrorData.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ComplexNestedErrorData.cpp index 17360c1f5e70..f6a18f8315bc 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ComplexNestedErrorData.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ComplexNestedErrorData.cpp @@ -58,9 +58,7 @@ ComplexNestedErrorData& ComplexNestedErrorData::operator=(const std::shared_ptr< } } m_fooHasBeenSet = true; - } - - else { + } else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); } @@ -115,9 +113,7 @@ ComplexNestedErrorData& ComplexNestedErrorData::operator=(const std::shared_ptr< } } m_fooHasBeenSet = true; - } - - else { + } else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/EmptyInputOutputResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/EmptyInputOutputResult.cpp index 6cfebd277af7..836c1c2a7ca3 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/EmptyInputOutputResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/EmptyInputOutputResult.cpp @@ -23,116 +23,7 @@ using namespace Aws; EmptyInputOutputResult::EmptyInputOutputResult(const Aws::AmazonWebServiceResult& result) { *this = result; } EmptyInputOutputResult& EmptyInputOutputResult::operator=(const Aws::AmazonWebServiceResult& result) { - const auto& cborValue = result.GetPayload(); - const auto decoder = cborValue.GetDecoder(); - - if (decoder != nullptr) { - auto initialMapType = decoder->PeekType(); - if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { - if (initialMapType.value() == CborType::MapStart) { - auto mapSize = decoder->PopNextMapStart(); - if (mapSize.has_value()) { - for (size_t i = 0; i < mapSize.value(); ++i) { - auto initialKey = decoder->PopNextTextVal(); - if (initialKey.has_value()) { - Aws::String initialKeyStr(reinterpret_cast(initialKey.value().ptr), initialKey.value().len); - - if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - - else { - // Unknown key, skip the value - decoder->ConsumeNextWholeDataItem(); - } - if ((decoder->LastError() != AWS_ERROR_UNKNOWN)) { - AWS_LOG_ERROR("EmptyInputOutputResult", "Invalid data received for %s", initialKeyStr.c_str()); - break; - } - } - } - } - } else // IndefMapStart - { - decoder->ConsumeNextSingleElement(); // consume the IndefMapStart - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto outerMapNextType = decoder->PeekType(); - if (!outerMapNextType.has_value() || outerMapNextType.value() == CborType::Break) { - if (outerMapNextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - - auto initialKey = decoder->PopNextTextVal(); - if (initialKey.has_value()) { - Aws::String initialKeyStr(reinterpret_cast(initialKey.value().ptr), initialKey.value().len); - - if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - - else { - // Unknown key, skip the value - decoder->ConsumeNextWholeDataItem(); - } - } - } - } - } - } + m_HttpResponseCode = result.GetResponseCode(); const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/Float16Result.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/Float16Result.cpp index ca8e745259a7..8474e38cec5a 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/Float16Result.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/Float16Result.cpp @@ -23,9 +23,10 @@ using namespace Aws; Float16Result::Float16Result(const Aws::AmazonWebServiceResult& result) { *this = result; } Float16Result& Float16Result::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + const auto& cborValue = result.GetPayload(); const auto decoder = cborValue.GetDecoder(); - if (decoder != nullptr) { auto initialMapType = decoder->PeekType(); if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { @@ -45,36 +46,6 @@ Float16Result& Float16Result::operator=(const Aws::AmazonWebServiceResultPeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); @@ -110,36 +81,6 @@ Float16Result& Float16Result::operator=(const Aws::AmazonWebServiceResultPeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/FractionalSecondsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/FractionalSecondsResult.cpp index cbf8bd8df5bd..2d08797fe33d 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/FractionalSecondsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/FractionalSecondsResult.cpp @@ -23,9 +23,10 @@ using namespace Aws; FractionalSecondsResult::FractionalSecondsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } FractionalSecondsResult& FractionalSecondsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + const auto& cborValue = result.GetPayload(); const auto decoder = cborValue.GetDecoder(); - if (decoder != nullptr) { auto initialMapType = decoder->PeekType(); if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { @@ -60,36 +61,6 @@ FractionalSecondsResult& FractionalSecondsResult::operator=(const Aws::AmazonWeb m_datetimeHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); @@ -140,36 +111,6 @@ FractionalSecondsResult& FractionalSecondsResult::operator=(const Aws::AmazonWeb m_datetimeHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/GreetingStruct.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/GreetingStruct.cpp index 06c32344f61e..cd36a3003999 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/GreetingStruct.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/GreetingStruct.cpp @@ -58,9 +58,7 @@ GreetingStruct& GreetingStruct::operator=(const std::shared_ptrConsumeNextWholeDataItem(); } @@ -115,9 +113,7 @@ GreetingStruct& GreetingStruct::operator=(const std::shared_ptrConsumeNextWholeDataItem(); } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/GreetingWithErrorsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/GreetingWithErrorsResult.cpp index f414e30407e7..2b54638e8a0d 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/GreetingWithErrorsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/GreetingWithErrorsResult.cpp @@ -25,9 +25,10 @@ GreetingWithErrorsResult::GreetingWithErrorsResult(const Aws::AmazonWebServiceRe } GreetingWithErrorsResult& GreetingWithErrorsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + const auto& cborValue = result.GetPayload(); const auto decoder = cborValue.GetDecoder(); - if (decoder != nullptr) { auto initialMapType = decoder->PeekType(); if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { @@ -69,36 +70,6 @@ GreetingWithErrorsResult& GreetingWithErrorsResult::operator=(const Aws::AmazonW m_greetingHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); @@ -156,36 +127,6 @@ GreetingWithErrorsResult& GreetingWithErrorsResult::operator=(const Aws::AmazonW m_greetingHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/OptionalInputOutputResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/OptionalInputOutputResult.cpp index 02da1e89ac68..a052d392c41d 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/OptionalInputOutputResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/OptionalInputOutputResult.cpp @@ -25,9 +25,10 @@ OptionalInputOutputResult::OptionalInputOutputResult(const Aws::AmazonWebService } OptionalInputOutputResult& OptionalInputOutputResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + const auto& cborValue = result.GetPayload(); const auto decoder = cborValue.GetDecoder(); - if (decoder != nullptr) { auto initialMapType = decoder->PeekType(); if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { @@ -69,36 +70,6 @@ OptionalInputOutputResult& OptionalInputOutputResult::operator=(const Aws::Amazo m_valueHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); @@ -156,36 +127,6 @@ OptionalInputOutputResult& OptionalInputOutputResult::operator=(const Aws::Amazo m_valueHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesInputOutputNested1.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesInputOutputNested1.cpp index 7b6c2f53c3e4..8fbebecf0aa3 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesInputOutputNested1.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesInputOutputNested1.cpp @@ -68,9 +68,7 @@ RecursiveShapesInputOutputNested1& RecursiveShapesInputOutputNested1::operator=( m_nested = Aws::MakeShared("RecursiveShapesInputOutputNested1", RecursiveShapesInputOutputNested2(decoder)); m_nestedHasBeenSet = true; - } - - else { + } else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); } @@ -131,9 +129,7 @@ RecursiveShapesInputOutputNested1& RecursiveShapesInputOutputNested1::operator=( m_nested = Aws::MakeShared("RecursiveShapesInputOutputNested1", RecursiveShapesInputOutputNested2(decoder)); m_nestedHasBeenSet = true; - } - - else { + } else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesInputOutputNested2.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesInputOutputNested2.cpp index 7ef98007adf3..b1d960ae8270 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesInputOutputNested2.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesInputOutputNested2.cpp @@ -68,9 +68,7 @@ RecursiveShapesInputOutputNested2& RecursiveShapesInputOutputNested2::operator=( m_recursiveMember = Aws::MakeShared("RecursiveShapesInputOutputNested2", RecursiveShapesInputOutputNested1(decoder)); m_recursiveMemberHasBeenSet = true; - } - - else { + } else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); } @@ -131,9 +129,7 @@ RecursiveShapesInputOutputNested2& RecursiveShapesInputOutputNested2::operator=( m_recursiveMember = Aws::MakeShared("RecursiveShapesInputOutputNested2", RecursiveShapesInputOutputNested1(decoder)); m_recursiveMemberHasBeenSet = true; - } - - else { + } else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesResult.cpp index bb8a96603add..a6268367e5e6 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RecursiveShapesResult.cpp @@ -23,9 +23,10 @@ using namespace Aws; RecursiveShapesResult::RecursiveShapesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } RecursiveShapesResult& RecursiveShapesResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + const auto& cborValue = result.GetPayload(); const auto decoder = cborValue.GetDecoder(); - if (decoder != nullptr) { auto initialMapType = decoder->PeekType(); if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { @@ -42,36 +43,6 @@ RecursiveShapesResult& RecursiveShapesResult::operator=(const Aws::AmazonWebServ m_nestedHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); @@ -104,36 +75,6 @@ RecursiveShapesResult& RecursiveShapesResult::operator=(const Aws::AmazonWebServ m_nestedHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborDenseMapsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborDenseMapsResult.cpp index d70f1377371a..83834ccd2f20 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborDenseMapsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborDenseMapsResult.cpp @@ -25,9 +25,10 @@ RpcV2CborDenseMapsResult::RpcV2CborDenseMapsResult(const Aws::AmazonWebServiceRe } RpcV2CborDenseMapsResult& RpcV2CborDenseMapsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + const auto& cborValue = result.GetPayload(); const auto decoder = cborValue.GetDecoder(); - if (decoder != nullptr) { auto initialMapType = decoder->PeekType(); if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { @@ -460,36 +461,6 @@ RpcV2CborDenseMapsResult& RpcV2CborDenseMapsResult::operator=(const Aws::AmazonW m_denseSetMapHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); @@ -937,36 +908,6 @@ RpcV2CborDenseMapsResult& RpcV2CborDenseMapsResult::operator=(const Aws::AmazonW m_denseSetMapHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborListsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborListsResult.cpp index 75afa15e3902..4bf3056e8eca 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborListsResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborListsResult.cpp @@ -24,9 +24,10 @@ using namespace Aws; RpcV2CborListsResult::RpcV2CborListsResult(const Aws::AmazonWebServiceResult& result) { *this = result; } RpcV2CborListsResult& RpcV2CborListsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + const auto& cborValue = result.GetPayload(); const auto decoder = cborValue.GetDecoder(); - if (decoder != nullptr) { auto initialMapType = decoder->PeekType(); if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { @@ -742,36 +743,6 @@ RpcV2CborListsResult& RpcV2CborListsResult::operator=(const Aws::AmazonWebServic m_blobListHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); @@ -1503,36 +1474,6 @@ RpcV2CborListsResult& RpcV2CborListsResult::operator=(const Aws::AmazonWebServic m_blobListHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborSparseMapsRequest.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborSparseMapsRequest.cpp new file mode 100644 index 000000000000..0fea08dbf94f --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborSparseMapsRequest.cpp @@ -0,0 +1,129 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +#include + +using namespace Aws::RpcV2Protocol::Model; +using namespace Aws::Crt::Cbor; +using namespace Aws::Utils; + +Aws::String RpcV2CborSparseMapsRequest::SerializePayload() const { + Aws::Crt::Cbor::CborEncoder encoder; + + // Calculate map size + size_t mapSize = 0; + if (m_sparseStructMapHasBeenSet) { + mapSize++; + } + if (m_sparseNumberMapHasBeenSet) { + mapSize++; + } + if (m_sparseBooleanMapHasBeenSet) { + mapSize++; + } + if (m_sparseStringMapHasBeenSet) { + mapSize++; + } + if (m_sparseSetMapHasBeenSet) { + mapSize++; + } + + encoder.WriteMapStart(mapSize); + + if (m_sparseStructMapHasBeenSet) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString("sparseStructMap")); + encoder.WriteMapStart(m_sparseStructMap.size()); + for (const auto& item_0 : m_sparseStructMap) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString(item_0.first.c_str())); + if (!item_0.second.has_value()) { + encoder.WriteNull(); + } else { + const auto& sparseVal_0 = *item_0.second; + sparseVal_0.CborEncode(encoder); + } + } + } + + if (m_sparseNumberMapHasBeenSet) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString("sparseNumberMap")); + encoder.WriteMapStart(m_sparseNumberMap.size()); + for (const auto& item_0 : m_sparseNumberMap) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString(item_0.first.c_str())); + if (!item_0.second.has_value()) { + encoder.WriteNull(); + } else { + const auto& sparseVal_0 = *item_0.second; + (sparseVal_0 >= 0) ? encoder.WriteUInt(sparseVal_0) : encoder.WriteNegInt(sparseVal_0); + } + } + } + + if (m_sparseBooleanMapHasBeenSet) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString("sparseBooleanMap")); + encoder.WriteMapStart(m_sparseBooleanMap.size()); + for (const auto& item_0 : m_sparseBooleanMap) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString(item_0.first.c_str())); + if (!item_0.second.has_value()) { + encoder.WriteNull(); + } else { + const auto& sparseVal_0 = *item_0.second; + encoder.WriteBool(sparseVal_0); + } + } + } + + if (m_sparseStringMapHasBeenSet) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString("sparseStringMap")); + encoder.WriteMapStart(m_sparseStringMap.size()); + for (const auto& item_0 : m_sparseStringMap) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString(item_0.first.c_str())); + if (!item_0.second.has_value()) { + encoder.WriteNull(); + } else { + const auto& sparseVal_0 = *item_0.second; + encoder.WriteText(Aws::Crt::ByteCursorFromCString(sparseVal_0.c_str())); + } + } + } + + if (m_sparseSetMapHasBeenSet) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString("sparseSetMap")); + encoder.WriteMapStart(m_sparseSetMap.size()); + for (const auto& item_0 : m_sparseSetMap) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString(item_0.first.c_str())); + if (!item_0.second.has_value()) { + encoder.WriteNull(); + } else { + const auto& sparseVal_0 = *item_0.second; + encoder.WriteArrayStart(sparseVal_0.size()); + for (const auto& item_1 : sparseVal_0) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString(item_1.c_str())); + } + } + } + } + + const auto str = Aws::String(reinterpret_cast(encoder.GetEncodedData().ptr), encoder.GetEncodedData().len); + return str; +} + +Aws::Http::HeaderValueCollection RpcV2CborSparseMapsRequest::GetRequestSpecificHeaders() const { + Aws::Http::HeaderValueCollection headers; + headers.emplace(Aws::Http::CONTENT_TYPE_HEADER, Aws::CBOR_CONTENT_TYPE); + headers.emplace(Aws::Http::SMITHY_PROTOCOL_HEADER, Aws::RPC_V2_CBOR); + headers.emplace(Aws::Http::ACCEPT_HEADER, Aws::CBOR_CONTENT_TYPE); + Aws::StringStream ss; + if (m_requestIdHasBeenSet) { + ss << m_requestId; + headers.emplace("x-amzn-requestid", ss.str()); + ss.str(""); + } + + return headers; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborSparseMapsResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborSparseMapsResult.cpp new file mode 100644 index 000000000000..dff144a882f0 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/RpcV2CborSparseMapsResult.cpp @@ -0,0 +1,1163 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::RpcV2Protocol::Model; +using namespace Aws::Crt; +using namespace Aws::Crt::Cbor; +using namespace Aws::Utils; +using namespace Aws::Utils::Cbor; +using namespace Aws; + +RpcV2CborSparseMapsResult::RpcV2CborSparseMapsResult(const Aws::AmazonWebServiceResult& result) { + *this = result; +} + +RpcV2CborSparseMapsResult& RpcV2CborSparseMapsResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + + const auto& cborValue = result.GetPayload(); + const auto decoder = cborValue.GetDecoder(); + if (decoder != nullptr) { + auto initialMapType = decoder->PeekType(); + if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { + if (initialMapType.value() == CborType::MapStart) { + auto mapSize = decoder->PopNextMapStart(); + if (mapSize.has_value()) { + for (size_t i = 0; i < mapSize.value(); ++i) { + auto initialKey = decoder->PopNextTextVal(); + if (initialKey.has_value()) { + Aws::String initialKeyStr(reinterpret_cast(initialKey.value().ptr), initialKey.value().len); + + if (initialKeyStr == "sparseStructMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStructMap[keyStr_1]; + } else { + m_sparseStructMap[keyStr_1] = GreetingStruct(decoder); + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStructMap[keyStr_1]; + } else { + m_sparseStructMap[keyStr_1] = GreetingStruct(decoder); + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseStructMapHasBeenSet = true; + } + + else if (initialKeyStr == "sparseNumberMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseNumberMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::UInt) { + auto val = decoder->PopNextUnsignedIntVal(); + if (val.has_value()) { + m_sparseNumberMap[keyStr_1] = static_cast(val.value()); + } + } else { + auto val = decoder->PopNextNegativeIntVal(); + if (val.has_value()) { + m_sparseNumberMap[keyStr_1] = static_cast(1 - val.value()); + } + } + } + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseNumberMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::UInt) { + auto val = decoder->PopNextUnsignedIntVal(); + if (val.has_value()) { + m_sparseNumberMap[keyStr_1] = static_cast(val.value()); + } + } else { + auto val = decoder->PopNextNegativeIntVal(); + if (val.has_value()) { + m_sparseNumberMap[keyStr_1] = static_cast(1 - val.value()); + } + } + } + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseNumberMapHasBeenSet = true; + } + + else if (initialKeyStr == "sparseBooleanMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseBooleanMap[keyStr_1]; + } else { + auto val = decoder->PopNextBooleanVal(); + if (val.has_value()) { + m_sparseBooleanMap[keyStr_1] = val.value(); + } + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseBooleanMap[keyStr_1]; + } else { + auto val = decoder->PopNextBooleanVal(); + if (val.has_value()) { + m_sparseBooleanMap[keyStr_1] = val.value(); + } + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseBooleanMapHasBeenSet = true; + } + + else if (initialKeyStr == "sparseStringMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringMap[keyStr_1] = + Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringMap[keyStr_1] = ss_1.str(); + ss_1.clear(); + } + } + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringMap[keyStr_1] = + Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringMap[keyStr_1] = ss_1.str(); + ss_1.clear(); + } + } + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseStringMapHasBeenSet = true; + } + + else if (initialKeyStr == "sparseSetMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseSetMap[keyStr_1]; + } else { + auto nestedList_1 = Vector(); + auto peekType_1 = decoder->PeekType(); + if (peekType_1.has_value() && + (peekType_1.value() == CborType::ArrayStart || peekType_1.value() == CborType::IndefArrayStart)) { + if (peekType_1.value() == CborType::ArrayStart) { + auto listSize_1 = decoder->PopNextArrayStart(); + if (listSize_1.has_value()) { + for (size_t j_1 = 0; j_1 < listSize_1.value(); j_1++) { + { + auto nullPeek_2 = decoder->PeekType(); + if (nullPeek_2.has_value() && nullPeek_2.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + nestedList_1.emplace_back(); + } else { + auto peekType_2 = decoder->PeekType(); + if (peekType_2.has_value()) { + if (peekType_2.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + nestedList_1.push_back( + Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_2; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_2 = decoder->PeekType(); + if (!nextType_2.has_value() || nextType_2.value() == CborType::Break) { + if (nextType_2.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_2 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + nestedList_1.push_back(ss_2.str()); + ss_2.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + } else // IndefArrayStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefArrayStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + { + auto nullPeek_2 = decoder->PeekType(); + if (nullPeek_2.has_value() && nullPeek_2.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + nestedList_1.emplace_back(); + } else { + auto peekType_2 = decoder->PeekType(); + if (peekType_2.has_value()) { + if (peekType_2.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + nestedList_1.push_back( + Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_2; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_2 = decoder->PeekType(); + if (!nextType_2.has_value() || nextType_2.value() == CborType::Break) { + if (nextType_2.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_2 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + nestedList_1.push_back(ss_2.str()); + ss_2.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + m_sparseSetMap[keyStr_1] = nestedList_1; + } + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseSetMap[keyStr_1]; + } else { + auto nestedList_1 = Vector(); + auto peekType_1 = decoder->PeekType(); + if (peekType_1.has_value() && + (peekType_1.value() == CborType::ArrayStart || peekType_1.value() == CborType::IndefArrayStart)) { + if (peekType_1.value() == CborType::ArrayStart) { + auto listSize_1 = decoder->PopNextArrayStart(); + if (listSize_1.has_value()) { + for (size_t j_1 = 0; j_1 < listSize_1.value(); j_1++) { + { + auto nullPeek_2 = decoder->PeekType(); + if (nullPeek_2.has_value() && nullPeek_2.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + nestedList_1.emplace_back(); + } else { + auto peekType_2 = decoder->PeekType(); + if (peekType_2.has_value()) { + if (peekType_2.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + nestedList_1.push_back( + Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_2; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_2 = decoder->PeekType(); + if (!nextType_2.has_value() || nextType_2.value() == CborType::Break) { + if (nextType_2.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_2 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + nestedList_1.push_back(ss_2.str()); + ss_2.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + } else // IndefArrayStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefArrayStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + { + auto nullPeek_2 = decoder->PeekType(); + if (nullPeek_2.has_value() && nullPeek_2.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + nestedList_1.emplace_back(); + } else { + auto peekType_2 = decoder->PeekType(); + if (peekType_2.has_value()) { + if (peekType_2.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + nestedList_1.push_back( + Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_2; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_2 = decoder->PeekType(); + if (!nextType_2.has_value() || nextType_2.value() == CborType::Break) { + if (nextType_2.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_2 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + nestedList_1.push_back(ss_2.str()); + ss_2.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + m_sparseSetMap[keyStr_1] = nestedList_1; + } + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseSetMapHasBeenSet = true; + } + + else { + // Unknown key, skip the value + decoder->ConsumeNextWholeDataItem(); + } + if ((decoder->LastError() != AWS_ERROR_UNKNOWN)) { + AWS_LOG_ERROR("RpcV2CborSparseMapsResult", "Invalid data received for %s", initialKeyStr.c_str()); + break; + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto outerMapNextType = decoder->PeekType(); + if (!outerMapNextType.has_value() || outerMapNextType.value() == CborType::Break) { + if (outerMapNextType.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + + auto initialKey = decoder->PopNextTextVal(); + if (initialKey.has_value()) { + Aws::String initialKeyStr(reinterpret_cast(initialKey.value().ptr), initialKey.value().len); + + if (initialKeyStr == "sparseStructMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStructMap[keyStr_1]; + } else { + m_sparseStructMap[keyStr_1] = GreetingStruct(decoder); + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStructMap[keyStr_1]; + } else { + m_sparseStructMap[keyStr_1] = GreetingStruct(decoder); + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseStructMapHasBeenSet = true; + } + + else if (initialKeyStr == "sparseNumberMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseNumberMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::UInt) { + auto val = decoder->PopNextUnsignedIntVal(); + if (val.has_value()) { + m_sparseNumberMap[keyStr_1] = static_cast(val.value()); + } + } else { + auto val = decoder->PopNextNegativeIntVal(); + if (val.has_value()) { + m_sparseNumberMap[keyStr_1] = static_cast(1 - val.value()); + } + } + } + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseNumberMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::UInt) { + auto val = decoder->PopNextUnsignedIntVal(); + if (val.has_value()) { + m_sparseNumberMap[keyStr_1] = static_cast(val.value()); + } + } else { + auto val = decoder->PopNextNegativeIntVal(); + if (val.has_value()) { + m_sparseNumberMap[keyStr_1] = static_cast(1 - val.value()); + } + } + } + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseNumberMapHasBeenSet = true; + } + + else if (initialKeyStr == "sparseBooleanMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseBooleanMap[keyStr_1]; + } else { + auto val = decoder->PopNextBooleanVal(); + if (val.has_value()) { + m_sparseBooleanMap[keyStr_1] = val.value(); + } + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseBooleanMap[keyStr_1]; + } else { + auto val = decoder->PopNextBooleanVal(); + if (val.has_value()) { + m_sparseBooleanMap[keyStr_1] = val.value(); + } + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseBooleanMapHasBeenSet = true; + } + + else if (initialKeyStr == "sparseStringMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringMap[keyStr_1] = + Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringMap[keyStr_1] = ss_1.str(); + ss_1.clear(); + } + } + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringMap[keyStr_1] = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringMap[keyStr_1] = ss_1.str(); + ss_1.clear(); + } + } + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseStringMapHasBeenSet = true; + } + + else if (initialKeyStr == "sparseSetMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseSetMap[keyStr_1]; + } else { + auto nestedList_1 = Vector(); + auto peekType_1 = decoder->PeekType(); + if (peekType_1.has_value() && + (peekType_1.value() == CborType::ArrayStart || peekType_1.value() == CborType::IndefArrayStart)) { + if (peekType_1.value() == CborType::ArrayStart) { + auto listSize_1 = decoder->PopNextArrayStart(); + if (listSize_1.has_value()) { + for (size_t j_1 = 0; j_1 < listSize_1.value(); j_1++) { + { + auto nullPeek_2 = decoder->PeekType(); + if (nullPeek_2.has_value() && nullPeek_2.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + nestedList_1.emplace_back(); + } else { + auto peekType_2 = decoder->PeekType(); + if (peekType_2.has_value()) { + if (peekType_2.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + nestedList_1.push_back( + Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_2; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_2 = decoder->PeekType(); + if (!nextType_2.has_value() || nextType_2.value() == CborType::Break) { + if (nextType_2.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_2 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + nestedList_1.push_back(ss_2.str()); + ss_2.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + } else // IndefArrayStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefArrayStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + { + auto nullPeek_2 = decoder->PeekType(); + if (nullPeek_2.has_value() && nullPeek_2.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + nestedList_1.emplace_back(); + } else { + auto peekType_2 = decoder->PeekType(); + if (peekType_2.has_value()) { + if (peekType_2.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + nestedList_1.push_back( + Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_2; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_2 = decoder->PeekType(); + if (!nextType_2.has_value() || nextType_2.value() == CborType::Break) { + if (nextType_2.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_2 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + nestedList_1.push_back(ss_2.str()); + ss_2.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + m_sparseSetMap[keyStr_1] = nestedList_1; + } + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseSetMap[keyStr_1]; + } else { + auto nestedList_1 = Vector(); + auto peekType_1 = decoder->PeekType(); + if (peekType_1.has_value() && + (peekType_1.value() == CborType::ArrayStart || peekType_1.value() == CborType::IndefArrayStart)) { + if (peekType_1.value() == CborType::ArrayStart) { + auto listSize_1 = decoder->PopNextArrayStart(); + if (listSize_1.has_value()) { + for (size_t j_1 = 0; j_1 < listSize_1.value(); j_1++) { + { + auto nullPeek_2 = decoder->PeekType(); + if (nullPeek_2.has_value() && nullPeek_2.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + nestedList_1.emplace_back(); + } else { + auto peekType_2 = decoder->PeekType(); + if (peekType_2.has_value()) { + if (peekType_2.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + nestedList_1.push_back( + Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_2; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_2 = decoder->PeekType(); + if (!nextType_2.has_value() || nextType_2.value() == CborType::Break) { + if (nextType_2.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_2 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + nestedList_1.push_back(ss_2.str()); + ss_2.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + } else // IndefArrayStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefArrayStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + { + auto nullPeek_2 = decoder->PeekType(); + if (nullPeek_2.has_value() && nullPeek_2.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + nestedList_1.emplace_back(); + } else { + auto peekType_2 = decoder->PeekType(); + if (peekType_2.has_value()) { + if (peekType_2.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + nestedList_1.push_back( + Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_2; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_2 = decoder->PeekType(); + if (!nextType_2.has_value() || nextType_2.value() == CborType::Break) { + if (nextType_2.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_2 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + nestedList_1.push_back(ss_2.str()); + ss_2.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + m_sparseSetMap[keyStr_1] = nestedList_1; + } + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseSetMapHasBeenSet = true; + } + + else { + // Unknown key, skip the value + decoder->ConsumeNextWholeDataItem(); + } + } + } + } + } + } + + const auto& headers = result.GetHeaderValueCollection(); + const auto& requestIdIter = headers.find("x-amzn-requestid"); + if (requestIdIter != headers.end()) { + m_requestId = requestIdIter->second; + m_requestIdHasBeenSet = true; + } + + return *this; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/SimpleScalarPropertiesResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/SimpleScalarPropertiesResult.cpp index a8bf8f3c51e2..1631dd3c2826 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/SimpleScalarPropertiesResult.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/SimpleScalarPropertiesResult.cpp @@ -27,9 +27,10 @@ SimpleScalarPropertiesResult::SimpleScalarPropertiesResult(const Aws::AmazonWebS SimpleScalarPropertiesResult& SimpleScalarPropertiesResult::operator=( const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + const auto& cborValue = result.GetPayload(); const auto decoder = cborValue.GetDecoder(); - if (decoder != nullptr) { auto initialMapType = decoder->PeekType(); if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { @@ -206,36 +207,6 @@ SimpleScalarPropertiesResult& SimpleScalarPropertiesResult::operator=( m_blobValueHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); @@ -428,36 +399,6 @@ SimpleScalarPropertiesResult& SimpleScalarPropertiesResult::operator=( m_blobValueHasBeenSet = true; } - else if (initialKeyStr == "x-amzn-requestid") { - auto peekType = decoder->PeekType(); - if (peekType.has_value()) { - if (peekType.value() == Aws::Crt::Cbor::CborType::Text) { - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - m_requestId = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } else { - decoder->ConsumeNextSingleElement(); - Aws::StringStream ss; - while (decoder->LastError() == AWS_ERROR_UNKNOWN) { - auto nextType = decoder->PeekType(); - if (!nextType.has_value() || nextType.value() == CborType::Break) { - if (nextType.has_value()) { - decoder->ConsumeNextSingleElement(); // consume the Break - } - break; - } - auto val = decoder->PopNextTextVal(); - if (val.has_value()) { - ss << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); - } - } - m_requestId = ss.str(); - } - } - m_requestIdHasBeenSet = true; - } - else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/SparseNullsOperationRequest.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/SparseNullsOperationRequest.cpp new file mode 100644 index 000000000000..c5c253117f41 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/SparseNullsOperationRequest.cpp @@ -0,0 +1,74 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +#include + +using namespace Aws::RpcV2Protocol::Model; +using namespace Aws::Crt::Cbor; +using namespace Aws::Utils; + +Aws::String SparseNullsOperationRequest::SerializePayload() const { + Aws::Crt::Cbor::CborEncoder encoder; + + // Calculate map size + size_t mapSize = 0; + if (m_sparseStringListHasBeenSet) { + mapSize++; + } + if (m_sparseStringMapHasBeenSet) { + mapSize++; + } + + encoder.WriteMapStart(mapSize); + + if (m_sparseStringListHasBeenSet) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString("sparseStringList")); + encoder.WriteArrayStart(m_sparseStringList.size()); + for (const auto& item_0 : m_sparseStringList) { + if (!item_0.has_value()) { + encoder.WriteNull(); + } else { + const auto& sparseItem_0 = *item_0; + encoder.WriteText(Aws::Crt::ByteCursorFromCString(sparseItem_0.c_str())); + } + } + } + + if (m_sparseStringMapHasBeenSet) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString("sparseStringMap")); + encoder.WriteMapStart(m_sparseStringMap.size()); + for (const auto& item_0 : m_sparseStringMap) { + encoder.WriteText(Aws::Crt::ByteCursorFromCString(item_0.first.c_str())); + if (!item_0.second.has_value()) { + encoder.WriteNull(); + } else { + const auto& sparseVal_0 = *item_0.second; + encoder.WriteText(Aws::Crt::ByteCursorFromCString(sparseVal_0.c_str())); + } + } + } + + const auto str = Aws::String(reinterpret_cast(encoder.GetEncodedData().ptr), encoder.GetEncodedData().len); + return str; +} + +Aws::Http::HeaderValueCollection SparseNullsOperationRequest::GetRequestSpecificHeaders() const { + Aws::Http::HeaderValueCollection headers; + headers.emplace(Aws::Http::CONTENT_TYPE_HEADER, Aws::CBOR_CONTENT_TYPE); + headers.emplace(Aws::Http::SMITHY_PROTOCOL_HEADER, Aws::RPC_V2_CBOR); + headers.emplace(Aws::Http::ACCEPT_HEADER, Aws::CBOR_CONTENT_TYPE); + Aws::StringStream ss; + if (m_requestIdHasBeenSet) { + ss << m_requestId; + headers.emplace("x-amzn-requestid", ss.str()); + ss.str(""); + } + + return headers; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/SparseNullsOperationResult.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/SparseNullsOperationResult.cpp new file mode 100644 index 000000000000..7a24fe68c591 --- /dev/null +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/SparseNullsOperationResult.cpp @@ -0,0 +1,494 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::RpcV2Protocol::Model; +using namespace Aws::Crt; +using namespace Aws::Crt::Cbor; +using namespace Aws::Utils; +using namespace Aws::Utils::Cbor; +using namespace Aws; + +SparseNullsOperationResult::SparseNullsOperationResult(const Aws::AmazonWebServiceResult& result) { + *this = result; +} + +SparseNullsOperationResult& SparseNullsOperationResult::operator=(const Aws::AmazonWebServiceResult& result) { + m_HttpResponseCode = result.GetResponseCode(); + + const auto& cborValue = result.GetPayload(); + const auto decoder = cborValue.GetDecoder(); + if (decoder != nullptr) { + auto initialMapType = decoder->PeekType(); + if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) { + if (initialMapType.value() == CborType::MapStart) { + auto mapSize = decoder->PopNextMapStart(); + if (mapSize.has_value()) { + for (size_t i = 0; i < mapSize.value(); ++i) { + auto initialKey = decoder->PopNextTextVal(); + if (initialKey.has_value()) { + Aws::String initialKeyStr(reinterpret_cast(initialKey.value().ptr), initialKey.value().len); + + if (initialKeyStr == "sparseStringList") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && + (peekType_0.value() == CborType::ArrayStart || peekType_0.value() == CborType::IndefArrayStart)) { + if (peekType_0.value() == CborType::ArrayStart) { + auto listSize_0 = decoder->PopNextArrayStart(); + if (listSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < listSize_0.value(); j_0++) { + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringList.emplace_back(); + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1.has_value()) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringList.push_back( + Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringList.push_back(ss_1.str()); + ss_1.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + } else // IndefArrayStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefArrayStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringList.emplace_back(); + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1.has_value()) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringList.push_back(Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringList.push_back(ss_1.str()); + ss_1.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + } + m_sparseStringListHasBeenSet = true; + } + + else if (initialKeyStr == "sparseStringMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringMap[keyStr_1] = + Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringMap[keyStr_1] = ss_1.str(); + ss_1.clear(); + } + } + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringMap[keyStr_1] = + Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringMap[keyStr_1] = ss_1.str(); + ss_1.clear(); + } + } + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseStringMapHasBeenSet = true; + } + + else { + // Unknown key, skip the value + decoder->ConsumeNextWholeDataItem(); + } + if ((decoder->LastError() != AWS_ERROR_UNKNOWN)) { + AWS_LOG_ERROR("SparseNullsOperationResult", "Invalid data received for %s", initialKeyStr.c_str()); + break; + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto outerMapNextType = decoder->PeekType(); + if (!outerMapNextType.has_value() || outerMapNextType.value() == CborType::Break) { + if (outerMapNextType.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + + auto initialKey = decoder->PopNextTextVal(); + if (initialKey.has_value()) { + Aws::String initialKeyStr(reinterpret_cast(initialKey.value().ptr), initialKey.value().len); + + if (initialKeyStr == "sparseStringList") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && + (peekType_0.value() == CborType::ArrayStart || peekType_0.value() == CborType::IndefArrayStart)) { + if (peekType_0.value() == CborType::ArrayStart) { + auto listSize_0 = decoder->PopNextArrayStart(); + if (listSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < listSize_0.value(); j_0++) { + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringList.emplace_back(); + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1.has_value()) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringList.push_back(Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringList.push_back(ss_1.str()); + ss_1.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + } else // IndefArrayStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefArrayStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringList.emplace_back(); + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1.has_value()) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringList.push_back(Aws::String(reinterpret_cast(val.value().ptr), val.value().len)); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringList.push_back(ss_1.str()); + ss_1.clear(); + } + } + } // end else (non-null sparse element) + } + } + } + } + m_sparseStringListHasBeenSet = true; + } + + else if (initialKeyStr == "sparseStringMap") { + auto peekType_0 = decoder->PeekType(); + if (peekType_0.has_value() && (peekType_0.value() == CborType::MapStart || peekType_0.value() == CborType::IndefMapStart)) { + if (peekType_0.value() == CborType::MapStart) { + auto mapSize_0 = decoder->PopNextMapStart(); + if (mapSize_0.has_value()) { + for (size_t j_0 = 0; j_0 < mapSize_0.value(); j_0++) { + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringMap[keyStr_1] = + Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringMap[keyStr_1] = ss_1.str(); + ss_1.clear(); + } + } + } // end else (non-null sparse value) + } + } + } + } + } else // IndefMapStart + { + decoder->ConsumeNextSingleElement(); // consume the IndefMapStart + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_0 = decoder->PeekType(); + if (!nextType_0.has_value() || nextType_0.value() == CborType::Break) { + if (nextType_0.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto key_1 = decoder->PopNextTextVal(); + if (key_1.has_value()) { + Aws::String keyStr_1 = Aws::String(reinterpret_cast(key_1.value().ptr), key_1.value().len); + { + auto nullPeek_1 = decoder->PeekType(); + if (nullPeek_1.has_value() && nullPeek_1.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); + m_sparseStringMap[keyStr_1]; + } else { + auto peekType_1 = decoder->PeekType(); + if (peekType_1) { + if (peekType_1.value() == Aws::Crt::Cbor::CborType::Text) { + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + m_sparseStringMap[keyStr_1] = Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } else { + decoder->ConsumeNextSingleElement(); + Aws::StringStream ss_1; + while (decoder->LastError() == AWS_ERROR_UNKNOWN) { + auto nextType_1 = decoder->PeekType(); + if (!nextType_1.has_value() || nextType_1.value() == CborType::Break) { + if (nextType_1.has_value()) { + decoder->ConsumeNextSingleElement(); // consume the Break + } + break; + } + auto val = decoder->PopNextTextVal(); + if (val.has_value()) { + ss_1 << Aws::String(reinterpret_cast(val.value().ptr), val.value().len); + } + } + m_sparseStringMap[keyStr_1] = ss_1.str(); + ss_1.clear(); + } + } + } // end else (non-null sparse value) + } + } + } + } + } + m_sparseStringMapHasBeenSet = true; + } + + else { + // Unknown key, skip the value + decoder->ConsumeNextWholeDataItem(); + } + } + } + } + } + } + + const auto& headers = result.GetHeaderValueCollection(); + const auto& requestIdIter = headers.find("x-amzn-requestid"); + if (requestIdIter != headers.end()) { + m_requestId = requestIdIter->second; + m_requestIdHasBeenSet = true; + } + + return *this; +} diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/StructureListMember.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/StructureListMember.cpp index 1448adf663ab..c3769a5dd794 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/StructureListMember.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/StructureListMember.cpp @@ -88,9 +88,7 @@ StructureListMember& StructureListMember::operator=(const std::shared_ptrConsumeNextWholeDataItem(); } @@ -175,9 +173,7 @@ StructureListMember& StructureListMember::operator=(const std::shared_ptrConsumeNextWholeDataItem(); } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ValidationException.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ValidationException.cpp index bfaadfa9e746..981add5bd141 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ValidationException.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ValidationException.cpp @@ -87,9 +87,7 @@ ValidationException& ValidationException::operator=(const std::shared_ptrConsumeNextWholeDataItem(); } @@ -173,9 +171,7 @@ ValidationException& ValidationException::operator=(const std::shared_ptrConsumeNextWholeDataItem(); } diff --git a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ValidationExceptionField.cpp b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ValidationExceptionField.cpp index ffd7a8ce4ca3..b0093e8c0ccc 100644 --- a/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ValidationExceptionField.cpp +++ b/generated/protocol-tests/test-clients/aws-cpp-sdk-rpcv2protocol/source/model/ValidationExceptionField.cpp @@ -88,9 +88,7 @@ ValidationExceptionField& ValidationExceptionField::operator=(const std::shared_ } } m_messageHasBeenSet = true; - } - - else { + } else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); } @@ -175,9 +173,7 @@ ValidationExceptionField& ValidationExceptionField::operator=(const std::shared_ } } m_messageHasBeenSet = true; - } - - else { + } else { // Unknown key, skip the value decoder->ConsumeNextWholeDataItem(); } diff --git a/generated/protocol-tests/tests/input/json/tests/EmptyOperationTest.cpp b/generated/protocol-tests/tests/input/json/tests/EmptyOperationTest.cpp index 98c6c8b407b0..1cec3ddab228 100644 --- a/generated/protocol-tests/tests/input/json/tests/EmptyOperationTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/EmptyOperationTest.cpp @@ -22,7 +22,7 @@ AWS_PROTOCOL_TEST(EmptyOperation, sends_requests_to_slash) { ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.EmptyOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.EmptyOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -38,7 +38,7 @@ AWS_PROTOCOL_TEST(EmptyOperation, includes_x_amz_target_and_content_type) { ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.EmptyOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.EmptyOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -55,7 +55,7 @@ AWS_PROTOCOL_TEST(EmptyOperation, json_1_1_client_sends_empty_payload_for_no_inp expectedRq.method = "POST"; expectedRq.body = "e30="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.EmptyOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.EmptyOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/json/tests/EndpointOperationTest.cpp b/generated/protocol-tests/tests/input/json/tests/EndpointOperationTest.cpp index ec35156e2675..e6b3582cda6b 100644 --- a/generated/protocol-tests/tests/input/json/tests/EndpointOperationTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/EndpointOperationTest.cpp @@ -24,7 +24,7 @@ AWS_PROTOCOL_TEST(EndpointOperation, AwsJson11EndpointTrait) { expectedRq.body = "e30="; expectedRq.uri = "/"; expectedRq.host = "foo.example.com"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.EndpointOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.EndpointOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/json/tests/EndpointWithHostLabelOperationTest.cpp b/generated/protocol-tests/tests/input/json/tests/EndpointWithHostLabelOperationTest.cpp index 9f9d0396fe63..274ef854f098 100644 --- a/generated/protocol-tests/tests/input/json/tests/EndpointWithHostLabelOperationTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/EndpointWithHostLabelOperationTest.cpp @@ -25,8 +25,8 @@ AWS_PROTOCOL_TEST(EndpointWithHostLabelOperation, AwsJson11EndpointTraitWithHost expectedRq.body = "eyJsYWJlbCI6ICJiYXIifQ=="; expectedRq.uri = "/"; expectedRq.host = "foo.bar.example.com"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, - {"X-Amz-Target", R"(JsonProtocol.EndpointWithHostLabelOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.EndpointWithHostLabelOperation)"}, + {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/json/tests/HostWithPathOperationTest.cpp b/generated/protocol-tests/tests/input/json/tests/HostWithPathOperationTest.cpp index d9cf15a19d3f..ab97a2319831 100644 --- a/generated/protocol-tests/tests/input/json/tests/HostWithPathOperationTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/HostWithPathOperationTest.cpp @@ -24,7 +24,7 @@ AWS_PROTOCOL_TEST(HostWithPathOperation, AwsJson11HostWithPath) { expectedRq.body = "e30="; expectedRq.uri = "/custom/"; expectedRq.host = "example.com/custom"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.HostWithPathOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.HostWithPathOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/json/tests/JsonEnumsTest.cpp b/generated/protocol-tests/tests/input/json/tests/JsonEnumsTest.cpp index 232ca48b4bb6..db97f7d0b7a1 100644 --- a/generated/protocol-tests/tests/input/json/tests/JsonEnumsTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/JsonEnumsTest.cpp @@ -32,7 +32,7 @@ AWS_PROTOCOL_TEST(JsonEnums, AwsJson11Enums) { "byIsCiAgICAgICAgIjAiCiAgICBdLAogICAgImZvb0VudW1TZXQiOiBbCiAgICAgICAgIkZvbyIsCiAgICAgICAgIjAiCiAgICBdLAogICAgImZvb0VudW1NYXAiOiB7CiAg" "ICAgICAgImhpIjogIkZvbyIsCiAgICAgICAgInplcm8iOiAiMCIKICAgIH0KfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonEnums)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonEnums)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/json/tests/JsonIntEnumsTest.cpp b/generated/protocol-tests/tests/input/json/tests/JsonIntEnumsTest.cpp index 3c5a8682ac35..233f375daa1f 100644 --- a/generated/protocol-tests/tests/input/json/tests/JsonIntEnumsTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/JsonIntEnumsTest.cpp @@ -32,7 +32,7 @@ AWS_PROTOCOL_TEST(JsonIntEnums, AwsJson11IntEnums) { "MgogICAgXSwKICAgICJpbnRFbnVtU2V0IjogWwogICAgICAgIDEsCiAgICAgICAgMgogICAgXSwKICAgICJpbnRFbnVtTWFwIjogewogICAgICAgICJhIjogMSwKICAgICAg" "ICAiYiI6IDIKICAgIH0KfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonIntEnums)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonIntEnums)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/json/tests/JsonUnionsTest.cpp b/generated/protocol-tests/tests/input/json/tests/JsonUnionsTest.cpp index c2eb0487bfd8..25cb73b18180 100644 --- a/generated/protocol-tests/tests/input/json/tests/JsonUnionsTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/JsonUnionsTest.cpp @@ -28,7 +28,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11SerializeStringUnionValue) { expectedRq.method = "POST"; expectedRq.body = "ewogICAgImNvbnRlbnRzIjogewogICAgICAgICJzdHJpbmdWYWx1ZSI6ICJmb28iCiAgICB9Cn0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -50,7 +50,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11SerializeBooleanUnionValue) { expectedRq.method = "POST"; expectedRq.body = "ewogICAgImNvbnRlbnRzIjogewogICAgICAgICJib29sZWFuVmFsdWUiOiB0cnVlCiAgICB9Cn0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -72,7 +72,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11SerializeNumberUnionValue) { expectedRq.method = "POST"; expectedRq.body = "ewogICAgImNvbnRlbnRzIjogewogICAgICAgICJudW1iZXJWYWx1ZSI6IDEKICAgIH0KfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -94,7 +94,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11SerializeBlobUnionValue) { expectedRq.method = "POST"; expectedRq.body = "ewogICAgImNvbnRlbnRzIjogewogICAgICAgICJibG9iVmFsdWUiOiAiWm05diIKICAgIH0KfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -116,7 +116,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11SerializeTimestampUnionValue) { expectedRq.method = "POST"; expectedRq.body = "ewogICAgImNvbnRlbnRzIjogewogICAgICAgICJ0aW1lc3RhbXBWYWx1ZSI6IDEzOTg3OTYyMzgKICAgIH0KfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -138,7 +138,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11SerializeEnumUnionValue) { expectedRq.method = "POST"; expectedRq.body = "ewogICAgImNvbnRlbnRzIjogewogICAgICAgICJlbnVtVmFsdWUiOiAiRm9vIgogICAgfQp9"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -160,7 +160,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11SerializeListUnionValue) { expectedRq.method = "POST"; expectedRq.body = "ewogICAgImNvbnRlbnRzIjogewogICAgICAgICJsaXN0VmFsdWUiOiBbImZvbyIsICJiYXIiXQogICAgfQp9"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -184,7 +184,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11SerializeMapUnionValue) { "ewogICAgImNvbnRlbnRzIjogewogICAgICAgICJtYXBWYWx1ZSI6IHsKICAgICAgICAgICAgImZvbyI6ICJiYXIiLAogICAgICAgICAgICAic3BhbSI6ICJlZ2dzIgogICAg" "ICAgIH0KICAgIH0KfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -211,7 +211,7 @@ AWS_PROTOCOL_TEST(JsonUnions, AwsJson11SerializeStructureUnionValue) { expectedRq.body = "ewogICAgImNvbnRlbnRzIjogewogICAgICAgICJzdHJ1Y3R1cmVWYWx1ZSI6IHsKICAgICAgICAgICAgImhpIjogImhlbGxvIgogICAgICAgIH0KICAgIH0KfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonUnions)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/json/tests/KitchenSinkOperationTest.cpp b/generated/protocol-tests/tests/input/json/tests/KitchenSinkOperationTest.cpp index 22585a26a489..b6ae11eb8c8d 100644 --- a/generated/protocol-tests/tests/input/json/tests/KitchenSinkOperationTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/KitchenSinkOperationTest.cpp @@ -24,7 +24,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_string_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJTdHJpbmciOiJhYmMgeHl6In0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -46,7 +46,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_string_shapes_with_jsonvalue_ "eyJKc29uVmFsdWUiOiJ7XCJzdHJpbmdcIjpcInZhbHVlXCIsXCJudW1iZXJcIjoxMjM0LjUsXCJib29sVHJ1ZVwiOnRydWUsXCJib29sRmFsc2VcIjpmYWxzZSxcImFycmF5" "XCI6WzEsMiwzLDRdLFwib2JqZWN0XCI6e1wia2V5XCI6XCJ2YWx1ZVwifSxcIm51bGxcIjpudWxsfSJ9"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -65,7 +65,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_integer_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJJbnRlZ2VyIjoxMjM0fQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -84,7 +84,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_long_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJMb25nIjo5OTk5OTk5OTk5OTl9"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -103,7 +103,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_float_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJGbG9hdCI6MTIzNC41fQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -122,7 +122,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_double_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJEb3VibGUiOjEyMzQuNX0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -141,7 +141,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_blob_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJCbG9iIjoiWW1sdVlYSjVMWFpoYkhWbCJ9"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -160,7 +160,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_boolean_shapes_true) { expectedRq.method = "POST"; expectedRq.body = "eyJCb29sZWFuIjp0cnVlfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -179,7 +179,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_boolean_shapes_false) { expectedRq.method = "POST"; expectedRq.body = "eyJCb29sZWFuIjpmYWxzZX0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -198,7 +198,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_timestamp_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJUaW1lc3RhbXAiOjk0Njg0NTI5Nn0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -217,7 +217,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_timestamp_shapes_with_iso8601 expectedRq.method = "POST"; expectedRq.body = "eyJJc284NjAxVGltZXN0YW1wIjoiMjAwMC0wMS0wMlQyMDozNDo1NloifQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -236,7 +236,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_timestamp_shapes_with_httpdat expectedRq.method = "POST"; expectedRq.body = "eyJIdHRwZGF0ZVRpbWVzdGFtcCI6IlN1biwgMDIgSmFuIDIwMDAgMjA6MzQ6NTYgR01UIn0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -255,7 +255,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_timestamp_shapes_with_unixtim expectedRq.method = "POST"; expectedRq.body = "eyJVbml4VGltZXN0YW1wIjo5NDY4NDUyOTZ9"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -274,7 +274,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_list_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJMaXN0T2ZTdHJpbmdzIjpbImFiYyIsIm1ubyIsInh5eiJdfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -293,7 +293,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_empty_list_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJMaXN0T2ZTdHJpbmdzIjpbXX0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -326,7 +326,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_list_of_map_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJMaXN0T2ZNYXBzT2ZTdHJpbmdzIjpbeyJmb28iOiJiYXIifSx7ImFiYyI6Inh5eiJ9LHsicmVkIjoiYmx1ZSJ9XX0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -359,7 +359,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_list_of_structure_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJMaXN0T2ZTdHJ1Y3RzIjpbeyJWYWx1ZSI6ImFiYyJ9LHsiVmFsdWUiOiJtbm8ifSx7IlZhbHVlIjoieHl6In1dfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -390,7 +390,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_list_of_recursive_structure_s expectedRq.method = "POST"; expectedRq.body = "eyJSZWN1cnNpdmVMaXN0IjpbeyJSZWN1cnNpdmVMaXN0IjpbeyJSZWN1cnNpdmVMaXN0IjpbeyJJbnRlZ2VyIjoxMjN9XX1dfV19"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -409,7 +409,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_map_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJNYXBPZlN0cmluZ3MiOnsiYWJjIjoieHl6IiwibW5vIjoiaGprIn19"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -428,7 +428,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_empty_map_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJNYXBPZlN0cmluZ3MiOnt9fQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -447,7 +447,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_map_of_list_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJNYXBPZkxpc3RzT2ZTdHJpbmdzIjp7ImFiYyI6WyJhYmMiLCJ4eXoiXSwibW5vIjpbInh5eiIsImFiYyJdfX0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -475,7 +475,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_map_of_structure_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJNYXBPZlN0cnVjdHMiOnsia2V5MSI6eyJWYWx1ZSI6InZhbHVlLTEifSwia2V5MiI6eyJWYWx1ZSI6InZhbHVlLTIifX19"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -507,7 +507,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_map_of_recursive_structure_sh expectedRq.body = "eyJSZWN1cnNpdmVNYXAiOnsia2V5MSI6eyJSZWN1cnNpdmVNYXAiOnsia2V5MiI6eyJSZWN1cnNpdmVNYXAiOnsia2V5MyI6eyJCb29sZWFuIjpmYWxzZX19fX19fX0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -530,7 +530,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_structure_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJTaW1wbGVTdHJ1Y3QiOnsiVmFsdWUiOiJhYmMifX0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -553,7 +553,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_structure_members_with_locati expectedRq.method = "POST"; expectedRq.body = "eyJTdHJ1Y3RXaXRoSnNvbk5hbWUiOnsiVmFsdWUiOiJzb21lLXZhbHVlIn19"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -575,7 +575,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_empty_structure_shapes) { expectedRq.method = "POST"; expectedRq.body = "eyJTaW1wbGVTdHJ1Y3QiOnt9fQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -597,7 +597,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_structure_which_have_no_membe expectedRq.method = "POST"; expectedRq.body = "eyJFbXB0eVN0cnVjdCI6e319"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); @@ -640,7 +640,7 @@ AWS_PROTOCOL_TEST(KitchenSinkOperation, serializes_recursive_structure_shapes) { "Y3Vyc2l2ZUxpc3QiOlt7IlN0cmluZyI6InN0cmluZy1vbmx5In0seyJSZWN1cnNpdmVTdHJ1Y3QiOnsiTWFwT2ZTdHJpbmdzIjp7ImNvbG9yIjoicmVkIiwic2l6ZSI6Imxh" "cmdlIn19fV19fQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.KitchenSinkOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); diff --git a/generated/protocol-tests/tests/input/json/tests/NullOperationTest.cpp b/generated/protocol-tests/tests/input/json/tests/NullOperationTest.cpp index ec8b8f01eed1..84e98c432629 100644 --- a/generated/protocol-tests/tests/input/json/tests/NullOperationTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/NullOperationTest.cpp @@ -23,7 +23,7 @@ AWS_PROTOCOL_TEST(NullOperation, AwsJson11StructuresDontSerializeNullValues) { expectedRq.method = "POST"; expectedRq.body = "e30="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.NullOperation)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.NullOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/json/tests/OperationWithOptionalInputOutputTest.cpp b/generated/protocol-tests/tests/input/json/tests/OperationWithOptionalInputOutputTest.cpp index c968458cad97..5dd920f8a672 100644 --- a/generated/protocol-tests/tests/input/json/tests/OperationWithOptionalInputOutputTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/OperationWithOptionalInputOutputTest.cpp @@ -23,8 +23,8 @@ AWS_PROTOCOL_TEST(OperationWithOptionalInputOutput, can_call_operation_with_no_i expectedRq.method = "POST"; expectedRq.body = "e30="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, - {"X-Amz-Target", R"(JsonProtocol.OperationWithOptionalInputOutput)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.OperationWithOptionalInputOutput)"}, + {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -42,8 +42,8 @@ AWS_PROTOCOL_TEST(OperationWithOptionalInputOutput, can_call_operation_with_opti expectedRq.method = "POST"; expectedRq.body = "eyJWYWx1ZSI6IkhpIn0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, - {"X-Amz-Target", R"(JsonProtocol.OperationWithOptionalInputOutput)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.OperationWithOptionalInputOutput)"}, + {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/json/tests/PutAndGetInlineDocumentsTest.cpp b/generated/protocol-tests/tests/input/json/tests/PutAndGetInlineDocumentsTest.cpp index 8e9562332a3b..69ae7ecf7585 100644 --- a/generated/protocol-tests/tests/input/json/tests/PutAndGetInlineDocumentsTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/PutAndGetInlineDocumentsTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(PutAndGetInlineDocuments, PutAndGetInlineDocumentsInput) { expectedRq.method = "POST"; expectedRq.body = "ewogICAgImlubGluZURvY3VtZW50IjogeyJmb28iOiAiYmFyIn0KfQ=="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.PutAndGetInlineDocuments)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.PutAndGetInlineDocuments)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); diff --git a/generated/protocol-tests/tests/input/json/tests/SimpleScalarPropertiesTest.cpp b/generated/protocol-tests/tests/input/json/tests/SimpleScalarPropertiesTest.cpp index 5f7996bef685..058d7f7a1f28 100644 --- a/generated/protocol-tests/tests/input/json/tests/SimpleScalarPropertiesTest.cpp +++ b/generated/protocol-tests/tests/input/json/tests/SimpleScalarPropertiesTest.cpp @@ -25,7 +25,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, AwsJson11SupportsNaNFloatInputs) { expectedRq.method = "POST"; expectedRq.body = "ewogICAgImZsb2F0VmFsdWUiOiAiTmFOIiwKICAgICJkb3VibGVWYWx1ZSI6ICJOYU4iCn0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.SimpleScalarProperties)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.SimpleScalarProperties)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -44,7 +44,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, AwsJson11SupportsInfinityFloatInputs) expectedRq.method = "POST"; expectedRq.body = "ewogICAgImZsb2F0VmFsdWUiOiAiSW5maW5pdHkiLAogICAgImRvdWJsZVZhbHVlIjogIkluZmluaXR5Igp9"; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.SimpleScalarProperties)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.SimpleScalarProperties)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -63,7 +63,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, AwsJson11SupportsNegativeInfinityFloat expectedRq.method = "POST"; expectedRq.body = "ewogICAgImZsb2F0VmFsdWUiOiAiLUluZmluaXR5IiwKICAgICJkb3VibGVWYWx1ZSI6ICItSW5maW5pdHkiCn0="; expectedRq.uri = "/"; - expectedRq.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.SimpleScalarProperties)"}}; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.SimpleScalarProperties)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/json/tests/SparseNullsOperationTest.cpp b/generated/protocol-tests/tests/input/json/tests/SparseNullsOperationTest.cpp new file mode 100644 index 000000000000..bb8dd14580ee --- /dev/null +++ b/generated/protocol-tests/tests/input/json/tests/SparseNullsOperationTest.cpp @@ -0,0 +1,48 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using SparseNullsOperation = AWS_PROTOCOL_TEST_SUITE; +using JsonProtocolClient = Aws::JsonProtocol::JsonProtocolClient; +using namespace Aws::JsonProtocol::Model; + +AWS_PROTOCOL_TEST(SparseNullsOperation, AwsJson11SparseMapsSerializeNullValues) { + JsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + SparseNullsOperationRequest request; + request.AddSparseStringMap("foo", Aws::Crt::Optional{}); + + auto outcome = client.SparseNullsOperation(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "ewogICAgInNwYXJzZVN0cmluZ01hcCI6IHsKICAgICAgICAiZm9vIjogbnVsbAogICAgfQp9"; + expectedRq.uri = "/"; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.SparseNullsOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} + +AWS_PROTOCOL_TEST(SparseNullsOperation, AwsJson11SparseListsSerializeNull) { + JsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + SparseNullsOperationRequest request; + request.AddSparseStringList(Aws::Crt::Optional{}); + + auto outcome = client.SparseNullsOperation(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "ewogICAgInNwYXJzZVN0cmluZ0xpc3QiOiBbCiAgICAgICAgbnVsbAogICAgXQp9"; + expectedRq.uri = "/"; + expectedRq.headers = {{"X-Amz-Target", R"(JsonProtocol.SparseNullsOperation)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} diff --git a/generated/protocol-tests/tests/input/rest-json/tests/HttpEmptyPrefixHeadersTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/HttpEmptyPrefixHeadersTest.cpp new file mode 100644 index 000000000000..b7f5a77fdde6 --- /dev/null +++ b/generated/protocol-tests/tests/input/rest-json/tests/HttpEmptyPrefixHeadersTest.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 + +using HttpEmptyPrefixHeaders = AWS_PROTOCOL_TEST_SUITE; +using RestJsonProtocolClient = Aws::RestJsonProtocol::RestJsonProtocolClient; +using namespace Aws::RestJsonProtocol::Model; + +AWS_PROTOCOL_TEST(HttpEmptyPrefixHeaders, RestJsonHttpEmptyPrefixHeadersRequestClient) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + HttpEmptyPrefixHeadersRequest request; + request.SetPrefixHeaders({{"x-foo", R"(Foo)"}, {"hello", R"(Hello)"}}); + request.SetSpecificHeader(R"(There)"); + + auto outcome = client.HttpEmptyPrefixHeaders(request); + ExpectedRequest expectedRq; + expectedRq.method = "GET"; + expectedRq.uri = "/HttpEmptyPrefixHeaders"; + expectedRq.headers = {{"x-foo", R"(Foo)"}, {"hello", R"(There)"}}; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} diff --git a/generated/protocol-tests/tests/input/rest-json/tests/HttpPayloadTraitsTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/HttpPayloadTraitsTest.cpp index 996b508a21a4..b61a2e44df43 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/HttpPayloadTraitsTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/HttpPayloadTraitsTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(HttpPayloadTraits, RestJsonHttpPayloadTraitsWithBlob) { expectedRq.method = "POST"; expectedRq.body = "YmxvYmJ5IGJsb2IgYmxvYg=="; expectedRq.uri = "/HttpPayloadTraits"; - expectedRq.headers = {{"Content-Type", R"(application/octet-stream)"}, {"X-Foo", R"(Foo)"}}; + expectedRq.headers = {{"X-Foo", R"(Foo)"}, {"Content-Type", R"(application/octet-stream)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); diff --git a/generated/protocol-tests/tests/input/rest-json/tests/HttpPrefixHeadersTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/HttpPrefixHeadersTest.cpp index 5d937bf13096..5bb0724102de 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/HttpPrefixHeadersTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/HttpPrefixHeadersTest.cpp @@ -24,7 +24,7 @@ AWS_PROTOCOL_TEST(HttpPrefixHeaders, RestJsonHttpPrefixHeadersArePresent) { ExpectedRequest expectedRq; expectedRq.method = "GET"; expectedRq.uri = "/HttpPrefixHeaders"; - expectedRq.headers = {{"x-foo", R"(Foo)"}, {"x-foo-abc", R"(Abc value)"}, {"x-foo-def", R"(Def value)"}}; + expectedRq.headers = {{"x-foo", R"(Foo)"}, {"x-foo-def", R"(Def value)"}, {"x-foo-abc", R"(Abc value)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/rest-json/tests/HttpQueryParamsOnlyOperationTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/HttpQueryParamsOnlyOperationTest.cpp new file mode 100644 index 000000000000..e85a64bda93f --- /dev/null +++ b/generated/protocol-tests/tests/input/rest-json/tests/HttpQueryParamsOnlyOperationTest.cpp @@ -0,0 +1,44 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using HttpQueryParamsOnlyOperation = AWS_PROTOCOL_TEST_SUITE; +using RestJsonProtocolClient = Aws::RestJsonProtocol::RestJsonProtocolClient; +using namespace Aws::RestJsonProtocol::Model; + +AWS_PROTOCOL_TEST(HttpQueryParamsOnlyOperation, HttpQueryParamsOnlyRequest) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + HttpQueryParamsOnlyOperationRequest request; + request.SetQueryMap({{"a", R"(b)"}, {"c", R"(d)"}}); + + auto outcome = client.HttpQueryParamsOnlyOperation(request); + ExpectedRequest expectedRq; + expectedRq.method = "GET"; + expectedRq.uri = "/http-query-params-only?a=b&c=d"; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} + +AWS_PROTOCOL_TEST(HttpQueryParamsOnlyOperation, HttpQueryParamsOnlyEmptyRequest) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + HttpQueryParamsOnlyOperationRequest request; + request.SetQueryMap({}); + + auto outcome = client.HttpQueryParamsOnlyOperation(request); + ExpectedRequest expectedRq; + expectedRq.method = "GET"; + expectedRq.uri = "/http-query-params-only"; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} 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 9730e59b80e0..06ba3c6b90d7 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/InputAndOutputWithHeadersTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/InputAndOutputWithHeadersTest.cpp @@ -25,7 +25,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithStringHea ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/InputAndOutputWithHeaders"; - expectedRq.headers = {{"X-String", R"(Hello)"}, {"X-StringList", R"(a, b, c)"}, {"X-StringSet", R"(a, b, c)"}}; + expectedRq.headers = {{"X-StringList", R"(a, b, c)"}, {"X-String", R"(Hello)"}, {"X-StringSet", R"(a, b, c)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -65,9 +65,9 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithNumericHe ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/InputAndOutputWithHeaders"; - expectedRq.headers = {{"X-Byte", R"(1)"}, {"X-Double", R"(1.1)"}, {"X-Float", R"(1.1)"}, - {"X-Integer", R"(123)"}, {"X-IntegerList", R"(1, 2, 3)"}, {"X-Long", R"(123)"}, - {"X-Short", R"(123)"}}; + expectedRq.headers = {{"X-Integer", R"(123)"}, {"X-Short", R"(123)"}, {"X-Byte", R"(1)"}, + {"X-Long", R"(123)"}, {"X-Double", R"(1.1)"}, {"X-Float", R"(1.1)"}, + {"X-IntegerList", R"(1, 2, 3)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -86,7 +86,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithBooleanHe ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/InputAndOutputWithHeaders"; - expectedRq.headers = {{"X-Boolean1", R"(true)"}, {"X-Boolean2", R"(false)"}, {"X-BooleanList", R"(true, false, true)"}}; + expectedRq.headers = {{"X-BooleanList", R"(true, false, true)"}, {"X-Boolean1", R"(true)"}, {"X-Boolean2", R"(false)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -123,7 +123,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithEnumHeade ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/InputAndOutputWithHeaders"; - expectedRq.headers = {{"X-Enum", R"(Foo)"}, {"X-EnumList", R"(Foo, Bar, Baz)"}}; + expectedRq.headers = {{"X-EnumList", R"(Foo, Bar, Baz)"}, {"X-Enum", R"(Foo)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -141,7 +141,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithIntEnumHe ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/InputAndOutputWithHeaders"; - expectedRq.headers = {{"X-IntegerEnum", R"(1)"}, {"X-IntegerEnumList", R"(1, 2, 3)"}}; + expectedRq.headers = {{"X-IntegerEnumList", R"(1, 2, 3)"}, {"X-IntegerEnum", R"(1)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -159,7 +159,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonSupportsNaNFloatHeaderInput ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/InputAndOutputWithHeaders"; - expectedRq.headers = {{"X-Double", R"(NaN)"}, {"X-Float", R"(NaN)"}}; + expectedRq.headers = {{"X-Float", R"(NaN)"}, {"X-Double", R"(NaN)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -177,7 +177,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonSupportsInfinityFloatHeader ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/InputAndOutputWithHeaders"; - expectedRq.headers = {{"X-Double", R"(Infinity)"}, {"X-Float", R"(Infinity)"}}; + expectedRq.headers = {{"X-Float", R"(Infinity)"}, {"X-Double", R"(Infinity)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } @@ -195,7 +195,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonSupportsNegativeInfinityFlo ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/InputAndOutputWithHeaders"; - expectedRq.headers = {{"X-Double", R"(-Infinity)"}, {"X-Float", R"(-Infinity)"}}; + expectedRq.headers = {{"X-Float", R"(-Infinity)"}, {"X-Double", R"(-Infinity)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/rest-json/tests/SimpleScalarPropertiesTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/SimpleScalarPropertiesTest.cpp index b1d6a7aecd60..6709a2219b0b 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/SimpleScalarPropertiesTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/SimpleScalarPropertiesTest.cpp @@ -36,7 +36,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RestJsonSimpleScalarProperties) { "eXRlVmFsdWUiOiAxLAogICAgInNob3J0VmFsdWUiOiAyLAogICAgImludGVnZXJWYWx1ZSI6IDMsCiAgICAibG9uZ1ZhbHVlIjogNCwKICAgICJmbG9hdFZhbHVlIjogNS41" "LAogICAgIkRvdWJsZURyaWJibGUiOiA2LjUKfQ=="; expectedRq.uri = "/SimpleScalarProperties"; - expectedRq.headers = {{"Content-Type", R"(application/json)"}, {"X-Foo", R"(Foo)"}}; + expectedRq.headers = {{"X-Foo", R"(Foo)"}, {"Content-Type", R"(application/json)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/rest-json/tests/SparseJsonListsTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/SparseJsonListsTest.cpp new file mode 100644 index 000000000000..df72dff11646 --- /dev/null +++ b/generated/protocol-tests/tests/input/rest-json/tests/SparseJsonListsTest.cpp @@ -0,0 +1,35 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using SparseJsonLists = AWS_PROTOCOL_TEST_SUITE; +using RestJsonProtocolClient = Aws::RestJsonProtocol::RestJsonProtocolClient; +using namespace Aws::RestJsonProtocol::Model; + +AWS_PROTOCOL_TEST(SparseJsonLists, RestJsonSparseListsSerializeNull) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + SparseJsonListsRequest request; + request.AddSparseStringList(Aws::Crt::Optional{}); + request.AddSparseStringList(R"(hi)"); + request.AddSparseShortList(Aws::Crt::Optional{}); + request.AddSparseShortList(2); + + auto outcome = client.SparseJsonLists(request); + ExpectedRequest expectedRq; + expectedRq.method = "PUT"; + expectedRq.body = + "ewogICAgInNwYXJzZVN0cmluZ0xpc3QiOiBbCiAgICAgICAgbnVsbCwKICAgICAgICAiaGkiCiAgICBdLAogICAgInNwYXJzZVNob3J0TGlzdCI6IFsKICAgICAgICBudWxs" + "LAogICAgICAgIDIKICAgIF0KfQ=="; + expectedRq.uri = "/SparseJsonLists"; + expectedRq.headers = {{"Content-Type", R"(application/json)"}}; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} diff --git a/generated/protocol-tests/tests/input/rest-json/tests/SparseJsonMapsTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/SparseJsonMapsTest.cpp new file mode 100644 index 000000000000..1f033b120b8a --- /dev/null +++ b/generated/protocol-tests/tests/input/rest-json/tests/SparseJsonMapsTest.cpp @@ -0,0 +1,126 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using SparseJsonMaps = AWS_PROTOCOL_TEST_SUITE; +using RestJsonProtocolClient = Aws::RestJsonProtocol::RestJsonProtocolClient; +using namespace Aws::RestJsonProtocol::Model; + +AWS_PROTOCOL_TEST(SparseJsonMaps, RestJsonSparseJsonMaps) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + SparseJsonMapsRequest request; + { + GreetingStruct requestSparseStructMapItem; + requestSparseStructMapItem.SetHi(R"(there)"); + request.AddSparseStructMap("foo", requestSparseStructMapItem); + } + { + GreetingStruct requestSparseStructMapItem; + requestSparseStructMapItem.SetHi(R"(bye)"); + request.AddSparseStructMap("baz", requestSparseStructMapItem); + } + + auto outcome = client.SparseJsonMaps(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = + "ewogICAgInNwYXJzZVN0cnVjdE1hcCI6IHsKICAgICAgICAiZm9vIjogewogICAgICAgICAgICAiaGkiOiAidGhlcmUiCiAgICAgICAgfSwKICAgICAgICAiYmF6Ijogewog" + "ICAgICAgICAgICAiaGkiOiAiYnllIgogICAgICAgIH0KICAgIH0KfQ=="; + expectedRq.uri = "/SparseJsonMaps"; + expectedRq.headers = {{"Content-Type", R"(application/json)"}}; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} + +AWS_PROTOCOL_TEST(SparseJsonMaps, RestJsonSerializesSparseNullMapValues) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + SparseJsonMapsRequest request; + request.AddSparseBooleanMap("x", Aws::Crt::Optional{}); + request.AddSparseNumberMap("x", Aws::Crt::Optional{}); + request.AddSparseStringMap("x", Aws::Crt::Optional{}); + request.AddSparseStructMap("x", Aws::Crt::Optional{}); + + auto outcome = client.SparseJsonMaps(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = + "ewogICAgInNwYXJzZUJvb2xlYW5NYXAiOiB7CiAgICAgICAgIngiOiBudWxsCiAgICB9LAogICAgInNwYXJzZU51bWJlck1hcCI6IHsKICAgICAgICAieCI6IG51bGwKICAg" + "IH0sCiAgICAic3BhcnNlU3RyaW5nTWFwIjogewogICAgICAgICJ4IjogbnVsbAogICAgfSwKICAgICJzcGFyc2VTdHJ1Y3RNYXAiOiB7CiAgICAgICAgIngiOiBudWxsCiAg" + "ICB9Cn0="; + expectedRq.uri = "/SparseJsonMaps"; + expectedRq.headers = {{"Content-Type", R"(application/json)"}}; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} + +AWS_PROTOCOL_TEST(SparseJsonMaps, RestJsonSerializesZeroValuesInSparseMaps) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + SparseJsonMapsRequest request; + request.AddSparseNumberMap("x", 0); + request.AddSparseBooleanMap("x", false); + + auto outcome = client.SparseJsonMaps(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = + "ewogICAgInNwYXJzZU51bWJlck1hcCI6IHsKICAgICAgICAieCI6IDAKICAgIH0sCiAgICAic3BhcnNlQm9vbGVhbk1hcCI6IHsKICAgICAgICAieCI6IGZhbHNlCiAgICB9" + "Cn0="; + expectedRq.uri = "/SparseJsonMaps"; + expectedRq.headers = {{"Content-Type", R"(application/json)"}}; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} + +AWS_PROTOCOL_TEST(SparseJsonMaps, RestJsonSerializesSparseSetMap) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + SparseJsonMapsRequest request; + request.AddSparseSetMap("x", Aws::Vector{}); + request.AddSparseSetMap("y", Aws::Vector{R"(a)", R"(b)"}); + + auto outcome = client.SparseJsonMaps(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "ewogICAgInNwYXJzZVNldE1hcCI6IHsKICAgICAgICAieCI6IFtdLAogICAgICAgICJ5IjogWyJhIiwgImIiXQogICAgfQp9"; + expectedRq.uri = "/SparseJsonMaps"; + expectedRq.headers = {{"Content-Type", R"(application/json)"}}; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} + +AWS_PROTOCOL_TEST(SparseJsonMaps, RestJsonSerializesSparseSetMapAndRetainsNull) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + SetMockResponse(); + + SparseJsonMapsRequest request; + request.AddSparseSetMap("x", Aws::Vector{}); + request.AddSparseSetMap("y", Aws::Vector{R"(a)", R"(b)"}); + request.AddSparseSetMap("z", Aws::Crt::Optional>{}); + + auto outcome = client.SparseJsonMaps(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = + "ewogICAgInNwYXJzZVNldE1hcCI6IHsKICAgICAgICAieCI6IFtdLAogICAgICAgICJ5IjogWyJhIiwgImIiXSwKICAgICAgICAieiI6IG51bGwKICAgIH0KfQ=="; + expectedRq.uri = "/SparseJsonMaps"; + expectedRq.headers = {{"Content-Type", R"(application/json)"}}; + ValidateRequestSent(expectedRq); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); +} diff --git a/generated/protocol-tests/tests/input/rest-json/tests/TestPayloadStructureTest.cpp b/generated/protocol-tests/tests/input/rest-json/tests/TestPayloadStructureTest.cpp index 9eeb9c1dd956..a8acd4504159 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/TestPayloadStructureTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/TestPayloadStructureTest.cpp @@ -65,7 +65,7 @@ AWS_PROTOCOL_TEST(TestPayloadStructure, RestJsonHttpWithHeadersButNoPayload) { expectedRq.method = "POST"; expectedRq.body = "e30="; expectedRq.uri = "/payload"; - expectedRq.headers = {{"Content-Type", R"(application/json)"}, {"X-Amz-Test-Id", R"(t-12345)"}}; + expectedRq.headers = {{"X-Amz-Test-Id", R"(t-12345)"}, {"Content-Type", R"(application/json)"}}; expectedRq.requireHeaders = {"Content-Length"}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); 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 adcb3c97befa..c6afe4214889 100644 --- a/generated/protocol-tests/tests/input/rest-json/tests/TimestampFormatHeadersTest.cpp +++ b/generated/protocol-tests/tests/input/rest-json/tests/TimestampFormatHeadersTest.cpp @@ -29,13 +29,13 @@ AWS_PROTOCOL_TEST(TimestampFormatHeaders, RestJsonTimestampFormatHeaders) { ExpectedRequest expectedRq; expectedRq.method = "POST"; expectedRq.uri = "/TimestampFormatHeaders"; - expectedRq.headers = {{"X-defaultFormat", R"(Mon, 16 Dec 2019 23:48:18 GMT)"}, - {"X-memberDateTime", R"(2019-12-16T23:48:18Z)"}, - {"X-memberEpochSeconds", R"(1576540098)"}, + expectedRq.headers = {{"X-memberDateTime", R"(2019-12-16T23:48:18Z)"}, + {"X-targetHttpDate", R"(Mon, 16 Dec 2019 23:48:18 GMT)"}, {"X-memberHttpDate", R"(Mon, 16 Dec 2019 23:48:18 GMT)"}, {"X-targetDateTime", R"(2019-12-16T23:48:18Z)"}, {"X-targetEpochSeconds", R"(1576540098)"}, - {"X-targetHttpDate", R"(Mon, 16 Dec 2019 23:48:18 GMT)"}}; + {"X-memberEpochSeconds", R"(1576540098)"}, + {"X-defaultFormat", R"(Mon, 16 Dec 2019 23:48:18 GMT)"}}; ValidateRequestSent(expectedRq); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); } diff --git a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/EmptyInputOutputTest.cpp b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/EmptyInputOutputTest.cpp index 6fe3204646dc..194933b45e0c 100644 --- a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/EmptyInputOutputTest.cpp +++ b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/EmptyInputOutputTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(EmptyInputOutput, empty_input) { expectedRq.method = "POST"; expectedRq.body = "v/8="; expectedRq.uri = "/service/RpcV2Protocol/operation/EmptyInputOutput"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.forbidHeaders = {"X-Amz-Target"}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); diff --git a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/OptionalInputOutputTest.cpp b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/OptionalInputOutputTest.cpp index 95bfa1b6bbfa..8f2d53bb0ad7 100644 --- a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/OptionalInputOutputTest.cpp +++ b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/OptionalInputOutputTest.cpp @@ -27,7 +27,7 @@ AWS_PROTOCOL_TEST(OptionalInputOutput, optional_input) { expectedRq.method = "POST"; expectedRq.body = "v/8="; expectedRq.uri = "/service/RpcV2Protocol/operation/OptionalInputOutput"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.forbidHeaders = {"X-Amz-Target"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); ValidateRequestSent(expectedRq, [](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { diff --git a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RecursiveShapesTest.cpp b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RecursiveShapesTest.cpp index 8de51c07a407..44b903e114ed 100644 --- a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RecursiveShapesTest.cpp +++ b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RecursiveShapesTest.cpp @@ -49,7 +49,7 @@ AWS_PROTOCOL_TEST(RecursiveShapes, RpcV2CborRecursiveShapes) { expectedRq.method = "POST"; expectedRq.body = "v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8="; expectedRq.uri = "/service/RpcV2Protocol/operation/RecursiveShapes"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const RecursiveShapesResult& result = outcome.GetResult(); diff --git a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborDenseMapsTest.cpp b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborDenseMapsTest.cpp index 7144d8b96e2b..0541228989f3 100644 --- a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborDenseMapsTest.cpp +++ b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborDenseMapsTest.cpp @@ -37,7 +37,7 @@ AWS_PROTOCOL_TEST(RpcV2CborDenseMaps, RpcV2CborMaps) { expectedRq.method = "POST"; expectedRq.body = "oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ=="; expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const RpcV2CborDenseMapsResult& result = outcome.GetResult(); @@ -76,7 +76,7 @@ AWS_PROTOCOL_TEST(RpcV2CborDenseMaps, RpcV2CborSerializesZeroValuesInMaps) { expectedRq.method = "POST"; expectedRq.body = "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A=="; expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const RpcV2CborDenseMapsResult& result = outcome.GetResult(); @@ -110,7 +110,7 @@ AWS_PROTOCOL_TEST(RpcV2CborDenseMaps, RpcV2CborSerializesDenseSetMap) { expectedRq.method = "POST"; expectedRq.body = "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi"; expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const RpcV2CborDenseMapsResult& result = outcome.GetResult(); diff --git a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborListsTest.cpp b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborListsTest.cpp index 2793873a2573..37b51a3c06b3 100644 --- a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborListsTest.cpp +++ b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborListsTest.cpp @@ -68,7 +68,7 @@ AWS_PROTOCOL_TEST(RpcV2CborLists, RpcV2CborLists) { "vzgAAAaGVudW1MaXN0gmNGb29hMGtpbnRFbnVtTGlzdIIBAnBuZXN0ZWRTdHJpbmdMaXN0goJjZm9vY2JhcoJjYmF6Y3F1eG1zdHJ1Y3R1cmVMaXN0gqJhYWExYWJhMqJhYW" "EzYWJhNGhibG9iTGlzdIJDZm9vQ2Jhcv8="; expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborLists"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const RpcV2CborListsResult& result = outcome.GetResult(); @@ -152,7 +152,7 @@ AWS_PROTOCOL_TEST(RpcV2CborLists, RpcV2CborListsEmpty) { expectedRq.method = "POST"; expectedRq.body = "v2pzdHJpbmdMaXN0n///"; expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborLists"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const RpcV2CborListsResult& result = outcome.GetResult(); @@ -180,7 +180,7 @@ AWS_PROTOCOL_TEST(RpcV2CborLists, RpcV2CborListsEmptyUsingDefiniteLength) { expectedRq.method = "POST"; expectedRq.body = "oWpzdHJpbmdMaXN0gA=="; expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborLists"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const RpcV2CborListsResult& result = outcome.GetResult(); diff --git a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborSparseMapsTest.cpp b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborSparseMapsTest.cpp new file mode 100644 index 000000000000..42d13b45b7f5 --- /dev/null +++ b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/RpcV2CborSparseMapsTest.cpp @@ -0,0 +1,219 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using RpcV2CborSparseMaps = AWS_PROTOCOL_TEST_SUITE; +using RpcV2ProtocolClient = Aws::RpcV2Protocol::RpcV2ProtocolClient; +using namespace Aws::RpcV2Protocol::Model; + +AWS_PROTOCOL_TEST(RpcV2CborSparseMaps, RpcV2CborSparseMaps) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + // Cbor specific + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.body = "v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////"; + SetMockResponse(mockRs); + + RpcV2CborSparseMapsRequest request; + { + GreetingStruct requestSparseStructMapItem; + requestSparseStructMapItem.SetHi(R"(there)"); + request.AddSparseStructMap("foo", requestSparseStructMapItem); + } + { + GreetingStruct requestSparseStructMapItem; + requestSparseStructMapItem.SetHi(R"(bye)"); + request.AddSparseStructMap("baz", requestSparseStructMapItem); + } + + auto outcome = client.RpcV2CborSparseMaps(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////"; + expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; + expectedRq.requireHeaders = {"Content-Length"}; + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const RpcV2CborSparseMapsResult& result = outcome.GetResult(); + ValidateRequestSent(expectedRq, [&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseStructMap":{"foo":{"hi":"there"},"baz":{"hi":"bye"}}} )" */ + const Aws::Map>& resultSparseStructMap = result.GetSparseStructMap(); + EXPECT_EQ(2U, resultSparseStructMap.size()); + { + EXPECT_TRUE(resultSparseStructMap.find("foo") != resultSparseStructMap.end()); + EXPECT_TRUE(resultSparseStructMap.at("foo").has_value()); + const GreetingStruct& resultSparseStructMapItem = *resultSparseStructMap.at("foo"); + EXPECT_EQ(R"(there)", resultSparseStructMapItem.GetHi()); + } + { + EXPECT_TRUE(resultSparseStructMap.find("baz") != resultSparseStructMap.end()); + EXPECT_TRUE(resultSparseStructMap.at("baz").has_value()); + const GreetingStruct& resultSparseStructMapItem = *resultSparseStructMap.at("baz"); + EXPECT_EQ(R"(bye)", resultSparseStructMapItem.GetHi()); + } + }); +} + +AWS_PROTOCOL_TEST(RpcV2CborSparseMaps, RpcV2CborSerializesNullMapValues) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + // Cbor specific + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.body = "v3BzcGFyc2VCb29sZWFuTWFwv2F49v9vc3BhcnNlTnVtYmVyTWFwv2F49v9vc3BhcnNlU3RyaW5nTWFwv2F49v9vc3BhcnNlU3RydWN0TWFwv2F49v//"; + SetMockResponse(mockRs); + + RpcV2CborSparseMapsRequest request; + request.AddSparseBooleanMap("x", Aws::Crt::Optional{}); + request.AddSparseNumberMap("x", Aws::Crt::Optional{}); + request.AddSparseStringMap("x", Aws::Crt::Optional{}); + request.AddSparseStructMap("x", Aws::Crt::Optional{}); + + auto outcome = client.RpcV2CborSparseMaps(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "v3BzcGFyc2VCb29sZWFuTWFwv2F49v9vc3BhcnNlTnVtYmVyTWFwv2F49v9vc3BhcnNlU3RyaW5nTWFwv2F49v9vc3BhcnNlU3RydWN0TWFwv2F49v//"; + expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; + expectedRq.requireHeaders = {"Content-Length"}; + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const RpcV2CborSparseMapsResult& result = outcome.GetResult(); + ValidateRequestSent(expectedRq, [&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( + * {"sparseBooleanMap":{"x":null},"sparseNumberMap":{"x":null},"sparseStringMap":{"x":null},"sparseStructMap":{"x":null}} )" */ + const Aws::Map>& resultSparseBooleanMap = result.GetSparseBooleanMap(); + EXPECT_EQ(1U, resultSparseBooleanMap.size()); + EXPECT_TRUE(resultSparseBooleanMap.find("x") != resultSparseBooleanMap.end()); + EXPECT_FALSE(resultSparseBooleanMap.at("x").has_value()); + const Aws::Map>& resultSparseNumberMap = result.GetSparseNumberMap(); + EXPECT_EQ(1U, resultSparseNumberMap.size()); + EXPECT_TRUE(resultSparseNumberMap.find("x") != resultSparseNumberMap.end()); + EXPECT_FALSE(resultSparseNumberMap.at("x").has_value()); + const Aws::Map>& resultSparseStringMap = result.GetSparseStringMap(); + EXPECT_EQ(1U, resultSparseStringMap.size()); + EXPECT_TRUE(resultSparseStringMap.find("x") != resultSparseStringMap.end()); + EXPECT_FALSE(resultSparseStringMap.at("x").has_value()); + const Aws::Map>& resultSparseStructMap = result.GetSparseStructMap(); + EXPECT_EQ(1U, resultSparseStructMap.size()); + { + EXPECT_TRUE(resultSparseStructMap.find("x") != resultSparseStructMap.end()); + EXPECT_FALSE(resultSparseStructMap.at("x").has_value()); + } + }); +} + +AWS_PROTOCOL_TEST(RpcV2CborSparseMaps, RpcV2CborSerializesSparseSetMap) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + // Cbor specific + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.body = "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL///8="; + SetMockResponse(mockRs); + + RpcV2CborSparseMapsRequest request; + request.AddSparseSetMap("x", Aws::Vector{}); + request.AddSparseSetMap("y", Aws::Vector{R"(a)", R"(b)"}); + + auto outcome = client.RpcV2CborSparseMaps(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL///8="; + expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; + expectedRq.requireHeaders = {"Content-Length"}; + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const RpcV2CborSparseMapsResult& result = outcome.GetResult(); + ValidateRequestSent(expectedRq, [&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseSetMap":{"x":[],"y":["a","b"]}} )" */ + const Aws::Map>>& resultSparseSetMap = result.GetSparseSetMap(); + EXPECT_EQ(2U, resultSparseSetMap.size()); + EXPECT_TRUE(resultSparseSetMap.find("x") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("x").has_value()); + EXPECT_EQ(Aws::Vector({}), *resultSparseSetMap.at("x")); + EXPECT_TRUE(resultSparseSetMap.find("y") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("y").has_value()); + EXPECT_EQ(Aws::Vector({R"(a)", R"(b)"}), *resultSparseSetMap.at("y")); + }); +} + +AWS_PROTOCOL_TEST(RpcV2CborSparseMaps, RpcV2CborSerializesSparseSetMapAndRetainsNull) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + // Cbor specific + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.body = "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8="; + SetMockResponse(mockRs); + + RpcV2CborSparseMapsRequest request; + request.AddSparseSetMap("x", Aws::Vector{}); + request.AddSparseSetMap("y", Aws::Vector{R"(a)", R"(b)"}); + request.AddSparseSetMap("z", Aws::Crt::Optional>{}); + + auto outcome = client.RpcV2CborSparseMaps(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8="; + expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; + expectedRq.requireHeaders = {"Content-Length"}; + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const RpcV2CborSparseMapsResult& result = outcome.GetResult(); + ValidateRequestSent(expectedRq, [&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseSetMap":{"x":[],"y":["a","b"],"z":null}} )" */ + const Aws::Map>>& resultSparseSetMap = result.GetSparseSetMap(); + EXPECT_EQ(3U, resultSparseSetMap.size()); + EXPECT_TRUE(resultSparseSetMap.find("x") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("x").has_value()); + EXPECT_EQ(Aws::Vector({}), *resultSparseSetMap.at("x")); + EXPECT_TRUE(resultSparseSetMap.find("y") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("y").has_value()); + EXPECT_EQ(Aws::Vector({R"(a)", R"(b)"}), *resultSparseSetMap.at("y")); + EXPECT_TRUE(resultSparseSetMap.find("z") != resultSparseSetMap.end()); + EXPECT_FALSE(resultSparseSetMap.at("z").has_value()); + }); +} + +AWS_PROTOCOL_TEST(RpcV2CborSparseMaps, RpcV2CborSerializesZeroValuesInSparseMaps) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + // Cbor specific + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.body = "v29zcGFyc2VOdW1iZXJNYXC/YXgA/3BzcGFyc2VCb29sZWFuTWFwv2F49P//"; + SetMockResponse(mockRs); + + RpcV2CborSparseMapsRequest request; + request.AddSparseNumberMap("x", 0); + request.AddSparseBooleanMap("x", false); + + auto outcome = client.RpcV2CborSparseMaps(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "v29zcGFyc2VOdW1iZXJNYXC/YXgA/3BzcGFyc2VCb29sZWFuTWFwv2F49P//"; + expectedRq.uri = "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps"; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; + expectedRq.requireHeaders = {"Content-Length"}; + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const RpcV2CborSparseMapsResult& result = outcome.GetResult(); + ValidateRequestSent(expectedRq, [&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseNumberMap":{"x":0},"sparseBooleanMap":{"x":false}} )" */ + const Aws::Map>& resultSparseNumberMap = result.GetSparseNumberMap(); + EXPECT_EQ(1U, resultSparseNumberMap.size()); + EXPECT_TRUE(resultSparseNumberMap.find("x") != resultSparseNumberMap.end()); + EXPECT_TRUE(resultSparseNumberMap.at("x").has_value()); + EXPECT_EQ(0, *resultSparseNumberMap.at("x")); + const Aws::Map>& resultSparseBooleanMap = result.GetSparseBooleanMap(); + EXPECT_EQ(1U, resultSparseBooleanMap.size()); + EXPECT_TRUE(resultSparseBooleanMap.find("x") != resultSparseBooleanMap.end()); + EXPECT_TRUE(resultSparseBooleanMap.at("x").has_value()); + EXPECT_EQ(false, *resultSparseBooleanMap.at("x")); + }); +} diff --git a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/SimpleScalarPropertiesTest.cpp b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/SimpleScalarPropertiesTest.cpp index 6b92a970b8ba..0f50ee7e3ed1 100644 --- a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/SimpleScalarPropertiesTest.cpp +++ b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/SimpleScalarPropertiesTest.cpp @@ -45,7 +45,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborSimpleScalarProperties) { "kD0AABsaW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/" "w=="; expectedRq.uri = "/service/RpcV2Protocol/operation/SimpleScalarProperties"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const SimpleScalarPropertiesResult& result = outcome.GetResult(); @@ -82,7 +82,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborClientDoesntSerializeNullStru expectedRq.method = "POST"; expectedRq.body = "v/8="; expectedRq.uri = "/service/RpcV2Protocol/operation/SimpleScalarProperties"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const SimpleScalarPropertiesResult& result = outcome.GetResult(); @@ -110,7 +110,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborSupportsNaNFloatInputs) { expectedRq.method = "POST"; expectedRq.body = "v2tkb3VibGVWYWx1Zft/+AAAAAAAAGpmbG9hdFZhbHVl+n/AAAD/"; expectedRq.uri = "/service/RpcV2Protocol/operation/SimpleScalarProperties"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const SimpleScalarPropertiesResult& result = outcome.GetResult(); @@ -139,7 +139,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborSupportsInfinityFloatInputs) expectedRq.method = "POST"; expectedRq.body = "v2tkb3VibGVWYWx1Zft/8AAAAAAAAGpmbG9hdFZhbHVl+n+AAAD/"; expectedRq.uri = "/service/RpcV2Protocol/operation/SimpleScalarProperties"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const SimpleScalarPropertiesResult& result = outcome.GetResult(); @@ -168,7 +168,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborSupportsNegativeInfinityFloat expectedRq.method = "POST"; expectedRq.body = "v2tkb3VibGVWYWx1Zfv/8AAAAAAAAGpmbG9hdFZhbHVl+v+AAAD/"; expectedRq.uri = "/service/RpcV2Protocol/operation/SimpleScalarProperties"; - expectedRq.headers = {{"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; expectedRq.requireHeaders = {"Content-Length"}; AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); const SimpleScalarPropertiesResult& result = outcome.GetResult(); diff --git a/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/SparseNullsOperationTest.cpp b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/SparseNullsOperationTest.cpp new file mode 100644 index 000000000000..9100e43f1249 --- /dev/null +++ b/generated/protocol-tests/tests/input/smithy-rpc-v2-cbor/tests/SparseNullsOperationTest.cpp @@ -0,0 +1,71 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using SparseNullsOperation = AWS_PROTOCOL_TEST_SUITE; +using RpcV2ProtocolClient = Aws::RpcV2Protocol::RpcV2ProtocolClient; +using namespace Aws::RpcV2Protocol::Model; + +AWS_PROTOCOL_TEST(SparseNullsOperation, RpcV2CborSparseMapsSerializeNullValues) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + // Cbor specific + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.body = "v29zcGFyc2VTdHJpbmdNYXC/Y2Zvb/b//w=="; + SetMockResponse(mockRs); + + SparseNullsOperationRequest request; + request.AddSparseStringMap("foo", Aws::Crt::Optional{}); + + auto outcome = client.SparseNullsOperation(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "v29zcGFyc2VTdHJpbmdNYXC/Y2Zvb/b//w=="; + expectedRq.uri = "/service/RpcV2Protocol/operation/SparseNullsOperation"; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; + expectedRq.requireHeaders = {"Content-Length"}; + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseNullsOperationResult& result = outcome.GetResult(); + ValidateRequestSent(expectedRq, [&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseStringMap":{"foo":null}} )" */ + const Aws::Map>& resultSparseStringMap = result.GetSparseStringMap(); + EXPECT_EQ(1U, resultSparseStringMap.size()); + EXPECT_TRUE(resultSparseStringMap.find("foo") != resultSparseStringMap.end()); + EXPECT_FALSE(resultSparseStringMap.at("foo").has_value()); + }); +} + +AWS_PROTOCOL_TEST(SparseNullsOperation, RpcV2CborSparseListsSerializeNull) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + // Cbor specific + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.body = "v3BzcGFyc2VTdHJpbmdMaXN0n/b//w=="; + SetMockResponse(mockRs); + + SparseNullsOperationRequest request; + request.AddSparseStringList(Aws::Crt::Optional{}); + + auto outcome = client.SparseNullsOperation(request); + ExpectedRequest expectedRq; + expectedRq.method = "POST"; + expectedRq.body = "v3BzcGFyc2VTdHJpbmdMaXN0n/b//w=="; + expectedRq.uri = "/service/RpcV2Protocol/operation/SparseNullsOperation"; + expectedRq.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Accept", R"(application/cbor)"}, {"Content-Type", R"(application/cbor)"}}; + expectedRq.requireHeaders = {"Content-Length"}; + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseNullsOperationResult& result = outcome.GetResult(); + ValidateRequestSent(expectedRq, [&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseStringList":[null]} )" */ + const Aws::Vector>& resultSparseStringListItem = result.GetSparseStringList(); + EXPECT_EQ(1U, resultSparseStringListItem.size()); + EXPECT_FALSE(resultSparseStringListItem.at(0).has_value()); + }); +} diff --git a/generated/protocol-tests/tests/output/json/tests/GreetingWithErrors1Test.cpp b/generated/protocol-tests/tests/output/json/tests/GreetingWithErrors1Test.cpp index 4b9c0674a871..e1350a67e128 100644 --- a/generated/protocol-tests/tests/output/json/tests/GreetingWithErrors1Test.cpp +++ b/generated/protocol-tests/tests/output/json/tests/GreetingWithErrors1Test.cpp @@ -147,3 +147,20 @@ AWS_PROTOCOL_TEST(GreetingWithErrors1, AwsJson11FooErrorWithDunderTypeUriAndName auto outcome = client.GreetingWithErrors(request); ASSERT_FALSE(outcome.IsSuccess()); } + +AWS_PROTOCOL_TEST(GreetingWithErrors1, AwsJson11FooErrorWithNestedTypeProperty) { + JsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 500; + mockRs.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}}; + mockRs.body = + "ewogICAgIl9fdHlwZSI6ICJhd3MucHJvdG9jb2x0ZXN0cy5yZXN0anNvbiNGb29FcnJvciIsCiAgICAiRXJyb3JEZXRhaWxzIjogWwogICAgICB7CiAgICAgICAgICAiX190" + "eXBlIjogImNvbS5hbWF6b24uaW50ZXJuYWwjRXJyb3JEZXRhaWxzIiwKICAgICAgICAgICJyZWFzb24iOiAiU29tZSByZWFzb24iCiAgICAgIH0KICAgIF0KfQ=="; + SetMockResponse(mockRs); + + GreetingWithErrorsRequest request; + + auto outcome = client.GreetingWithErrors(request); + ASSERT_FALSE(outcome.IsSuccess()); +} diff --git a/generated/protocol-tests/tests/output/json/tests/JsonIntEnumsTest.cpp b/generated/protocol-tests/tests/output/json/tests/JsonIntEnumsTest.cpp index bee441fba790..75651cce433b 100644 --- a/generated/protocol-tests/tests/output/json/tests/JsonIntEnumsTest.cpp +++ b/generated/protocol-tests/tests/output/json/tests/JsonIntEnumsTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(JsonIntEnums, AwsJson11IntEnums) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}, {"X-Amz-Target", R"(JsonProtocol.JsonIntEnums)"}}; + mockRs.headers = {{"X-Amz-Target", R"(JsonProtocol.JsonIntEnums)"}, {"Content-Type", R"(application/x-amz-json-1.1)"}}; mockRs.body = "ewogICAgImludEVudW0xIjogMSwKICAgICJpbnRFbnVtMiI6IDIsCiAgICAiaW50RW51bTMiOiAzLAogICAgImludEVudW1MaXN0IjogWwogICAgICAgIDEsCiAgICAgICAg" "MgogICAgXSwKICAgICJpbnRFbnVtU2V0IjogWwogICAgICAgIDEsCiAgICAgICAgMgogICAgXSwKICAgICJpbnRFbnVtTWFwIjogewogICAgICAgICJhIjogMSwKICAgICAg" diff --git a/generated/protocol-tests/tests/output/json/tests/SparseNullsOperationTest.cpp b/generated/protocol-tests/tests/output/json/tests/SparseNullsOperationTest.cpp new file mode 100644 index 000000000000..71f4c4fd0533 --- /dev/null +++ b/generated/protocol-tests/tests/output/json/tests/SparseNullsOperationTest.cpp @@ -0,0 +1,57 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using SparseNullsOperation = AWS_PROTOCOL_TEST_SUITE; +using JsonProtocolClient = Aws::JsonProtocol::JsonProtocolClient; +using namespace Aws::JsonProtocol::Model; + +AWS_PROTOCOL_TEST(SparseNullsOperation, AwsJson11SparseMapsDeserializeNullValues) { + JsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}}; + mockRs.body = "ewogICAgInNwYXJzZVN0cmluZ01hcCI6IHsKICAgICAgICAiZm9vIjogbnVsbAogICAgfQp9"; + SetMockResponse(mockRs); + + SparseNullsOperationRequest request; + + auto outcome = client.SparseNullsOperation(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseNullsOperationResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseStringMap":{"foo":null}} )" */ + const Aws::Map>& resultSparseStringMap = result.GetSparseStringMap(); + EXPECT_EQ(1U, resultSparseStringMap.size()); + EXPECT_TRUE(resultSparseStringMap.find("foo") != resultSparseStringMap.end()); + EXPECT_FALSE(resultSparseStringMap.at("foo").has_value()); + }); +} + +AWS_PROTOCOL_TEST(SparseNullsOperation, AwsJson11SparseListsDeserializeNull) { + JsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"Content-Type", R"(application/x-amz-json-1.1)"}}; + mockRs.body = "ewogICAgInNwYXJzZVN0cmluZ0xpc3QiOiBbCiAgICAgICAgbnVsbAogICAgXQp9"; + SetMockResponse(mockRs); + + SparseNullsOperationRequest request; + + auto outcome = client.SparseNullsOperation(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseNullsOperationResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseStringList":[null]} )" */ + const Aws::Vector>& resultSparseStringListItem = result.GetSparseStringList(); + EXPECT_EQ(1U, resultSparseStringListItem.size()); + EXPECT_FALSE(resultSparseStringListItem.at(0).has_value()); + }); +} diff --git a/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors0Test.cpp b/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors0Test.cpp index 604e79791786..55ce363897d6 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors0Test.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors0Test.cpp @@ -11,135 +11,13 @@ using GreetingWithErrors0 = AWS_PROTOCOL_TEST_SUITE; using RestJsonProtocolClient = Aws::RestJsonProtocol::RestJsonProtocolClient; using namespace Aws::RestJsonProtocol::Model; -AWS_PROTOCOL_TEST(GreetingWithErrors0, RestJsonFooErrorUsingXAmznErrorType) { +AWS_PROTOCOL_TEST(GreetingWithErrors0, RestJsonInvalidGreetingError) { RestJsonProtocolClient client(mockCredentials, mockConfig); OutputResponse mockRs; - mockRs.statusCode = 500; - mockRs.headers = {{"X-Amzn-Errortype", R"(FooError)"}}; - SetMockResponse(mockRs); - - GreetingWithErrorsRequest request; - - auto outcome = client.GreetingWithErrors(request); - ASSERT_FALSE(outcome.IsSuccess()); -} - -AWS_PROTOCOL_TEST(GreetingWithErrors0, RestJsonFooErrorUsingXAmznErrorTypeWithUri) { - RestJsonProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 500; - mockRs.headers = {{"X-Amzn-Errortype", R"(FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/)"}}; - SetMockResponse(mockRs); - - GreetingWithErrorsRequest request; - - auto outcome = client.GreetingWithErrors(request); - ASSERT_FALSE(outcome.IsSuccess()); -} - -AWS_PROTOCOL_TEST(GreetingWithErrors0, RestJsonFooErrorUsingXAmznErrorTypeWithUriAndNamespace) { - RestJsonProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 500; - mockRs.headers = { - {"X-Amzn-Errortype", R"(aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/)"}}; - SetMockResponse(mockRs); - - GreetingWithErrorsRequest request; - - auto outcome = client.GreetingWithErrors(request); - ASSERT_FALSE(outcome.IsSuccess()); -} - -AWS_PROTOCOL_TEST(GreetingWithErrors0, RestJsonFooErrorUsingCode) { - RestJsonProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 500; - mockRs.headers = {{"Content-Type", R"(application/json)"}}; - mockRs.body = "ewogICAgImNvZGUiOiAiRm9vRXJyb3IiCn0="; - SetMockResponse(mockRs); - - GreetingWithErrorsRequest request; - - auto outcome = client.GreetingWithErrors(request); - ASSERT_FALSE(outcome.IsSuccess()); -} - -AWS_PROTOCOL_TEST(GreetingWithErrors0, RestJsonFooErrorUsingCodeAndNamespace) { - RestJsonProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 500; - mockRs.headers = {{"Content-Type", R"(application/json)"}}; - mockRs.body = "ewogICAgImNvZGUiOiAiYXdzLnByb3RvY29sdGVzdHMucmVzdGpzb24jRm9vRXJyb3IiCn0="; - SetMockResponse(mockRs); - - GreetingWithErrorsRequest request; - - auto outcome = client.GreetingWithErrors(request); - ASSERT_FALSE(outcome.IsSuccess()); -} - -AWS_PROTOCOL_TEST(GreetingWithErrors0, RestJsonFooErrorUsingCodeUriAndNamespace) { - RestJsonProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 500; - mockRs.headers = {{"Content-Type", R"(application/json)"}}; - mockRs.body = - "ewogICAgImNvZGUiOiAiYXdzLnByb3RvY29sdGVzdHMucmVzdGpzb24jRm9vRXJyb3I6aHR0cDovL2ludGVybmFsLmFtYXpvbi5jb20vY29yYWwvY29tLmFtYXpvbi5jb3Jh" - "bC52YWxpZGF0ZS8iCn0="; - SetMockResponse(mockRs); - - GreetingWithErrorsRequest request; - - auto outcome = client.GreetingWithErrors(request); - ASSERT_FALSE(outcome.IsSuccess()); -} - -AWS_PROTOCOL_TEST(GreetingWithErrors0, RestJsonFooErrorWithDunderType) { - RestJsonProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 500; - mockRs.headers = {{"Content-Type", R"(application/json)"}}; - mockRs.body = "ewogICAgIl9fdHlwZSI6ICJGb29FcnJvciIKfQ=="; - SetMockResponse(mockRs); - - GreetingWithErrorsRequest request; - - auto outcome = client.GreetingWithErrors(request); - ASSERT_FALSE(outcome.IsSuccess()); -} - -AWS_PROTOCOL_TEST(GreetingWithErrors0, RestJsonFooErrorWithDunderTypeAndNamespace) { - RestJsonProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 500; - mockRs.headers = {{"Content-Type", R"(application/json)"}}; - mockRs.body = "ewogICAgIl9fdHlwZSI6ICJhd3MucHJvdG9jb2x0ZXN0cy5yZXN0anNvbiNGb29FcnJvciIKfQ=="; - SetMockResponse(mockRs); - - GreetingWithErrorsRequest request; - - auto outcome = client.GreetingWithErrors(request); - ASSERT_FALSE(outcome.IsSuccess()); -} - -AWS_PROTOCOL_TEST(GreetingWithErrors0, RestJsonFooErrorWithDunderTypeUriAndNamespace) { - RestJsonProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 500; - mockRs.headers = {{"Content-Type", R"(application/json)"}}; - mockRs.body = - "ewogICAgIl9fdHlwZSI6ICJhd3MucHJvdG9jb2x0ZXN0cy5yZXN0anNvbiNGb29FcnJvcjpodHRwOi8vaW50ZXJuYWwuYW1hem9uLmNvbS9jb3JhbC9jb20uYW1hem9uLmNv" - "cmFsLnZhbGlkYXRlLyIKfQ=="; + mockRs.statusCode = 400; + mockRs.headers = {{"X-Amzn-Errortype", R"(InvalidGreeting)"}, {"Content-Type", R"(application/json)"}}; + mockRs.body = "ewogICAgIk1lc3NhZ2UiOiAiSGkiCn0="; SetMockResponse(mockRs); GreetingWithErrorsRequest request; diff --git a/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors1Test.cpp b/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors1Test.cpp index dc1a0179eb03..d8771ebb6d8b 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors1Test.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors1Test.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(GreetingWithErrors1, RestJsonComplexErrorWithNoMessage) { OutputResponse mockRs; mockRs.statusCode = 403; - mockRs.headers = {{"Content-Type", R"(application/json)"}, {"X-Amzn-Errortype", R"(ComplexError)"}, {"X-Header", R"(Header)"}}; + mockRs.headers = {{"X-Amzn-Errortype", R"(ComplexError)"}, {"X-Header", R"(Header)"}, {"Content-Type", R"(application/json)"}}; mockRs.body = "ewogICAgIlRvcExldmVsIjogIlRvcCBsZXZlbCIsCiAgICAiTmVzdGVkIjogewogICAgICAgICJGb29vb28iOiAiYmFyIgogICAgfQp9"; SetMockResponse(mockRs); @@ -31,7 +31,7 @@ AWS_PROTOCOL_TEST(GreetingWithErrors1, RestJsonEmptyComplexErrorWithNoMessage) { OutputResponse mockRs; mockRs.statusCode = 403; - mockRs.headers = {{"Content-Type", R"(application/json)"}, {"X-Amzn-Errortype", R"(ComplexError)"}}; + mockRs.headers = {{"X-Amzn-Errortype", R"(ComplexError)"}, {"Content-Type", R"(application/json)"}}; mockRs.body = "e30="; SetMockResponse(mockRs); diff --git a/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors2Test.cpp b/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors2Test.cpp index 5a56b791335a..364510d19987 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors2Test.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/GreetingWithErrors2Test.cpp @@ -11,13 +11,152 @@ using GreetingWithErrors2 = AWS_PROTOCOL_TEST_SUITE; using RestJsonProtocolClient = Aws::RestJsonProtocol::RestJsonProtocolClient; using namespace Aws::RestJsonProtocol::Model; -AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonInvalidGreetingError) { +AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonFooErrorUsingXAmznErrorType) { RestJsonProtocolClient client(mockCredentials, mockConfig); OutputResponse mockRs; - mockRs.statusCode = 400; - mockRs.headers = {{"Content-Type", R"(application/json)"}, {"X-Amzn-Errortype", R"(InvalidGreeting)"}}; - mockRs.body = "ewogICAgIk1lc3NhZ2UiOiAiSGkiCn0="; + mockRs.statusCode = 500; + mockRs.headers = {{"X-Amzn-Errortype", R"(FooError)"}}; + SetMockResponse(mockRs); + + GreetingWithErrorsRequest request; + + auto outcome = client.GreetingWithErrors(request); + ASSERT_FALSE(outcome.IsSuccess()); +} + +AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonFooErrorUsingXAmznErrorTypeWithUri) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 500; + mockRs.headers = {{"X-Amzn-Errortype", R"(FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/)"}}; + SetMockResponse(mockRs); + + GreetingWithErrorsRequest request; + + auto outcome = client.GreetingWithErrors(request); + ASSERT_FALSE(outcome.IsSuccess()); +} + +AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonFooErrorUsingXAmznErrorTypeWithUriAndNamespace) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 500; + mockRs.headers = { + {"X-Amzn-Errortype", R"(aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/)"}}; + SetMockResponse(mockRs); + + GreetingWithErrorsRequest request; + + auto outcome = client.GreetingWithErrors(request); + ASSERT_FALSE(outcome.IsSuccess()); +} + +AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonFooErrorUsingCode) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 500; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = "ewogICAgImNvZGUiOiAiRm9vRXJyb3IiCn0="; + SetMockResponse(mockRs); + + GreetingWithErrorsRequest request; + + auto outcome = client.GreetingWithErrors(request); + ASSERT_FALSE(outcome.IsSuccess()); +} + +AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonFooErrorUsingCodeAndNamespace) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 500; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = "ewogICAgImNvZGUiOiAiYXdzLnByb3RvY29sdGVzdHMucmVzdGpzb24jRm9vRXJyb3IiCn0="; + SetMockResponse(mockRs); + + GreetingWithErrorsRequest request; + + auto outcome = client.GreetingWithErrors(request); + ASSERT_FALSE(outcome.IsSuccess()); +} + +AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonFooErrorUsingCodeUriAndNamespace) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 500; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = + "ewogICAgImNvZGUiOiAiYXdzLnByb3RvY29sdGVzdHMucmVzdGpzb24jRm9vRXJyb3I6aHR0cDovL2ludGVybmFsLmFtYXpvbi5jb20vY29yYWwvY29tLmFtYXpvbi5jb3Jh" + "bC52YWxpZGF0ZS8iCn0="; + SetMockResponse(mockRs); + + GreetingWithErrorsRequest request; + + auto outcome = client.GreetingWithErrors(request); + ASSERT_FALSE(outcome.IsSuccess()); +} + +AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonFooErrorWithDunderType) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 500; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = "ewogICAgIl9fdHlwZSI6ICJGb29FcnJvciIKfQ=="; + SetMockResponse(mockRs); + + GreetingWithErrorsRequest request; + + auto outcome = client.GreetingWithErrors(request); + ASSERT_FALSE(outcome.IsSuccess()); +} + +AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonFooErrorWithDunderTypeAndNamespace) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 500; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = "ewogICAgIl9fdHlwZSI6ICJhd3MucHJvdG9jb2x0ZXN0cy5yZXN0anNvbiNGb29FcnJvciIKfQ=="; + SetMockResponse(mockRs); + + GreetingWithErrorsRequest request; + + auto outcome = client.GreetingWithErrors(request); + ASSERT_FALSE(outcome.IsSuccess()); +} + +AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonFooErrorWithDunderTypeUriAndNamespace) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 500; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = + "ewogICAgIl9fdHlwZSI6ICJhd3MucHJvdG9jb2x0ZXN0cy5yZXN0anNvbiNGb29FcnJvcjpodHRwOi8vaW50ZXJuYWwuYW1hem9uLmNvbS9jb3JhbC9jb20uYW1hem9uLmNv" + "cmFsLnZhbGlkYXRlLyIKfQ=="; + SetMockResponse(mockRs); + + GreetingWithErrorsRequest request; + + auto outcome = client.GreetingWithErrors(request); + ASSERT_FALSE(outcome.IsSuccess()); +} + +AWS_PROTOCOL_TEST(GreetingWithErrors2, RestJsonFooErrorWithNestedTypeProperty) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 500; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = + "ewogICAgIl9fdHlwZSI6ICJhd3MucHJvdG9jb2x0ZXN0cy5yZXN0anNvbiNGb29FcnJvciIsCiAgICAiRXJyb3JEZXRhaWxzIjogWwogICAgICB7CiAgICAgICAgICAiX190" + "eXBlIjogImNvbS5hbWF6b24uaW50ZXJuYWwjRXJyb3JEZXRhaWxzIiwKICAgICAgICAgICJyZWFzb24iOiAiU29tZSByZWFzb24iCiAgICAgIH0KICAgIF0KfQ=="; SetMockResponse(mockRs); GreetingWithErrorsRequest request; diff --git a/generated/protocol-tests/tests/output/rest-json/tests/HttpEmptyPrefixHeadersTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/HttpEmptyPrefixHeadersTest.cpp new file mode 100644 index 000000000000..5f6dbada2b82 --- /dev/null +++ b/generated/protocol-tests/tests/output/rest-json/tests/HttpEmptyPrefixHeadersTest.cpp @@ -0,0 +1,37 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using HttpEmptyPrefixHeaders = AWS_PROTOCOL_TEST_SUITE; +using RestJsonProtocolClient = Aws::RestJsonProtocol::RestJsonProtocolClient; +using namespace Aws::RestJsonProtocol::Model; + +AWS_PROTOCOL_TEST(HttpEmptyPrefixHeaders, RestJsonHttpEmptyPrefixHeadersResponseClient) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"x-foo", R"(Foo)"}, {"hello", R"(There)"}}; + SetMockResponse(mockRs); + + HttpEmptyPrefixHeadersRequest request; + + auto outcome = client.HttpEmptyPrefixHeaders(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const HttpEmptyPrefixHeadersResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"prefixHeaders":{"x-foo":"Foo","hello":"There"},"specificHeader":"There"} )" */ + const Aws::Map& resultPrefixHeaders = result.GetPrefixHeaders(); + EXPECT_EQ(2U, resultPrefixHeaders.size()); + EXPECT_TRUE(resultPrefixHeaders.find("x-foo") != resultPrefixHeaders.end()); + EXPECT_EQ(R"(Foo)", resultPrefixHeaders.at("x-foo")); + EXPECT_TRUE(resultPrefixHeaders.find("hello") != resultPrefixHeaders.end()); + EXPECT_EQ(R"(There)", resultPrefixHeaders.at("hello")); + EXPECT_EQ(R"(There)", result.GetSpecificHeader()); + }); +} diff --git a/generated/protocol-tests/tests/output/rest-json/tests/HttpPayloadWithStructureTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/HttpPayloadWithStructureTest.cpp index 32089586ebc7..f86d39e679b3 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/HttpPayloadWithStructureTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/HttpPayloadWithStructureTest.cpp @@ -34,3 +34,21 @@ AWS_PROTOCOL_TEST(HttpPayloadWithStructure, RestJsonHttpPayloadWithStructure) { } }); } + +AWS_PROTOCOL_TEST(HttpPayloadWithStructure, RestJsonHttpPayloadWithStructureAndEmptyResponseBody) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + SetMockResponse(mockRs); + + HttpPayloadWithStructureRequest request; + + auto outcome = client.HttpPayloadWithStructure(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const HttpPayloadWithStructureResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"nested":null} )" */ + { (void)result.GetNested(); } + }); +} diff --git a/generated/protocol-tests/tests/output/rest-json/tests/HttpPrefixHeadersInResponseTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/HttpPrefixHeadersInResponseTest.cpp index 606dd3b2b1e2..a0862f25a814 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/HttpPrefixHeadersInResponseTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/HttpPrefixHeadersInResponseTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(HttpPrefixHeadersInResponse, HttpPrefixHeadersResponse) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"hello", R"(Hello)"}, {"x-foo", R"(Foo)"}}; + mockRs.headers = {{"x-foo", R"(Foo)"}, {"hello", R"(Hello)"}}; SetMockResponse(mockRs); HttpPrefixHeadersInResponseRequest request; diff --git a/generated/protocol-tests/tests/output/rest-json/tests/HttpPrefixHeadersTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/HttpPrefixHeadersTest.cpp index c1f32e2812c6..c1a7082be81b 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/HttpPrefixHeadersTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/HttpPrefixHeadersTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(HttpPrefixHeaders, RestJsonHttpPrefixHeadersArePresent) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"x-foo", R"(Foo)"}, {"x-foo-abc", R"(Abc value)"}, {"x-foo-def", R"(Def value)"}}; + mockRs.headers = {{"x-foo", R"(Foo)"}, {"x-foo-def", R"(Def value)"}, {"x-foo-abc", R"(Abc value)"}}; SetMockResponse(mockRs); HttpPrefixHeadersRequest request; diff --git a/generated/protocol-tests/tests/output/rest-json/tests/IgnoreQueryParamsInResponseTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/IgnoreQueryParamsInResponseTest.cpp index a71df1e91504..3faea1063467 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/IgnoreQueryParamsInResponseTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/IgnoreQueryParamsInResponseTest.cpp @@ -17,30 +17,16 @@ AWS_PROTOCOL_TEST(IgnoreQueryParamsInResponse, RestJsonIgnoreQueryParamsInRespon OutputResponse mockRs; mockRs.statusCode = 200; mockRs.headers = {{"Content-Type", R"(application/json)"}}; - mockRs.body = "e30="; + mockRs.body = "eyJiYXoiOiJiYW0ifQ=="; SetMockResponse(mockRs); IgnoreQueryParamsInResponseRequest request; auto outcome = client.IgnoreQueryParamsInResponse(request); AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); - ValidateRequestSent([](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { - /* expectedResult = R"( {} )" */ - }); -} - -AWS_PROTOCOL_TEST(IgnoreQueryParamsInResponse, RestJsonIgnoreQueryParamsInResponseNoPayload) { - RestJsonProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 200; - SetMockResponse(mockRs); - - IgnoreQueryParamsInResponseRequest request; - - auto outcome = client.IgnoreQueryParamsInResponse(request); - AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); - ValidateRequestSent([](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { - /* expectedResult = R"( {} )" */ + const IgnoreQueryParamsInResponseResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"baz":"bam"} )" */ + EXPECT_EQ(R"(bam)", result.GetBaz()); }); } 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 fac1299589bd..a3925403b3b5 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/InputAndOutputWithHeadersTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/InputAndOutputWithHeadersTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithStringHea OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"X-String", R"(Hello)"}, {"X-StringList", R"(a, b, c)"}, {"X-StringSet", R"(a, b, c)"}}; + mockRs.headers = {{"X-StringList", R"(a, b, c)"}, {"X-String", R"(Hello)"}, {"X-StringSet", R"(a, b, c)"}}; SetMockResponse(mockRs); InputAndOutputWithHeadersRequest request; @@ -68,9 +68,9 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithNumericHe OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"X-Byte", R"(1)"}, {"X-Double", R"(1.1)"}, {"X-Float", R"(1.1)"}, - {"X-Integer", R"(123)"}, {"X-IntegerList", R"(1, 2, 3)"}, {"X-Long", R"(123)"}, - {"X-Short", R"(123)"}}; + mockRs.headers = {{"X-Integer", R"(123)"}, {"X-Short", R"(123)"}, {"X-Byte", R"(1)"}, + {"X-Long", R"(123)"}, {"X-Double", R"(1.1)"}, {"X-Float", R"(1.1)"}, + {"X-IntegerList", R"(1, 2, 3)"}}; SetMockResponse(mockRs); InputAndOutputWithHeadersRequest request; @@ -101,7 +101,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithBooleanHe OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"X-Boolean1", R"(true)"}, {"X-Boolean2", R"(false)"}, {"X-BooleanList", R"(true, false, true)"}}; + mockRs.headers = {{"X-BooleanList", R"(true, false, true)"}, {"X-Boolean1", R"(true)"}, {"X-Boolean2", R"(false)"}}; SetMockResponse(mockRs); InputAndOutputWithHeadersRequest request; @@ -148,7 +148,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithEnumHeade OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"X-Enum", R"(Foo)"}, {"X-EnumList", R"(Foo, Bar, Baz)"}}; + mockRs.headers = {{"X-EnumList", R"(Foo, Bar, Baz)"}, {"X-Enum", R"(Foo)"}}; SetMockResponse(mockRs); InputAndOutputWithHeadersRequest request; @@ -172,7 +172,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonInputAndOutputWithIntEnumHe OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"X-IntegerEnum", R"(1)"}, {"X-IntegerEnumList", R"(1, 2, 3)"}}; + mockRs.headers = {{"X-IntegerEnumList", R"(1, 2, 3)"}, {"X-IntegerEnum", R"(1)"}}; SetMockResponse(mockRs); InputAndOutputWithHeadersRequest request; @@ -196,7 +196,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonSupportsNaNFloatHeaderOutpu OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"X-Double", R"(NaN)"}, {"X-Float", R"(NaN)"}}; + mockRs.headers = {{"X-Float", R"(NaN)"}, {"X-Double", R"(NaN)"}}; SetMockResponse(mockRs); InputAndOutputWithHeadersRequest request; @@ -216,7 +216,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonSupportsInfinityFloatHeader OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"X-Double", R"(Infinity)"}, {"X-Float", R"(Infinity)"}}; + mockRs.headers = {{"X-Float", R"(Infinity)"}, {"X-Double", R"(Infinity)"}}; SetMockResponse(mockRs); InputAndOutputWithHeadersRequest request; @@ -236,7 +236,7 @@ AWS_PROTOCOL_TEST(InputAndOutputWithHeaders, RestJsonSupportsNegativeInfinityFlo OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"X-Double", R"(-Infinity)"}, {"X-Float", R"(-Infinity)"}}; + mockRs.headers = {{"X-Float", R"(-Infinity)"}, {"X-Double", R"(-Infinity)"}}; SetMockResponse(mockRs); InputAndOutputWithHeadersRequest request; diff --git a/generated/protocol-tests/tests/output/rest-json/tests/JsonMapsTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/JsonMapsTest.cpp index b2ea1eaa9e29..2ef54cf3e932 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/JsonMapsTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/JsonMapsTest.cpp @@ -105,36 +105,3 @@ AWS_PROTOCOL_TEST(JsonMaps, RestJsonDeserializesDenseSetMap) { } }); } - -AWS_PROTOCOL_TEST(JsonMaps, RestJsonDeserializesDenseSetMapAndSkipsNull) { - RestJsonProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/json)"}}; - mockRs.body = "ewogICAgImRlbnNlU2V0TWFwIjogewogICAgICAgICJ4IjogW10sCiAgICAgICAgInkiOiBbImEiLCAiYiJdLAogICAgICAgICJ6IjogbnVsbAogICAgfQp9"; - SetMockResponse(mockRs); - - JsonMapsRequest request; - - auto outcome = client.JsonMaps(request); - AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); - const JsonMapsResult& result = outcome.GetResult(); - ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { - /* expectedResult = R"( {"denseSetMap":{"x":[],"y":["a","b"]}} )" */ - const Aws::Map>& resultDenseSetMap = result.GetDenseSetMap(); - EXPECT_EQ(2U, resultDenseSetMap.size()); - EXPECT_TRUE(resultDenseSetMap.find("x") != resultDenseSetMap.end()); - { - const Aws::Vector& resultDenseSetMapItem = resultDenseSetMap.at("x"); - EXPECT_EQ(0U, resultDenseSetMapItem.size()); - } - EXPECT_TRUE(resultDenseSetMap.find("y") != resultDenseSetMap.end()); - { - const Aws::Vector& resultDenseSetMapItem = resultDenseSetMap.at("y"); - EXPECT_EQ(2U, resultDenseSetMapItem.size()); - EXPECT_EQ(R"(a)", resultDenseSetMapItem.at(0)); - EXPECT_EQ(R"(b)", resultDenseSetMapItem.at(1)); - } - }); -} diff --git a/generated/protocol-tests/tests/output/rest-json/tests/SimpleScalarPropertiesTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/SimpleScalarPropertiesTest.cpp index 752c98edeb22..b089b17fd066 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/SimpleScalarPropertiesTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/SimpleScalarPropertiesTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RestJsonSimpleScalarProperties) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/json)"}, {"X-Foo", R"(Foo)"}}; + mockRs.headers = {{"X-Foo", R"(Foo)"}, {"Content-Type", R"(application/json)"}}; mockRs.body = "ewogICAgInN0cmluZ1ZhbHVlIjogInN0cmluZyIsCiAgICAidHJ1ZUJvb2xlYW5WYWx1ZSI6IHRydWUsCiAgICAiZmFsc2VCb29sZWFuVmFsdWUiOiBmYWxzZSwKICAgICJi" "eXRlVmFsdWUiOiAxLAogICAgInNob3J0VmFsdWUiOiAyLAogICAgImludGVnZXJWYWx1ZSI6IDMsCiAgICAibG9uZ1ZhbHVlIjogNCwKICAgICJmbG9hdFZhbHVlIjogNS41" diff --git a/generated/protocol-tests/tests/output/rest-json/tests/SparseJsonListsTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/SparseJsonListsTest.cpp new file mode 100644 index 000000000000..4e4981f2356a --- /dev/null +++ b/generated/protocol-tests/tests/output/rest-json/tests/SparseJsonListsTest.cpp @@ -0,0 +1,43 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using SparseJsonLists = AWS_PROTOCOL_TEST_SUITE; +using RestJsonProtocolClient = Aws::RestJsonProtocol::RestJsonProtocolClient; +using namespace Aws::RestJsonProtocol::Model; + +AWS_PROTOCOL_TEST(SparseJsonLists, RestJsonSparseListsSerializeNull) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = + "ewogICAgInNwYXJzZVN0cmluZ0xpc3QiOiBbCiAgICAgICAgbnVsbCwKICAgICAgICAiaGkiCiAgICBdLAogICAgInNwYXJzZVNob3J0TGlzdCI6IFsKICAgICAgICBudWxs" + "LAogICAgICAgIDIKICAgIF0KfQ=="; + SetMockResponse(mockRs); + + SparseJsonListsRequest request; + + auto outcome = client.SparseJsonLists(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseJsonListsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseStringList":[null,"hi"],"sparseShortList":[null,2]} )" */ + const Aws::Vector>& resultSparseStringListItem = result.GetSparseStringList(); + EXPECT_EQ(2U, resultSparseStringListItem.size()); + EXPECT_FALSE(resultSparseStringListItem.at(0).has_value()); + EXPECT_TRUE(resultSparseStringListItem.at(1).has_value()); + EXPECT_EQ(R"(hi)", *resultSparseStringListItem.at(1)); + const Aws::Vector>& resultSparseShortListItem = result.GetSparseShortList(); + EXPECT_EQ(2U, resultSparseShortListItem.size()); + EXPECT_FALSE(resultSparseShortListItem.at(0).has_value()); + EXPECT_TRUE(resultSparseShortListItem.at(1).has_value()); + EXPECT_EQ(2, *resultSparseShortListItem.at(1)); + }); +} diff --git a/generated/protocol-tests/tests/output/rest-json/tests/SparseJsonMapsTest.cpp b/generated/protocol-tests/tests/output/rest-json/tests/SparseJsonMapsTest.cpp new file mode 100644 index 000000000000..2ff707cdc16e --- /dev/null +++ b/generated/protocol-tests/tests/output/rest-json/tests/SparseJsonMapsTest.cpp @@ -0,0 +1,176 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using SparseJsonMaps = AWS_PROTOCOL_TEST_SUITE; +using RestJsonProtocolClient = Aws::RestJsonProtocol::RestJsonProtocolClient; +using namespace Aws::RestJsonProtocol::Model; + +AWS_PROTOCOL_TEST(SparseJsonMaps, RestJsonSparseJsonMaps) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = + "ewogICAgInNwYXJzZVN0cnVjdE1hcCI6IHsKICAgICAgICAiZm9vIjogewogICAgICAgICAgICAiaGkiOiAidGhlcmUiCiAgICAgICAgfSwKICAgICAgICAiYmF6Ijogewog" + "ICAgICAgICAgICAiaGkiOiAiYnllIgogICAgICAgIH0KICAgfQp9"; + SetMockResponse(mockRs); + + SparseJsonMapsRequest request; + + auto outcome = client.SparseJsonMaps(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseJsonMapsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseStructMap":{"foo":{"hi":"there"},"baz":{"hi":"bye"}}} )" */ + const Aws::Map>& resultSparseStructMap = result.GetSparseStructMap(); + EXPECT_EQ(2U, resultSparseStructMap.size()); + { + EXPECT_TRUE(resultSparseStructMap.find("foo") != resultSparseStructMap.end()); + EXPECT_TRUE(resultSparseStructMap.at("foo").has_value()); + const GreetingStruct& resultSparseStructMapItem = *resultSparseStructMap.at("foo"); + EXPECT_EQ(R"(there)", resultSparseStructMapItem.GetHi()); + } + { + EXPECT_TRUE(resultSparseStructMap.find("baz") != resultSparseStructMap.end()); + EXPECT_TRUE(resultSparseStructMap.at("baz").has_value()); + const GreetingStruct& resultSparseStructMapItem = *resultSparseStructMap.at("baz"); + EXPECT_EQ(R"(bye)", resultSparseStructMapItem.GetHi()); + } + }); +} + +AWS_PROTOCOL_TEST(SparseJsonMaps, RestJsonDeserializesSparseNullMapValues) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = + "ewogICAgInNwYXJzZUJvb2xlYW5NYXAiOiB7CiAgICAgICAgIngiOiBudWxsCiAgICB9LAogICAgInNwYXJzZU51bWJlck1hcCI6IHsKICAgICAgICAieCI6IG51bGwKICAg" + "IH0sCiAgICAic3BhcnNlU3RyaW5nTWFwIjogewogICAgICAgICJ4IjogbnVsbAogICAgfSwKICAgICJzcGFyc2VTdHJ1Y3RNYXAiOiB7CiAgICAgICAgIngiOiBudWxsCiAg" + "ICB9Cn0="; + SetMockResponse(mockRs); + + SparseJsonMapsRequest request; + + auto outcome = client.SparseJsonMaps(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseJsonMapsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( + * {"sparseBooleanMap":{"x":null},"sparseNumberMap":{"x":null},"sparseStringMap":{"x":null},"sparseStructMap":{"x":null}} )" */ + const Aws::Map>& resultSparseBooleanMap = result.GetSparseBooleanMap(); + EXPECT_EQ(1U, resultSparseBooleanMap.size()); + EXPECT_TRUE(resultSparseBooleanMap.find("x") != resultSparseBooleanMap.end()); + EXPECT_FALSE(resultSparseBooleanMap.at("x").has_value()); + const Aws::Map>& resultSparseNumberMap = result.GetSparseNumberMap(); + EXPECT_EQ(1U, resultSparseNumberMap.size()); + EXPECT_TRUE(resultSparseNumberMap.find("x") != resultSparseNumberMap.end()); + EXPECT_FALSE(resultSparseNumberMap.at("x").has_value()); + const Aws::Map>& resultSparseStringMap = result.GetSparseStringMap(); + EXPECT_EQ(1U, resultSparseStringMap.size()); + EXPECT_TRUE(resultSparseStringMap.find("x") != resultSparseStringMap.end()); + EXPECT_FALSE(resultSparseStringMap.at("x").has_value()); + const Aws::Map>& resultSparseStructMap = result.GetSparseStructMap(); + EXPECT_EQ(1U, resultSparseStructMap.size()); + { + EXPECT_TRUE(resultSparseStructMap.find("x") != resultSparseStructMap.end()); + EXPECT_FALSE(resultSparseStructMap.at("x").has_value()); + } + }); +} + +AWS_PROTOCOL_TEST(SparseJsonMaps, RestJsonDeserializesZeroValuesInSparseMaps) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = + "ewogICAgInNwYXJzZU51bWJlck1hcCI6IHsKICAgICAgICAieCI6IDAKICAgIH0sCiAgICAic3BhcnNlQm9vbGVhbk1hcCI6IHsKICAgICAgICAieCI6IGZhbHNlCiAgICB9" + "Cn0="; + SetMockResponse(mockRs); + + SparseJsonMapsRequest request; + + auto outcome = client.SparseJsonMaps(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseJsonMapsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseNumberMap":{"x":0},"sparseBooleanMap":{"x":false}} )" */ + const Aws::Map>& resultSparseNumberMap = result.GetSparseNumberMap(); + EXPECT_EQ(1U, resultSparseNumberMap.size()); + EXPECT_TRUE(resultSparseNumberMap.find("x") != resultSparseNumberMap.end()); + EXPECT_TRUE(resultSparseNumberMap.at("x").has_value()); + EXPECT_EQ(0, *resultSparseNumberMap.at("x")); + const Aws::Map>& resultSparseBooleanMap = result.GetSparseBooleanMap(); + EXPECT_EQ(1U, resultSparseBooleanMap.size()); + EXPECT_TRUE(resultSparseBooleanMap.find("x") != resultSparseBooleanMap.end()); + EXPECT_TRUE(resultSparseBooleanMap.at("x").has_value()); + EXPECT_EQ(false, *resultSparseBooleanMap.at("x")); + }); +} + +AWS_PROTOCOL_TEST(SparseJsonMaps, RestJsonDeserializesSparseSetMap) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = "ewogICAgInNwYXJzZVNldE1hcCI6IHsKICAgICAgICAieCI6IFtdLAogICAgICAgICJ5IjogWyJhIiwgImIiXQogICAgfQp9"; + SetMockResponse(mockRs); + + SparseJsonMapsRequest request; + + auto outcome = client.SparseJsonMaps(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseJsonMapsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseSetMap":{"x":[],"y":["a","b"]}} )" */ + const Aws::Map>>& resultSparseSetMap = result.GetSparseSetMap(); + EXPECT_EQ(2U, resultSparseSetMap.size()); + EXPECT_TRUE(resultSparseSetMap.find("x") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("x").has_value()); + EXPECT_EQ(Aws::Vector({}), *resultSparseSetMap.at("x")); + EXPECT_TRUE(resultSparseSetMap.find("y") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("y").has_value()); + EXPECT_EQ(Aws::Vector({R"(a)", R"(b)"}), *resultSparseSetMap.at("y")); + }); +} + +AWS_PROTOCOL_TEST(SparseJsonMaps, RestJsonDeserializesSparseSetMapAndRetainsNull) { + RestJsonProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"Content-Type", R"(application/json)"}}; + mockRs.body = + "ewogICAgInNwYXJzZVNldE1hcCI6IHsKICAgICAgICAieCI6IFtdLAogICAgICAgICJ5IjogWyJhIiwgImIiXSwKICAgICAgICAieiI6IG51bGwKICAgIH0KfQ=="; + SetMockResponse(mockRs); + + SparseJsonMapsRequest request; + + auto outcome = client.SparseJsonMaps(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseJsonMapsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseSetMap":{"x":[],"y":["a","b"],"z":null}} )" */ + const Aws::Map>>& resultSparseSetMap = result.GetSparseSetMap(); + EXPECT_EQ(3U, resultSparseSetMap.size()); + EXPECT_TRUE(resultSparseSetMap.find("x") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("x").has_value()); + EXPECT_EQ(Aws::Vector({}), *resultSparseSetMap.at("x")); + EXPECT_TRUE(resultSparseSetMap.find("y") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("y").has_value()); + EXPECT_EQ(Aws::Vector({R"(a)", R"(b)"}), *resultSparseSetMap.at("y")); + EXPECT_TRUE(resultSparseSetMap.find("z") != resultSparseSetMap.end()); + EXPECT_FALSE(resultSparseSetMap.at("z").has_value()); + }); +} 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 9079a2080844..fa9247ce3cae 100644 --- a/generated/protocol-tests/tests/output/rest-json/tests/TimestampFormatHeadersTest.cpp +++ b/generated/protocol-tests/tests/output/rest-json/tests/TimestampFormatHeadersTest.cpp @@ -16,13 +16,13 @@ AWS_PROTOCOL_TEST(TimestampFormatHeaders, RestJsonTimestampFormatHeaders) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"X-defaultFormat", R"(Mon, 16 Dec 2019 23:48:18 GMT)"}, - {"X-memberDateTime", R"(2019-12-16T23:48:18Z)"}, - {"X-memberEpochSeconds", R"(1576540098)"}, + mockRs.headers = {{"X-memberDateTime", R"(2019-12-16T23:48:18Z)"}, + {"X-targetHttpDate", R"(Mon, 16 Dec 2019 23:48:18 GMT)"}, {"X-memberHttpDate", R"(Mon, 16 Dec 2019 23:48:18 GMT)"}, {"X-targetDateTime", R"(2019-12-16T23:48:18Z)"}, {"X-targetEpochSeconds", R"(1576540098)"}, - {"X-targetHttpDate", R"(Mon, 16 Dec 2019 23:48:18 GMT)"}}; + {"X-memberEpochSeconds", R"(1576540098)"}, + {"X-defaultFormat", R"(Mon, 16 Dec 2019 23:48:18 GMT)"}}; SetMockResponse(mockRs); TimestampFormatHeadersRequest request; diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/EmptyInputOutputTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/EmptyInputOutputTest.cpp index c29578e23d0f..017bd6623e63 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/EmptyInputOutputTest.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/EmptyInputOutputTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(EmptyInputOutput, empty_output) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v/8="; SetMockResponse(mockRs); @@ -34,7 +34,7 @@ AWS_PROTOCOL_TEST(EmptyInputOutput, empty_output_no_body) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; SetMockResponse(mockRs); EmptyInputOutputRequest request; diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/Float16Test.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/Float16Test.cpp index 377081bc4b04..3e3cebb0f65f 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/Float16Test.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/Float16Test.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(Float16, RpcV2CborFloat16Inf) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "oWV2YWx1Zfl8AA=="; SetMockResponse(mockRs); @@ -36,7 +36,7 @@ AWS_PROTOCOL_TEST(Float16, RpcV2CborFloat16NegInf) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "oWV2YWx1Zfn8AA=="; SetMockResponse(mockRs); @@ -56,7 +56,7 @@ AWS_PROTOCOL_TEST(Float16, RpcV2CborFloat16LSBNaN) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "oWV2YWx1Zfl8AQ=="; SetMockResponse(mockRs); @@ -76,7 +76,7 @@ AWS_PROTOCOL_TEST(Float16, RpcV2CborFloat16MSBNaN) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "oWV2YWx1Zfl+AA=="; SetMockResponse(mockRs); @@ -96,7 +96,7 @@ AWS_PROTOCOL_TEST(Float16, RpcV2CborFloat16Subnormal) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "oWV2YWx1ZfkAUA=="; SetMockResponse(mockRs); diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/FractionalSecondsTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/FractionalSecondsTest.cpp index ed46376734d4..b623e344446a 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/FractionalSecondsTest.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/FractionalSecondsTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(FractionalSeconds, RpcV2CborDateTimeWithFractionalSeconds) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2hkYXRldGltZcH7Qcw32zgPvnf/"; SetMockResponse(mockRs); diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/GreetingWithErrors0Test.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/GreetingWithErrors0Test.cpp index 8489577c3f5e..1be67faf5c7d 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/GreetingWithErrors0Test.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/GreetingWithErrors0Test.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(GreetingWithErrors0, RpcV2CborComplexError) { OutputResponse mockRs; mockRs.statusCode = 400; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2ZfX3R5cGV4K3NtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNDb21wbGV4RXJyb3JoVG9wTGV2ZWxpVG9wIGxldmVsZk5lc3RlZL9jRm9vY2Jhcv//"; SetMockResponse(mockRs); @@ -31,7 +31,7 @@ AWS_PROTOCOL_TEST(GreetingWithErrors0, RpcV2CborEmptyComplexError) { OutputResponse mockRs; mockRs.statusCode = 400; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2ZfX3R5cGV4K3NtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNDb21wbGV4RXJyb3L/"; SetMockResponse(mockRs); diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/GreetingWithErrorsTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/GreetingWithErrorsTest.cpp index 69bde9a797b4..7613403d99cd 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/GreetingWithErrorsTest.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/GreetingWithErrorsTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(GreetingWithErrors, RpcV2CborInvalidGreetingError) { OutputResponse mockRs; mockRs.statusCode = 400; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2ZfX3R5cGV4LnNtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNJbnZhbGlkR3JlZXRpbmdnTWVzc2FnZWJIaf8="; SetMockResponse(mockRs); diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/NoInputOutputTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/NoInputOutputTest.cpp index b71c652e7b2f..c5cd9d8d8d98 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/NoInputOutputTest.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/NoInputOutputTest.cpp @@ -33,7 +33,7 @@ AWS_PROTOCOL_TEST(NoInputOutput, NoOutputClientAllowsEmptyCbor) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v/8="; SetMockResponse(mockRs); @@ -51,7 +51,7 @@ AWS_PROTOCOL_TEST(NoInputOutput, NoOutputClientAllowsEmptyBody) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; SetMockResponse(mockRs); NoInputOutputRequest request; diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/OptionalInputOutputTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/OptionalInputOutputTest.cpp index 33588e44f881..9703a4856b18 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/OptionalInputOutputTest.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/OptionalInputOutputTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(OptionalInputOutput, optional_output) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v/8="; SetMockResponse(mockRs); diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RecursiveShapesTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RecursiveShapesTest.cpp index d1a0bd83db43..4c0e29b4fdcf 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RecursiveShapesTest.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RecursiveShapesTest.cpp @@ -18,7 +18,7 @@ AWS_PROTOCOL_TEST(RecursiveShapes, RpcV2CborRecursiveShapes) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8="; SetMockResponse(mockRs); @@ -54,7 +54,7 @@ AWS_PROTOCOL_TEST(RecursiveShapes, RpcV2CborRecursiveShapesUsingDefiniteLength) OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "oWZuZXN0ZWSiY2Zvb2RGb28xZm5lc3RlZKJjYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyomNmb29kRm9vMmZuZXN0ZWShY2JhcmRCYXIy"; SetMockResponse(mockRs); diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborDenseMapsTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborDenseMapsTest.cpp index fdcffa81a06f..f8c5c9a8bbfe 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborDenseMapsTest.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborDenseMapsTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(RpcV2CborDenseMaps, RpcV2CborMaps) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ=="; SetMockResponse(mockRs); @@ -47,7 +47,7 @@ AWS_PROTOCOL_TEST(RpcV2CborDenseMaps, RpcV2CborDeserializesZeroValuesInMaps) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A=="; SetMockResponse(mockRs); @@ -74,7 +74,7 @@ AWS_PROTOCOL_TEST(RpcV2CborDenseMaps, RpcV2CborDeserializesDenseSetMap) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi"; SetMockResponse(mockRs); @@ -101,36 +101,3 @@ AWS_PROTOCOL_TEST(RpcV2CborDenseMaps, RpcV2CborDeserializesDenseSetMap) { } }); } - -AWS_PROTOCOL_TEST(RpcV2CborDenseMaps, RpcV2CborDeserializesDenseSetMapAndSkipsNull) { - RpcV2ProtocolClient client(mockCredentials, mockConfig); - - OutputResponse mockRs; - mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; - mockRs.body = "oWtkZW5zZVNldE1hcKNheIBheYJhYWFiYXr2"; - SetMockResponse(mockRs); - - RpcV2CborDenseMapsRequest request; - - auto outcome = client.RpcV2CborDenseMaps(request); - AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); - const RpcV2CborDenseMapsResult& result = outcome.GetResult(); - ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { - /* expectedResult = R"( {"denseSetMap":{"x":[],"y":["a","b"]}} )" */ - const Aws::Map>& resultDenseSetMap = result.GetDenseSetMap(); - EXPECT_EQ(2U, resultDenseSetMap.size()); - EXPECT_TRUE(resultDenseSetMap.find("x") != resultDenseSetMap.end()); - { - const Aws::Vector& resultDenseSetMapItem = resultDenseSetMap.at("x"); - EXPECT_EQ(0U, resultDenseSetMapItem.size()); - } - EXPECT_TRUE(resultDenseSetMap.find("y") != resultDenseSetMap.end()); - { - const Aws::Vector& resultDenseSetMapItem = resultDenseSetMap.at("y"); - EXPECT_EQ(2U, resultDenseSetMapItem.size()); - EXPECT_EQ(R"(a)", resultDenseSetMapItem.at(0)); - EXPECT_EQ(R"(b)", resultDenseSetMapItem.at(1)); - } - }); -} diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborListsTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborListsTest.cpp index 9e0f0f125ca2..4141a27c06ab 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborListsTest.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborListsTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(RpcV2CborLists, RpcV2CborLists) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2pzdHJpbmdMaXN0n2Nmb29jYmFy/2lzdHJpbmdTZXSfY2Zvb2NiYXL/a2ludGVnZXJMaXN0nwEC/2tib29sZWFuTGlzdJ/19P9tdGltZXN0YW1wTGlzdJ/B+0HU1/" "vzgAAAwftB1Nf784AAAP9oZW51bUxpc3SfY0Zvb2Ew/2tpbnRFbnVtTGlzdJ8BAv9wbmVzdGVkU3RyaW5nTGlzdJ+fY2Zvb2NiYXL/n2NiYXpjcXV4//" @@ -96,7 +96,7 @@ AWS_PROTOCOL_TEST(RpcV2CborLists, RpcV2CborListsEmpty) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2pzdHJpbmdMaXN0n///"; SetMockResponse(mockRs); @@ -117,7 +117,7 @@ AWS_PROTOCOL_TEST(RpcV2CborLists, RpcV2CborIndefiniteStringInsideIndefiniteListC OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2pzdHJpbmdMaXN0n394HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcsdyB3aGljaCB3aWxsIGJlIGNodW5rZWQsbiBvbiBlYWNoIGNvbW1h/" "394NUFub3RoZXIgZXhhbXBsZSBpbmRlZmluaXRlIHN0cmluZyB3aXRoIG9ubHkgb25lIGNodW5r/3ZUaGlzIGlzIGEgcGxhaW4gc3RyaW5n//8="; @@ -144,7 +144,7 @@ AWS_PROTOCOL_TEST(RpcV2CborLists, RpcV2CborIndefiniteStringInsideDefiniteListCan OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "oWpzdHJpbmdMaXN0g394HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcsdyB3aGljaCB3aWxsIGJlIGNodW5rZWQsbiBvbiBlYWNoIGNvbW1h/" "394NUFub3RoZXIgZXhhbXBsZSBpbmRlZmluaXRlIHN0cmluZyB3aXRoIG9ubHkgb25lIGNodW5r/3ZUaGlzIGlzIGEgcGxhaW4gc3RyaW5n"; diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborSparseMapsTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborSparseMapsTest.cpp new file mode 100644 index 000000000000..8812a58db9f7 --- /dev/null +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/RpcV2CborSparseMapsTest.cpp @@ -0,0 +1,168 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using RpcV2CborSparseMaps = AWS_PROTOCOL_TEST_SUITE; +using RpcV2ProtocolClient = Aws::RpcV2Protocol::RpcV2ProtocolClient; +using namespace Aws::RpcV2Protocol::Model; + +AWS_PROTOCOL_TEST(RpcV2CborSparseMaps, RpcV2CborSparseJsonMaps) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; + mockRs.body = "v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////"; + SetMockResponse(mockRs); + + RpcV2CborSparseMapsRequest request; + + auto outcome = client.RpcV2CborSparseMaps(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const RpcV2CborSparseMapsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseStructMap":{"foo":{"hi":"there"},"baz":{"hi":"bye"}}} )" */ + const Aws::Map>& resultSparseStructMap = result.GetSparseStructMap(); + EXPECT_EQ(2U, resultSparseStructMap.size()); + { + EXPECT_TRUE(resultSparseStructMap.find("foo") != resultSparseStructMap.end()); + EXPECT_TRUE(resultSparseStructMap.at("foo").has_value()); + const GreetingStruct& resultSparseStructMapItem = *resultSparseStructMap.at("foo"); + EXPECT_EQ(R"(there)", resultSparseStructMapItem.GetHi()); + } + { + EXPECT_TRUE(resultSparseStructMap.find("baz") != resultSparseStructMap.end()); + EXPECT_TRUE(resultSparseStructMap.at("baz").has_value()); + const GreetingStruct& resultSparseStructMapItem = *resultSparseStructMap.at("baz"); + EXPECT_EQ(R"(bye)", resultSparseStructMapItem.GetHi()); + } + }); +} + +AWS_PROTOCOL_TEST(RpcV2CborSparseMaps, RpcV2CborDeserializesNullMapValues) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; + mockRs.body = "v3BzcGFyc2VCb29sZWFuTWFwv2F49v9vc3BhcnNlTnVtYmVyTWFwv2F49v9vc3BhcnNlU3RyaW5nTWFwv2F49v9vc3BhcnNlU3RydWN0TWFwv2F49v//"; + SetMockResponse(mockRs); + + RpcV2CborSparseMapsRequest request; + + auto outcome = client.RpcV2CborSparseMaps(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const RpcV2CborSparseMapsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( + * {"sparseBooleanMap":{"x":null},"sparseNumberMap":{"x":null},"sparseStringMap":{"x":null},"sparseStructMap":{"x":null}} )" */ + const Aws::Map>& resultSparseBooleanMap = result.GetSparseBooleanMap(); + EXPECT_EQ(1U, resultSparseBooleanMap.size()); + EXPECT_TRUE(resultSparseBooleanMap.find("x") != resultSparseBooleanMap.end()); + EXPECT_FALSE(resultSparseBooleanMap.at("x").has_value()); + const Aws::Map>& resultSparseNumberMap = result.GetSparseNumberMap(); + EXPECT_EQ(1U, resultSparseNumberMap.size()); + EXPECT_TRUE(resultSparseNumberMap.find("x") != resultSparseNumberMap.end()); + EXPECT_FALSE(resultSparseNumberMap.at("x").has_value()); + const Aws::Map>& resultSparseStringMap = result.GetSparseStringMap(); + EXPECT_EQ(1U, resultSparseStringMap.size()); + EXPECT_TRUE(resultSparseStringMap.find("x") != resultSparseStringMap.end()); + EXPECT_FALSE(resultSparseStringMap.at("x").has_value()); + const Aws::Map>& resultSparseStructMap = result.GetSparseStructMap(); + EXPECT_EQ(1U, resultSparseStructMap.size()); + { + EXPECT_TRUE(resultSparseStructMap.find("x") != resultSparseStructMap.end()); + EXPECT_FALSE(resultSparseStructMap.at("x").has_value()); + } + }); +} + +AWS_PROTOCOL_TEST(RpcV2CborSparseMaps, RpcV2CborDeserializesSparseSetMap) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; + mockRs.body = "v2xzcGFyc2VTZXRNYXC/YXmfYWFhYv9heJ////8="; + SetMockResponse(mockRs); + + RpcV2CborSparseMapsRequest request; + + auto outcome = client.RpcV2CborSparseMaps(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const RpcV2CborSparseMapsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseSetMap":{"x":[],"y":["a","b"]}} )" */ + const Aws::Map>>& resultSparseSetMap = result.GetSparseSetMap(); + EXPECT_EQ(2U, resultSparseSetMap.size()); + EXPECT_TRUE(resultSparseSetMap.find("x") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("x").has_value()); + EXPECT_EQ(Aws::Vector({}), *resultSparseSetMap.at("x")); + EXPECT_TRUE(resultSparseSetMap.find("y") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("y").has_value()); + EXPECT_EQ(Aws::Vector({R"(a)", R"(b)"}), *resultSparseSetMap.at("y")); + }); +} + +AWS_PROTOCOL_TEST(RpcV2CborSparseMaps, RpcV2CborDeserializesSparseSetMapAndRetainsNull) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; + mockRs.body = "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8="; + SetMockResponse(mockRs); + + RpcV2CborSparseMapsRequest request; + + auto outcome = client.RpcV2CborSparseMaps(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const RpcV2CborSparseMapsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseSetMap":{"x":[],"y":["a","b"],"z":null}} )" */ + const Aws::Map>>& resultSparseSetMap = result.GetSparseSetMap(); + EXPECT_EQ(3U, resultSparseSetMap.size()); + EXPECT_TRUE(resultSparseSetMap.find("x") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("x").has_value()); + EXPECT_EQ(Aws::Vector({}), *resultSparseSetMap.at("x")); + EXPECT_TRUE(resultSparseSetMap.find("y") != resultSparseSetMap.end()); + EXPECT_TRUE(resultSparseSetMap.at("y").has_value()); + EXPECT_EQ(Aws::Vector({R"(a)", R"(b)"}), *resultSparseSetMap.at("y")); + EXPECT_TRUE(resultSparseSetMap.find("z") != resultSparseSetMap.end()); + EXPECT_FALSE(resultSparseSetMap.at("z").has_value()); + }); +} + +AWS_PROTOCOL_TEST(RpcV2CborSparseMaps, RpcV2CborDeserializesZeroValuesInSparseMaps) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; + mockRs.body = "v29zcGFyc2VOdW1iZXJNYXC/YXgA/3BzcGFyc2VCb29sZWFuTWFwv2F49P//"; + SetMockResponse(mockRs); + + RpcV2CborSparseMapsRequest request; + + auto outcome = client.RpcV2CborSparseMaps(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const RpcV2CborSparseMapsResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseNumberMap":{"x":0},"sparseBooleanMap":{"x":false}} )" */ + const Aws::Map>& resultSparseNumberMap = result.GetSparseNumberMap(); + EXPECT_EQ(1U, resultSparseNumberMap.size()); + EXPECT_TRUE(resultSparseNumberMap.find("x") != resultSparseNumberMap.end()); + EXPECT_TRUE(resultSparseNumberMap.at("x").has_value()); + EXPECT_EQ(0, *resultSparseNumberMap.at("x")); + const Aws::Map>& resultSparseBooleanMap = result.GetSparseBooleanMap(); + EXPECT_EQ(1U, resultSparseBooleanMap.size()); + EXPECT_TRUE(resultSparseBooleanMap.find("x") != resultSparseBooleanMap.end()); + EXPECT_TRUE(resultSparseBooleanMap.at("x").has_value()); + EXPECT_EQ(false, *resultSparseBooleanMap.at("x")); + }); +} diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/SimpleScalarPropertiesTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/SimpleScalarPropertiesTest.cpp index 1c15c425d93b..9bef61357cb1 100644 --- a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/SimpleScalarPropertiesTest.cpp +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/SimpleScalarPropertiesTest.cpp @@ -16,7 +16,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborSimpleScalarProperties) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v3B0cnVlQm9vbGVhblZhbHVl9XFmYWxzZUJvb2xlYW5WYWx1ZfRpYnl0ZVZhbHVlBWtkb3VibGVWYWx1Zfs//" "jlYEGJN02pmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAanNob3J0VmFsdWUZJqprc3RyaW5nVmFsdWVmc2ltcGxlaWJsb2JWYWx1ZUNmb2//"; @@ -48,7 +48,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborSimpleScalarPropertiesUsingDe OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "qXB0cnVlQm9vbGVhblZhbHVl9XFmYWxzZUJvb2xlYW5WYWx1ZfRpYnl0ZVZhbHVlBWtkb3VibGVWYWx1Zfs//" "jlYEGJN02pmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAanNob3J0VmFsdWUZJqprc3RyaW5nVmFsdWVmc2ltcGxlaWJsb2JWYWx1ZUNmb28="; @@ -80,7 +80,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborClientDoesntDeserializeNullSt OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2tzdHJpbmdWYWx1Zfb/"; SetMockResponse(mockRs); @@ -98,7 +98,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborSupportsNaNFloatOutputs) { OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2tkb3VibGVWYWx1Zft/+AAAAAAAAGpmbG9hdFZhbHVl+n/AAAD/"; SetMockResponse(mockRs); @@ -119,7 +119,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborSupportsInfinityFloatOutputs) OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2tkb3VibGVWYWx1Zft/8AAAAAAAAGpmbG9hdFZhbHVl+n+AAAD/"; SetMockResponse(mockRs); @@ -140,7 +140,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborSupportsNegativeInfinityFloat OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2tkb3VibGVWYWx1Zfv/8AAAAAAAAGpmbG9hdFZhbHVl+v+AAAD/"; SetMockResponse(mockRs); @@ -161,7 +161,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborSupportsUpcastingDataOnDeseri OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2tkb3VibGVWYWx1Zfk+AGpmbG9hdFZhbHVl+UegbGludGVnZXJWYWx1ZRg4aWxvbmdWYWx1ZRkBAGpzaG9ydFZhbHVlCv8="; SetMockResponse(mockRs); @@ -185,7 +185,7 @@ AWS_PROTOCOL_TEST(SimpleScalarProperties, RpcV2CborExtraFieldsInTheBodyShouldBeS OutputResponse mockRs; mockRs.statusCode = 200; - mockRs.headers = {{"Content-Type", R"(application/cbor)"}, {"smithy-protocol", R"(rpc-v2-cbor)"}}; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; mockRs.body = "v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kD0AABrZXh0cmFPYmplY3S/" "c2luZGVmaW5pdGVMZW5ndGhNYXC/a3dpdGhBbkFycmF5nwECA///" diff --git a/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/SparseNullsOperationTest.cpp b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/SparseNullsOperationTest.cpp new file mode 100644 index 000000000000..c3cb27c45aee --- /dev/null +++ b/generated/protocol-tests/tests/output/smithy-rpc-v2-cbor/tests/SparseNullsOperationTest.cpp @@ -0,0 +1,57 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ +#include +#include +#include +#include + +using SparseNullsOperation = AWS_PROTOCOL_TEST_SUITE; +using RpcV2ProtocolClient = Aws::RpcV2Protocol::RpcV2ProtocolClient; +using namespace Aws::RpcV2Protocol::Model; + +AWS_PROTOCOL_TEST(SparseNullsOperation, RpcV2CborSparseMapsDeserializeNullValues) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; + mockRs.body = "v29zcGFyc2VTdHJpbmdNYXC/Y2Zvb/b//w=="; + SetMockResponse(mockRs); + + SparseNullsOperationRequest request; + + auto outcome = client.SparseNullsOperation(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseNullsOperationResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseStringMap":{"foo":null}} )" */ + const Aws::Map>& resultSparseStringMap = result.GetSparseStringMap(); + EXPECT_EQ(1U, resultSparseStringMap.size()); + EXPECT_TRUE(resultSparseStringMap.find("foo") != resultSparseStringMap.end()); + EXPECT_FALSE(resultSparseStringMap.at("foo").has_value()); + }); +} + +AWS_PROTOCOL_TEST(SparseNullsOperation, RpcV2CborSparseListsDeserializeNull) { + RpcV2ProtocolClient client(mockCredentials, mockConfig); + + OutputResponse mockRs; + mockRs.statusCode = 200; + mockRs.headers = {{"smithy-protocol", R"(rpc-v2-cbor)"}, {"Content-Type", R"(application/cbor)"}}; + mockRs.body = "v3BzcGFyc2VTdHJpbmdMaXN0n/b//w=="; + SetMockResponse(mockRs); + + SparseNullsOperationRequest request; + + auto outcome = client.SparseNullsOperation(request); + AWS_ASSERT_SUCCESS(outcome) << outcome.GetError(); + const SparseNullsOperationResult& result = outcome.GetResult(); + ValidateRequestSent([&result](const ExpectedRequest&, const Aws::ProtocolMock::Model::Request&) -> void { + /* expectedResult = R"( {"sparseStringList":[null]} )" */ + const Aws::Vector>& resultSparseStringListItem = result.GetSparseStringList(); + EXPECT_EQ(1U, resultSparseStringListItem.size()); + EXPECT_FALSE(resultSparseStringListItem.at(0).has_value()); + }); +} diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/AuditEvent.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/AuditEvent.h index c587fc9f713f..2b37bda92232 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/AuditEvent.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/AuditEvent.h @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -113,14 +114,14 @@ class AuditEvent { /** *

A list of Case Audit History event fields.

*/ - inline const Aws::Vector& GetFields() const { return m_fields; } + inline const Aws::Vector>& GetFields() const { return m_fields; } inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; } - template > + template >> void SetFields(FieldsT&& value) { m_fieldsHasBeenSet = true; m_fields = std::forward(value); } - template > + template >> AuditEvent& WithFields(FieldsT&& value) { SetFields(std::forward(value)); return *this; @@ -131,6 +132,11 @@ class AuditEvent { m_fields.emplace_back(std::forward(value)); return *this; } + inline AuditEvent& AddFields(Aws::Crt::Optional value) { + m_fieldsHasBeenSet = true; + m_fields.push_back(value); + return *this; + } ///@} ///@{ @@ -159,7 +165,7 @@ class AuditEvent { Aws::Utils::DateTime m_performedTime{}; - Aws::Vector m_fields; + Aws::Vector> m_fields; AuditEventPerformedBy m_performedBy; bool m_eventIdHasBeenSet = false; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseAuditEventsResult.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseAuditEventsResult.h index 2d78754a729d..44b78f22e3c0 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseAuditEventsResult.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseAuditEventsResult.h @@ -9,6 +9,7 @@ #include #include #include +#include #include @@ -52,13 +53,13 @@ class GetCaseAuditEventsResult { *

A list of case audits where each represents a particular edit of the * case.

*/ - inline const Aws::Vector& GetAuditEvents() const { return m_auditEvents; } - template > + inline const Aws::Vector>& GetAuditEvents() const { return m_auditEvents; } + template >> void SetAuditEvents(AuditEventsT&& value) { m_auditEventsHasBeenSet = true; m_auditEvents = std::forward(value); } - template > + template >> GetCaseAuditEventsResult& WithAuditEvents(AuditEventsT&& value) { SetAuditEvents(std::forward(value)); return *this; @@ -69,6 +70,11 @@ class GetCaseAuditEventsResult { m_auditEvents.emplace_back(std::forward(value)); return *this; } + inline GetCaseAuditEventsResult& AddAuditEvents(Aws::Crt::Optional value) { + m_auditEventsHasBeenSet = true; + m_auditEvents.push_back(value); + return *this; + } ///@} ///@{ @@ -90,7 +96,7 @@ class GetCaseAuditEventsResult { private: Aws::String m_nextToken; - Aws::Vector m_auditEvents; + Aws::Vector> m_auditEvents; Aws::String m_requestId; Aws::Http::HttpResponseCode m_HttpResponseCode; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseResult.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseResult.h index 88134f3871c4..18497a2afe1d 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseResult.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseResult.h @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -93,23 +94,28 @@ class GetCaseResult { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } - template > + inline const Aws::Map>& GetTags() const { return m_tags; } + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> GetCaseResult& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > GetCaseResult& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline GetCaseResult& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} ///@{ @@ -135,7 +141,7 @@ class GetCaseResult { Aws::String m_nextToken; - Aws::Map m_tags; + Aws::Map> m_tags; Aws::String m_requestId; Aws::Http::HttpResponseCode m_HttpResponseCode; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseRuleResponse.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseRuleResponse.h index 2b1f890f4fce..8b6c1b5e1aca 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseRuleResponse.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetCaseRuleResponse.h @@ -9,6 +9,7 @@ #include #include #include +#include #include @@ -185,24 +186,29 @@ class GetCaseRuleResponse { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } + inline const Aws::Map>& GetTags() const { return m_tags; } inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } - template > + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> GetCaseRuleResponse& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > GetCaseRuleResponse& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline GetCaseRuleResponse& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} private: Aws::String m_caseRuleId; @@ -221,7 +227,7 @@ class GetCaseRuleResponse { Aws::Utils::DateTime m_lastModifiedTime{}; - Aws::Map m_tags; + Aws::Map> m_tags; bool m_caseRuleIdHasBeenSet = false; bool m_nameHasBeenSet = false; bool m_caseRuleArnHasBeenSet = false; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetDomainResult.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetDomainResult.h index 2813cd8232e2..19164920e091 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetDomainResult.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetDomainResult.h @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -118,23 +119,28 @@ class GetDomainResult { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } - template > + inline const Aws::Map>& GetTags() const { return m_tags; } + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> GetDomainResult& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > GetDomainResult& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline GetDomainResult& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} ///@{ @@ -164,7 +170,7 @@ class GetDomainResult { DomainStatus m_domainStatus{DomainStatus::NOT_SET}; - Aws::Map m_tags; + Aws::Map> m_tags; Aws::String m_requestId; Aws::Http::HttpResponseCode m_HttpResponseCode; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetFieldResponse.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetFieldResponse.h index 9d805758474b..26a83b15ff8a 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetFieldResponse.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetFieldResponse.h @@ -11,6 +11,7 @@ #include #include #include +#include #include @@ -145,24 +146,29 @@ class GetFieldResponse { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } + inline const Aws::Map>& GetTags() const { return m_tags; } inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } - template > + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> GetFieldResponse& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > GetFieldResponse& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline GetFieldResponse& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} ///@{ @@ -247,7 +253,7 @@ class GetFieldResponse { FieldNamespace m_namespace{FieldNamespace::NOT_SET}; - Aws::Map m_tags; + Aws::Map> m_tags; bool m_deleted{false}; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetLayoutResult.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetLayoutResult.h index bfe8d66506cf..bb971d052543 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetLayoutResult.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetLayoutResult.h @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -104,23 +105,28 @@ class GetLayoutResult { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } - template > + inline const Aws::Map>& GetTags() const { return m_tags; } + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> GetLayoutResult& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > GetLayoutResult& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline GetLayoutResult& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} ///@{ @@ -197,7 +203,7 @@ class GetLayoutResult { LayoutContent m_content; - Aws::Map m_tags; + Aws::Map> m_tags; bool m_deleted{false}; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetTemplateResult.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetTemplateResult.h index a70d35c9f62b..5f2fd4b08bcf 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetTemplateResult.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/GetTemplateResult.h @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -149,23 +150,28 @@ class GetTemplateResult { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } - template > + inline const Aws::Map>& GetTags() const { return m_tags; } + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> GetTemplateResult& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > GetTemplateResult& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline GetTemplateResult& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} ///@{ @@ -311,7 +317,7 @@ class GetTemplateResult { Aws::Vector m_requiredFields; - Aws::Map m_tags; + Aws::Map> m_tags; TemplateStatus m_status{TemplateStatus::NOT_SET}; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/ListTagsForResourceResult.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/ListTagsForResourceResult.h index 8c1a7e10715e..c6f2c6652531 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/ListTagsForResourceResult.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/ListTagsForResourceResult.h @@ -8,6 +8,7 @@ #include #include #include +#include #include @@ -33,23 +34,28 @@ class ListTagsForResourceResult { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } - template > + inline const Aws::Map>& GetTags() const { return m_tags; } + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> ListTagsForResourceResult& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > ListTagsForResourceResult& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline ListTagsForResourceResult& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} ///@{ @@ -69,7 +75,7 @@ class ListTagsForResourceResult { inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; } private: - Aws::Map m_tags; + Aws::Map> m_tags; Aws::String m_requestId; Aws::Http::HttpResponseCode m_HttpResponseCode; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchAllRelatedItemsResponseItem.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchAllRelatedItemsResponseItem.h index ccfdbcb753bf..3ef9ed0e87a0 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchAllRelatedItemsResponseItem.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchAllRelatedItemsResponseItem.h @@ -11,6 +11,7 @@ #include #include #include +#include #include @@ -146,24 +147,29 @@ class SearchAllRelatedItemsResponseItem { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } + inline const Aws::Map>& GetTags() const { return m_tags; } inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } - template > + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> SearchAllRelatedItemsResponseItem& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > SearchAllRelatedItemsResponseItem& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline SearchAllRelatedItemsResponseItem& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} private: Aws::String m_relatedItemId; @@ -178,7 +184,7 @@ class SearchAllRelatedItemsResponseItem { UserUnion m_performedBy; - Aws::Map m_tags; + Aws::Map> m_tags; bool m_relatedItemIdHasBeenSet = false; bool m_caseIdHasBeenSet = false; bool m_typeHasBeenSet = false; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchAllRelatedItemsResult.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchAllRelatedItemsResult.h index fc9a363bce5d..7e0a53fb4110 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchAllRelatedItemsResult.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchAllRelatedItemsResult.h @@ -9,6 +9,7 @@ #include #include #include +#include #include @@ -51,13 +52,13 @@ class SearchAllRelatedItemsResult { /** *

A list of items related to a case.

*/ - inline const Aws::Vector& GetRelatedItems() const { return m_relatedItems; } - template > + inline const Aws::Vector>& GetRelatedItems() const { return m_relatedItems; } + template >> void SetRelatedItems(RelatedItemsT&& value) { m_relatedItemsHasBeenSet = true; m_relatedItems = std::forward(value); } - template > + template >> SearchAllRelatedItemsResult& WithRelatedItems(RelatedItemsT&& value) { SetRelatedItems(std::forward(value)); return *this; @@ -68,6 +69,11 @@ class SearchAllRelatedItemsResult { m_relatedItems.emplace_back(std::forward(value)); return *this; } + inline SearchAllRelatedItemsResult& AddRelatedItems(Aws::Crt::Optional value) { + m_relatedItemsHasBeenSet = true; + m_relatedItems.push_back(value); + return *this; + } ///@} ///@{ @@ -89,7 +95,7 @@ class SearchAllRelatedItemsResult { private: Aws::String m_nextToken; - Aws::Vector m_relatedItems; + Aws::Vector> m_relatedItems; Aws::String m_requestId; Aws::Http::HttpResponseCode m_HttpResponseCode; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchCasesResponseItem.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchCasesResponseItem.h index 119be4308f83..d08c1ab25dd2 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchCasesResponseItem.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchCasesResponseItem.h @@ -9,6 +9,7 @@ #include #include #include +#include #include @@ -99,24 +100,29 @@ class SearchCasesResponseItem { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } + inline const Aws::Map>& GetTags() const { return m_tags; } inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } - template > + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> SearchCasesResponseItem& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > SearchCasesResponseItem& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline SearchCasesResponseItem& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} private: Aws::String m_caseId; @@ -125,7 +131,7 @@ class SearchCasesResponseItem { Aws::Vector m_fields; - Aws::Map m_tags; + Aws::Map> m_tags; bool m_caseIdHasBeenSet = false; bool m_templateIdHasBeenSet = false; bool m_fieldsHasBeenSet = false; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchCasesResult.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchCasesResult.h index 5d8f85788c22..5d95ab89c6bc 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchCasesResult.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchCasesResult.h @@ -9,6 +9,7 @@ #include #include #include +#include #include @@ -53,13 +54,13 @@ class SearchCasesResult { * CaseId and Fields where each field is a complex union * structure.

*/ - inline const Aws::Vector& GetCases() const { return m_cases; } - template > + inline const Aws::Vector>& GetCases() const { return m_cases; } + template >> void SetCases(CasesT&& value) { m_casesHasBeenSet = true; m_cases = std::forward(value); } - template > + template >> SearchCasesResult& WithCases(CasesT&& value) { SetCases(std::forward(value)); return *this; @@ -70,6 +71,11 @@ class SearchCasesResult { m_cases.emplace_back(std::forward(value)); return *this; } + inline SearchCasesResult& AddCases(Aws::Crt::Optional value) { + m_casesHasBeenSet = true; + m_cases.push_back(value); + return *this; + } ///@} ///@{ @@ -106,7 +112,7 @@ class SearchCasesResult { private: Aws::String m_nextToken; - Aws::Vector m_cases; + Aws::Vector> m_cases; long long m_totalCount{0}; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchRelatedItemsResponseItem.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchRelatedItemsResponseItem.h index e631683345da..ab554870499f 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchRelatedItemsResponseItem.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchRelatedItemsResponseItem.h @@ -11,6 +11,7 @@ #include #include #include +#include #include @@ -111,24 +112,29 @@ class SearchRelatedItemsResponseItem { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } + inline const Aws::Map>& GetTags() const { return m_tags; } inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } - template > + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> SearchRelatedItemsResponseItem& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > SearchRelatedItemsResponseItem& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline SearchRelatedItemsResponseItem& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} ///@{ @@ -157,7 +163,7 @@ class SearchRelatedItemsResponseItem { RelatedItemContent m_content; - Aws::Map m_tags; + Aws::Map> m_tags; UserUnion m_performedBy; bool m_relatedItemIdHasBeenSet = false; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchRelatedItemsResult.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchRelatedItemsResult.h index 0c6a43fd72d9..77869aeb866e 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchRelatedItemsResult.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/SearchRelatedItemsResult.h @@ -9,6 +9,7 @@ #include #include #include +#include #include @@ -51,13 +52,13 @@ class SearchRelatedItemsResult { /** *

A list of items related to a case.

*/ - inline const Aws::Vector& GetRelatedItems() const { return m_relatedItems; } - template > + inline const Aws::Vector>& GetRelatedItems() const { return m_relatedItems; } + template >> void SetRelatedItems(RelatedItemsT&& value) { m_relatedItemsHasBeenSet = true; m_relatedItems = std::forward(value); } - template > + template >> SearchRelatedItemsResult& WithRelatedItems(RelatedItemsT&& value) { SetRelatedItems(std::forward(value)); return *this; @@ -68,6 +69,11 @@ class SearchRelatedItemsResult { m_relatedItems.emplace_back(std::forward(value)); return *this; } + inline SearchRelatedItemsResult& AddRelatedItems(Aws::Crt::Optional value) { + m_relatedItemsHasBeenSet = true; + m_relatedItems.push_back(value); + return *this; + } ///@} ///@{ @@ -89,7 +95,7 @@ class SearchRelatedItemsResult { private: Aws::String m_nextToken; - Aws::Vector m_relatedItems; + Aws::Vector> m_relatedItems; Aws::String m_requestId; Aws::Http::HttpResponseCode m_HttpResponseCode; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/TagResourceRequest.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/TagResourceRequest.h index 1f41bec9cff8..8a22369231c3 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/TagResourceRequest.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/TagResourceRequest.h @@ -8,6 +8,7 @@ #include #include #include +#include #include @@ -52,29 +53,34 @@ class TagResourceRequest : public ConnectCasesRequest { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } + inline const Aws::Map>& GetTags() const { return m_tags; } inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } - template > + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> TagResourceRequest& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > TagResourceRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline TagResourceRequest& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} private: Aws::String m_arn; - Aws::Map m_tags; + Aws::Map> m_tags; bool m_arnHasBeenSet = false; bool m_tagsHasBeenSet = false; }; diff --git a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/UpdateRelatedItemResult.h b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/UpdateRelatedItemResult.h index bfa4c09af375..617753592d4a 100644 --- a/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/UpdateRelatedItemResult.h +++ b/generated/src/aws-cpp-sdk-connectcases/include/aws/connectcases/model/UpdateRelatedItemResult.h @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -120,23 +121,28 @@ class UpdateRelatedItemResult { *

A map of of key-value pairs that represent tags on a resource. Tags are used * to organize, track, or control access for this resource.

*/ - inline const Aws::Map& GetTags() const { return m_tags; } - template > + inline const Aws::Map>& GetTags() const { return m_tags; } + template >> void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward(value); } - template > + template >> UpdateRelatedItemResult& WithTags(TagsT&& value) { SetTags(std::forward(value)); return *this; } - template + template > UpdateRelatedItemResult& AddTags(TagsKeyT&& key, TagsValueT&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::forward(key), std::forward(value)); return *this; } + inline UpdateRelatedItemResult& AddTags(Aws::String key, Aws::Crt::Optional value) { + m_tagsHasBeenSet = true; + m_tags.emplace(key, value); + return *this; + } ///@} ///@{ @@ -200,7 +206,7 @@ class UpdateRelatedItemResult { Aws::Utils::DateTime m_associationTime{}; - Aws::Map m_tags; + Aws::Map> m_tags; UserUnion m_lastUpdatedUser; diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/AuditEvent.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/AuditEvent.cpp index 66360f3b98f6..3b99b4269b6a 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/AuditEvent.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/AuditEvent.cpp @@ -37,7 +37,11 @@ AuditEvent& AuditEvent::operator=(JsonView jsonValue) { if (jsonValue.ValueExists("fields")) { Aws::Utils::Array fieldsJsonList = jsonValue.GetArray("fields"); for (unsigned fieldsIndex = 0; fieldsIndex < fieldsJsonList.GetLength(); ++fieldsIndex) { - m_fields.push_back(fieldsJsonList[fieldsIndex].AsObject()); + if (fieldsJsonList[fieldsIndex].IsNull()) { + m_fields.emplace_back(); + continue; + } + m_fields.emplace_back(fieldsJsonList[fieldsIndex].AsObject()); } m_fieldsHasBeenSet = true; } @@ -70,7 +74,11 @@ JsonValue AuditEvent::Jsonize() const { if (m_fieldsHasBeenSet) { Aws::Utils::Array fieldsJsonList(m_fields.size()); for (unsigned fieldsIndex = 0; fieldsIndex < fieldsJsonList.GetLength(); ++fieldsIndex) { - fieldsJsonList[fieldsIndex].AsObject(m_fields[fieldsIndex].Jsonize()); + if (!m_fields[fieldsIndex].has_value()) { + fieldsJsonList[fieldsIndex].AsNull(); + continue; + } + fieldsJsonList[fieldsIndex].AsObject(m_fields[fieldsIndex]->Jsonize()); } payload.WithArray("fields", std::move(fieldsJsonList)); } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseAuditEventsResult.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseAuditEventsResult.cpp index 8f45555be65e..7b9f9ea65f61 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseAuditEventsResult.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseAuditEventsResult.cpp @@ -29,7 +29,11 @@ GetCaseAuditEventsResult& GetCaseAuditEventsResult::operator=(const Aws::AmazonW if (jsonValue.ValueExists("auditEvents")) { Aws::Utils::Array auditEventsJsonList = jsonValue.GetArray("auditEvents"); for (unsigned auditEventsIndex = 0; auditEventsIndex < auditEventsJsonList.GetLength(); ++auditEventsIndex) { - m_auditEvents.push_back(auditEventsJsonList[auditEventsIndex].AsObject()); + if (auditEventsJsonList[auditEventsIndex].IsNull()) { + m_auditEvents.emplace_back(); + continue; + } + m_auditEvents.emplace_back(auditEventsJsonList[auditEventsIndex].AsObject()); } m_auditEventsHasBeenSet = true; } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseResult.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseResult.cpp index b86fc873a4cc..f99350a6f3a5 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseResult.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseResult.cpp @@ -40,6 +40,10 @@ GetCaseResult& GetCaseResult::operator=(const Aws::AmazonWebServiceResult tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseRuleResponse.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseRuleResponse.cpp index 73d8c393b0f2..b4b3e913f077 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseRuleResponse.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/GetCaseRuleResponse.cpp @@ -53,6 +53,10 @@ GetCaseRuleResponse& GetCaseRuleResponse::operator=(JsonView jsonValue) { if (jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; @@ -98,7 +102,11 @@ JsonValue GetCaseRuleResponse::Jsonize() const { if (m_tagsHasBeenSet) { JsonValue tagsJsonMap; for (auto& tagsItem : m_tags) { - tagsJsonMap.WithString(tagsItem.first, tagsItem.second); + if (!tagsItem.second.has_value()) { + tagsJsonMap.WithNull(tagsItem.first); + continue; + } + tagsJsonMap.WithString(tagsItem.first, *tagsItem.second); } payload.WithObject("tags", std::move(tagsJsonMap)); } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/GetDomainResult.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/GetDomainResult.cpp index 964aaa25dfb3..60fc953a26a4 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/GetDomainResult.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/GetDomainResult.cpp @@ -45,6 +45,10 @@ GetDomainResult& GetDomainResult::operator=(const Aws::AmazonWebServiceResult tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/GetFieldResponse.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/GetFieldResponse.cpp index 0244a7127e36..ddaebf2457bc 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/GetFieldResponse.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/GetFieldResponse.cpp @@ -45,6 +45,10 @@ GetFieldResponse& GetFieldResponse::operator=(JsonView jsonValue) { if (jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; @@ -98,7 +102,11 @@ JsonValue GetFieldResponse::Jsonize() const { if (m_tagsHasBeenSet) { JsonValue tagsJsonMap; for (auto& tagsItem : m_tags) { - tagsJsonMap.WithString(tagsItem.first, tagsItem.second); + if (!tagsItem.second.has_value()) { + tagsJsonMap.WithNull(tagsItem.first); + continue; + } + tagsJsonMap.WithString(tagsItem.first, *tagsItem.second); } payload.WithObject("tags", std::move(tagsJsonMap)); } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/GetLayoutResult.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/GetLayoutResult.cpp index 451984f27ff5..103fc8085d51 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/GetLayoutResult.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/GetLayoutResult.cpp @@ -41,6 +41,10 @@ GetLayoutResult& GetLayoutResult::operator=(const Aws::AmazonWebServiceResult tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/GetTemplateResult.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/GetTemplateResult.cpp index 08aecc55a0b2..36b2dbb90c31 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/GetTemplateResult.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/GetTemplateResult.cpp @@ -52,6 +52,10 @@ GetTemplateResult& GetTemplateResult::operator=(const Aws::AmazonWebServiceResul if (jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/ListTagsForResourceResult.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/ListTagsForResourceResult.cpp index 51e0bdff87d8..996bad0b9b0d 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/ListTagsForResourceResult.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/ListTagsForResourceResult.cpp @@ -25,6 +25,10 @@ ListTagsForResourceResult& ListTagsForResourceResult::operator=(const Aws::Amazo if (jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchAllRelatedItemsResponseItem.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchAllRelatedItemsResponseItem.cpp index b22f459acf02..9483e6fecba5 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchAllRelatedItemsResponseItem.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchAllRelatedItemsResponseItem.cpp @@ -45,6 +45,10 @@ SearchAllRelatedItemsResponseItem& SearchAllRelatedItemsResponseItem::operator=( if (jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; @@ -82,7 +86,11 @@ JsonValue SearchAllRelatedItemsResponseItem::Jsonize() const { if (m_tagsHasBeenSet) { JsonValue tagsJsonMap; for (auto& tagsItem : m_tags) { - tagsJsonMap.WithString(tagsItem.first, tagsItem.second); + if (!tagsItem.second.has_value()) { + tagsJsonMap.WithNull(tagsItem.first); + continue; + } + tagsJsonMap.WithString(tagsItem.first, *tagsItem.second); } payload.WithObject("tags", std::move(tagsJsonMap)); } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchAllRelatedItemsResult.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchAllRelatedItemsResult.cpp index a347fd46553c..1a234266ca02 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchAllRelatedItemsResult.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchAllRelatedItemsResult.cpp @@ -29,7 +29,11 @@ SearchAllRelatedItemsResult& SearchAllRelatedItemsResult::operator=(const Aws::A if (jsonValue.ValueExists("relatedItems")) { Aws::Utils::Array relatedItemsJsonList = jsonValue.GetArray("relatedItems"); for (unsigned relatedItemsIndex = 0; relatedItemsIndex < relatedItemsJsonList.GetLength(); ++relatedItemsIndex) { - m_relatedItems.push_back(relatedItemsJsonList[relatedItemsIndex].AsObject()); + if (relatedItemsJsonList[relatedItemsIndex].IsNull()) { + m_relatedItems.emplace_back(); + continue; + } + m_relatedItems.emplace_back(relatedItemsJsonList[relatedItemsIndex].AsObject()); } m_relatedItemsHasBeenSet = true; } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchCasesResponseItem.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchCasesResponseItem.cpp index aaa9f68503b0..1d188f38cb1a 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchCasesResponseItem.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchCasesResponseItem.cpp @@ -36,6 +36,10 @@ SearchCasesResponseItem& SearchCasesResponseItem::operator=(JsonView jsonValue) if (jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; @@ -65,7 +69,11 @@ JsonValue SearchCasesResponseItem::Jsonize() const { if (m_tagsHasBeenSet) { JsonValue tagsJsonMap; for (auto& tagsItem : m_tags) { - tagsJsonMap.WithString(tagsItem.first, tagsItem.second); + if (!tagsItem.second.has_value()) { + tagsJsonMap.WithNull(tagsItem.first); + continue; + } + tagsJsonMap.WithString(tagsItem.first, *tagsItem.second); } payload.WithObject("tags", std::move(tagsJsonMap)); } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchCasesResult.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchCasesResult.cpp index d4d3fa7e0975..58b56654cf61 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchCasesResult.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchCasesResult.cpp @@ -29,7 +29,11 @@ SearchCasesResult& SearchCasesResult::operator=(const Aws::AmazonWebServiceResul if (jsonValue.ValueExists("cases")) { Aws::Utils::Array casesJsonList = jsonValue.GetArray("cases"); for (unsigned casesIndex = 0; casesIndex < casesJsonList.GetLength(); ++casesIndex) { - m_cases.push_back(casesJsonList[casesIndex].AsObject()); + if (casesJsonList[casesIndex].IsNull()) { + m_cases.emplace_back(); + continue; + } + m_cases.emplace_back(casesJsonList[casesIndex].AsObject()); } m_casesHasBeenSet = true; } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchRelatedItemsResponseItem.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchRelatedItemsResponseItem.cpp index 5c8bee6ea96f..b1991569ab64 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchRelatedItemsResponseItem.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchRelatedItemsResponseItem.cpp @@ -37,6 +37,10 @@ SearchRelatedItemsResponseItem& SearchRelatedItemsResponseItem::operator=(JsonVi if (jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; @@ -70,7 +74,11 @@ JsonValue SearchRelatedItemsResponseItem::Jsonize() const { if (m_tagsHasBeenSet) { JsonValue tagsJsonMap; for (auto& tagsItem : m_tags) { - tagsJsonMap.WithString(tagsItem.first, tagsItem.second); + if (!tagsItem.second.has_value()) { + tagsJsonMap.WithNull(tagsItem.first); + continue; + } + tagsJsonMap.WithString(tagsItem.first, *tagsItem.second); } payload.WithObject("tags", std::move(tagsJsonMap)); } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchRelatedItemsResult.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchRelatedItemsResult.cpp index b131c66a8ae6..698cead4e5d8 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/SearchRelatedItemsResult.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/SearchRelatedItemsResult.cpp @@ -29,7 +29,11 @@ SearchRelatedItemsResult& SearchRelatedItemsResult::operator=(const Aws::AmazonW if (jsonValue.ValueExists("relatedItems")) { Aws::Utils::Array relatedItemsJsonList = jsonValue.GetArray("relatedItems"); for (unsigned relatedItemsIndex = 0; relatedItemsIndex < relatedItemsJsonList.GetLength(); ++relatedItemsIndex) { - m_relatedItems.push_back(relatedItemsJsonList[relatedItemsIndex].AsObject()); + if (relatedItemsJsonList[relatedItemsIndex].IsNull()) { + m_relatedItems.emplace_back(); + continue; + } + m_relatedItems.emplace_back(relatedItemsJsonList[relatedItemsIndex].AsObject()); } m_relatedItemsHasBeenSet = true; } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/TagResourceRequest.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/TagResourceRequest.cpp index 93f3d02f033f..0b5b5cfea034 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/TagResourceRequest.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/TagResourceRequest.cpp @@ -18,7 +18,11 @@ Aws::String TagResourceRequest::SerializePayload() const { if (m_tagsHasBeenSet) { JsonValue tagsJsonMap; for (auto& tagsItem : m_tags) { - tagsJsonMap.WithString(tagsItem.first, tagsItem.second); + if (!tagsItem.second.has_value()) { + tagsJsonMap.WithNull(tagsItem.first); + continue; + } + tagsJsonMap.WithString(tagsItem.first, *tagsItem.second); } payload.WithObject("tags", std::move(tagsJsonMap)); } diff --git a/generated/src/aws-cpp-sdk-connectcases/source/model/UpdateRelatedItemResult.cpp b/generated/src/aws-cpp-sdk-connectcases/source/model/UpdateRelatedItemResult.cpp index bfc7df385336..ffa7a4ba949b 100644 --- a/generated/src/aws-cpp-sdk-connectcases/source/model/UpdateRelatedItemResult.cpp +++ b/generated/src/aws-cpp-sdk-connectcases/source/model/UpdateRelatedItemResult.cpp @@ -45,6 +45,10 @@ UpdateRelatedItemResult& UpdateRelatedItemResult::operator=(const Aws::AmazonWeb if (jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for (auto& tagsItem : tagsJsonMap) { + if (tagsItem.second.IsNull()) { + m_tags[tagsItem.first]; + continue; + } m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; diff --git a/src/aws-cpp-sdk-core/include/aws/core/utils/json/JsonSerializer.h b/src/aws-cpp-sdk-core/include/aws/core/utils/json/JsonSerializer.h index 8b2ccc139bb5..fabbe7aaf33c 100644 --- a/src/aws-cpp-sdk-core/include/aws/core/utils/json/JsonSerializer.h +++ b/src/aws-cpp-sdk-core/include/aws/core/utils/json/JsonSerializer.h @@ -94,6 +94,17 @@ namespace Aws JsonValue& WithString(const Aws::String& key, const Aws::String& value); JsonValue& WithString(const char* key, const Aws::String& value); + /** + * Adds a null value to the top level of this node with key. + */ + JsonValue& WithNull(const Aws::String& key); + JsonValue& WithNull(const char* key); + + /** + * Converts the current JSON node to null. + */ + JsonValue& AsNull(); + /** * Converts the current JSON node to a string. */ diff --git a/src/aws-cpp-sdk-core/source/utils/json/JsonSerializer.cpp b/src/aws-cpp-sdk-core/source/utils/json/JsonSerializer.cpp index 3cdcac1a8127..25edf4363e9c 100644 --- a/src/aws-cpp-sdk-core/source/utils/json/JsonSerializer.cpp +++ b/src/aws-cpp-sdk-core/source/utils/json/JsonSerializer.cpp @@ -153,6 +153,30 @@ JsonValue& JsonValue::WithString(const Aws::String& key, const Aws::String& valu return WithString(key.c_str(), value); } +JsonValue& JsonValue::WithNull(const char* key) +{ + if (!m_value) + { + m_value = cJSON_AS4CPP_CreateObject(); + } + + const auto val = cJSON_AS4CPP_CreateNull(); + AddOrReplace(m_value, key, val); + return *this; +} + +JsonValue& JsonValue::WithNull(const Aws::String& key) +{ + return WithNull(key.c_str()); +} + +JsonValue& JsonValue::AsNull() +{ + Destroy(); + m_value = cJSON_AS4CPP_CreateNull(); + return *this; +} + JsonValue& JsonValue::AsString(const Aws::String& value) { Destroy(); diff --git a/tests/aws-cpp-sdk-core-tests/utils/json/JsonSerializerTest.cpp b/tests/aws-cpp-sdk-core-tests/utils/json/JsonSerializerTest.cpp index 12234707833f..00f313f9752d 100644 --- a/tests/aws-cpp-sdk-core-tests/utils/json/JsonSerializerTest.cpp +++ b/tests/aws-cpp-sdk-core-tests/utils/json/JsonSerializerTest.cpp @@ -434,6 +434,39 @@ TEST_F(JsonSerializerTest, TestGetAllObjects) ASSERT_EQ(42, all["Key2"].AsInteger()); } +TEST_F(JsonSerializerTest, TestWithNull) +{ + JsonValue value; + value.WithString("Key1", "value1"); + value.WithNull("Key2"); + value.WithNull(Aws::String("Key3")); + value.WithInteger("Key4", 42); + + auto view = value.View(); + + ASSERT_TRUE(view.KeyExists("Key2")); + ASSERT_FALSE(view.ValueExists("Key2")); + ASSERT_TRUE(view.GetObject("Key2").IsNull()); + + ASSERT_TRUE(view.KeyExists("Key3")); + ASSERT_FALSE(view.ValueExists("Key3")); + ASSERT_TRUE(view.GetObject("Key3").IsNull()); + + ASSERT_STREQ("value1", view.GetString("Key1").c_str()); + ASSERT_EQ(42, view.GetInteger("Key4")); + + Aws::String serialized = view.WriteCompact(); + JsonValue reparsed(serialized); + ASSERT_TRUE(reparsed.WasParseSuccessful()); + auto reparsedView = reparsed.View(); + ASSERT_TRUE(reparsedView.KeyExists("Key2")); + ASSERT_FALSE(reparsedView.ValueExists("Key2")); + ASSERT_TRUE(reparsedView.GetObject("Key2").IsNull()); + ASSERT_TRUE(reparsedView.KeyExists("Key3")); + ASSERT_FALSE(reparsedView.ValueExists("Key3")); + ASSERT_TRUE(reparsedView.GetObject("Key3").IsNull()); +} + TEST_F(JsonSerializerTest, TestEquality) { auto input = R"({"AWS" : { diff --git a/tests/testing-resources/include/aws/testing/AwsProtocolTestHelpers.h b/tests/testing-resources/include/aws/testing/AwsProtocolTestHelpers.h index 6e4f8157c7f6..947058d48e0a 100644 --- a/tests/testing-resources/include/aws/testing/AwsProtocolTestHelpers.h +++ b/tests/testing-resources/include/aws/testing/AwsProtocolTestHelpers.h @@ -113,9 +113,19 @@ class AwsProtocolTestSuite : public Aws::Testing::AwsCppSdkGTestSuite { static void ValidateBody(const ExpectedRequest& expected, const Aws::ProtocolMock::Model::Request& receivedRequest) { const auto expectedBodyBuf = Aws::Utils::HashingUtils::Base64Decode(expected.body); const auto receivedBodyBuf = Aws::Utils::HashingUtils::Base64Decode(receivedRequest.GetBody()); - const auto expectedBodyStr = Aws::String(reinterpret_cast(expectedBodyBuf.GetUnderlyingData()), expectedBodyBuf.GetLength()); - const auto receivedBodyStr = Aws::String(reinterpret_cast(receivedBodyBuf.GetUnderlyingData()), receivedBodyBuf.GetLength()); - EXPECT_STREQ(expectedBodyStr.c_str(), receivedBodyStr.c_str()); + auto expectedBodyStr = Aws::String(reinterpret_cast(expectedBodyBuf.GetUnderlyingData()), expectedBodyBuf.GetLength()); + auto receivedBodyStr = Aws::String(reinterpret_cast(receivedBodyBuf.GetUnderlyingData()), receivedBodyBuf.GetLength()); + // Normalize empty bodies to empty JSON object + if (expectedBodyStr.empty()) expectedBodyStr = "{}"; + if (receivedBodyStr.empty()) receivedBodyStr = "{}"; + // Attempt semantic JSON comparison by round-tripping through the parser + Aws::Utils::Json::JsonValue expectedJson(expectedBodyStr); + Aws::Utils::Json::JsonValue receivedJson(receivedBodyStr); + if (expectedJson.WasParseSuccessful() && receivedJson.WasParseSuccessful()) { + EXPECT_EQ(expectedJson, receivedJson); + } else { + EXPECT_STREQ(expectedBodyStr.c_str(), receivedBodyStr.c_str()); + } } void ValidateRequestSent(const std::function& bodyCompare = ValidateBody) const { diff --git a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/c2j/C2jShape.java b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/c2j/C2jShape.java index fdcde4780145..af13deb827bb 100644 --- a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/c2j/C2jShape.java +++ b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/c2j/C2jShape.java @@ -36,4 +36,5 @@ public class C2jShape { private boolean sensitive; private boolean document; private Map retryable; + private boolean sparse; } diff --git a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/Shape.java b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/Shape.java index fe953ce7a6b7..478056141298 100644 --- a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/Shape.java +++ b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/Shape.java @@ -63,6 +63,7 @@ public class Shape { private boolean overrideStreaming = false; private boolean requestCompressionRequired=false; private boolean requestCompressionRequiredGzip=false; + private boolean sparse=false; public boolean isMap() { return "map".equals(type.toLowerCase()); diff --git a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/cpp/CppCborViewHelper.java b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/cpp/CppCborViewHelper.java deleted file mode 100644 index f25de52358f8..000000000000 --- a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/cpp/CppCborViewHelper.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.cpp; - -import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.Shape; -import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.ShapeMember; - -import java.util.HashMap; -import java.util.Map; - -public class CppCborViewHelper extends CppViewHelper { - private static final Map CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING = new HashMap<>(); - - static { - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("long", "long long"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("integer", "int64_t"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("string", "Aws::String"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("timestamp", "Aws::Utils::DateTime"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("boolean", "bool"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("sensitive_boolean", "bool"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("double", "double"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("float", "double"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("blob", "Aws::Utils::ByteBuffer"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("sensitive_blob", "Aws::Utils::CryptoBuffer"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("sensitive_long", "long long"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("sensitive_integer", "int64_t"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("sensitive_float", "double"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("sensitive_double", "double"); - CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("sensitive_timestamp", "Aws::Utils::DateTime"); - } - - public static String computeCppType(Shape shape) { - return computeCppTypeInternal(shape, CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING); - } - - public static String computeCppType(Shape parent, String member) { - if (!parent.getMembers().containsKey(member)) { - throw new RuntimeException("Parent shape " + parent.getName() + - " does not contain member key " + member); - } - ShapeMember shapeMember = parent.getMembers().get(member); - Shape childShape = shapeMember.getShape(); - - if (parent.getPayload() != null && parent.getPayload().equals(member) && parent.isResult()) { - if (shapeMember.isStreaming() || childShape.isBlob() || childShape.isString()) { - return "Aws::Utils::Stream::ResponseStream"; - } - } - return computeCppType(childShape); - } -} diff --git a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/cpp/CppViewHelper.java b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/cpp/CppViewHelper.java index 9c215a955ca3..a7cec4a38e51 100644 --- a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/cpp/CppViewHelper.java +++ b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/domainmodels/codegeneration/cpp/CppViewHelper.java @@ -15,6 +15,7 @@ import java.lang.RuntimeException; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashSet; import java.util.LinkedList; @@ -26,6 +27,7 @@ public class CppViewHelper { private static final Map CORAL_TYPE_TO_CPP_TYPE_MAPPING = new HashMap<>(); + private static final Map CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING = new HashMap<>(); private static final Map CORAL_TYPE_TO_JSON_CPP_TYPE_MAPPING = new HashMap<>(); private static final Map CORAL_TYPE_TO_XML_CONVERSION_MAPPING = new HashMap<>(); private static final Map CORAL_TYPE_TO_DEFAULT_VALUES = new HashMap<>(); @@ -56,6 +58,9 @@ public class CppViewHelper { CORAL_TYPE_TO_CPP_TYPE_MAPPING.put("sensitive_double", "double"); CORAL_TYPE_TO_CPP_TYPE_MAPPING.put("sensitive_timestamp", "Aws::Utils::DateTime"); + CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("integer", "int64_t"); + CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING.put("sensitive_integer", "int64_t"); + CORAL_TYPE_TO_JSON_CPP_TYPE_MAPPING.put("long", "Int64"); CORAL_TYPE_TO_JSON_CPP_TYPE_MAPPING.put("integer", "Integer"); CORAL_TYPE_TO_JSON_CPP_TYPE_MAPPING.put("string", "String"); @@ -205,8 +210,12 @@ public static String computeJsonizeString(Shape shape) { } static String computeCppTypeInternal(Shape shape, Map typeMapping) { + return computeCppTypeInternal(shape, typeMapping, Collections.emptyMap()); + } + + static String computeCppTypeInternal(Shape shape, Map typeMapping, Map overrideMapping) { String sensitivePrefix = shape.isSensitive() ? "sensitive_" : ""; - String cppType = typeMapping.get(sensitivePrefix + shape.getType()); + String cppType = overrideMapping.getOrDefault(sensitivePrefix + shape.getType(), typeMapping.get(sensitivePrefix + shape.getType())); //enum types show up as string if(cppType != null && !shape.isEnum()) { @@ -224,13 +233,15 @@ else if(shape.isStructure() || shape.isEnum()) } else if(shape.isList()) { - String type = computeCppTypeInternal(shape.getListMember().getShape(), typeMapping); + String type = computeCppTypeInternal(shape.getListMember().getShape(), typeMapping, overrideMapping); + type = shape.isSparse() ? String.format("Aws::Crt::Optional<%s>", type) : type; return String.format("Aws::Vector<%s>", type); } else if(shape.isMap()) { - String key = computeCppTypeInternal(shape.getMapKey().getShape(), typeMapping); - String value = computeCppTypeInternal(shape.getMapValue().getShape(), typeMapping); + String key = computeCppTypeInternal(shape.getMapKey().getShape(), typeMapping, overrideMapping); + String value = computeCppTypeInternal(shape.getMapValue().getShape(), typeMapping, overrideMapping); + value = shape.isSparse() ? String.format("Aws::Crt::Optional<%s>", value) : value; return String.format("Aws::Map<%s, %s>", key, value); } @@ -243,6 +254,16 @@ public static String computeCppType(Shape shape) { return computeCppTypeInternal(shape, CORAL_TYPE_TO_CPP_TYPE_MAPPING); } + public static String computeCborCppType(Shape shape) { + return computeCppTypeInternal(shape, CORAL_TYPE_TO_CPP_TYPE_MAPPING, CORAL_TYPE_TO_CBOR_CPP_TYPE_MAPPING); + } + + public static String computeResultCppType(Shape shape, String protocol) { + return "smithy-rpc-v2-cbor".equals(protocol) + ? computeCborCppType(shape) + : computeCppType(shape); + } + public static boolean isStreamingPayloadMember(Shape parent, String member) { if (!parent.getMembers().containsKey(member)) { throw new RuntimeException("Parent shape " + parent.getName() + @@ -275,6 +296,22 @@ public static String computeCppType(Shape parent, String member) { return computeCppType(childShape); } + public static String computeCborCppType(Shape parent, String member) { + if (!parent.getMembers().containsKey(member)) { + throw new RuntimeException("Parent shape " + parent.getName() + + " does not contain member key " + member); + } + ShapeMember shapeMember = parent.getMembers().get(member); + Shape childShape = shapeMember.getShape(); + + if (parent.getPayload() != null && parent.getPayload().equals(member) && parent.isResult()) { + if (shapeMember.isStreaming() || childShape.isBlob() || childShape.isString()) { + return "Aws::Utils::Stream::ResponseStream"; + } + } + return computeCborCppType(childShape); + } + public static String computeJsonCppType(Shape shape) { if(shape.isTimeStamp() && shape.getTimestampFormat() != null) { return CORAL_TYPE_TO_JSON_CPP_TYPE_MAPPING.get(shape.getTimestampFormat().toLowerCase()); @@ -387,6 +424,9 @@ public static Set computeHeaderIncludes(String projectName, Shape shape) headers.add(formatModelIncludeName(projectName, shapeInList)); } } + if (next.isSparse()) { + headers.add(""); + } if(!next.isPrimitive()) { if (next.isException() && !next.isModeledException()) { // C++ SDK code generator skips generating exceptions that can be expressed using diff --git a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CborCppClientGenerator.java b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CborCppClientGenerator.java index 305f532e80c4..5cbda5cc955f 100644 --- a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CborCppClientGenerator.java +++ b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CborCppClientGenerator.java @@ -10,7 +10,6 @@ import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.ServiceModel; import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.Shape; import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.ShapeMember; -import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.cpp.CppCborViewHelper; import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.cpp.CppShapeInformation; import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.cpp.CppViewHelper; import org.apache.velocity.Template; @@ -35,7 +34,7 @@ protected SdkFileEntry generateErrorMarshallerHeaderFile(ServiceModel serviceMod Template template = velocityEngine.getTemplate("/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborErrorMarshallerHeader.vm", StandardCharsets.UTF_8.name()); VelocityContext context = createContext(serviceModel); - context.put("CppViewHelper", CppCborViewHelper.class); + context.put("CppViewHelper", CppViewHelper.class); String fileName = String.format("include/aws/%s/%sErrorMarshaller.h", serviceModel.getMetadata().getProjectName(), serviceModel.getMetadata().getClassNamePrefix()); @@ -79,7 +78,7 @@ protected SdkFileEntry generateModelHeaderFile(ServiceModel serviceModel, Map.En context.put("shape", shape); context.put("typeInfo", new CppShapeInformation(shape, serviceModel)); - context.put("CppViewHelper", CppCborViewHelper.class); + context.put("CppViewHelper", CppViewHelper.class); String fileName = String.format("include/aws/%s/model/%s.h", serviceModel.getMetadata().getProjectName(), shapeEntry.getKey()); @@ -147,7 +146,7 @@ else if (shape.isResult()) { context.put("shape", shape); context.put("typeInfo", new CppShapeInformation(shape, serviceModel)); - context.put("CppViewHelper", CppCborViewHelper.class); + context.put("CppViewHelper", CppViewHelper.class); String fileName = String.format("source/model/%s.cpp", shapeEntry.getKey()); @@ -166,7 +165,7 @@ protected SdkFileEntry generateClientHeaderFile(final ServiceModel serviceModel) Template template = velocityEngine.getTemplate("/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborServiceClientHeader.vm", StandardCharsets.UTF_8.name()); VelocityContext context = createContext(serviceModel); - context.put("CppViewHelper", CppCborViewHelper.class); + context.put("CppViewHelper", CppViewHelper.class); context.put("RequestlessOperations", requestlessOperations); String fileName = String.format("include/aws/%s/%sClient.h", serviceModel.getMetadata().getProjectName(), diff --git a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CppProtocolTestGenerator.java b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CppProtocolTestGenerator.java index 43154aa5ad36..82c1746c8917 100644 --- a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CppProtocolTestGenerator.java +++ b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/CppProtocolTestGenerator.java @@ -11,7 +11,6 @@ import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.Shape; import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.ShapeMember; -import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.cpp.CppCborViewHelper; import com.amazonaws.util.awsclientgenerator.domainmodels.codegeneration.cpp.CppViewHelper; import com.amazonaws.util.awsclientgenerator.domainmodels.protocol_test.ProtocolTestModel; import com.amazonaws.util.awsclientgenerator.domainmodels.protocol_test.ProtocolTestSuite; @@ -115,11 +114,7 @@ protected final VelocityContext createContext() { context.put("testModel", testModel); context.put("input.encoding", StandardCharsets.UTF_8.name()); context.put("output.encoding", StandardCharsets.UTF_8.name()); - if(serviceModel.getMetadata().getProtocol().equals("smithy-rpc-v2-cbor")){ - context.put("CppViewHelper", CppCborViewHelper.class); - } else { - context.put("CppViewHelper", CppViewHelper.class); - } + context.put("CppViewHelper", CppViewHelper.class); return context; } diff --git a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformer.java b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformer.java index 1838d2c7b59a..89ed4e05ab95 100644 --- a/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformer.java +++ b/tools/code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/transform/C2jModelToGeneratorModelTransformer.java @@ -439,6 +439,10 @@ Shape convertShapeBasics(C2jShape c2jShape, String shapeName) { shape.setEvent(c2jShape.isEvent()); shape.setException(c2jShape.isException()); shape.setDocument(c2jShape.isDocument()); + shape.setSparse(c2jShape.isSparse()); + if (shape.isSparse() && !shape.isList() && !shape.isMap()) { + throw new SourceGenerationFailedException("The sparse trait is only applicable to list and map shapes, but was found on shape: " + shape.getName()); + } if (c2jShape.getXmlNamespace() != null) { XmlNamespace xmlns = new XmlNamespace(); @@ -850,6 +854,7 @@ Shape cloneShape(Shape shape) { cloned.setException(shape.isException()); cloned.setXmlNamespace(shape.getXmlNamespace()); cloned.setDocument(shape.isDocument()); + cloned.setSparse(shape.isSparse()); return cloned; } diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ModelClassHeaderMembersSource.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ModelClassHeaderMembersSource.vm index ba5ccc5bed0a..de43e1bd99a8 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ModelClassHeaderMembersSource.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ModelClassHeaderMembersSource.vm @@ -42,7 +42,11 @@ ${spaces}for(const auto& item : $memberVarName) ${spaces}{ ${spaces} ss << "${locationName}" << item.first; +#if($member.shape.sparse) + ${spaces} if(item.second.has_value()) { headers.emplace(ss.str(), item.second.value()); } +#else ${spaces} headers.emplace(ss.str(), item.second); +#end ${spaces} ss.str(""); ${spaces}} #elseif($member.shape.list) diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ModelClassMembersAndInlines.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ModelClassMembersAndInlines.vm index 19804fce8c45..483a35ca0a63 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ModelClassMembersAndInlines.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ModelClassMembersAndInlines.vm @@ -18,7 +18,7 @@ #set($cppType = "${metadata.classNamePrefix}Error") #set($isStream = false) #else -#set($cppType = $CppViewHelper.computeCppType($member.value.shape)) +#set($cppType = $CppViewHelper.computeResultCppType($member.value.shape, $protocol)) #set($isStream = false) #end #set($subShape = $member.value.shape) @@ -52,7 +52,7 @@ #elseif($member.value.shape.isMutuallyReferencedWith($shape) || $member.value.shape.getName() == $shape.getName()) #set($getterBody = "{$nl return *${memberVariableName};$nl }") #set($setterWithCopy = ";") -#set($setterWithMove = " {$nl ${setHasBeenSet}$nl ${memberVariableName} = Aws::MakeShared<$CppViewHelper.computeCppType($member.value.shape)>(" + '"' + "${typeInfo.className}" + '"' + ", std::forward<${memberKeyWithFirstLetterCapitalized}T>(value));$nl }") +#set($setterWithMove = " {$nl ${setHasBeenSet}$nl ${memberVariableName} = Aws::MakeShared<$CppViewHelper.computeResultCppType($member.value.shape, $protocol)>(" + '"' + "${typeInfo.className}" + '"' + ", std::forward<${memberKeyWithFirstLetterCapitalized}T>(value));$nl }") #elseif($member.value.isChecksumMember()) #set($getterBody = " { return ${memberVariableName}; }") #set($setterWithCopy = " { ${setHasBeenSet}${memberVariableName} = value; SetChecksumAlgorithm(ChecksumAlgorithm::${member.value.getChecksumEnumMember()}); }") @@ -109,8 +109,26 @@ #end #if($member.value.shape.map) #set($mapMember = $member.value.shape) -#set($keyType = $CppViewHelper.computeCppType($mapMember.mapKey.shape)) -#set($valueType = $CppViewHelper.computeCppType($mapMember.mapValue.shape)) +#set($keyType = $CppViewHelper.computeResultCppType($mapMember.mapKey.shape, $protocol)) +#set($valueType = $CppViewHelper.computeResultCppType($mapMember.mapValue.shape, $protocol)) +#if($mapMember.sparse) +#set($optionalValueType = "Aws::Crt::Optional<${valueType}>") +#if(!$mapMember.mapKey.shape.primitive && !$mapMember.mapKey.shape.enum && !$mapMember.mapValue.shape.primitive && !$mapMember.mapValue.shape.enum) +#set($keyTemplType = "${memberKeyWithFirstLetterCapitalized}KeyT") +#set($valueTemplType = "${memberKeyWithFirstLetterCapitalized}ValueT") + template + ${classNameRef} Add${memberKeyWithFirstLetterCapitalized}(${keyTemplType}&& key, ${valueTemplType}&& value) { + ${setHasBeenSet}${memberVariableName}.emplace(std::forward<${keyTemplType}>(key), std::forward<${valueTemplType}>(value)); return *this; + } +#else + ${inline}${classNameRef} Add${memberKeyWithFirstLetterCapitalized}(${keyType} key, ${valueType} value) { + ${setHasBeenSet}${memberVariableName}.emplace(key, value); return *this; + } +#end + ${inline}${classNameRef} Add${memberKeyWithFirstLetterCapitalized}(${keyType} key, ${optionalValueType} value) { + ${setHasBeenSet}${memberVariableName}.emplace(key, value); return *this; + } +#else #if(!$mapMember.mapKey.shape.primitive && !$mapMember.mapKey.shape.enum && !$mapMember.mapValue.shape.primitive && !$mapMember.mapValue.shape.enum) #set($keyTemplType = "${memberKeyWithFirstLetterCapitalized}KeyT") #set($valueTemplType = "${memberKeyWithFirstLetterCapitalized}ValueT") @@ -124,9 +142,21 @@ } #end #end +#end #if($member.value.shape.list) #set($listMember = $member.value.shape) -#set($valueType = $CppViewHelper.computeCppType($listMember.listMember.shape)) +#set($valueType = $CppViewHelper.computeResultCppType($listMember.listMember.shape, $protocol)) +#if($listMember.sparse) +#set($optionalValueType = "Aws::Crt::Optional<${valueType}>") +#if(!$listMember.listMember.shape.primitive && !$listMember.listMember.shape.enum) +#set($valueTemplType = "${memberKeyWithFirstLetterCapitalized}T") + template + ${classNameRef} Add${memberKeyWithFirstLetterCapitalized}(${valueTemplType}&& value) { ${setHasBeenSet}${memberVariableName}.emplace_back(std::forward<${valueTemplType}>(value)); return *this; } +#else + ${inline}${classNameRef} Add${memberKeyWithFirstLetterCapitalized}(${valueType} value)$adderWithCopy +#end + ${inline}${classNameRef} Add${memberKeyWithFirstLetterCapitalized}(${optionalValueType} value)$adderWithCopy +#else #if(!$listMember.listMember.shape.primitive && !$listMember.listMember.shape.enum) #set($valueTemplType = "${memberKeyWithFirstLetterCapitalized}T") template @@ -134,6 +164,7 @@ #else ${inline}${classNameRef} Add${memberKeyWithFirstLetterCapitalized}(${valueType} value)$adderWithCopy #end +#end #end ///@} #end##if(!($CppViewHelper.isStreamingPayloadMember($shape, $member.key) && $shape.request)) diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborDecodeListValue.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborDecodeListValue.vm index 9a47a159e28b..73129f37e651 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborDecodeListValue.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborDecodeListValue.vm @@ -1,7 +1,24 @@ +#set($parentListDepth = $recursionDepth - 1) +#if($member.shape.sparse) +{ + auto nullPeek_${recursionDepth} = decoder->PeekType(); + if (nullPeek_${recursionDepth}.has_value() && nullPeek_${recursionDepth}.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); +#if($parentListDepth == 0) + ${memberVarName}.emplace_back(); +#else + nestedList_${parentListDepth}.emplace_back(); +#end + } else { +#end #if($shapeMember.enum) auto ${containerVar} = decoder->PopNextTextVal(); if (${containerVar}.has_value()) { - ${value}.push_back(${shapeMember.name}Mapper::Get${shapeMember.name}ForName(Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len))); +#if($parentListDepth == 0) + ${memberVarName}.push_back(${shapeMember.name}Mapper::Get${shapeMember.name}ForName(Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len))); +#else + nestedList_${parentListDepth}.push_back(${shapeMember.name}Mapper::Get${shapeMember.name}ForName(Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len))); +#end } #elseif($shapeMember.string) auto peekType_${recursionDepth} = decoder->PeekType(); @@ -9,7 +26,11 @@ if(peekType_${recursionDepth}.has_value()){ if (peekType_${recursionDepth}.value() == Aws::Crt::Cbor::CborType::Text) { auto ${containerVar} = decoder->PopNextTextVal(); if (${containerVar}.has_value()) { - ${value}.push_back(Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len)); +#if($parentListDepth == 0) + ${memberVarName}.push_back(Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len)); +#else + nestedList_${parentListDepth}.push_back(Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len)); +#end } } else { decoder->ConsumeNextSingleElement(); @@ -27,24 +48,40 @@ if(peekType_${recursionDepth}.has_value()){ ss_${recursionDepth} << Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len); } } - ${value}.push_back(ss_${recursionDepth}.str()); +#if($parentListDepth == 0) + ${memberVarName}.push_back(ss_${recursionDepth}.str()); +#else + nestedList_${parentListDepth}.push_back(ss_${recursionDepth}.str()); +#end ss_${recursionDepth}.clear(); } } #elseif($shapeMember.boolean) auto ${containerVar} = decoder->PopNextBooleanVal(); if (${containerVar}.has_value()) { - ${value}.push_back(${containerVar}.value()); +#if($parentListDepth == 0) + ${memberVarName}.push_back(${containerVar}.value()); +#else + nestedList_${parentListDepth}.push_back(${containerVar}.value()); +#end } #elseif($shapeMember.double) auto ${containerVar} = decoder->PopNextFloatVal(); if (${containerVar}.has_value()) { - ${value}.push_back(${containerVar}.value()); +#if($parentListDepth == 0) + ${memberVarName}.push_back(${containerVar}.value()); +#else + nestedList_${parentListDepth}.push_back(${containerVar}.value()); +#end } #elseif($shapeMember.float) auto ${containerVar} = decoder->PopNextFloatVal(); if (${containerVar}.has_value()) { - ${value}.push_back(${containerVar}.value()); +#if($parentListDepth == 0) + ${memberVarName}.push_back(${containerVar}.value()); +#else + nestedList_${parentListDepth}.push_back(${containerVar}.value()); +#end } #elseif($shapeMember.blob) auto peekType_${recursionDepth} = decoder->PeekType(); @@ -52,7 +89,11 @@ if(peekType_${recursionDepth}.has_value()){ if (peekType_${recursionDepth}.value() == Aws::Crt::Cbor::CborType::Bytes) { auto ${containerVar} = decoder->PopNextBytesVal(); if (${containerVar}.has_value()) { - ${value}.push_back(Aws::Utils::ByteBuffer(${containerVar}.value().ptr, ${containerVar}.value().len)); +#if($parentListDepth == 0) + ${memberVarName}.push_back(Aws::Utils::ByteBuffer(${containerVar}.value().ptr, ${containerVar}.value().len)); +#else + nestedList_${parentListDepth}.push_back(Aws::Utils::ByteBuffer(${containerVar}.value().ptr, ${containerVar}.value().len)); +#end } } else { decoder->ConsumeNextSingleElement(); @@ -70,7 +111,11 @@ if(peekType_${recursionDepth}.has_value()){ ss_${recursionDepth} << Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len); } } - ${value}.push_back(Aws::Utils::ByteBuffer(ss_${recursionDepth}.str())); +#if($parentListDepth == 0) + ${memberVarName}.push_back(Aws::Utils::ByteBuffer(ss_${recursionDepth}.str())); +#else + nestedList_${parentListDepth}.push_back(Aws::Utils::ByteBuffer(ss_${recursionDepth}.str())); +#end ss_${recursionDepth}.clear(); } } @@ -85,27 +130,47 @@ if(peekType_${recursionDepth}.has_value()){ { auto ${containerVar} = decoder->PopNextFloatVal(); if (${containerVar}.has_value()) { - ${value}.push_back(Aws::Utils::DateTime(${containerVar}.value())); +#if($parentListDepth == 0) + ${memberVarName}.push_back(Aws::Utils::DateTime(${containerVar}.value())); +#else + nestedList_${parentListDepth}.push_back(Aws::Utils::DateTime(${containerVar}.value())); +#end } } else { auto ${containerVar} = decoder->PopNextUnsignedIntVal(); if (${containerVar}.has_value()) { - ${value}.push_back(Aws::Utils::DateTime(${containerVar}.value())); +#if($parentListDepth == 0) + ${memberVarName}.push_back(Aws::Utils::DateTime(${containerVar}.value())); +#else + nestedList_${parentListDepth}.push_back(Aws::Utils::DateTime(${containerVar}.value())); +#end } } } } #elseif($shapeMember.structure) #if($member.shape.isMutuallyReferencedWith($shape) || $member.shape.getName() == $shape.getName()) - ${value}.push_back(Aws::MakeShared<${shapeMember.name}>("${typeInfo.className}", ${shapeMember.name}(decoder))); +#if($parentListDepth == 0) + ${memberVarName}.push_back(Aws::MakeShared<${shapeMember.name}>("${typeInfo.className}", ${shapeMember.name}(decoder))); +#else + nestedList_${parentListDepth}.push_back(Aws::MakeShared<${shapeMember.name}>("${typeInfo.className}", ${shapeMember.name}(decoder))); +#end #else - ${value}.push_back(${shapeMember.name}(decoder)); +#if($parentListDepth == 0) + ${memberVarName}.push_back(${shapeMember.name}(decoder)); +#else + nestedList_${parentListDepth}.push_back(${shapeMember.name}(decoder)); +#end #end #elseif($shapeMember.list) #set($template.nestedShapeMember = $shapeMember.listMember.shape) +#if($shapeMember.sparse) + auto nestedList_${recursionDepth} = Vector>(); +#else auto nestedList_${recursionDepth} = Vector<$CppViewHelper.computeCppType($template.nestedShapeMember)>(); +#end auto peekType_${recursionDepth} = decoder->PeekType(); if (peekType_${recursionDepth}.has_value() && (peekType_${recursionDepth}.value() == CborType::ArrayStart || peekType_${recursionDepth}.value() == CborType::IndefArrayStart)) { @@ -145,14 +210,18 @@ if(peekType_${recursionDepth}.has_value()){ } #if($recursionDepth > 1) #set($parentDepth = $recursionDepth - 1) - nestedList_${parentDepth}.push_back(${value}); + nestedList_${parentDepth}.push_back(nestedList_${recursionDepth}); #else ${memberVarName}.push_back(nestedList_${recursionDepth}); #end } #elseif($shapeMember.map) #set($template.nestedShapeMember = $shapeMember.mapValue.shape) +#if($shapeMember.sparse) + auto nestedMap_${recursionDepth} = Map>(); +#else auto nestedMap_${recursionDepth} = Map(); +#end auto peekType_${recursionDepth} = decoder->PeekType(); if (peekType_${recursionDepth}.has_value() && (peekType_${recursionDepth}.value() == CborType::MapStart || peekType_${recursionDepth}.value() == CborType::IndefMapStart)) { @@ -191,7 +260,7 @@ if(peekType_${recursionDepth}.has_value()){ } #if($recursionDepth > 1) #set($parentDepth = $recursionDepth - 1) - nestedList_${parentDepth}.push_back(${value}); + nestedList_${parentDepth}.push_back(nestedMap_${recursionDepth}); #else ${memberVarName}.push_back(nestedMap_${recursionDepth}); #end @@ -202,13 +271,25 @@ if(peekType_${recursionDepth}.has_value()){ if(peekType_${recursionDepth}.value() == Aws::Crt::Cbor::CborType::UInt){ auto ${containerVar} = decoder->PopNextUnsignedIntVal(); if (${containerVar}.has_value()) { - ${value}.push_back(static_cast(${containerVar}.value())); +#if($parentListDepth == 0) + ${memberVarName}.push_back(static_cast(${containerVar}.value())); +#else + nestedList_${parentListDepth}.push_back(static_cast(${containerVar}.value())); +#end } } else { auto ${containerVar} = decoder->PopNextNegativeIntVal(); if (${containerVar}.has_value()) { - ${value}.push_back(static_cast(1 - ${containerVar}.value())); +#if($parentListDepth == 0) + ${memberVarName}.push_back(static_cast(1 - ${containerVar}.value())); +#else + nestedList_${parentListDepth}.push_back(static_cast(1 - ${containerVar}.value())); +#end } } } -#end \ No newline at end of file +#end +#if($member.shape.sparse) + } // end else (non-null sparse element) +} +#end diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborDecodeMapValue.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborDecodeMapValue.vm index 29bd1683e133..05688770430f 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborDecodeMapValue.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborDecodeMapValue.vm @@ -1,10 +1,27 @@ +#set($parentMapDepth = $recursionDepth - 1) auto key_${recursionDepth} = decoder->PopNextTextVal(); if (key_${recursionDepth}.has_value()) { Aws::String keyStr_${recursionDepth} = Aws::String(reinterpret_cast(key_${recursionDepth}.value().ptr), key_${recursionDepth}.value().len); +#if($member.shape.sparse) + { + auto nullPeek_${recursionDepth} = decoder->PeekType(); + if (nullPeek_${recursionDepth}.has_value() && nullPeek_${recursionDepth}.value() == Aws::Crt::Cbor::CborType::Null) { + decoder->ConsumeNextSingleElement(); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}]; +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}]; +#end + } else { +#end #if($shapeMember.enum) auto ${containerVar} = decoder->PopNextTextVal(); if (${containerVar}.has_value()) { - ${value}[keyStr_${recursionDepth}] = ${shapeMember.name}Mapper::Get${shapeMember.name}ForName(Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len)); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = ${shapeMember.name}Mapper::Get${shapeMember.name}ForName(Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len)); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = ${shapeMember.name}Mapper::Get${shapeMember.name}ForName(Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len)); +#end } #elseif($shapeMember.string) auto peekType_${recursionDepth} = decoder->PeekType(); @@ -12,7 +29,11 @@ if(peekType_${recursionDepth}){ if (peekType_${recursionDepth}.value() == Aws::Crt::Cbor::CborType::Text) { auto ${containerVar} = decoder->PopNextTextVal(); if (${containerVar}.has_value()) { - ${value}[keyStr_${recursionDepth}] = Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len); +#end } } else { decoder->ConsumeNextSingleElement(); @@ -30,24 +51,40 @@ if(peekType_${recursionDepth}){ ss_${recursionDepth} << Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len); } } - ${value}[keyStr_${recursionDepth}] = ss_${recursionDepth}.str(); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = ss_${recursionDepth}.str(); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = ss_${recursionDepth}.str(); +#end ss_${recursionDepth}.clear(); } } #elseif($shapeMember.boolean) auto ${containerVar} = decoder->PopNextBooleanVal(); if (${containerVar}.has_value()) { - ${value}[keyStr_${recursionDepth}] = ${containerVar}.value(); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = ${containerVar}.value(); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = ${containerVar}.value(); +#end } #elseif($shapeMember.double) auto ${containerVar} = decoder->PopNextFloatVal(); if (${containerVar}.has_value()) { - ${value}[keyStr_${recursionDepth}] = ${containerVar}.value(); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = ${containerVar}.value(); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = ${containerVar}.value(); +#end } #elseif($shapeMember.float) auto ${containerVar} = decoder->PopNextFloatVal(); if (${containerVar}.has_value()) { - ${value}[keyStr_${recursionDepth}] = ${containerVar}.value(); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = ${containerVar}.value(); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = ${containerVar}.value(); +#end } #elseif($shapeMember.blob) auto peekType_${recursionDepth} = decoder->PeekType(); @@ -55,7 +92,11 @@ if(peekType_${recursionDepth}){ if (peekType_${recursionDepth}.value() == Aws::Crt::Cbor::CborType::Bytes) { auto ${containerVar} = decoder->PopNextBytesVal(); if (${containerVar}.has_value()) { - ${value}[keyStr_${recursionDepth}] = Aws::Utils::ByteBuffer(${containerVar}.value().ptr, ${containerVar}.value().len); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = Aws::Utils::ByteBuffer(${containerVar}.value().ptr, ${containerVar}.value().len); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = Aws::Utils::ByteBuffer(${containerVar}.value().ptr, ${containerVar}.value().len); +#end } } else { decoder->ConsumeNextSingleElement(); @@ -73,7 +114,11 @@ if(peekType_${recursionDepth}){ ss_${recursionDepth} << Aws::String(reinterpret_cast(${containerVar}.value().ptr), ${containerVar}.value().len); } } - ${value}[keyStr_${recursionDepth}] = Aws::Utils::ByteBuffer(ss_${recursionDepth}.str()); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = Aws::Utils::ByteBuffer(ss_${recursionDepth}.str()); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = Aws::Utils::ByteBuffer(ss_${recursionDepth}.str()); +#end ss_${recursionDepth}.clear(); } } @@ -88,27 +133,47 @@ if(peekType_${recursionDepth}){ { auto ${containerVar} = decoder->PopNextFloatVal(); if (${containerVar}.has_value()) { - ${value}[keyStr_${recursionDepth}] = Aws::Utils::DateTime(${containerVar}.value()); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = Aws::Utils::DateTime(${containerVar}.value()); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = Aws::Utils::DateTime(${containerVar}.value()); +#end } } else { auto ${containerVar} = decoder->PopNextUnsignedIntVal(); if (${containerVar}.has_value()) { - ${value}[keyStr_${recursionDepth}] = Aws::Utils::DateTime(${containerVar}.value()); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = Aws::Utils::DateTime(${containerVar}.value()); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = Aws::Utils::DateTime(${containerVar}.value()); +#end } } } } #elseif($shapeMember.structure) #if($member.shape.isMutuallyReferencedWith($shape) || $member.shape.getName() == $shape.getName()) - ${value}[keyStr_${recursionDepth}] = Aws::MakeShared<${shapeMember.name}>("${typeInfo.className}", ${shapeMember.name}(decoder)); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = Aws::MakeShared<${shapeMember.name}>("${typeInfo.className}", ${shapeMember.name}(decoder)); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = Aws::MakeShared<${shapeMember.name}>("${typeInfo.className}", ${shapeMember.name}(decoder)); +#end #else - ${value}[keyStr_${recursionDepth}] = ${shapeMember.name}(decoder); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = ${shapeMember.name}(decoder); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = ${shapeMember.name}(decoder); +#end #end #elseif($shapeMember.map) #set($template.nestedShapeMember = $shapeMember.mapValue.shape) +#if($shapeMember.sparse) + auto nestedMap_${recursionDepth} = Map>(); +#else auto nestedMap_${recursionDepth} = Map(); +#end auto peekType_${recursionDepth} = decoder->PeekType(); if (peekType_${recursionDepth}.has_value() && (peekType_${recursionDepth}.value() == CborType::MapStart || peekType_${recursionDepth}.value() == CborType::IndefMapStart)) { @@ -144,16 +209,20 @@ if(peekType_${recursionDepth}){ #set($recursionDepth = $recursionDepth - 1) } } - #if($recursionDepth > 0) + #if($recursionDepth > 1) #set($parentDepth = $recursionDepth - 1) - nestedMap_${parentDepth}[keyStr_${recursionDepth}] = ${value}; + nestedMap_${parentDepth}[keyStr_${recursionDepth}] = nestedMap_${recursionDepth}; #else ${memberVarName}[keyStr_${recursionDepth}] = nestedMap_${recursionDepth}; #end } #elseif($shapeMember.list) #set($template.nestedShapeMember = $shapeMember.listMember.shape) +#if($shapeMember.sparse) + auto nestedList_${recursionDepth} = Vector>(); +#else auto nestedList_${recursionDepth} = Vector<$CppViewHelper.computeCppType($template.nestedShapeMember)>(); +#end auto peekType_${recursionDepth} = decoder->PeekType(); if (peekType_${recursionDepth}.has_value() && (peekType_${recursionDepth}.value() == CborType::ArrayStart || peekType_${recursionDepth}.value() == CborType::IndefArrayStart)) { @@ -193,7 +262,7 @@ if(peekType_${recursionDepth}){ } #if($recursionDepth > 1) #set($parentDepth = $recursionDepth - 1) - nestedMap_${parentDepth}[keyStr_${recursionDepth}] = ${value}; + nestedMap_${parentDepth}[keyStr_${recursionDepth}] = nestedList_${recursionDepth}; #else ${memberVarName}[keyStr_${recursionDepth}] = nestedList_${recursionDepth}; #end @@ -204,14 +273,26 @@ if(peekType_${recursionDepth}){ if(peekType_${recursionDepth}.value() == Aws::Crt::Cbor::CborType::UInt){ auto ${containerVar} = decoder->PopNextUnsignedIntVal(); if (${containerVar}.has_value()) { - ${value}[keyStr_${recursionDepth}] = static_cast(${containerVar}.value()); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = static_cast(${containerVar}.value()); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = static_cast(${containerVar}.value()); +#end } } else { auto ${containerVar} = decoder->PopNextNegativeIntVal(); if (${containerVar}.has_value()) { - ${value}[keyStr_${recursionDepth}] = static_cast(1 - ${containerVar}.value()); +#if($parentMapDepth == 0) + ${memberVarName}[keyStr_${recursionDepth}] = static_cast(1 - ${containerVar}.value()); +#else + nestedMap_${parentMapDepth}[keyStr_${recursionDepth}] = static_cast(1 - ${containerVar}.value()); +#end } } } #end -} \ No newline at end of file +#if($member.shape.sparse) + } // end else (non-null sparse value) + } +#end +} diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborEncodeValue.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborEncodeValue.vm index 279d4d3dc78f..fd089e19d3d1 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborEncodeValue.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborEncodeValue.vm @@ -3,21 +3,43 @@ encoder.WriteText(Aws::Crt::ByteCursorFromCString(${shapeMember.name}Mapper::Get #elseif($shapeMember.list) encoder.WriteArrayStart(${value}.size()); for(const auto& item_${recursionDepth} : ${value}) { +#if($shapeMember.sparse) + if (!item_${recursionDepth}.has_value()) { encoder.WriteNull(); } else { + const auto& sparseItem_${recursionDepth} = *item_${recursionDepth}; +#set($value = "sparseItem_${recursionDepth}") #set($shapeMember = $shapeMember.listMember.shape) +#set($recursionDepth = $recursionDepth + 1) +#parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborEncodeValue.vm") +#set($recursionDepth = $recursionDepth - 1) + } +#else #set($value = "item_${recursionDepth}") +#set($shapeMember = $shapeMember.listMember.shape) #set($recursionDepth = $recursionDepth + 1) #parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborEncodeValue.vm") #set($recursionDepth = $recursionDepth - 1) +#end } #elseif($shapeMember.map) encoder.WriteMapStart(${value}.size()); for(const auto& item_${recursionDepth} : ${value}) { encoder.WriteText(Aws::Crt::ByteCursorFromCString(item_${recursionDepth}.first.c_str())); +#if($shapeMember.sparse) + if (!item_${recursionDepth}.second.has_value()) { encoder.WriteNull(); } else { + const auto& sparseVal_${recursionDepth} = *item_${recursionDepth}.second; +#set($value = "sparseVal_${recursionDepth}") #set($shapeMember = $shapeMember.mapValue.shape) +#set($recursionDepth = $recursionDepth + 1) +#parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborEncodeValue.vm") +#set($recursionDepth = $recursionDepth - 1) + } +#else #set($value = "item_${recursionDepth}.second") +#set($shapeMember = $shapeMember.mapValue.shape) #set($recursionDepth = $recursionDepth + 1) #parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborEncodeValue.vm") #set($recursionDepth = $recursionDepth - 1) +#end } #elseif($shapeMember.blob) encoder.WriteBytes(Aws::Crt::ByteCursorFromCString(reinterpret_cast(${value}.GetUnderlyingData()))); @@ -40,4 +62,4 @@ encoder.WriteTag(1); //1 represents Epoch-based date/time. See https://www.rfc-e encoder.WriteUInt(${value}.Seconds()); #else (${value} >= 0) ? encoder.WriteUInt(${value}) : encoder.WriteNegInt(${value}); -#end \ No newline at end of file +#end diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborResultHeader.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborResultHeader.vm index b3f867df5a35..13f69a08bd73 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborResultHeader.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborResultHeader.vm @@ -46,6 +46,7 @@ template ${exportMacro} ${classNameRef} operator=(const Aws::AmazonWebServiceResult<${CborRef}>& result); #set($useRequiredField = false) + #set($protocol = "smithy-rpc-v2-cbor") #parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/ModelClassMembersAndInlines.vm") }; diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborSubObjectHeader.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborSubObjectHeader.vm index 096ccba4def8..0a533ddc04a4 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborSubObjectHeader.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborSubObjectHeader.vm @@ -51,6 +51,7 @@ ${exportMacro} ${classNameRef} operator=(const ${typeInfo.cborDecoder}& decoder) ${exportMacro} void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const; #set($useRequiredField = true) +#set($protocol = "smithy-rpc-v2-cbor") #parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/ModelClassMembersAndInlines.vm") }; diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/common/model/ServiceClientModelHeaderMemberDeclaration.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/common/model/ServiceClientModelHeaderMemberDeclaration.vm index 3c8d8684cb41..1fd29e072f86 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/common/model/ServiceClientModelHeaderMemberDeclaration.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/common/model/ServiceClientModelHeaderMemberDeclaration.vm @@ -7,7 +7,11 @@ #else #set($isEventStreamInput = false) #end +#if($protocol == "smithy-rpc-v2-cbor") +#set($cppType = $CppViewHelper.computeCborCppType($shape, $member.key)) +#else #set($cppType = $CppViewHelper.computeCppType($shape, $member.key)) +#end #if($member.value.shape.isException() && !$member.value.shape.isModeledException()) #set($cppType = "${metadata.classNamePrefix}Error") #end diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/ModelInternalMapOrListJsonDeserializer.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/ModelInternalMapOrListJsonDeserializer.vm index 492de94d73bc..9ca68def9179 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/ModelInternalMapOrListJsonDeserializer.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/ModelInternalMapOrListJsonDeserializer.vm @@ -18,10 +18,21 @@ #end #if($template.recursionDepth > 1) #set($template.containerVar = ${template.lowerCaseVarName} + "Map") +#if($template.currentShape.sparse) + ${template.currentSpaces}Aws::Map<${CppViewHelper.computeCppType($template.currentShape.mapKey.shape)}, Aws::Crt::Optional<${CppViewHelper.computeCppType($template.currentShape.mapValue.shape)}>> ${template.lowerCaseVarName}Map; +#else ${template.currentSpaces}Aws::Map<${CppViewHelper.computeCppType($template.currentShape.mapKey.shape)}, ${CppViewHelper.computeCppType($template.currentShape.mapValue.shape)}> ${template.lowerCaseVarName}Map; +#end #end ${template.currentSpaces}for(auto& ${template.lowerCaseVarName}Item : ${template.lowerCaseVarName}JsonMap) ${template.currentSpaces}{ +#if($template.currentShape.sparse) + ${template.currentSpaces} if(${template.lowerCaseVarName}Item.second.IsNull()) + ${template.currentSpaces} { + ${template.currentSpaces} ${template.containerVar}[${template.lowerCaseVarName}Item.first]; + ${template.currentSpaces} continue; + ${template.currentSpaces} } +#end #if(!$template.currentShape.mapValue.shape.map && !$template.currentShape.mapValue.shape.list) #set($lvalue = "${template.containerVar}[${template.lowerCaseVarName}Item.first]") #set($rvalue = "${template.lowerCaseVarName}Item.second.As${CppViewHelper.computeJsonCppType($template.currentShape.mapValue.shape)}()") @@ -77,23 +88,50 @@ #end #if($template.recursionDepth > 1) #set($template.containerVar = ${template.lowerCaseVarName} + "List") +#if($template.currentShape.sparse) + ${template.currentSpaces}Aws::Vector> ${template.lowerCaseVarName}List; +#else ${template.currentSpaces}Aws::Vector<${CppViewHelper.computeCppType($template.currentShape.listMember.shape)}> ${template.lowerCaseVarName}List; +#end ${template.currentSpaces}${template.lowerCaseVarName}List.reserve((size_t)${template.lowerCaseVarName}JsonList.GetLength()); #end ${template.currentSpaces}for(unsigned ${template.lowerCaseVarName}Index = 0; ${template.lowerCaseVarName}Index < ${template.lowerCaseVarName}JsonList.GetLength(); ++${template.lowerCaseVarName}Index) ${template.currentSpaces}{ +#if($template.currentShape.sparse) + ${template.currentSpaces} if(${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].IsNull()) + ${template.currentSpaces} { + ${template.currentSpaces} ${template.containerVar}.emplace_back(); + ${template.currentSpaces} continue; + ${template.currentSpaces} } +#end #if(!$template.currentShape.listMember.shape.map && !$template.currentShape.listMember.shape.list) #set($template.atBottom = true) #if($template.currentShape.listMember.shape.enum) #set($enumName = $template.currentShape.listMember.shape.name) +#if($template.currentShape.sparse) + ${template.currentSpaces} ${template.containerVar}.emplace_back(${enumName}Mapper::Get${enumName}ForName(${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].AsString())); +#else ${template.currentSpaces} ${template.containerVar}.push_back(${enumName}Mapper::Get${enumName}ForName(${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].AsString())); +#end #elseif($template.currentShape.listMember.shape.blob) +#if($template.currentShape.sparse) + ${template.currentSpaces} ${template.containerVar}.emplace_back(HashingUtils::Base64Decode(${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}())); +#else ${template.currentSpaces} ${template.containerVar}.push_back(HashingUtils::Base64Decode(${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}())); +#end #elseif($template.currentShape.listMember.shape.timeStamp && $template.currentShape.listMember.shape.timestampFormat == "iso8601") +#if($template.currentShape.sparse) + ${template.currentSpaces} ${template.containerVar}.emplace_back(Aws::Utils::DateTime{${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}(), Aws::Utils::DateFormat::$CppViewHelper.computeTimestampFormatInQueryString($template.currentShape.listMember.shape)}); +#else ${template.currentSpaces} ${template.containerVar}.push_back(Aws::Utils::DateTime{${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}(), Aws::Utils::DateFormat::$CppViewHelper.computeTimestampFormatInQueryString($template.currentShape.listMember.shape)}); +#end +#else +#if($template.currentShape.sparse) + ${template.currentSpaces} ${template.containerVar}.emplace_back(${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}()); #else ${template.currentSpaces} ${template.containerVar}.push_back(${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}()); #end +#end #else #set($currentSpaces = $template.currentSpaces + " ") #set($currentShape = $template.currentShape.listMember.shape) diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/ModelInternalMapOrListJsonize.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/ModelInternalMapOrListJsonize.vm index 56c69280c330..b6bdd69ff86f 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/ModelInternalMapOrListJsonize.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/ModelInternalMapOrListJsonize.vm @@ -13,8 +13,35 @@ ${template.currentSpaces}JsonValue ${template.lowerCaseVarName}JsonMap; ${template.currentSpaces}for(auto& ${template.lowerCaseVarName}Item : ${template.containerVar}) ${template.currentSpaces}{ +#if($template.currentShape.sparse) + ${template.currentSpaces} if(!${template.lowerCaseVarName}Item.second.has_value()) + ${template.currentSpaces} { + ${template.currentSpaces} ${template.lowerCaseVarName}JsonMap.WithNull(${template.lowerCaseVarName}Item.first); + ${template.currentSpaces} continue; + ${template.currentSpaces} } +#end #if(!$template.currentShape.mapValue.shape.map && !$template.currentShape.mapValue.shape.list) #set($functionCall = "${template.lowerCaseVarName}JsonMap.With${CppViewHelper.computeJsonCppType($template.currentShape.mapValue.shape)}") +#if($template.currentShape.sparse) +#set($key = "${template.lowerCaseVarName}Item.first") +#if($template.currentShape.mapValue.shape.isStructure() || $template.currentShape.mapValue.shape.isTimeStamp() || $template.currentShape.mapValue.shape.isDocument()) +#set($value = "${template.lowerCaseVarName}Item.second${CppViewHelper.computeJsonizeString($template.currentShape.mapValue.shape, true)}") +#else +#set($value = "*${template.lowerCaseVarName}Item.second") +#end +#if($template.currentShape.mapValue.shape.isBlob()) +#set($value = "HashingUtils::Base64Encode(*${template.lowerCaseVarName}Item.second${CppViewHelper.computeJsonizeString($template.currentShape.mapValue.shape)})") +#end +#if($template.currentShape.mapKey.shape.enum) +#set($enumName = $template.currentShape.mapKey.shape.name) +#set($key = "${enumName}Mapper::GetNameFor${enumName}(${template.lowerCaseVarName}Item.first)") +#end +#if($template.currentShape.mapValue.shape.enum) +#set($enumName = $template.currentShape.mapValue.shape.name) +#set($value = "${enumName}Mapper::GetNameFor${enumName}(*${template.lowerCaseVarName}Item.second)") +#set($functionCall = "${template.lowerCaseVarName}JsonMap.WithString") +#end +#else #set($key = "${template.lowerCaseVarName}Item.first") #set($value = "${template.lowerCaseVarName}Item.second${CppViewHelper.computeJsonizeString($template.currentShape.mapValue.shape)}") #if($template.currentShape.mapValue.shape.isBlob()) @@ -28,6 +55,7 @@ #set($enumName = $template.currentShape.mapValue.shape.name) #set($value = "${enumName}Mapper::GetNameFor${enumName}(${value})") #set($functionCall = "${template.lowerCaseVarName}JsonMap.WithString") +#end #end ${template.currentSpaces} ${functionCall}(${key}, ${value}); #set($template.atBottom = true) @@ -35,7 +63,11 @@ #set($currentSpaces = $template.currentSpaces + " ") #set($currentShape = $template.currentShape.mapValue.shape) #set($memberKey = $template.currentShape.mapValue.shape.name) +#if($template.currentShape.sparse) +#set($containerVar = "(*" + ${template.lowerCaseVarName} + "Item.second)") +#else #set($containerVar = ${template.lowerCaseVarName} + "Item.second") +#end #set($recursionDepth = $template.recursionDepth + 1) #set($jsonValue = ${template.lowerCaseVarName} + "Item.second") #parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/json/ModelInternalMapOrListJsonize.vm") @@ -59,22 +91,49 @@ ${template.currentSpaces}${AwsArray} ${template.lowerCaseVarName}JsonList(${template.containerVar}.size()); ${template.currentSpaces}for(unsigned ${template.lowerCaseVarName}Index = 0; ${template.lowerCaseVarName}Index < ${template.lowerCaseVarName}JsonList.GetLength(); ++${template.lowerCaseVarName}Index) ${template.currentSpaces}{ +#if($template.currentShape.sparse) + ${template.currentSpaces} if(!${template.containerVar}[${template.lowerCaseVarName}Index].has_value()) + ${template.currentSpaces} { + ${template.currentSpaces} ${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].AsNull(); + ${template.currentSpaces} continue; + ${template.currentSpaces} } +#end #if(!$template.currentShape.listMember.shape.map && !$template.currentShape.listMember.shape.list) #set($template.atBottom = true) #if($template.currentShape.listMember.shape.enum) #set($enumName = $template.currentShape.listMember.shape.name) +#if($template.currentShape.sparse) + ${template.currentSpaces} ${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].AsString(${enumName}Mapper::GetNameFor${enumName}(*${template.containerVar}[${template.lowerCaseVarName}Index])); +#else ${template.currentSpaces} ${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].AsString(${enumName}Mapper::GetNameFor${enumName}(${template.containerVar}[${template.lowerCaseVarName}Index])); +#end #elseif($template.currentShape.listMember.shape.blob) +#if($template.currentShape.sparse) + ${template.currentSpaces} ${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}(HashingUtils::Base64Encode(*${template.containerVar}[${template.lowerCaseVarName}Index]${CppViewHelper.computeJsonizeString($template.currentShape.listMember.shape)})); +#else ${template.currentSpaces} ${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}(HashingUtils::Base64Encode(${template.containerVar}[${template.lowerCaseVarName}Index]${CppViewHelper.computeJsonizeString($template.currentShape.listMember.shape)})); +#end +#else +#if($template.currentShape.sparse) +#if($template.currentShape.listMember.shape.isStructure() || $template.currentShape.listMember.shape.isTimeStamp() || $template.currentShape.listMember.shape.isDocument()) + ${template.currentSpaces} ${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}(${template.containerVar}[${template.lowerCaseVarName}Index]${CppViewHelper.computeJsonizeString($template.currentShape.listMember.shape, true)}); +#else + ${template.currentSpaces} ${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}(*${template.containerVar}[${template.lowerCaseVarName}Index]); +#end #else ${template.currentSpaces} ${template.lowerCaseVarName}JsonList[${template.lowerCaseVarName}Index].As${CppViewHelper.computeJsonCppType($template.currentShape.listMember.shape)}(${template.containerVar}[${template.lowerCaseVarName}Index]${CppViewHelper.computeJsonizeString($template.currentShape.listMember.shape)}); #end +#end #else #set($currentSpaces = $template.currentSpaces + " ") #set($currentShape = $template.currentShape.listMember.shape) #set($memberKey = $template.currentShape.listMember.shape.name) #set($jsonValue = ${template.lowerCaseVarName} + "JsonList[" + ${template.lowerCaseVarName} + "Index]") +#if($template.currentShape.sparse) +#set($containerVar = "(*" + $template.containerVar + "[" + ${template.lowerCaseVarName} + "Index])") +#else #set($containerVar = $template.containerVar + "[" + ${template.lowerCaseVarName} + "Index]") +#end #set($recursionDepth = $template.recursionDepth + 1) #parse("com/amazonaws/util/awsclientgenerator/velocity/cpp/json/ModelInternalMapOrListJsonize.vm") #end diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SetListMacro.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SetListMacro.vm index 98ee03ac1321..8b612eb14933 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SetListMacro.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SetListMacro.vm @@ -31,6 +31,18 @@ ${macro.spaces}{ ${macro.spaces}} #end##foreach #else## not (list || map || structure) +#if($listShape.sparse) +#set($macro.fieldAdder = "Add${CppViewHelper.capitalizeFirstChar($testInputParam.key)}") +#foreach($arrayItem in $testInputParam.value) +#if($arrayItem == "null") +${macro.spaces}${dstObject}.${macro.fieldAdder}(Aws::Crt::Optional<$CppViewHelper.computeCppType($macro.listMemberShape)>{}); +#elseif($macro.listMemberShape.list || $macro.listMemberShape.map) +${macro.spaces}${dstObject}.${macro.fieldAdder}($CppViewHelper.computeCppType($macro.listMemberShape)#SerializeSingleParameterMacro($macro.listMemberShape, $arrayItem)); +#else +${macro.spaces}${dstObject}.${macro.fieldAdder}(#SerializeSingleParameterMacro($macro.listMemberShape, $arrayItem)); +#end +#end +#else #set($macro.fieldSetter = "Set${CppViewHelper.capitalizeFirstChar($testInputParam.key)}") #set($macro.listResult="{") #foreach($arrayItem in $testInputParam.value) @@ -39,5 +51,6 @@ ${macro.spaces}} #end #set($macro.listResult=$macro.listResult + "}") ${spaces}${dstObject}.${macro.fieldSetter}($macro.listResult); +#end #end##(list || map || structure) #end##macro SetListMacro \ No newline at end of file diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SetMapMacro.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SetMapMacro.vm index 809e27ce2377..63e49e95b108 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SetMapMacro.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/request/SetMapMacro.vm @@ -7,17 +7,24 @@ #set($macro.mapItemVarName = "${dstObject}${CppViewHelper.capitalizeFirstChar(${CppViewHelper.computeVariableName($testInputParam.key)})}Item") #set($macro.fieldAdder = "Add${CppViewHelper.capitalizeFirstChar($testInputParam.key)}") #foreach($mapItem in $testInputParam.value.fields()) +#if($mapShape.sparse && $mapItem.value == "null") +${macro.spaces}${dstObject}.${macro.fieldAdder}("$mapItem.key", Aws::Crt::Optional{}); +#else ${macro.spaces}{ ${macro.spaces}Aws::Utils::Document ${macro.mapItemVarName}(R"j(${mapItem.value})j"); ${macro.spaces}${dstObject}.${macro.fieldAdder}("$mapItem.key", $macro.mapItemVarName); ${macro.spaces}} #end +#end #break #end #if($mapShape.mapValue.shape.structure) #set($macro.mapItemVarName = "${dstObject}${CppViewHelper.capitalizeFirstChar(${CppViewHelper.computeVariableName($testInputParam.key)})}Item") #set($macro.fieldAdder = "Add${CppViewHelper.capitalizeFirstChar($testInputParam.key)}") #foreach($mapItem in $testInputParam.value.fields()) +#if($mapShape.sparse && $mapItem.value == "null") +${macro.spaces}${dstObject}.${macro.fieldAdder}("$mapItem.key", Aws::Crt::Optional<$CppViewHelper.computeCppType($mapShape.mapValue.shape)>{}); +#else ${macro.spaces}{ ${macro.spaces}$CppViewHelper.computeCppType($mapShape.mapValue.shape) $macro.mapItemVarName; #foreach($innerParam in $mapItem.value.fields()) @@ -26,9 +33,22 @@ ${macro.spaces}{ ${macro.spaces}${dstObject}.${macro.fieldAdder}("$mapItem.key", $macro.mapItemVarName); ${macro.spaces}} #end +#end #break #end ###----- the map value is not nested structure or document +#if($mapShape.sparse) +#set($macro.fieldAdder = "Add${CppViewHelper.capitalizeFirstChar($testInputParam.key)}") +#foreach($mapItem in $testInputParam.value.fields()) +#if($mapItem.value == "null") +${macro.spaces}${dstObject}.${macro.fieldAdder}("$mapItem.key", Aws::Crt::Optional<$CppViewHelper.computeCppType($mapShape.mapValue.shape)>{}); +#elseif($mapShape.mapValue.shape.list || $mapShape.mapValue.shape.map) +${macro.spaces}${dstObject}.${macro.fieldAdder}("$mapItem.key", $CppViewHelper.computeCppType($mapShape.mapValue.shape)#SerializeSingleParameterMacro($mapShape.mapValue.shape, $mapItem.value)); +#else +${macro.spaces}${dstObject}.${macro.fieldAdder}("$mapItem.key", #SerializeSingleParameterMacro($mapShape.mapValue.shape, $mapItem.value)); +#end +#end +#else #set($macro.mapResult="{") #foreach($mapItem in $testInputParam.value.fields()) #set($macro.mapItem="{" + '"' + "$mapItem.key" + '"' + ", ") @@ -38,4 +58,5 @@ ${macro.spaces}} #end #set($macro.mapResult=$macro.mapResult + "}") ${spaces}${dstObject}.${macro.fieldSetter}($macro.mapResult); +#end #end##macro SetMapMacro \ No newline at end of file diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateListMacro.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateListMacro.vm index 7c9070a317bd..7c9266760a49 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateListMacro.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateListMacro.vm @@ -23,17 +23,34 @@ #set($macro.listItemVarName = "${dstObject}${CppViewHelper.capitalizeFirstChar(${CppViewHelper.computeVariableName($testValidateParam.key)})}Item") #end #if($macro.listMemberShape.list || $macro.listMemberShape.map || $macro.listMemberShape.structure) +#if($listShape.sparse && $macro.listMemberShape.structure) +${macro.spaces}const Aws::Vector>& $macro.listItemVarName = ${dstObject}.${macro.fieldGetter}; +${macro.spaces}EXPECT_EQ(${testValidateParamVal.size()}U, ${macro.listItemVarName}.size()); +#foreach($arrayItem in $testValidateParamVal) +${macro.spaces}{ +#if($arrayItem.isNull()) + ${macro.spaces}EXPECT_FALSE(${macro.listItemVarName}.at(${foreach.index}).has_value()); +#else + ${macro.spaces}EXPECT_TRUE(${macro.listItemVarName}.at(${foreach.index}).has_value()); + ${macro.spaces}const ${macro.listMemberShape.name}& ${macro.listItemVarName}Ref = *${macro.listItemVarName}.at(${foreach.index}); +#foreach($innerParam in $arrayItem.fields()) +#ValidateParamsMacro("${macro.spaces} " "${macro.listItemVarName}Ref" $macro.listMemberShape $innerParam) +#end +#end +${macro.spaces}} +#end +#else ${macro.spaces}EXPECT_EQ(${testValidateParamVal.size()}U, ${dstObject}.${macro.fieldGetter}.size()); #foreach($arrayItem in $testValidateParamVal) ${macro.spaces}{ #if($macro.listMemberShape.list) - ${macro.spaces}const Aws::Vector<$CppViewHelper.computeCppType($macro.listMemberShape.listMember.shape)>& $macro.listItemVarName = ${dstObject}.${macro.fieldGetter}.at(${foreach.index}); + ${macro.spaces}const Aws::Vector<$CppViewHelper.computeResultCppType($macro.listMemberShape.listMember.shape, $serviceModel.metadata.protocol)>& $macro.listItemVarName = ${dstObject}.${macro.fieldGetter}.at(${foreach.index}); ${macro.spaces}EXPECT_EQ(${arrayItem.size()}U, ${macro.listItemVarName}.size()); #foreach($innerListEl in $arrayItem) ${macro.spaces}EXPECT_EQ(#ValidateSingleParameterMacro($macro.listMemberShape.listMember.shape, $innerListEl), ${macro.listItemVarName}.at(${foreach.index})); #end #elseif($macro.listMemberShape.map) - ${macro.spaces}const Aws::Map<$CppViewHelper.computeCppType($macro.listMemberShape.mapKey.shape), $CppViewHelper.computeCppType($macro.listMemberShape.mapValue.shape)>& $macro.listItemVarName = ${dstObject}.${macro.fieldGetter}.at(${foreach.index}); + ${macro.spaces}const Aws::Map<$CppViewHelper.computeResultCppType($macro.listMemberShape.mapKey.shape, $serviceModel.metadata.protocol), $CppViewHelper.computeResultCppType($macro.listMemberShape.mapValue.shape, $serviceModel.metadata.protocol)>& $macro.listItemVarName = ${dstObject}.${macro.fieldGetter}.at(${foreach.index}); ${macro.spaces}EXPECT_EQ(${arrayItem.size()}U, ${macro.listItemVarName}.size()); #foreach($innerMapEl in $arrayItem.fields()) ${macro.spaces}EXPECT_TRUE(${macro.listItemVarName}.find("$innerMapEl.key") != ${macro.listItemVarName}.end()); @@ -47,11 +64,25 @@ ${macro.spaces}{ #end##list ${macro.spaces}} #end##foreach +#end #else## not (list || map || structure) -${macro.spaces}const Aws::Vector<$CppViewHelper.computeCppType($macro.listMemberShape)>& $macro.listItemVarName = ${dstObject}.${macro.fieldGetter}; +#if($listShape.sparse) +${macro.spaces}const Aws::Vector>& $macro.listItemVarName = ${dstObject}.${macro.fieldGetter}; +${macro.spaces}EXPECT_EQ(${testValidateParamVal.size()}U, ${macro.listItemVarName}.size()); +#foreach($arrayItem in $testValidateParamVal) +#if($arrayItem.isNull()) +${macro.spaces}EXPECT_FALSE(${macro.listItemVarName}.at(${foreach.index}).has_value()); +#else +${macro.spaces}EXPECT_TRUE(${macro.listItemVarName}.at(${foreach.index}).has_value()); +${macro.spaces}EXPECT_EQ(#ValidateSingleParameterMacro($macro.listMemberShape, $arrayItem), *${macro.listItemVarName}.at(${foreach.index})); +#end +#end +#else +${macro.spaces}const Aws::Vector<$CppViewHelper.computeResultCppType($macro.listMemberShape, $serviceModel.metadata.protocol)>& $macro.listItemVarName = ${dstObject}.${macro.fieldGetter}; ${macro.spaces}EXPECT_EQ(${testValidateParamVal.size()}U, ${macro.listItemVarName}.size()); #foreach($arrayItem in $testValidateParamVal) ${macro.spaces}EXPECT_EQ(#ValidateSingleParameterMacro($macro.listMemberShape, $arrayItem), ${macro.listItemVarName}.at(${foreach.index})); #end +#end##sparse #end##(list || map || structure) #end##macro ValidateListMacro \ No newline at end of file diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateMapMacro.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateMapMacro.vm index 845748270b70..d2eb9830fb02 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateMapMacro.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateMapMacro.vm @@ -17,7 +17,7 @@ #end #set($macro.spaces = $spaces) #if($mapShape.mapValue.shape.document) -${macro.spaces}const Aws::Map<$CppViewHelper.computeCppType($mapShape.mapKey.shape), $CppViewHelper.computeCppType($mapShape.mapValue.shape)>& $macro.mapVarName = ${dstObject}.${macro.fieldGetter}; +${macro.spaces}const Aws::Map<$CppViewHelper.computeResultCppType($mapShape.mapKey.shape, $serviceModel.metadata.protocol), $CppViewHelper.computeResultCppType($mapShape.mapValue.shape, $serviceModel.metadata.protocol)>& $macro.mapVarName = ${dstObject}.${macro.fieldGetter}; ${macro.spaces}EXPECT_EQ(${testValidateParamVal.size()}U, ${macro.mapVarName}.size()); #foreach($mapItem in $testValidateParamVal.fields()) ${macro.spaces}EXPECT_STREQ(R"j(${mapItem.value})j", ${macro.mapVarName}.at("$mapItem.key").View().WriteCompact().c_str()); @@ -25,21 +25,53 @@ ${macro.spaces}EXPECT_STREQ(R"j(${mapItem.value})j", ${macro.mapVarName}.at("$ma #break #end #if($mapShape.mapValue.shape.structure) -${macro.spaces}const Aws::Map<$CppViewHelper.computeCppType($mapShape.mapKey.shape), $CppViewHelper.computeCppType($mapShape.mapValue.shape)>& $macro.mapVarName = ${dstObject}.${macro.fieldGetter}; +#if($mapShape.sparse) +${macro.spaces}const Aws::Map<$CppViewHelper.computeResultCppType($mapShape.mapKey.shape, $serviceModel.metadata.protocol), Aws::Crt::Optional<$CppViewHelper.computeResultCppType($mapShape.mapValue.shape, $serviceModel.metadata.protocol)>>& $macro.mapVarName = ${dstObject}.${macro.fieldGetter}; ${macro.spaces}EXPECT_EQ(${testValidateParamVal.size()}U, ${macro.mapVarName}.size()); #foreach($mapItem in $testValidateParamVal.fields()) ${macro.spaces}{ ${macro.spaces}EXPECT_TRUE(${macro.mapVarName}.find("$mapItem.key") != ${macro.mapVarName}.end()); - ${macro.spaces}const $CppViewHelper.computeCppType($mapShape.mapValue.shape)& $macro.mapItemVarName = ${macro.mapVarName}.at("$mapItem.key"); +#if($mapItem.value.isNull()) + ${macro.spaces}EXPECT_FALSE(${macro.mapVarName}.at("$mapItem.key").has_value()); +#else + ${macro.spaces}EXPECT_TRUE(${macro.mapVarName}.at("$mapItem.key").has_value()); + ${macro.spaces}const $CppViewHelper.computeResultCppType($mapShape.mapValue.shape, $serviceModel.metadata.protocol)& $macro.mapItemVarName = *${macro.mapVarName}.at("$mapItem.key"); +#foreach($innerParam in $mapItem.value.fields()) +#ValidateParamsMacro("${macro.spaces} " $macro.mapItemVarName $mapShape.mapValue.shape $innerParam) +#end +#end +${macro.spaces}} +#end +#else +${macro.spaces}const Aws::Map<$CppViewHelper.computeResultCppType($mapShape.mapKey.shape, $serviceModel.metadata.protocol), $CppViewHelper.computeResultCppType($mapShape.mapValue.shape, $serviceModel.metadata.protocol)>& $macro.mapVarName = ${dstObject}.${macro.fieldGetter}; +${macro.spaces}EXPECT_EQ(${testValidateParamVal.size()}U, ${macro.mapVarName}.size()); +#foreach($mapItem in $testValidateParamVal.fields()) +${macro.spaces}{ + ${macro.spaces}EXPECT_TRUE(${macro.mapVarName}.find("$mapItem.key") != ${macro.mapVarName}.end()); + ${macro.spaces}const $CppViewHelper.computeResultCppType($mapShape.mapValue.shape, $serviceModel.metadata.protocol)& $macro.mapItemVarName = ${macro.mapVarName}.at("$mapItem.key"); #foreach($innerParam in $mapItem.value.fields()) #ValidateParamsMacro("${macro.spaces} " $macro.mapItemVarName $mapShape.mapValue.shape $innerParam) #end ${macro.spaces}} #end +#end #break #end ###----- the map value is not nested structure or document -${macro.spaces}const Aws::Map<$CppViewHelper.computeCppType($mapShape.mapKey.shape), $CppViewHelper.computeCppType($mapShape.mapValue.shape)>& $macro.mapVarName = ${dstObject}.${macro.fieldGetter}; +#if($mapShape.sparse) +${macro.spaces}const Aws::Map<$CppViewHelper.computeResultCppType($mapShape.mapKey.shape, $serviceModel.metadata.protocol), Aws::Crt::Optional<$CppViewHelper.computeResultCppType($mapShape.mapValue.shape, $serviceModel.metadata.protocol)>>& $macro.mapVarName = ${dstObject}.${macro.fieldGetter}; +${macro.spaces}EXPECT_EQ(${testValidateParamVal.size()}U, ${macro.mapVarName}.size()); +#foreach($mapItem in $testValidateParamVal.fields()) +${macro.spaces}EXPECT_TRUE(${macro.mapVarName}.find("$mapItem.key") != ${macro.mapVarName}.end()); +#if($mapItem.value.isNull()) +${macro.spaces}EXPECT_FALSE(${macro.mapVarName}.at("$mapItem.key").has_value()); +#else +${macro.spaces}EXPECT_TRUE(${macro.mapVarName}.at("$mapItem.key").has_value()); +${macro.spaces}EXPECT_EQ(#ValidateSingleParameterMacro($mapShape.mapValue.shape, $mapItem.value), *${macro.mapVarName}.at("$mapItem.key")); +#end +#end +#else +${macro.spaces}const Aws::Map<$CppViewHelper.computeResultCppType($mapShape.mapKey.shape, $serviceModel.metadata.protocol), $CppViewHelper.computeResultCppType($mapShape.mapValue.shape, $serviceModel.metadata.protocol)>& $macro.mapVarName = ${dstObject}.${macro.fieldGetter}; ${macro.spaces}EXPECT_EQ(${testValidateParamVal.size()}U, ${macro.mapVarName}.size()); #foreach($mapItem in $testValidateParamVal.fields()) ${macro.spaces}EXPECT_TRUE(${macro.mapVarName}.find("$mapItem.key") != ${macro.mapVarName}.end()); @@ -48,4 +80,5 @@ ${macro.spaces}EXPECT_TRUE(${macro.mapVarName}.find("$mapItem.key") != ${macro.m #set($macro.var = $macro.mapItemVarName) #ValidateSingleVariableMacro($macro.spaces, $mapShape.mapValue.shape, $mapItem.value, $macro.parentVarName, $macro.getter, $macro.var) #end +#end##sparse #end##macro ValidateMapMacro \ No newline at end of file diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateParamsMacro.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateParamsMacro.vm index 96962a369a8d..5263b5ebb285 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateParamsMacro.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/protocoltests/result/ValidateParamsMacro.vm @@ -24,10 +24,14 @@ ${macro.spaces}EXPECT_TRUE(std::isnan(${dstObject}.${macro.fieldGetter}())); #elseif($macro.memberToGet.shape.structure) ${macro.spaces}{ #set($macro.innerStructVarName = "${dstObject}${CppViewHelper.capitalizeFirstChar(${CppViewHelper.computeVariableName($testValidateParam.key)})}") +#if($testValidateParam.value.isNull()) + ${macro.spaces}(void)${dstObject}.${macro.fieldGetter}(); +#else ${macro.spaces}const ${macro.memberToGet.shape.name}& $macro.innerStructVarName = ${dstObject}.${macro.fieldGetter}(); #foreach($innerParam in $testValidateParam.value.fields()) #ValidateParamsMacro("${macro.spaces} ", $macro.innerStructVarName, $macro.memberToGet.shape, $innerParam) #end +#end ${macro.spaces}} #elseif($testValidateParam.key != "contentType" && $currentShape.members.containsKey($testValidateParam.key) && $CppViewHelper.isStreamingPayloadMember($currentShape, $testValidateParam.key)) #set($macro.payloadVarName = "${dstObject}${CppViewHelper.capitalizeFirstChar(${CppViewHelper.computeVariableName($testValidateParam.key)})}") 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 1e5ee6442cd1..7f3d0c0d6a5f 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 @@ -38,15 +38,14 @@ Aws::Utils::DateTime(static_cast(${value}))## #elseif($shape.enum) ${shape.name}Mapper::Get${shape.name}ForName(R"e(${value.asText()})e")## #elseif($shape.list) -#set($macro.listResult="Aws::Vector<$CppViewHelper.computeCppType($shape)>({") -#foreach($listItem in $value) +#set($macro.listResult="Aws::Vector<$CppViewHelper.computeResultCppType($shape.listMember.shape, $serviceModel.metadata.protocol)>({")#foreach($listItem in $value) #set($macro.listResult=$macro.listResult + "#ValidateSingleParameterMacro($shape.listMember.shape, $listItem)") #if($foreach.hasNext)#set($macro.listResult=$macro.listResult + ", ")#end #end #set($macro.listResult=$macro.listResult + "})") $macro.listResult## #elseif($shape.map) -#set($macro.mapResult="Aws::Map<$CppViewHelper.computeCppType($shape.mapKey.shape), $CppViewHelper.computeCppType($shape.mapValue.shape)>({") +#set($macro.mapResult="Aws::Map<$CppViewHelper.computeResultCppType($shape.mapKey.shape, $serviceModel.metadata.protocol), $CppViewHelper.computeResultCppType($shape.mapValue.shape, $serviceModel.metadata.protocol)>({") #foreach($mapItem in $value.fields()) #set($macro.mapItem="{" + '"' + "$mapItem.key" + '"' + ", ") #set($macro.mapItem=$macro.mapItem + "#ValidateSingleParameterMacro($shape.mapValue.shape, $mapItem.value)" + "}") diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeRequestQueryListElement.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeRequestQueryListElement.vm index 03c8ca9e6bab..f4e686065506 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeRequestQueryListElement.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeRequestQueryListElement.vm @@ -45,10 +45,23 @@ #end #end #if($member.shape.listMember.shape.structure) +#if($member.shape.sparse) + ${macro.spaces} if(item.has_value()) { + ${macro.spaces} item.value().OutputToStream(ss, "${macro.listLocation}.", ${varName}Count, ""); + ${macro.spaces} } +#else ${macro.spaces} item.OutputToStream(ss, "${macro.listLocation}.", ${varName}Count, ""); +#end +#else +#if($member.shape.sparse) + ${macro.spaces} if(item.has_value()) { + ${macro.spaces} ss << "${macro.listLocation}." << ${varName}Count << "=" + ${macro.spaces} << #serializeQuerySingleElementToText($macro.spaces, $member.shape.listMember, "item.value()") << "&"; + ${macro.spaces} } #else ${macro.spaces} ss << "${macro.listLocation}." << ${varName}Count << "=" ${macro.spaces} << #serializeQuerySingleElementToText($macro.spaces, $member.shape.listMember, "item") << "&"; +#end #end ${macro.spaces} ${varName}Count++; ${macro.spaces}} diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeRequestQueryMapElement.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeRequestQueryMapElement.vm index 751eca7c55ab..f797d4abb67a 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeRequestQueryMapElement.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeRequestQueryMapElement.vm @@ -35,14 +35,27 @@ #end ## --- MAP VALUE --- #if($member.shape.mapValue.shape.structure) +#if($member.shape.sparse) + ${spaces} if(item.second.has_value()) { + ${spaces} item.second.value().OutputToStream(ss, "${macro.mapLocationName}.", ${macro.varName}Count, ".${macro.valueLocationName}"); + ${spaces} } +#else ${spaces} item.second.OutputToStream(ss, "${macro.mapLocationName}.", ${macro.varName}Count, ".${macro.valueLocationName}"); +#end #else #set($macro.equals='=') #if($member.shape.mapValue.shape.list || $member.shape.mapValue.shape.map) #set($macro.equals='') #end +#if($member.shape.sparse) + ${spaces} if(item.second.has_value()) { + ${spaces} ss << "${macro.mapLocationName}." << ${macro.varName}Count << ".${macro.valueLocationName}${macro.equals}" + ${spaces} << #serializeQuerySingleElementToText($spaces, $member.shape.mapValue, "item.second.value()") << "&"; + ${spaces} } +#else ${spaces} ss << "${macro.mapLocationName}." << ${macro.varName}Count << ".${macro.valueLocationName}${macro.equals}" ${spaces} << #serializeQuerySingleElementToText($spaces, $member.shape.mapValue, "item.second") << "&"; +#end #end ${spaces} ${macro.varName}Count++; ${spaces}} diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeSubObjQueryMapElement.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeSubObjQueryMapElement.vm index 633eddb064d3..4db390fc41b7 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeSubObjQueryMapElement.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/queryxml/QuerySerializeTemplateMacros/serializeSubObjQueryMapElement.vm @@ -32,14 +32,26 @@ #if($member.shape.mapValue.shape.structure) ${spaces} Aws::StringStream ${macro.lowerCaseVarName}Ss; ${spaces} ${macro.lowerCaseVarName}Ss << location << ${macro.locationIndexValue}".${macro.mapLocationName}." << ${macro.lowerCaseVarName}Idx << ".${macro.mapValueLocationName}"; +#if($member.shape.sparse) + ${spaces} if(item.second.has_value()) { + ${spaces} item.second.value().OutputToStream(oStream, ${macro.lowerCaseVarName}Ss.str().c_str()); + ${spaces} } +#else ${spaces} item.second.OutputToStream(oStream, ${macro.lowerCaseVarName}Ss.str().c_str()); +#end #else #set($macro.equals='="') #if($member.shape.mapValue.shape.list || $member.shape.mapValue.shape.map) #set($macro.equals='"') #end #set($mapValueLocation = '".' + "${macro.mapLocationName}." + '"' + " << ${macro.lowerCaseVarName}Idx << " + '".' + ${macro.mapValueLocationName} + $macro.equals + $nl + " ${spaces} ") +#if($member.shape.sparse) + ${spaces} if(item.second.has_value()) { + ${spaces} oStream << location << ${macro.locationIndexValue}#serializeSubObjQuerySingleElement($member.shape.mapValue, $mapValueLocation, "item.second.value()") << "&"; + ${spaces} } +#else ${spaces} oStream << location << ${macro.locationIndexValue}#serializeSubObjQuerySingleElement($member.shape.mapValue, $mapValueLocation, "item.second") << "&"; +#end #end ${spaces} ${macro.lowerCaseVarName}Idx++; ${spaces}} diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlListPayloadElement.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlListPayloadElement.vm index 289c96de1220..be8e43a22dbf 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlListPayloadElement.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlListPayloadElement.vm @@ -54,7 +54,19 @@ ${macro.spaces}while(!${macro.listVarName}.IsNull()) ${macro.spaces}{ #set($macro.memberVarName = $CppViewHelper.computeMemberVariableName($memberName)) +#if($member.shape.sparse) + ${macro.spaces} if(${macro.listVarName}.GetText().empty() || ${macro.listVarName}.GetAttributeValue("xsi:nil") == "true") { + ${macro.spaces} ${macro.memberVarName}.emplace_back(); + ${macro.spaces} } else { +#if($member.shape.listMember.shape.structure) + ${macro.spaces} ${macro.memberVarName}.emplace_back(#deserializeXmlSingleElement($member.shape.listMember, $macro.listVarName)); +#else + ${macro.spaces} ${macro.memberVarName}.push_back(#deserializeXmlSingleElement($member.shape.listMember, $macro.listVarName)); +#end + ${macro.spaces} } +#else ${macro.spaces} ${macro.memberVarName}.push_back(#deserializeXmlSingleElement($member.shape.listMember, $macro.listVarName)); +#end #if($member.shape.listMember.locationName) #set($listMemberName = $member.shape.listMember.locationName) #elseif(!($member.shape.flattened || $member.flattened)) diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlMapPayloadElement.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlMapPayloadElement.vm index c117ed91570a..1c3ed3ccc637 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlMapPayloadElement.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlMapPayloadElement.vm @@ -38,8 +38,14 @@ ${macro.spaces} XmlNode valueNode = ${macro.mapVarName}.FirstChild("value"); #end #set($macro.memberVarName = $CppViewHelper.computeMemberVariableName($memberName)) +#if($member.shape.sparse) + ${macro.spaces} if(valueNode.IsNull() || valueNode.GetAttributeValue("xsi:nil") == "true") { ${macro.memberVarName}[#deserializeXmlSingleElement($member.shape.mapKey, "keyNode")]; } else { + ${macro.spaces} ${macro.memberVarName}[#deserializeXmlSingleElement($member.shape.mapKey, "keyNode")] = + ${macro.spaces} #deserializeXmlSingleElement($member.shape.mapValue, "valueNode", $macro.spaces, false); } +#else ${macro.spaces} ${macro.memberVarName}[#deserializeXmlSingleElement($member.shape.mapKey, "keyNode")] = ${macro.spaces} #deserializeXmlSingleElement($member.shape.mapValue, "valueNode", $macro.spaces, false); +#end #if($member.locationName) ${macro.spaces} ${macro.mapVarName} = ${macro.mapVarName}.NextNode("${member.locationName}"); #else diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlNestedListElement.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlNestedListElement.vm index f04e717dbbb3..015c9b215b24 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlNestedListElement.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlNestedListElement.vm @@ -8,7 +8,15 @@ ${macro.spaces} if(${memberVarName}.IsNull()) { return ${macro.resultVarName}; } ${macro.spaces} XmlNode ${macro.resultVarName}MemberNode = ${memberVarName}.FirstChild("${CppViewHelper.ifNotNullOrEmpty($member.locationName, 'member')}"); ${macro.spaces} while(!${macro.resultVarName}MemberNode.IsNull()) { +#if($member.shape.sparse) + ${macro.spaces} if(${macro.resultVarName}MemberNode.IsNull() || ${macro.resultVarName}MemberNode.GetText().empty()) { + ${macro.spaces} ${macro.resultVarName}.push_back(Aws::Crt::Optional<$CppViewHelper.computeCppType($member.shape.listMember.shape)>{}); + ${macro.spaces} } else { + ${macro.spaces} ${macro.resultVarName}.push_back(#deserializeXmlSingleElement($member.shape.listMember, "${macro.resultVarName}MemberNode")); + ${macro.spaces} } +#else ${macro.spaces} ${macro.resultVarName}.push_back(#deserializeXmlSingleElement($member.shape.listMember, "${macro.resultVarName}MemberNode")); +#end ${macro.spaces} ${macro.resultVarName}MemberNode = ${macro.resultVarName}MemberNode.NextNode("${CppViewHelper.ifNotNullOrEmpty($member.locationName, 'member')}"); ${macro.spaces} } ${macro.spaces} return ${macro.resultVarName}; diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlNestedMapElement.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlNestedMapElement.vm index 2eadbc20f8ec..52ee6eeb9c25 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlNestedMapElement.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlDeserializeTemplateMacros/deserializeXmlNestedMapElement.vm @@ -23,8 +23,17 @@ ${macro.spaces} while(!${macro.resultVarName}EntryNode.IsNull()) { ${macro.spaces} XmlNode ${macro.resultVarName}KeyNode = ${macro.resultVarName}EntryNode.FirstChild("${CppViewHelper.ifNotNullOrEmpty($member.shape.mapKey.locationName, 'key')}"); ${macro.spaces} XmlNode ${macro.resultVarName}ValNode = ${macro.resultVarName}EntryNode.FirstChild("${CppViewHelper.ifNotNullOrEmpty($member.shape.mapValue.locationName, 'value')}"); +#if($member.shape.sparse) + ${macro.spaces} if(${macro.resultVarName}ValNode.IsNull() || ${macro.resultVarName}ValNode.GetText().empty()) { + ${macro.spaces} ${macro.resultVarName}[#deserializeXmlSingleElement($member.shape.mapKey, "${macro.resultVarName}KeyNode")] = Aws::Crt::Optional<$CppViewHelper.computeCppType($member.shape.mapValue.shape)>{}; + ${macro.spaces} } else { + ${macro.spaces} ${macro.resultVarName}[#deserializeXmlSingleElement($member.shape.mapKey, "${macro.resultVarName}KeyNode")] = + ${macro.spaces} #deserializeXmlSingleElement($member.shape.mapValue, "${macro.resultVarName}ValNode", $macro.spaces, false); + ${macro.spaces} } +#else ${macro.spaces} ${macro.resultVarName}[#deserializeXmlSingleElement($member.shape.mapKey, "${macro.resultVarName}KeyNode")] = ${macro.spaces} #deserializeXmlSingleElement($member.shape.mapValue, "${macro.resultVarName}ValNode", $macro.spaces, false); +#end ${macro.spaces} ${macro.resultVarName}EntryNode = ${macro.resultVarName}EntryNode.NextNode("${CppViewHelper.ifNotNullOrEmpty($member.locationName, 'entry')}"); ${macro.spaces} } ${macro.spaces} return ${macro.resultVarName}; diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlSerializeTemplateMacros/serializeXmlListPayloadElement.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlSerializeTemplateMacros/serializeXmlListPayloadElement.vm index cacc0d8899a9..a046ef956287 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlSerializeTemplateMacros/serializeXmlListPayloadElement.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlSerializeTemplateMacros/serializeXmlListPayloadElement.vm @@ -29,6 +29,15 @@ ## if list is flattened than the name of repeated XML element is ShapeMember name in parent name OR explicitly set by parent's locationName #set($macro.listMemberSerializationName = ${CppViewHelper.ifNotNullOrEmpty($member.locationName, $serializationName)}) #end +#if($member.shape.sparse) + ${spaces} if(!${macro.listItemVarName}.has_value()) { + ${spaces} XmlNode ${lowerCaseVarName}NilNode = ${macro.listMemberParentNode}.CreateChildElement("${macro.listMemberSerializationName}"); + ${spaces} ${lowerCaseVarName}NilNode.SetAttributeValue("xsi:nil", "true"); + ${spaces} } else { +#serializeXmlSinglePayloadElement($macro.listSpaces, $macro.listMemberSerializationName, $lowerCaseVarName, $member.shape.listMember, "(*${macro.listItemVarName})", $macro.listMemberParentNode) + ${spaces} } +#else #serializeXmlSinglePayloadElement($macro.listSpaces, $macro.listMemberSerializationName, $lowerCaseVarName, $member.shape.listMember, $macro.listItemVarName, $macro.listMemberParentNode) +#end ${spaces}} #end##macro serializeXmlListPayloadElement \ No newline at end of file diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlSerializeTemplateMacros/serializeXmlMapPayloadElement.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlSerializeTemplateMacros/serializeXmlMapPayloadElement.vm index abd754414e4a..23fa939fe361 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlSerializeTemplateMacros/serializeXmlMapPayloadElement.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/xml/XmlSerializeTemplateMacros/serializeXmlMapPayloadElement.vm @@ -25,6 +25,15 @@ #set($macro.mapKeySerializationName = "#if($member.shape.mapKey.locationName)$member.shape.mapKey.locationName#{else}key#end") #serializeXmlSinglePayloadElement($macro.mapSpaces, $macro.mapKeySerializationName, "${lowerCaseVarName}Key", $member.shape.mapKey, "${macro.mapItemVarName}.first", "${lowerCaseVarName}MapEntryNode") #set($macro.mapValueSerializationName = "#if($member.shape.mapValue.locationName)$member.shape.mapValue.locationName#{else}value#end") +#if($member.shape.sparse) + ${spaces} if(!${macro.mapItemVarName}.second.has_value()) { + ${spaces} XmlNode ${lowerCaseVarName}NilNode = ${lowerCaseVarName}MapEntryNode.CreateChildElement("${macro.mapValueSerializationName}"); + ${spaces} ${lowerCaseVarName}NilNode.SetAttributeValue("xsi:nil", "true"); + ${spaces} } else { +#serializeXmlSinglePayloadElement($macro.mapSpaces, $macro.mapValueSerializationName, "${lowerCaseVarName}Value", $member.shape.mapValue, "(*${macro.mapItemVarName}.second)", "${lowerCaseVarName}MapEntryNode") + ${spaces} } +#else #serializeXmlSinglePayloadElement($macro.mapSpaces, $macro.mapValueSerializationName, "${lowerCaseVarName}Value", $member.shape.mapValue, "${macro.mapItemVarName}.second", "${lowerCaseVarName}MapEntryNode") +#end ${spaces}} #end##macro serializeXmlMapPayloadElement \ No newline at end of file diff --git a/tools/code-generation/protocol-tests/api-descriptions/json-protocol-2018-01-01.normal.json b/tools/code-generation/protocol-tests/api-descriptions/json-protocol-2018-01-01.normal.json index c1054b12c04f..ee8992d3dc72 100644 --- a/tools/code-generation/protocol-tests/api-descriptions/json-protocol-2018-01-01.normal.json +++ b/tools/code-generation/protocol-tests/api-descriptions/json-protocol-2018-01-01.normal.json @@ -180,6 +180,15 @@ }, "input":{"shape":"SimpleScalarPropertiesInputOutput"}, "output":{"shape":"SimpleScalarPropertiesInputOutput"} + }, + "SparseNullsOperation":{ + "name":"SparseNullsOperation", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"SparseNullsOperationInputOutput"}, + "output":{"shape":"SparseNullsOperationInputOutput"} } }, "shapes":{ @@ -211,8 +220,7 @@ }, "ContentTypeParametersOutput":{ "type":"structure", - "members":{ - } + "members":{} }, "DateTime":{ "type":"timestamp", @@ -226,8 +234,7 @@ }, "Document":{ "type":"structure", - "members":{ - }, + "members":{}, "document":true }, "Double":{ @@ -236,8 +243,7 @@ }, "EmptyStruct":{ "type":"structure", - "members":{ - } + "members":{} }, "ErrorWithMembers":{ "type":"structure", @@ -257,8 +263,7 @@ }, "ErrorWithoutMembers":{ "type":"structure", - "members":{ - }, + "members":{}, "exception":true, "fault":true }, @@ -291,8 +296,7 @@ }, "FooError":{ "type":"structure", - "members":{ - }, + "members":{}, "documentation":"

This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.

", "exception":true, "fault":true @@ -520,6 +524,24 @@ "Value":{"shape":"String"} } }, + "SparseNullsOperationInputOutput":{ + "type":"structure", + "members":{ + "sparseStringList":{"shape":"SparseStringList"}, + "sparseStringMap":{"shape":"SparseStringMap"} + } + }, + "SparseStringList":{ + "type":"list", + "member":{"shape":"String"}, + "sparse":true + }, + "SparseStringMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"String"}, + "sparse":true + }, "String":{"type":"string"}, "StringList":{ "type":"list", diff --git a/tools/code-generation/protocol-tests/api-descriptions/rest-json-protocol-2019-12-16.normal.json b/tools/code-generation/protocol-tests/api-descriptions/rest-json-protocol-2019-12-16.normal.json index 1b52f0baf5e1..76bdf764ccae 100644 --- a/tools/code-generation/protocol-tests/api-descriptions/rest-json-protocol-2019-12-16.normal.json +++ b/tools/code-generation/protocol-tests/api-descriptions/rest-json-protocol-2019-12-16.normal.json @@ -21,7 +21,8 @@ "responseCode":200 }, "input":{"shape":"AllQueryStringTypesInput"}, - "documentation":"

This example uses all query string types.

" + "documentation":"

This example uses all query string types.

", + "readonly":true }, "ConstantAndVariableQueryString":{ "name":"ConstantAndVariableQueryString", @@ -31,7 +32,8 @@ "responseCode":200 }, "input":{"shape":"ConstantAndVariableQueryStringInput"}, - "documentation":"

This example uses fixed query string params and variable query string params. The fixed query string parameters and variable parameters must both be serialized (implementations may need to merge them together).

" + "documentation":"

This example uses fixed query string params and variable query string params. The fixed query string parameters and variable parameters must both be serialized (implementations may need to merge them together).

", + "readonly":true }, "ConstantQueryString":{ "name":"ConstantQueryString", @@ -41,7 +43,8 @@ "responseCode":200 }, "input":{"shape":"ConstantQueryStringInput"}, - "documentation":"

This example uses a constant query string parameters and a label. This simply tests that labels and query string parameters are compatible. The fixed query string parameter named "hello" should in no way conflict with the label, {hello}.

" + "documentation":"

This example uses a constant query string parameters and a label. This simply tests that labels and query string parameters are compatible. The fixed query string parameter named "hello" should in no way conflict with the label, {hello}.

", + "readonly":true }, "ContentTypeParameters":{ "name":"ContentTypeParameters", @@ -162,7 +165,8 @@ "method":"GET", "requestUri":"/HostWithPathOperation", "responseCode":200 - } + }, + "readonly":true }, "HttpChecksumRequired":{ "name":"HttpChecksumRequired", @@ -176,6 +180,18 @@ "documentation":"

This example tests httpChecksumRequired trait

", "httpChecksumRequired":true }, + "HttpEmptyPrefixHeaders":{ + "name":"HttpEmptyPrefixHeaders", + "http":{ + "method":"GET", + "requestUri":"/HttpEmptyPrefixHeaders", + "responseCode":200 + }, + "input":{"shape":"HttpEmptyPrefixHeadersInput"}, + "output":{"shape":"HttpEmptyPrefixHeadersOutput"}, + "documentation":"

Clients that perform this test extract all headers from the response.

", + "readonly":true + }, "HttpEnumPayload":{ "name":"HttpEnumPayload", "http":{ @@ -230,7 +246,8 @@ }, "input":{"shape":"HttpPrefixHeadersInput"}, "output":{"shape":"HttpPrefixHeadersOutput"}, - "documentation":"

This examples adds headers to the input of a request and response by prefix.

" + "documentation":"

This examples adds headers to the input of a request and response by prefix.

", + "readonly":true }, "HttpPrefixHeadersInResponse":{ "name":"HttpPrefixHeadersInResponse", @@ -241,7 +258,19 @@ }, "input":{"shape":"HttpPrefixHeadersInResponseInput"}, "output":{"shape":"HttpPrefixHeadersInResponseOutput"}, - "documentation":"

Clients that perform this test extract all headers from the response.

" + "documentation":"

Clients that perform this test extract all headers from the response.

", + "readonly":true + }, + "HttpQueryParamsOnlyOperation":{ + "name":"HttpQueryParamsOnlyOperation", + "http":{ + "method":"GET", + "requestUri":"/http-query-params-only", + "responseCode":200 + }, + "input":{"shape":"HttpQueryParamsOnlyInput"}, + "documentation":"

This example tests httpQueryParams when no other query parameters exist.

", + "readonly":true }, "HttpRequestWithFloatLabels":{ "name":"HttpRequestWithFloatLabels", @@ -250,7 +279,8 @@ "requestUri":"/FloatHttpLabels/{float}/{double}", "responseCode":200 }, - "input":{"shape":"HttpRequestWithFloatLabelsInput"} + "input":{"shape":"HttpRequestWithFloatLabelsInput"}, + "readonly":true }, "HttpRequestWithGreedyLabelInPath":{ "name":"HttpRequestWithGreedyLabelInPath", @@ -259,7 +289,8 @@ "requestUri":"/HttpRequestWithGreedyLabelInPath/foo/{foo}/baz/{baz+}", "responseCode":200 }, - "input":{"shape":"HttpRequestWithGreedyLabelInPathInput"} + "input":{"shape":"HttpRequestWithGreedyLabelInPathInput"}, + "readonly":true }, "HttpRequestWithLabels":{ "name":"HttpRequestWithLabels", @@ -269,7 +300,8 @@ "responseCode":200 }, "input":{"shape":"HttpRequestWithLabelsInput"}, - "documentation":"

The example tests how requests are serialized when there's no input payload but there are HTTP labels.

" + "documentation":"

The example tests how requests are serialized when there's no input payload but there are HTTP labels.

", + "readonly":true }, "HttpRequestWithLabelsAndTimestampFormat":{ "name":"HttpRequestWithLabelsAndTimestampFormat", @@ -279,7 +311,8 @@ "responseCode":200 }, "input":{"shape":"HttpRequestWithLabelsAndTimestampFormatInput"}, - "documentation":"

The example tests how requests serialize different timestamp formats in the URI path.

" + "documentation":"

The example tests how requests serialize different timestamp formats in the URI path.

", + "readonly":true }, "HttpRequestWithRegexLiteral":{ "name":"HttpRequestWithRegexLiteral", @@ -288,7 +321,8 @@ "requestUri":"/ReDosLiteral/{str}/(a+)+", "responseCode":200 }, - "input":{"shape":"HttpRequestWithRegexLiteralInput"} + "input":{"shape":"HttpRequestWithRegexLiteralInput"}, + "readonly":true }, "HttpResponseCode":{ "name":"HttpResponseCode", @@ -318,7 +352,8 @@ "responseCode":200 }, "output":{"shape":"IgnoreQueryParamsInResponseOutput"}, - "documentation":"

This example ensures that query string bound request parameters are serialized in the body of responses if the structure is used in both the request and response.

" + "documentation":"

This example ensures that query string bound request parameters are serialized in the body of responses if the structure is used in both the request and response.

", + "readonly":true }, "InputAndOutputWithHeaders":{ "name":"InputAndOutputWithHeaders", @@ -421,7 +456,8 @@ }, "input":{"shape":"MediaTypeHeaderInput"}, "output":{"shape":"MediaTypeHeaderOutput"}, - "documentation":"

This example ensures that mediaType strings are base64 encoded in headers.

" + "documentation":"

This example ensures that mediaType strings are base64 encoded in headers.

", + "readonly":true }, "NoInputAndNoOutput":{ "name":"NoInputAndNoOutput", @@ -451,7 +487,8 @@ }, "input":{"shape":"NullAndEmptyHeadersIO"}, "output":{"shape":"NullAndEmptyHeadersIO"}, - "documentation":"

Null headers are not sent over the wire, empty headers are serialized to ""

" + "documentation":"

Null headers are not sent over the wire, empty headers are serialized to ""

", + "readonly":true }, "NullAndEmptyHeadersServer":{ "name":"NullAndEmptyHeadersServer", @@ -462,7 +499,8 @@ }, "input":{"shape":"NullAndEmptyHeadersIO"}, "output":{"shape":"NullAndEmptyHeadersIO"}, - "documentation":"

Null headers are not sent over the wire, empty headers are serialized to ""

" + "documentation":"

Null headers are not sent over the wire, empty headers are serialized to ""

", + "readonly":true }, "OmitsNullSerializesEmptyString":{ "name":"OmitsNullSerializesEmptyString", @@ -472,7 +510,8 @@ "responseCode":200 }, "input":{"shape":"OmitsNullSerializesEmptyStringInput"}, - "documentation":"

Omits null, but serializes empty string value.

" + "documentation":"

Omits null, but serializes empty string value.

", + "readonly":true }, "OmitsSerializingEmptyLists":{ "name":"OmitsSerializingEmptyLists", @@ -553,7 +592,8 @@ "responseCode":201 }, "input":{"shape":"ResponseCodeHttpFallbackInputOutput"}, - "output":{"shape":"ResponseCodeHttpFallbackInputOutput"} + "output":{"shape":"ResponseCodeHttpFallbackInputOutput"}, + "readonly":true }, "ResponseCodeRequired":{ "name":"ResponseCodeRequired", @@ -562,7 +602,8 @@ "requestUri":"/responseCodeRequired", "responseCode":200 }, - "output":{"shape":"ResponseCodeRequiredOutput"} + "output":{"shape":"ResponseCodeRequiredOutput"}, + "readonly":true }, "SimpleScalarProperties":{ "name":"SimpleScalarProperties", @@ -575,6 +616,28 @@ "output":{"shape":"SimpleScalarPropertiesInputOutput"}, "idempotent":true }, + "SparseJsonLists":{ + "name":"SparseJsonLists", + "http":{ + "method":"PUT", + "requestUri":"/SparseJsonLists", + "responseCode":200 + }, + "input":{"shape":"SparseJsonListsInputOutput"}, + "output":{"shape":"SparseJsonListsInputOutput"}, + "idempotent":true + }, + "SparseJsonMaps":{ + "name":"SparseJsonMaps", + "http":{ + "method":"POST", + "requestUri":"/SparseJsonMaps", + "responseCode":200 + }, + "input":{"shape":"SparseJsonMapsInputOutput"}, + "output":{"shape":"SparseJsonMapsInputOutput"}, + "documentation":"

This example tests sparse map serialization.

" + }, "TestBodyStructure":{ "name":"TestBodyStructure", "http":{ @@ -595,7 +658,8 @@ "responseCode":200 }, "output":{"shape":"TestNoPayloadInputOutput"}, - "documentation":"

This example GET operation has no input and serializes a request without a HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.

" + "documentation":"

This example GET operation has no input and serializes a request without a HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.

", + "readonly":true }, "TestGetNoPayload":{ "name":"TestGetNoPayload", @@ -606,7 +670,8 @@ }, "input":{"shape":"TestNoPayloadInputOutput"}, "output":{"shape":"TestNoPayloadInputOutput"}, - "documentation":"

This example GET operation serializes a request without a modeled HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.

" + "documentation":"

This example GET operation serializes a request without a modeled HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.

", + "readonly":true }, "TestPayloadBlob":{ "name":"TestPayloadBlob", @@ -854,8 +919,7 @@ }, "ContentTypeParametersOutput":{ "type":"structure", - "members":{ - } + "members":{} }, "DateTime":{ "type":"timestamp", @@ -894,8 +958,7 @@ }, "Document":{ "type":"structure", - "members":{ - }, + "members":{}, "document":true }, "DocumentTypeAsMapValueInputOutput":{ @@ -933,13 +996,11 @@ }, "EmptyInputAndEmptyOutputInput":{ "type":"structure", - "members":{ - } + "members":{} }, "EmptyInputAndEmptyOutputOutput":{ "type":"structure", - "members":{ - } + "members":{} }, "EnumPayloadInput":{ "type":"structure", @@ -981,8 +1042,7 @@ }, "FooError":{ "type":"structure", - "members":{ - }, + "members":{}, "documentation":"

This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.

", "error":{"httpStatusCode":500}, "exception":true, @@ -1030,6 +1090,36 @@ "type":"timestamp", "timestampFormat":"rfc822" }, + "HttpEmptyPrefixHeadersInput":{ + "type":"structure", + "members":{ + "prefixHeaders":{ + "shape":"StringMap", + "location":"headers", + "locationName":"" + }, + "specificHeader":{ + "shape":"String", + "location":"header", + "locationName":"hello" + } + } + }, + "HttpEmptyPrefixHeadersOutput":{ + "type":"structure", + "members":{ + "prefixHeaders":{ + "shape":"StringMap", + "location":"headers", + "locationName":"" + }, + "specificHeader":{ + "shape":"String", + "location":"header", + "locationName":"hello" + } + } + }, "HttpPayloadTraitsInputOutput":{ "type":"structure", "members":{ @@ -1058,8 +1148,7 @@ }, "HttpPrefixHeadersInResponseInput":{ "type":"structure", - "members":{ - } + "members":{} }, "HttpPrefixHeadersInResponseOutput":{ "type":"structure", @@ -1101,6 +1190,15 @@ } } }, + "HttpQueryParamsOnlyInput":{ + "type":"structure", + "members":{ + "queryMap":{ + "shape":"QueryMap", + "location":"querystring" + } + } + }, "HttpRequestWithFloatLabelsInput":{ "type":"structure", "required":[ @@ -1536,8 +1634,7 @@ }, "NoInputAndOutputOutput":{ "type":"structure", - "members":{ - } + "members":{} }, "NullAndEmptyHeadersIO":{ "type":"structure", @@ -1655,6 +1752,11 @@ } } }, + "QueryMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"String"} + }, "QueryParamsAsStringListMapInput":{ "type":"structure", "members":{ @@ -1711,8 +1813,7 @@ }, "ResponseCodeHttpFallbackInputOutput":{ "type":"structure", - "members":{ - } + "members":{} }, "ResponseCodeRequiredOutput":{ "type":"structure", @@ -1746,6 +1847,63 @@ } } }, + "SparseBooleanMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"Boolean"}, + "sparse":true + }, + "SparseJsonListsInputOutput":{ + "type":"structure", + "members":{ + "sparseStringList":{"shape":"SparseStringList"}, + "sparseShortList":{"shape":"SparseShortList"} + } + }, + "SparseJsonMapsInputOutput":{ + "type":"structure", + "members":{ + "sparseStructMap":{"shape":"SparseStructMap"}, + "sparseNumberMap":{"shape":"SparseNumberMap"}, + "sparseBooleanMap":{"shape":"SparseBooleanMap"}, + "sparseStringMap":{"shape":"SparseStringMap"}, + "sparseSetMap":{"shape":"SparseSetMap"} + } + }, + "SparseNumberMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"Integer"}, + "sparse":true + }, + "SparseSetMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"StringSet"}, + "sparse":true + }, + "SparseShortList":{ + "type":"list", + "member":{"shape":"Integer"}, + "sparse":true + }, + "SparseStringList":{ + "type":"list", + "member":{"shape":"String"}, + "sparse":true + }, + "SparseStringMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"String"}, + "sparse":true + }, + "SparseStructMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"GreetingStruct"}, + "sparse":true + }, "String":{"type":"string"}, "StringEnum":{ "type":"string", @@ -1930,6 +2088,5 @@ }, "union":true } - }, - "documentation":"

A REST JSON service that sends JSON requests and responses.

" + } } diff --git a/tools/code-generation/protocol-tests/api-descriptions/rpcv2protocol-2020-07-14.normal.json b/tools/code-generation/protocol-tests/api-descriptions/rpcv2protocol-2020-07-14.normal.json index dff3518f7447..933e1d8effae 100644 --- a/tools/code-generation/protocol-tests/api-descriptions/rpcv2protocol-2020-07-14.normal.json +++ b/tools/code-generation/protocol-tests/api-descriptions/rpcv2protocol-2020-07-14.normal.json @@ -105,6 +105,18 @@ "documentation":"

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal lists.
  2. Normal sets.
  3. Lists of lists.
  4. Lists of structures.
", "idempotent":true }, + "RpcV2CborSparseMaps":{ + "name":"RpcV2CborSparseMaps", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"RpcV2CborSparseMapsInputOutput"}, + "output":{"shape":"RpcV2CborSparseMapsInputOutput"}, + "errors":[ + {"shape":"ValidationException"} + ] + }, "SimpleScalarProperties":{ "name":"SimpleScalarProperties", "http":{ @@ -113,6 +125,15 @@ }, "input":{"shape":"SimpleScalarStructure"}, "output":{"shape":"SimpleScalarStructure"} + }, + "SparseNullsOperation":{ + "name":"SparseNullsOperation", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"SparseNullsOperationInputOutput"}, + "output":{"shape":"SparseNullsOperationInputOutput"} } }, "shapes":{ @@ -179,8 +200,7 @@ }, "EmptyStructure":{ "type":"structure", - "members":{ - } + "members":{} }, "Float":{ "type":"float", @@ -302,6 +322,16 @@ "blobList":{"shape":"BlobList"} } }, + "RpcV2CborSparseMapsInputOutput":{ + "type":"structure", + "members":{ + "sparseStructMap":{"shape":"SparseStructMap"}, + "sparseNumberMap":{"shape":"SparseNumberMap"}, + "sparseBooleanMap":{"shape":"SparseBooleanMap"}, + "sparseStringMap":{"shape":"SparseStringMap"}, + "sparseSetMap":{"shape":"SparseSetMap"} + } + }, "SimpleScalarStructure":{ "type":"structure", "members":{ @@ -323,6 +353,48 @@ "value":{"shape":"String"} } }, + "SparseBooleanMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"Boolean"}, + "sparse":true + }, + "SparseNullsOperationInputOutput":{ + "type":"structure", + "members":{ + "sparseStringList":{"shape":"SparseStringList"}, + "sparseStringMap":{"shape":"SparseStringMap"} + } + }, + "SparseNumberMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"Integer"}, + "sparse":true + }, + "SparseSetMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"StringSet"}, + "sparse":true + }, + "SparseStringList":{ + "type":"list", + "member":{"shape":"String"}, + "sparse":true + }, + "SparseStringMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"String"}, + "sparse":true + }, + "SparseStructMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"GreetingStruct"}, + "sparse":true + }, "String":{"type":"string"}, "StringList":{ "type":"list", diff --git a/tools/code-generation/protocol-tests/input/json.json b/tools/code-generation/protocol-tests/input/json.json index 2187e52a5260..add87a2beecf 100644 --- a/tools/code-generation/protocol-tests/input/json.json +++ b/tools/code-generation/protocol-tests/input/json.json @@ -2,18 +2,28 @@ { "description": "Test cases for EmptyOperation operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": {}, "cases": [ { "id": "sends_requests_to_slash", + "description": "Sends requests to /", "given": { "name": "EmptyOperation", "http": { @@ -21,19 +31,19 @@ "requestUri": "/" } }, - "description": "Sends requests to /", "params": {}, "serialized": { "method": "POST", "uri": "/", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.EmptyOperation" + "X-Amz-Target": "JsonProtocol.EmptyOperation", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "includes_x_amz_target_and_content_type", + "description": "Includes X-Amz-Target header and Content-Type", "given": { "name": "EmptyOperation", "http": { @@ -41,19 +51,19 @@ "requestUri": "/" } }, - "description": "Includes X-Amz-Target header and Content-Type", "params": {}, "serialized": { "method": "POST", "uri": "/", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.EmptyOperation" + "X-Amz-Target": "JsonProtocol.EmptyOperation", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "json_1_1_client_sends_empty_payload_for_no_input_shape", + "description": "Clients must always send an empty JSON object payload for\noperations with no input (that is, `{}`). While AWS service\nimplementations support requests with no payload or requests\nthat send `{}`, always sending `{}` from the client is\npreferred for forward compatibility in case input is ever\nadded to an operation.", "given": { "name": "EmptyOperation", "http": { @@ -61,15 +71,14 @@ "requestUri": "/" } }, - "description": "Clients must always send an empty JSON object payload for\noperations with no input (that is, `{}`). While AWS service\nimplementations support requests with no payload or requests\nthat send `{}`, always sending `{}` from the client is\npreferred for forward compatibility in case input is ever\nadded to an operation.", "params": {}, "serialized": { "method": "POST", "uri": "/", "body": "{}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.EmptyOperation" + "X-Amz-Target": "JsonProtocol.EmptyOperation", + "Content-Type": "application/x-amz-json-1.1" } } } @@ -77,19 +86,30 @@ }, { "description": "Test cases for EndpointOperation operation", + "clientEndpoint": "https://example.com", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": {}, "cases": [ { "id": "AwsJson11EndpointTrait", + "description": "Operations can prepend to the given host if they define the\nendpoint trait.", "given": { "name": "EndpointOperation", "http": { @@ -100,32 +120,40 @@ "hostPrefix": "foo." } }, - "description": "Operations can prepend to the given host if they define the\nendpoint trait.", "params": {}, "serialized": { "method": "POST", "uri": "/", "body": "{}", + "host": "foo.example.com", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.EndpointOperation" - }, - "host": "foo.example.com" + "X-Amz-Target": "JsonProtocol.EndpointOperation", + "Content-Type": "application/x-amz-json-1.1" + } } } - ], - "clientEndpoint": "https://example.com" + ] }, { "description": "Test cases for EndpointWithHostLabelOperation operation", + "clientEndpoint": "https://example.com", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { "HostLabelInput": { @@ -147,6 +175,7 @@ "cases": [ { "id": "AwsJson11EndpointTraitWithHostLabel", + "description": "Operations can prepend to the given host if they define the\nendpoint trait, and can use the host label trait to define\nfurther customization based on user input.", "given": { "name": "EndpointWithHostLabelOperation", "http": { @@ -160,7 +189,6 @@ "hostPrefix": "foo.{label}." } }, - "description": "Operations can prepend to the given host if they define the\nendpoint trait, and can use the host label trait to define\nfurther customization based on user input.", "params": { "label": "bar" }, @@ -168,31 +196,41 @@ "method": "POST", "uri": "/", "body": "{\"label\": \"bar\"}", + "host": "foo.bar.example.com", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.EndpointWithHostLabelOperation" - }, - "host": "foo.bar.example.com" + "X-Amz-Target": "JsonProtocol.EndpointWithHostLabelOperation", + "Content-Type": "application/x-amz-json-1.1" + } } } - ], - "clientEndpoint": "https://example.com" + ] }, { "description": "Test cases for HostWithPathOperation operation", + "clientEndpoint": "https://example.com/custom", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": {}, "cases": [ { "id": "AwsJson11HostWithPath", + "description": "Custom endpoints supplied by users can have paths", "given": { "name": "HostWithPathOperation", "http": { @@ -200,57 +238,41 @@ "requestUri": "/" } }, - "description": "Custom endpoints supplied by users can have paths", "params": {}, "serialized": { "method": "POST", "uri": "/custom/", "body": "{}", + "host": "example.com/custom", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.HostWithPathOperation" - }, - "host": "example.com/custom" + "X-Amz-Target": "JsonProtocol.HostWithPathOperation", + "Content-Type": "application/x-amz-json-1.1" + } } } - ], - "clientEndpoint": "https://example.com/custom" + ] }, { "description": "Test cases for JsonEnums operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { - "JsonEnumsInputOutput": { - "type": "structure", - "members": { - "fooEnum1": { - "shape": "FooEnum" - }, - "fooEnum2": { - "shape": "FooEnum" - }, - "fooEnum3": { - "shape": "FooEnum" - }, - "fooEnumList": { - "shape": "FooEnumList" - }, - "fooEnumSet": { - "shape": "FooEnumSet" - }, - "fooEnumMap": { - "shape": "FooEnumMap" - } - } - }, "FooEnum": { "type": "string", "enum": [ @@ -267,12 +289,6 @@ "shape": "FooEnum" } }, - "FooEnumSet": { - "type": "list", - "member": { - "shape": "FooEnum" - } - }, "FooEnumMap": { "type": "map", "key": { @@ -282,6 +298,35 @@ "shape": "FooEnum" } }, + "FooEnumSet": { + "type": "list", + "member": { + "shape": "FooEnum" + } + }, + "JsonEnumsInputOutput": { + "type": "structure", + "members": { + "fooEnum1": { + "shape": "FooEnum" + }, + "fooEnum2": { + "shape": "FooEnum" + }, + "fooEnum3": { + "shape": "FooEnum" + }, + "fooEnumList": { + "shape": "FooEnumList" + }, + "fooEnumSet": { + "shape": "FooEnumSet" + }, + "fooEnumMap": { + "shape": "FooEnumMap" + } + } + }, "String": { "type": "string" } @@ -289,6 +334,7 @@ "cases": [ { "id": "AwsJson11Enums", + "description": "Serializes simple scalar properties", "given": { "name": "JsonEnums", "http": { @@ -301,7 +347,6 @@ "documentation": "

This example serializes enums as top level properties, in lists, sets, and maps.

", "idempotent": true }, - "description": "Serializes simple scalar properties", "params": { "fooEnum1": "Foo", "fooEnum2": "0", @@ -324,8 +369,8 @@ "uri": "/", "body": "{\n \"fooEnum1\": \"Foo\",\n \"fooEnum2\": \"0\",\n \"fooEnum3\": \"1\",\n \"fooEnumList\": [\n \"Foo\",\n \"0\"\n ],\n \"fooEnumSet\": [\n \"Foo\",\n \"0\"\n ],\n \"fooEnumMap\": {\n \"hi\": \"Foo\",\n \"zero\": \"0\"\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonEnums" + "X-Amz-Target": "JsonProtocol.JsonEnums", + "Content-Type": "application/x-amz-json-1.1" } } } @@ -334,15 +379,49 @@ { "description": "Test cases for JsonIntEnums operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { + "IntegerEnum": { + "type": "integer", + "box": true + }, + "IntegerEnumList": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, + "IntegerEnumMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "IntegerEnum" + } + }, + "IntegerEnumSet": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, "JsonIntEnumsInputOutput": { "type": "structure", "members": { @@ -366,31 +445,6 @@ } } }, - "IntegerEnum": { - "type": "integer", - "box": true - }, - "IntegerEnumList": { - "type": "list", - "member": { - "shape": "IntegerEnum" - } - }, - "IntegerEnumSet": { - "type": "list", - "member": { - "shape": "IntegerEnum" - } - }, - "IntegerEnumMap": { - "type": "map", - "key": { - "shape": "String" - }, - "value": { - "shape": "IntegerEnum" - } - }, "String": { "type": "string" } @@ -398,6 +452,7 @@ "cases": [ { "id": "AwsJson11IntEnums", + "description": "Serializes simple scalar properties", "given": { "name": "JsonIntEnums", "http": { @@ -410,7 +465,6 @@ "documentation": "

This example serializes intEnums as top level properties, in lists, sets, and maps.

", "idempotent": true }, - "description": "Serializes simple scalar properties", "params": { "intEnum1": 1, "intEnum2": 2, @@ -433,8 +487,8 @@ "uri": "/", "body": "{\n \"intEnum1\": 1,\n \"intEnum2\": 2,\n \"intEnum3\": 3,\n \"intEnumList\": [\n 1,\n 2\n ],\n \"intEnumSet\": [\n 1,\n 2\n ],\n \"intEnumMap\": {\n \"a\": 1,\n \"b\": 2\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonIntEnums" + "X-Amz-Target": "JsonProtocol.JsonIntEnums", + "Content-Type": "application/x-amz-json-1.1" } } } @@ -443,23 +497,52 @@ { "description": "Test cases for JsonUnions operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { - "UnionInputOutput": { + "Blob": { + "type": "blob" + }, + "Boolean": { + "type": "boolean", + "box": true + }, + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] + }, + "GreetingStruct": { "type": "structure", "members": { - "contents": { - "shape": "MyUnion" + "hi": { + "shape": "String" } - }, - "documentation": "

A shared structure that contains a single union member.

" + } + }, + "Integer": { + "type": "integer", + "box": true }, "MyUnion": { "type": "structure", @@ -498,30 +581,6 @@ "String": { "type": "string" }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true - }, - "Blob": { - "type": "blob" - }, - "Timestamp": { - "type": "timestamp" - }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, "StringList": { "type": "list", "member": { @@ -537,18 +596,23 @@ "shape": "String" } }, - "GreetingStruct": { + "Timestamp": { + "type": "timestamp" + }, + "UnionInputOutput": { "type": "structure", "members": { - "hi": { - "shape": "String" + "contents": { + "shape": "MyUnion" } - } + }, + "documentation": "

A shared structure that contains a single union member.

" } }, "cases": [ { "id": "AwsJson11SerializeStringUnionValue", + "description": "Serializes a string union value", "given": { "name": "JsonUnions", "http": { @@ -561,7 +625,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a string union value", "params": { "contents": { "stringValue": "foo" @@ -572,13 +635,14 @@ "uri": "/", "body": "{\n \"contents\": {\n \"stringValue\": \"foo\"\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonUnions" + "X-Amz-Target": "JsonProtocol.JsonUnions", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "AwsJson11SerializeBooleanUnionValue", + "description": "Serializes a boolean union value", "given": { "name": "JsonUnions", "http": { @@ -591,7 +655,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a boolean union value", "params": { "contents": { "booleanValue": true @@ -602,13 +665,14 @@ "uri": "/", "body": "{\n \"contents\": {\n \"booleanValue\": true\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonUnions" + "X-Amz-Target": "JsonProtocol.JsonUnions", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "AwsJson11SerializeNumberUnionValue", + "description": "Serializes a number union value", "given": { "name": "JsonUnions", "http": { @@ -621,7 +685,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a number union value", "params": { "contents": { "numberValue": 1 @@ -632,13 +695,14 @@ "uri": "/", "body": "{\n \"contents\": {\n \"numberValue\": 1\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonUnions" + "X-Amz-Target": "JsonProtocol.JsonUnions", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "AwsJson11SerializeBlobUnionValue", + "description": "Serializes a blob union value", "given": { "name": "JsonUnions", "http": { @@ -651,7 +715,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a blob union value", "params": { "contents": { "blobValue": "foo" @@ -662,13 +725,14 @@ "uri": "/", "body": "{\n \"contents\": {\n \"blobValue\": \"Zm9v\"\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonUnions" + "X-Amz-Target": "JsonProtocol.JsonUnions", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "AwsJson11SerializeTimestampUnionValue", + "description": "Serializes a timestamp union value", "given": { "name": "JsonUnions", "http": { @@ -681,7 +745,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a timestamp union value", "params": { "contents": { "timestampValue": 1398796238 @@ -692,13 +755,14 @@ "uri": "/", "body": "{\n \"contents\": {\n \"timestampValue\": 1398796238\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonUnions" + "X-Amz-Target": "JsonProtocol.JsonUnions", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "AwsJson11SerializeEnumUnionValue", + "description": "Serializes an enum union value", "given": { "name": "JsonUnions", "http": { @@ -711,7 +775,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes an enum union value", "params": { "contents": { "enumValue": "Foo" @@ -722,13 +785,14 @@ "uri": "/", "body": "{\n \"contents\": {\n \"enumValue\": \"Foo\"\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonUnions" + "X-Amz-Target": "JsonProtocol.JsonUnions", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "AwsJson11SerializeListUnionValue", + "description": "Serializes a list union value", "given": { "name": "JsonUnions", "http": { @@ -741,7 +805,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a list union value", "params": { "contents": { "listValue": [ @@ -755,13 +818,14 @@ "uri": "/", "body": "{\n \"contents\": {\n \"listValue\": [\"foo\", \"bar\"]\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonUnions" + "X-Amz-Target": "JsonProtocol.JsonUnions", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "AwsJson11SerializeMapUnionValue", + "description": "Serializes a map union value", "given": { "name": "JsonUnions", "http": { @@ -774,7 +838,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a map union value", "params": { "contents": { "mapValue": { @@ -788,13 +851,14 @@ "uri": "/", "body": "{\n \"contents\": {\n \"mapValue\": {\n \"foo\": \"bar\",\n \"spam\": \"eggs\"\n }\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonUnions" + "X-Amz-Target": "JsonProtocol.JsonUnions", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "AwsJson11SerializeStructureUnionValue", + "description": "Serializes a structure union value", "given": { "name": "JsonUnions", "http": { @@ -807,7 +871,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a structure union value", "params": { "contents": { "structureValue": { @@ -820,8 +883,8 @@ "uri": "/", "body": "{\n \"contents\": {\n \"structureValue\": {\n \"hi\": \"hello\"\n }\n }\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonUnions" + "X-Amz-Target": "JsonProtocol.JsonUnions", + "Content-Type": "application/x-amz-json-1.1" } } } @@ -830,15 +893,50 @@ { "description": "Test cases for KitchenSinkOperation operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { + "Blob": { + "type": "blob" + }, + "Boolean": { + "type": "boolean", + "box": true + }, + "Double": { + "type": "double", + "box": true + }, + "EmptyStruct": { + "type": "structure", + "members": {} + }, + "Float": { + "type": "float", + "box": true + }, + "Integer": { + "type": "integer", + "box": true + }, + "JsonValue": { + "type": "string" + }, "KitchenSink": { "type": "structure", "members": { @@ -909,53 +1007,25 @@ "SimpleStruct": { "shape": "SimpleStruct" }, - "String": { - "shape": "String" - }, - "StructWithJsonName": { - "shape": "StructWithJsonName" - }, - "Timestamp": { - "shape": "Timestamp" - }, - "UnixTimestamp": { - "shape": "SyntheticTimestamp_epoch_seconds" - } - } - }, - "Blob": { - "type": "blob" - }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Double": { - "type": "double", - "box": true - }, - "EmptyStruct": { - "type": "structure", - "members": {} - }, - "Float": { - "type": "float", - "box": true - }, - "SyntheticTimestamp_http_date": { - "type": "timestamp", - "timestampFormat": "rfc822" - }, - "Integer": { - "type": "integer", - "box": true - }, - "SyntheticTimestamp_date_time": { - "type": "timestamp", - "timestampFormat": "iso8601" + "String": { + "shape": "String" + }, + "StructWithJsonName": { + "shape": "StructWithJsonName" + }, + "Timestamp": { + "shape": "Timestamp" + }, + "UnixTimestamp": { + "shape": "SyntheticTimestamp_epoch_seconds" + } + } }, - "JsonValue": { - "type": "string" + "ListOfKitchenSinks": { + "type": "list", + "member": { + "shape": "KitchenSink" + } }, "ListOfListOfStrings": { "type": "list", @@ -985,6 +1055,15 @@ "type": "long", "box": true }, + "MapOfKitchenSinks": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "KitchenSink" + } + }, "MapOfListsOfStrings": { "type": "map", "key": { @@ -1021,21 +1100,6 @@ "shape": "SimpleStruct" } }, - "ListOfKitchenSinks": { - "type": "list", - "member": { - "shape": "KitchenSink" - } - }, - "MapOfKitchenSinks": { - "type": "map", - "key": { - "shape": "String" - }, - "value": { - "shape": "KitchenSink" - } - }, "SimpleStruct": { "type": "structure", "members": { @@ -1055,17 +1119,26 @@ } } }, - "Timestamp": { - "type": "timestamp" + "SyntheticTimestamp_date_time": { + "type": "timestamp", + "timestampFormat": "iso8601" }, "SyntheticTimestamp_epoch_seconds": { "type": "timestamp", "timestampFormat": "unixTimestamp" + }, + "SyntheticTimestamp_http_date": { + "type": "timestamp", + "timestampFormat": "rfc822" + }, + "Timestamp": { + "type": "timestamp" } }, "cases": [ { "id": "serializes_string_shapes", + "description": "Serializes string shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1076,7 +1149,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes string shapes", "params": { "String": "abc xyz" }, @@ -1085,8 +1157,8 @@ "uri": "/", "body": "{\"String\":\"abc xyz\"}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1095,6 +1167,7 @@ }, { "id": "serializes_string_shapes_with_jsonvalue_trait", + "description": "Serializes string shapes with jsonvalue trait", "given": { "name": "KitchenSinkOperation", "http": { @@ -1105,7 +1178,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes string shapes with jsonvalue trait", "params": { "JsonValue": "{\"string\":\"value\",\"number\":1234.5,\"boolTrue\":true,\"boolFalse\":false,\"array\":[1,2,3,4],\"object\":{\"key\":\"value\"},\"null\":null}" }, @@ -1114,8 +1186,8 @@ "uri": "/", "body": "{\"JsonValue\":\"{\\\"string\\\":\\\"value\\\",\\\"number\\\":1234.5,\\\"boolTrue\\\":true,\\\"boolFalse\\\":false,\\\"array\\\":[1,2,3,4],\\\"object\\\":{\\\"key\\\":\\\"value\\\"},\\\"null\\\":null}\"}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1124,6 +1196,7 @@ }, { "id": "serializes_integer_shapes", + "description": "Serializes integer shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1134,7 +1207,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes integer shapes", "params": { "Integer": 1234 }, @@ -1143,8 +1215,8 @@ "uri": "/", "body": "{\"Integer\":1234}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1153,6 +1225,7 @@ }, { "id": "serializes_long_shapes", + "description": "Serializes long shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1163,7 +1236,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes long shapes", "params": { "Long": 999999999999 }, @@ -1172,8 +1244,8 @@ "uri": "/", "body": "{\"Long\":999999999999}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1182,6 +1254,7 @@ }, { "id": "serializes_float_shapes", + "description": "Serializes float shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1192,7 +1265,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes float shapes", "params": { "Float": 1234.5 }, @@ -1201,8 +1273,8 @@ "uri": "/", "body": "{\"Float\":1234.5}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1211,6 +1283,7 @@ }, { "id": "serializes_double_shapes", + "description": "Serializes double shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1221,7 +1294,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes double shapes", "params": { "Double": 1234.5 }, @@ -1230,8 +1302,8 @@ "uri": "/", "body": "{\"Double\":1234.5}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1240,6 +1312,7 @@ }, { "id": "serializes_blob_shapes", + "description": "Serializes blob shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1250,7 +1323,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes blob shapes", "params": { "Blob": "binary-value" }, @@ -1259,8 +1331,8 @@ "uri": "/", "body": "{\"Blob\":\"YmluYXJ5LXZhbHVl\"}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1269,6 +1341,7 @@ }, { "id": "serializes_boolean_shapes_true", + "description": "Serializes boolean shapes (true)", "given": { "name": "KitchenSinkOperation", "http": { @@ -1279,7 +1352,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes boolean shapes (true)", "params": { "Boolean": true }, @@ -1288,8 +1360,8 @@ "uri": "/", "body": "{\"Boolean\":true}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1298,6 +1370,7 @@ }, { "id": "serializes_boolean_shapes_false", + "description": "Serializes boolean shapes (false)", "given": { "name": "KitchenSinkOperation", "http": { @@ -1308,7 +1381,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes boolean shapes (false)", "params": { "Boolean": false }, @@ -1317,8 +1389,8 @@ "uri": "/", "body": "{\"Boolean\":false}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1327,6 +1399,7 @@ }, { "id": "serializes_timestamp_shapes", + "description": "Serializes timestamp shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1337,7 +1410,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes timestamp shapes", "params": { "Timestamp": 946845296 }, @@ -1346,8 +1418,8 @@ "uri": "/", "body": "{\"Timestamp\":946845296}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1356,6 +1428,7 @@ }, { "id": "serializes_timestamp_shapes_with_iso8601_timestampformat", + "description": "Serializes timestamp shapes with iso8601 timestampFormat", "given": { "name": "KitchenSinkOperation", "http": { @@ -1366,7 +1439,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes timestamp shapes with iso8601 timestampFormat", "params": { "Iso8601Timestamp": 946845296 }, @@ -1375,8 +1447,8 @@ "uri": "/", "body": "{\"Iso8601Timestamp\":\"2000-01-02T20:34:56Z\"}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1385,6 +1457,7 @@ }, { "id": "serializes_timestamp_shapes_with_httpdate_timestampformat", + "description": "Serializes timestamp shapes with httpdate timestampFormat", "given": { "name": "KitchenSinkOperation", "http": { @@ -1395,7 +1468,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes timestamp shapes with httpdate timestampFormat", "params": { "HttpdateTimestamp": 946845296 }, @@ -1404,8 +1476,8 @@ "uri": "/", "body": "{\"HttpdateTimestamp\":\"Sun, 02 Jan 2000 20:34:56 GMT\"}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1414,6 +1486,7 @@ }, { "id": "serializes_timestamp_shapes_with_unixtimestamp_timestampformat", + "description": "Serializes timestamp shapes with unixTimestamp timestampFormat", "given": { "name": "KitchenSinkOperation", "http": { @@ -1424,7 +1497,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes timestamp shapes with unixTimestamp timestampFormat", "params": { "UnixTimestamp": 946845296 }, @@ -1433,8 +1505,8 @@ "uri": "/", "body": "{\"UnixTimestamp\":946845296}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1443,6 +1515,7 @@ }, { "id": "serializes_list_shapes", + "description": "Serializes list shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1453,7 +1526,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes list shapes", "params": { "ListOfStrings": [ "abc", @@ -1466,8 +1538,8 @@ "uri": "/", "body": "{\"ListOfStrings\":[\"abc\",\"mno\",\"xyz\"]}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1476,6 +1548,7 @@ }, { "id": "serializes_empty_list_shapes", + "description": "Serializes empty list shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1486,7 +1559,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes empty list shapes", "params": { "ListOfStrings": [] }, @@ -1495,8 +1567,8 @@ "uri": "/", "body": "{\"ListOfStrings\":[]}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1505,6 +1577,7 @@ }, { "id": "serializes_list_of_map_shapes", + "description": "Serializes list of map shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1515,7 +1588,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes list of map shapes", "params": { "ListOfMapsOfStrings": [ { @@ -1534,8 +1606,8 @@ "uri": "/", "body": "{\"ListOfMapsOfStrings\":[{\"foo\":\"bar\"},{\"abc\":\"xyz\"},{\"red\":\"blue\"}]}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1544,6 +1616,7 @@ }, { "id": "serializes_list_of_structure_shapes", + "description": "Serializes list of structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1554,7 +1627,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes list of structure shapes", "params": { "ListOfStructs": [ { @@ -1573,8 +1645,8 @@ "uri": "/", "body": "{\"ListOfStructs\":[{\"Value\":\"abc\"},{\"Value\":\"mno\"},{\"Value\":\"xyz\"}]}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1583,6 +1655,7 @@ }, { "id": "serializes_list_of_recursive_structure_shapes", + "description": "Serializes list of recursive structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1593,7 +1666,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes list of recursive structure shapes", "params": { "RecursiveList": [ { @@ -1614,8 +1686,8 @@ "uri": "/", "body": "{\"RecursiveList\":[{\"RecursiveList\":[{\"RecursiveList\":[{\"Integer\":123}]}]}]}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1624,6 +1696,7 @@ }, { "id": "serializes_map_shapes", + "description": "Serializes map shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1634,7 +1707,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes map shapes", "params": { "MapOfStrings": { "abc": "xyz", @@ -1646,8 +1718,8 @@ "uri": "/", "body": "{\"MapOfStrings\":{\"abc\":\"xyz\",\"mno\":\"hjk\"}}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1656,6 +1728,7 @@ }, { "id": "serializes_empty_map_shapes", + "description": "Serializes empty map shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1666,7 +1739,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes empty map shapes", "params": { "MapOfStrings": {} }, @@ -1675,8 +1747,8 @@ "uri": "/", "body": "{\"MapOfStrings\":{}}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1685,6 +1757,7 @@ }, { "id": "serializes_map_of_list_shapes", + "description": "Serializes map of list shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1695,7 +1768,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes map of list shapes", "params": { "MapOfListsOfStrings": { "abc": [ @@ -1713,8 +1785,8 @@ "uri": "/", "body": "{\"MapOfListsOfStrings\":{\"abc\":[\"abc\",\"xyz\"],\"mno\":[\"xyz\",\"abc\"]}}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1723,6 +1795,7 @@ }, { "id": "serializes_map_of_structure_shapes", + "description": "Serializes map of structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1733,7 +1806,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes map of structure shapes", "params": { "MapOfStructs": { "key1": { @@ -1749,8 +1821,8 @@ "uri": "/", "body": "{\"MapOfStructs\":{\"key1\":{\"Value\":\"value-1\"},\"key2\":{\"Value\":\"value-2\"}}}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1759,6 +1831,7 @@ }, { "id": "serializes_map_of_recursive_structure_shapes", + "description": "Serializes map of recursive structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1769,7 +1842,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes map of recursive structure shapes", "params": { "RecursiveMap": { "key1": { @@ -1790,8 +1862,8 @@ "uri": "/", "body": "{\"RecursiveMap\":{\"key1\":{\"RecursiveMap\":{\"key2\":{\"RecursiveMap\":{\"key3\":{\"Boolean\":false}}}}}}}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1800,6 +1872,7 @@ }, { "id": "serializes_structure_shapes", + "description": "Serializes structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1810,7 +1883,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes structure shapes", "params": { "SimpleStruct": { "Value": "abc" @@ -1821,8 +1893,8 @@ "uri": "/", "body": "{\"SimpleStruct\":{\"Value\":\"abc\"}}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1831,6 +1903,7 @@ }, { "id": "serializes_structure_members_with_locationname_traits", + "description": "Serializes structure members with locationName traits", "given": { "name": "KitchenSinkOperation", "http": { @@ -1841,7 +1914,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes structure members with locationName traits", "params": { "StructWithJsonName": { "Value": "some-value" @@ -1852,8 +1924,8 @@ "uri": "/", "body": "{\"StructWithJsonName\":{\"Value\":\"some-value\"}}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1862,6 +1934,7 @@ }, { "id": "serializes_empty_structure_shapes", + "description": "Serializes empty structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1872,7 +1945,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes empty structure shapes", "params": { "SimpleStruct": {} }, @@ -1881,8 +1953,8 @@ "uri": "/", "body": "{\"SimpleStruct\":{}}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1891,6 +1963,7 @@ }, { "id": "serializes_structure_which_have_no_members", + "description": "Serializes structure which have no members", "given": { "name": "KitchenSinkOperation", "http": { @@ -1901,7 +1974,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes structure which have no members", "params": { "EmptyStruct": {} }, @@ -1910,8 +1982,8 @@ "uri": "/", "body": "{\"EmptyStruct\":{}}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1920,6 +1992,7 @@ }, { "id": "serializes_recursive_structure_shapes", + "description": "Serializes recursive structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1930,7 +2003,6 @@ "shape": "KitchenSink" } }, - "description": "Serializes recursive structure shapes", "params": { "String": "top-value", "Boolean": false, @@ -1957,8 +2029,8 @@ "uri": "/", "body": "{\"String\":\"top-value\",\"Boolean\":false,\"RecursiveStruct\":{\"String\":\"nested-value\",\"Boolean\":true,\"RecursiveList\":[{\"String\":\"string-only\"},{\"RecursiveStruct\":{\"MapOfStrings\":{\"color\":\"red\",\"size\":\"large\"}}}]}}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.KitchenSinkOperation" + "X-Amz-Target": "JsonProtocol.KitchenSinkOperation", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -1970,13 +2042,22 @@ { "description": "Test cases for NullOperation operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { "NullOperationInputOutput": { @@ -1994,6 +2075,7 @@ "cases": [ { "id": "AwsJson11StructuresDontSerializeNullValues", + "description": "Null structure values are dropped", "given": { "name": "NullOperation", "http": { @@ -2004,7 +2086,6 @@ "shape": "NullOperationInputOutput" } }, - "description": "Null structure values are dropped", "params": { "string": null }, @@ -2013,8 +2094,8 @@ "uri": "/", "body": "{}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.NullOperation" + "X-Amz-Target": "JsonProtocol.NullOperation", + "Content-Type": "application/x-amz-json-1.1" } } } @@ -2023,13 +2104,22 @@ { "description": "Test cases for OperationWithOptionalInputOutput operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { "OperationWithOptionalInputOutputInput": { @@ -2047,6 +2137,7 @@ "cases": [ { "id": "can_call_operation_with_no_input_or_output", + "description": "Can call operations with no input or output", "given": { "name": "OperationWithOptionalInputOutput", "http": { @@ -2057,20 +2148,20 @@ "shape": "OperationWithOptionalInputOutputInput" } }, - "description": "Can call operations with no input or output", "params": {}, "serialized": { "method": "POST", "uri": "/", "body": "{}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.OperationWithOptionalInputOutput" + "X-Amz-Target": "JsonProtocol.OperationWithOptionalInputOutput", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "can_call_operation_with_optional_input", + "description": "Can invoke operations with optional input", "given": { "name": "OperationWithOptionalInputOutput", "http": { @@ -2081,7 +2172,6 @@ "shape": "OperationWithOptionalInputOutputInput" } }, - "description": "Can invoke operations with optional input", "params": { "Value": "Hi" }, @@ -2090,8 +2180,8 @@ "uri": "/", "body": "{\"Value\":\"Hi\"}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.OperationWithOptionalInputOutput" + "X-Amz-Target": "JsonProtocol.OperationWithOptionalInputOutput", + "Content-Type": "application/x-amz-json-1.1" } } } @@ -2100,15 +2190,29 @@ { "description": "Test cases for PutAndGetInlineDocuments operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { + "Document": { + "type": "structure", + "members": {}, + "document": true + }, "PutAndGetInlineDocumentsInputOutput": { "type": "structure", "members": { @@ -2116,16 +2220,12 @@ "shape": "Document" } } - }, - "Document": { - "type": "structure", - "members": {}, - "document": true } }, "cases": [ { "id": "PutAndGetInlineDocumentsInput", + "description": "Serializes inline documents in a JSON request.", "given": { "name": "PutAndGetInlineDocuments", "http": { @@ -2137,7 +2237,6 @@ }, "documentation": "

This example serializes an inline document as part of the payload.

" }, - "description": "Serializes inline documents in a JSON request.", "params": { "inlineDocument": { "foo": "bar" @@ -2148,8 +2247,8 @@ "uri": "/", "body": "{\n \"inlineDocument\": {\"foo\": \"bar\"}\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.PutAndGetInlineDocuments" + "X-Amz-Target": "JsonProtocol.PutAndGetInlineDocuments", + "Content-Type": "application/x-amz-json-1.1" }, "requireHeaders": [ "Content-Length" @@ -2161,13 +2260,22 @@ { "description": "Test cases for PutWithContentEncoding operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { "PutWithContentEncodingInput": { @@ -2188,6 +2296,7 @@ "cases": [ { "id": "SDKAppliedContentEncoding_awsJson1_1", + "description": "Compression algorithm encoding is appended to the Content-Encoding header.", "given": { "name": "PutWithContentEncoding", "http": { @@ -2203,7 +2312,6 @@ ] } }, - "description": "Compression algorithm encoding is appended to the Content-Encoding header.", "params": { "data": "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsmcKPr1crqiXjM\noVWdM4ObOO6QA7Pu4c1hT68CrTmbcecjFcxHkgsqdixnFtN6keMGL9Z2YMjZOjYYzbUEwLJqUVWalkIB\nBkgBRqZpzxx5nB5t0qDH35KjsfKM5cinQaFoRq9y9Z82xdCoKZOsUbxZkk1kVmy1jPDCBhkhixkc5PKS\nFoSKTbeK7kuCEZCtR9OfF2k2MqbygGFsFu2sgb1Zn2YdDbaRwRGeaLhswta09UNSMUo8aTixgoYVHxwy\nvraLB6olPSPegeLOnmBeWyKmEfPdbpdGm4ev4vA2AUFuLIeFz0LkCSN0NgQMrr8ALEm1UNpJLReg1ZAX\nzZh7gtQTZUaBVdMJokaJpLk6FPxSA6zkwB5TegSqhrFIsmvpY3VNWmTUq7H0iADdh3dRQ8Is97bTsbwu\nvAEOjh4FQ9wPSFzEtcSJeYQft5GfWYPisDImjjvHVFshFFkNy2nN18pJmhVPoJc456tgbdfEIdGhIADC\n6UPcSSzE1FxlPpILqZrp3i4NvvKoiOa4a8tnALd2XRHHmsvALn2Wmfu07b86gZlu4yOyuUFNoWI6tFvd\nbHnqSJYNQlFESv13gJw609DBzNnrIgBGYBAcDRrIGAnflRKwVDUnDFrUQmE8xNG6jRlyb1p2Y2RrfBtG\ncKqhuGNiT2DfxpY89ektZ98waPhJrFEPJToNH8EADzBorh3T0h4YP1IeLmaI7SOxeuVrk1kjRqMK0rUB\nlUJgJNtCE35jCyoHMwPQlyi78ZaVv8COVQ24zcGpw0MTy6JUsDzAC3jLNY6xCb40SZV9XzG7nWvXA5Ej\nYC1gTXxF4AtFexIdDZ4RJbtYMyXt8LsEJerwwpkfqvDwsiFuqYC6vIn9RoZO5kI0F35XtUITDQYKZ4eq\nWBV0itxTyyR5Rp6g30pZEmEqOusDaIh96CEmHpOBYAQZ7u1QTfzRdysIGMpzbx5gj9Dxm2PO1glWzY7P\nlVqQiBlXSGDOkBkrB6SkiAxknt9zsPdTTsf3r3nid4hdiPrZmGWNgjOO1khSxZSzBdltrCESNnQmlnP5\nZOHA0eSYXwy8j4od5ZmjA3IpFOEPW2MutMbxIbJpg5dIx2x7WxespftenRLgl3CxcpPDcnb9w8LCHBg7\nSEjrEer6Y8wVLFWsQiv6nTdCPZz9cGqwgtCaiHRy8lTWFgdfWd397vw9rduGld3uUFeFRGjYrphqEmHi\nhiG0GhE6wRFVUsGJtvOCYkVREvbEdxPFeJvlAvOcs9HKbtptlTusvYB86vR2bNcIY4f5JZu2X6sGa354\n7LRk0ps2zqYjat3hMR7XDC8KiKceBteFsXoDjfVxTYKelpedTxqWAafrKhaoAVuNM98PSnkuIWGzjSUC\nNsDJTt6vt1D1afBVPWVmnQ7ZQdtEtLIEwAWYjemAztreELIr1E9fPEILm1Ke4KctP9I0I72Dh4eylNZD\n0DEr2Hg7cWFckuZ0Av5d0IPRARXikEGDHl8uh12TXL9v2Uh0ZVSJMEYvxGSbZvkWz8TjWSk3hKA2a7GL\nJm3Ho7e1C34gE1XRGcEthxvURxt4OKBqN3ZNaMIuDTWinoQAutMcUqtm4MoL7RGPiCHUrvTwQPSirsmA\nQmOEu8nOpnP77Fivh9jLGx5ta7nL6jrsWUsBqiN1lzpdPYLRR4mUIAj6sNWiDEk4pkbHSMEcqbWw6Zl7\npsEyPDHalCNhWMA3RSK3skURzQDZ0oBV5W7vjVIZ4d3uCKsk6zrzEI9u5mx7p9RdNKodXfzqYt0ULdtc\n3RW0hIfw2KvrO3BD2QrtgAkfrFBGVvlJSUoh0MvLz8DeXxfuiuq9Ttu7wvsqVI4Piah6WNEXtHHGPJO3\nGhc75Bnv2To4VS2v8rmyKAPIIVTuYBHZN6sZ4FhFzbrslCIdk0eadaU60naqiNWU3CsxplIYGyeThmJ7\n9u4h6Y2OmiPZjFPS2bAzwgAozYTVefII9aEaWZ0hxHZeu1FW7r79dkdO73ZqRfas9u8Z7LLBPCw5pV0F\n5I0pHDgNb6MogoxF4NZJfVtIX1vCHhhVLrXjrYNJU2fD9Fw8kT8Ie2HDBJnqAvYKmryQ1r9ulo3Me3rH\nq9s2Y5uCDxu9iQNhnpwIm57WYGFeqd2fnQeY2IziD3Jgx0KSrmOH0jgi0RwJyfGXaORPq3bQQqljuACo\nkO6io9t5VI8PbNxSHTRbtYiPciUslbT0g7SpCLrRPOBRJ4DDk56pjghpeoUagJ5xJ4wjBzBuXnAGkNnP\nTfpiuz2r3oSBAi8sB9wiYK2z9sp4gZyQsqdVNzAEgKatOxBRBmJCBYpjO98ZQrF83XApPpfFg0ujB2PW\n1iYF9NkgwIKB5oB6KVTOmSKJk11mVermPgeugHbzdd2zUP6fP8fWbhseqk2t8ahGvqjs2CDHFIWXl5jc\nfCknbykE3ANt7lnAfJQ2ddduLGiqrX4HWx6jcWw08Es6BkleO0IDbaWrb95d5isvFlzJsf0TyDIXF4uq\nbBDCi0XPWqtRJ2iqmnJa2GbBe9GmAOWMkBFSilMyC4sR395WSDpD56fx0NGoU6cHrRu9xF2Bgh7RGSfl\nch2GXEeE02fDpSHFNvJBlOEqqfkIX6oCa6KY9NThqeIjYsT184XR2ZI7akXRaw1gMOGpk4FmUxk6WIuX\n4ei1SLQgSdl7OEdRtJklZ76eFrMbkJQ2TDhu8f7mVuiy53GUMIvCrP9xYGZGmCIDm2e4U2BDi3F7C5xK\n3bDZXwlQp6z4BSqTy2OVEWxXUJfjPMOL5Mc7AvDeKtxAS73pVIv0HgHIa4NBAdC7uLG0zXuu1FF6z2XY\nyUhk03fMZhYe7vVxsul3WE7U01fuN8z2y0eKwBW1RFBE1eKIaR9Y01sIWQWbSrfHfDrdZiElhmhHehfs\n0EfrR4sLYdQshJuvhTeKGJDaEhtPQwwJ9mUYGtuCL9RozWx1XI4bHNlzBTW0BVokYiJGlPe7wdxNzJD7\nJgS7Lwv6jGKngVf86imGZyzqwiteWFPdNUoWdTvUPSMO5xIUK9mo5QpwbBOAmyYzVq42o3Qs90N9khEV\nU36LB99fw8PtGHH5wsCHshfauwnNPj0blGXzke0kQ4JNCVH7Jtn0Y0aeejkSxFtwtxoYs6zHl1Lxxpsd\nsw5vBy49CEtoltDW367lVAwDjWdx20msGB7qJCkEDrzu7EXSO22782QX9NBRcN9ppX0C25I0FMA4Wnhz\n9zIpiXRrsTH35jzM8Cjt4EVLGNU3O0HuEvAer3cENnMJtngdrT86ox3fihMQbiuy4Bh4DEcP5in2VjbT\n3qbnoCNvOi8Fmmf7KlGlWAOceL5OHVE5lljjQEMzEQOCEgrk5mDKgwSBJQBNauIDSC1a5iEQjB8Xxp4C\nqeKyyWY9IOntNrtU5ny4lNprHJd36dKFeBLKcGCOvgHBXdOZloMF0YTRExw7hreEO9IoTGVHJ4teWsNr\nHdtagUHjkeZkdMMfnUGNv5aBNtFMqhcZH6EitEa9lGPkKBbJpoom3u8D8EHSIF1H5EZqqx9TLY5hWAIG\nPwJ4qwkpCGw5rCLVrjw7ARKukIFzNULANqjHUMcJ002TlUosJM4xJ4aAgckpLVGOGuPDhGAAexEcQmbg\nUsZdmqQrtuVUyyLteLbLbqtR6CTlcAIwY3xyMCmPgyefE0FEUODBoxQtRUuYTL9RC5o1sYb2PvcxUQfb\niJFi2CAl99pAzcckU2qVCxniARslIxM5pmMRGsQX9ZzYAfZrbg6ce6S74I8UMlgRQ2QVyvUjKKOE6IrJ\nLng370emHfe5m6LZULD5YiZutkD5ipjL2Bz77DvTE5kNPUhuoKBcTJcUgytfXAKUTWOcRKNlq0GImrxM\nJfr7AWbLFFNKGLeTrVDBwpcokJCv0zcOKWe8fd2xkeXkZTdmM66IgM27cyYmtQ6YF26Kd0qrWJeVZJV9\n3fyLYYvKN5csbRY2BHoYE5ERARRW65IrpkXMf48OrCXMtDIP0Z7wxI9DiTeKKeH4uuguhCJnwzR3WxLA\nVU6eBJEd7ZjS6JA83w7decq8uDI7LGKjcz1FySp3B7fE9DkHRGXxbsL7Fjar6vW2mAv8CuvI20B6jctp\n2yLDs24sPfB3sSxrrlhbuT1m6DZqiN0dl6umKx7NGZhmOTVGr20jfcxhqPQwTJfd7kel4rvxip4BqkvT\n7STy8knJ2BXGyJeNgwo1PXUZRDVy0LCTsSF1RFuRZe8cktHl9lgw8ntdPn1pVFL0MwJkJfdXBNUp5gNv\n50FTkrpo1t6wq4CVbcfj2XOrOzvBUzNH26sXGABI1gGxCdp2jEZrHgqQaWIaTJVTuguZhxqDvdYsrwFW\nYN58uuNcKHIrGdRSigyZInwQDYk0pjcqdSeU0WVU3Y9htzZBR7XRaCJr5YTZvq7fwermb5tuwb37lPLq\nB2IGg0iftkVbXaSyfCwVaRbfLBb88so0QqpmJGirFu8FcDiXOV1zTr8yW9XLdYQuUjh43xrXLdgsuYff\nCagInUk1eU1aLjVZoJRsNmStmOEpAqlYMwTvx7w6j2f421Cxr5cNZBIVlAxlXN2QiDqJ9v3sHhHkTanc\nlQuH8ptUyX8qncpBuXXBn7cSez9N0EoxCBl1GHUagbjstgJo4gzLvTmVIY6MiWYOBitzNUHfyqKwtKUr\nVoSCdZcGeA9lHUPA7PUprRRaT3m1hGKPyshtVS2ikG48w3oVerln1N1qGdtz46gZCrndw3LZ1B362RfW\nzDPuXbpsyLsRMTt1Rz1oKHRXp3iE41hkhQH6pxlvyCW2INnHt5XU8zRamOB3oW0udOhMpQFDjRkOcy06\nb4t0QTHvoRqmBna3WXzIMZyeK3GChF5eF8oDXRbjhk7BB6YKCgqwWUzEJ5K47HMSlhFkBUjaPRjdGM0z\nzOMwhW6b1NvSwP7XM1P5yi1oPvOspts1vr29SXqrMMrBhVogeodWyd69NqrO4jkyBxKmlXifoTowpfiY\n2cUCE0XMZqxUN39LCP09JqZifaEcBEo3mgtm1tWu5QR2GNq7UyQf4RIPSDOpDCAtwoPhRgdT1lJdcj4U\nlnH0wrJ8Uwu7c08L7ErnIrDATqCrOjpSbzGP1xHENABYONC4TknFPrJ8pe40A8fzGT0qBw9mAM1SKcHO\nfoiLcMC9AjHTqJzDG3xplSLPG9or2rMeq7Fzp9r0y7uJRMxgg51EbjfvYlH466A3ggvL2WQlDXjJqPW3\nBJGWAWDNN9LK8f46bADKPxakpkx23S9O47rGSXfDhVSIZsDympxWX1UOzWwMZRHkofVeKqizgbKkGgUT\nWykE9gRoRAOd9wfHZDYKa9i0LaPDiaUMvnU1gdBIqIoiVsdJ9swX47oxvMtOxtcS0zlD6llDkBuIiU5g\nPwRCYmtkkb25c8iRJXwGFPjI1wJ34I1z1ENicPdosPiUe9ZC2jnXIKzEdv01x2ER7DNDF3yxOwOhxNxI\nGqsmC92j25UQQFu9ZstOZ28AoCkuOYs0Uycm5u8jR1T39dMBwrko09rC65ENLnsxM8oebmyFCPiGJ1ED\n5Xqc9qZ237f1OnETAoEOwqUSvrdPTv56U7hV91EMTyC812MLQpr2710E3VVpsUCUMNhIxdt7UXZ1UNFb\njgzpZLXnf4DHrv6B7kq6UI50KMxcw1HZE2GpODfUTzNFLaqdrvzxKe5eUWdcojBaRbD4fFdVYJTElYDH\nNNVh6ofkoeWcs9CWGFmSBe0T4K8phFeygQg0prKMELNEy6qENzVtG9ZDcqj3a7L6ZLtvq50anWp7fAVu\nfwz55g4iM2Z2fA0pnwHDL7tt67zTxGITvsnJsZSpeq1EQsZcwtkBV9liu7Rl7jiVT1IIRtchB8TsTiaA\nwVHIQQ9RIOTiPQdKNqi1kC9iGlUqWK93gblNWlBw1eYB9Wk8FQogutwTf0caNMx8D4nPbANcmOOlskIy\nzALh15OlTrWnhP95rf08AN2J026zDE2DUF9k0eCevYBQIDjqKNW4XCZnjbHoIcKzbY5VzPbMs3ZyMz8K\nSucBmgPg6wrSK5ykbkapS5vuqvXc9GbjQJ8bPNzoxoWGyjbZvDs2OBrIqBmcQb2DLJ8v38McQ4mC4UsS\njf4PyfSCtpk274QZjvLCZbLiCBxQegk7jUU0NmTFJAcYCxd9xMWdlFkiszcltT2YzwuFFz7iA6aa4n5L\nHpBNfUA01GcAi1aCMYhmooS4zSlYcSOZkovMz36U3Fd9WtqIEOJLi7HMgHQDgNMdK6DTzAdHQtxerxVF\nHJnPrfNVG7270r3bp0bPnLNYLhObbAn6zqSAUeLtI2Y4KJDjBKCAh2vvYGbu0e2REYJWRj7MkGevsSSy\nb1kCXLt6tKGWAb7lt5c0xyJgUIJW7pdtnwgT0ZCa24BecCAwNnG5U2EwQbcjZGsFxqNGfaemd3oFEhES\nBaE0Fxms9UKTnMafu8wvZ2xymMrUduuRzOjDeX7oD5YsLC88V8CGMLxbbxIpt94KGykbr6e7L0R4oZl1\ntKMgFwQ2p9Txdbp0Y293LcsJymKizqI0F2xEp7y4SmWOJqHZtsbz80wVV9nv41CvtfxuSoGZJ5cNB7pI\nBgzNcQCeH3Jt0RaGGwboxxpuFbzilmkMFXxJm87tD4WNgu01nHfGCKeQcySEBZpVfJgi6sDFJ8uWnvKm\n9mPLHurtWzEfKqUEa1iC71bXjw5wrvhv9BYW8JSUELHmDquftQyKdq0DZXhULMHGQLf4e95WIaoA14LL\nbThz77kuhKULPTu2MNrBUKGorurhGugo5gs4ZUezSsUOe3KxYdrFMdGgny1GgTxMSMTp2RAZytKjv4kQ\nVx7XgzvpQLIbDjUPAkJv6lScwIRq1W3Ne0Rh0V6Bmn6U5uIuWnJjULmbaQiSODj3z0mAZvak0mSWIGwT\nTX83HztcC4W7e1f6a1thmcc5K61Icehla2hBELWPpixTkyC4eEVmk9Rq0m0ZXtx0JX2ZQXqXDEyePyMe\nJ70sdSzXk72zusqhY4yuOMGgbYNHqxOToK6NxujR7e4dV3Wk5JnSUthym8scjcPeCiKDNY4cHfTMnDXJ\n9zLVy01LtNKYpJ1s8FxVxigmxQNKEbIamxhx6yqwGC4aiISVOOUEjvNOdaUfXfUsE6jEwtwxyGxjlRK1\ncLyxXttq4QWN6PehgHv7jXykzPjInbEysebFvvPOOMdunmJvcCNMSvjUda8fL6xfGo0FDrLg8XZipd6S\noPVdYtyIM1Dg40KbBA3JuumPYtXuJaHrZnjZmdnM5OVo4ZNxktfCVT0c6bnD4bAeyn4bYt1ZPaX6hQHh\nJtvNYfpD0ONYlmqKuToQAMlz52Fh6bj45EbX89L5eLlSpWeyBlGotzriB0EPlclrGi5l2B5oPb1aB1ag\nyyYuu44l0F1oOVYnBIZsxIsHVITxi9lEuVPFkWASOUNuVQXfM4n5hxWR9qtuKnIcPsvbJsv1U10XlKh3\nKisqPhHU15xrCLr5gwFxPUKiNTLUBrkzgBOHXPVsHcLCiSD0YU56TRGfvEom43TWUKPPfl9Z54tgVQuT\njCRlaljAzeniQIcbbHZnn3f0HxbDG3DFYqWSxNrXabHhRsIOhhUHSPENyhGSTVO5t0XX5CdMspJPCd02\n3Oqv32ccbUK4O3YH6LEvp0WO3kSl5n50odVkI9B0i0iq4UPFGMkM8bEQJbgJoOH71P10vtdevJFQE4g2\nyhimiM53ZJRWgSZveHtENZc0Gjo0F9eioak9BnPpY1QxAFPC817svuhEstcU69bLCA4D1rO5R8AuIIBq\nyQJcifFLvbpAEYTLKJqysZrU8EEl3TSdC13A9hZvk4NC8VGEDAxcNrKw313dZp17kZPO5HSd1y6sljAW\nA9M1d6FMYV5SlBWf3WZNCUPS7qKNlda2YBsC6IUVB363f5RLGQOQHwbaijBSRCkrVoRxBHtc0Bd5J9V9\nP5uMTXkpZOxRcCQvImGgcmGuxxLb5zTqfS2xu7v3Sf3IIesSt9tVzcEcdbEvLGVJkLk4mb3G30DbIbri\nPZ09JkweDvMaQ3bxT2nfkz3Ilihkw9jqikkCCCz7E8h6z6KbhQErEW9VzJZzMCgJsyPjFam6iNwpe07S\nhyOvNVw2t9wpzL5xM11DvVzQwDaWEytNRHzDBs4KwEtpI2IpjUyVZHSwA0UGqqkzoCgrJFlNOvPlXqcS\nIcREouUIBmuttkrhPWJtSxOOgpsdvBR3kTOzAXNzSKxoaBAb0c5SDMUc6FIyGA8x5wg5DkUgjFUUodEt\nOYaB2VHVePW9mxHeBTdKWLzJow4ZZvjnoBuVigXljKCNh137ckV2y3Yg3Xi4UzJEI2V5Rw9AfnMs7xUw\nVHOFCg189maD3bmZAe7b4eaGZhyy4HVKjqCXmIH7vsEjRvbnfB0SQxxpuqBDJbHNCtW4vM643ZQQBVPP\na7oXSQIq9w2dHp0A7dtkocCZdQp9FKR9XdJAFIbVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n" }, @@ -2217,6 +2325,7 @@ }, { "id": "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1", + "description": "Compression algorithm encoding is appended to the Content-Encoding header, and the\nuser-provided content-encoding is NOT in the Content-Encoding header since HTTP binding\ntraits are ignored in the awsJson1_1 protocol.\n", "given": { "name": "PutWithContentEncoding", "http": { @@ -2232,7 +2341,6 @@ ] } }, - "description": "Compression algorithm encoding is appended to the Content-Encoding header, and the\nuser-provided content-encoding is NOT in the Content-Encoding header since HTTP binding\ntraits are ignored in the awsJson1_1 protocol.\n", "params": { "encoding": "custom", "data": "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsmcKPr1crqiXjM\noVWdM4ObOO6QA7Pu4c1hT68CrTmbcecjFcxHkgsqdixnFtN6keMGL9Z2YMjZOjYYzbUEwLJqUVWalkIB\nBkgBRqZpzxx5nB5t0qDH35KjsfKM5cinQaFoRq9y9Z82xdCoKZOsUbxZkk1kVmy1jPDCBhkhixkc5PKS\nFoSKTbeK7kuCEZCtR9OfF2k2MqbygGFsFu2sgb1Zn2YdDbaRwRGeaLhswta09UNSMUo8aTixgoYVHxwy\nvraLB6olPSPegeLOnmBeWyKmEfPdbpdGm4ev4vA2AUFuLIeFz0LkCSN0NgQMrr8ALEm1UNpJLReg1ZAX\nzZh7gtQTZUaBVdMJokaJpLk6FPxSA6zkwB5TegSqhrFIsmvpY3VNWmTUq7H0iADdh3dRQ8Is97bTsbwu\nvAEOjh4FQ9wPSFzEtcSJeYQft5GfWYPisDImjjvHVFshFFkNy2nN18pJmhVPoJc456tgbdfEIdGhIADC\n6UPcSSzE1FxlPpILqZrp3i4NvvKoiOa4a8tnALd2XRHHmsvALn2Wmfu07b86gZlu4yOyuUFNoWI6tFvd\nbHnqSJYNQlFESv13gJw609DBzNnrIgBGYBAcDRrIGAnflRKwVDUnDFrUQmE8xNG6jRlyb1p2Y2RrfBtG\ncKqhuGNiT2DfxpY89ektZ98waPhJrFEPJToNH8EADzBorh3T0h4YP1IeLmaI7SOxeuVrk1kjRqMK0rUB\nlUJgJNtCE35jCyoHMwPQlyi78ZaVv8COVQ24zcGpw0MTy6JUsDzAC3jLNY6xCb40SZV9XzG7nWvXA5Ej\nYC1gTXxF4AtFexIdDZ4RJbtYMyXt8LsEJerwwpkfqvDwsiFuqYC6vIn9RoZO5kI0F35XtUITDQYKZ4eq\nWBV0itxTyyR5Rp6g30pZEmEqOusDaIh96CEmHpOBYAQZ7u1QTfzRdysIGMpzbx5gj9Dxm2PO1glWzY7P\nlVqQiBlXSGDOkBkrB6SkiAxknt9zsPdTTsf3r3nid4hdiPrZmGWNgjOO1khSxZSzBdltrCESNnQmlnP5\nZOHA0eSYXwy8j4od5ZmjA3IpFOEPW2MutMbxIbJpg5dIx2x7WxespftenRLgl3CxcpPDcnb9w8LCHBg7\nSEjrEer6Y8wVLFWsQiv6nTdCPZz9cGqwgtCaiHRy8lTWFgdfWd397vw9rduGld3uUFeFRGjYrphqEmHi\nhiG0GhE6wRFVUsGJtvOCYkVREvbEdxPFeJvlAvOcs9HKbtptlTusvYB86vR2bNcIY4f5JZu2X6sGa354\n7LRk0ps2zqYjat3hMR7XDC8KiKceBteFsXoDjfVxTYKelpedTxqWAafrKhaoAVuNM98PSnkuIWGzjSUC\nNsDJTt6vt1D1afBVPWVmnQ7ZQdtEtLIEwAWYjemAztreELIr1E9fPEILm1Ke4KctP9I0I72Dh4eylNZD\n0DEr2Hg7cWFckuZ0Av5d0IPRARXikEGDHl8uh12TXL9v2Uh0ZVSJMEYvxGSbZvkWz8TjWSk3hKA2a7GL\nJm3Ho7e1C34gE1XRGcEthxvURxt4OKBqN3ZNaMIuDTWinoQAutMcUqtm4MoL7RGPiCHUrvTwQPSirsmA\nQmOEu8nOpnP77Fivh9jLGx5ta7nL6jrsWUsBqiN1lzpdPYLRR4mUIAj6sNWiDEk4pkbHSMEcqbWw6Zl7\npsEyPDHalCNhWMA3RSK3skURzQDZ0oBV5W7vjVIZ4d3uCKsk6zrzEI9u5mx7p9RdNKodXfzqYt0ULdtc\n3RW0hIfw2KvrO3BD2QrtgAkfrFBGVvlJSUoh0MvLz8DeXxfuiuq9Ttu7wvsqVI4Piah6WNEXtHHGPJO3\nGhc75Bnv2To4VS2v8rmyKAPIIVTuYBHZN6sZ4FhFzbrslCIdk0eadaU60naqiNWU3CsxplIYGyeThmJ7\n9u4h6Y2OmiPZjFPS2bAzwgAozYTVefII9aEaWZ0hxHZeu1FW7r79dkdO73ZqRfas9u8Z7LLBPCw5pV0F\n5I0pHDgNb6MogoxF4NZJfVtIX1vCHhhVLrXjrYNJU2fD9Fw8kT8Ie2HDBJnqAvYKmryQ1r9ulo3Me3rH\nq9s2Y5uCDxu9iQNhnpwIm57WYGFeqd2fnQeY2IziD3Jgx0KSrmOH0jgi0RwJyfGXaORPq3bQQqljuACo\nkO6io9t5VI8PbNxSHTRbtYiPciUslbT0g7SpCLrRPOBRJ4DDk56pjghpeoUagJ5xJ4wjBzBuXnAGkNnP\nTfpiuz2r3oSBAi8sB9wiYK2z9sp4gZyQsqdVNzAEgKatOxBRBmJCBYpjO98ZQrF83XApPpfFg0ujB2PW\n1iYF9NkgwIKB5oB6KVTOmSKJk11mVermPgeugHbzdd2zUP6fP8fWbhseqk2t8ahGvqjs2CDHFIWXl5jc\nfCknbykE3ANt7lnAfJQ2ddduLGiqrX4HWx6jcWw08Es6BkleO0IDbaWrb95d5isvFlzJsf0TyDIXF4uq\nbBDCi0XPWqtRJ2iqmnJa2GbBe9GmAOWMkBFSilMyC4sR395WSDpD56fx0NGoU6cHrRu9xF2Bgh7RGSfl\nch2GXEeE02fDpSHFNvJBlOEqqfkIX6oCa6KY9NThqeIjYsT184XR2ZI7akXRaw1gMOGpk4FmUxk6WIuX\n4ei1SLQgSdl7OEdRtJklZ76eFrMbkJQ2TDhu8f7mVuiy53GUMIvCrP9xYGZGmCIDm2e4U2BDi3F7C5xK\n3bDZXwlQp6z4BSqTy2OVEWxXUJfjPMOL5Mc7AvDeKtxAS73pVIv0HgHIa4NBAdC7uLG0zXuu1FF6z2XY\nyUhk03fMZhYe7vVxsul3WE7U01fuN8z2y0eKwBW1RFBE1eKIaR9Y01sIWQWbSrfHfDrdZiElhmhHehfs\n0EfrR4sLYdQshJuvhTeKGJDaEhtPQwwJ9mUYGtuCL9RozWx1XI4bHNlzBTW0BVokYiJGlPe7wdxNzJD7\nJgS7Lwv6jGKngVf86imGZyzqwiteWFPdNUoWdTvUPSMO5xIUK9mo5QpwbBOAmyYzVq42o3Qs90N9khEV\nU36LB99fw8PtGHH5wsCHshfauwnNPj0blGXzke0kQ4JNCVH7Jtn0Y0aeejkSxFtwtxoYs6zHl1Lxxpsd\nsw5vBy49CEtoltDW367lVAwDjWdx20msGB7qJCkEDrzu7EXSO22782QX9NBRcN9ppX0C25I0FMA4Wnhz\n9zIpiXRrsTH35jzM8Cjt4EVLGNU3O0HuEvAer3cENnMJtngdrT86ox3fihMQbiuy4Bh4DEcP5in2VjbT\n3qbnoCNvOi8Fmmf7KlGlWAOceL5OHVE5lljjQEMzEQOCEgrk5mDKgwSBJQBNauIDSC1a5iEQjB8Xxp4C\nqeKyyWY9IOntNrtU5ny4lNprHJd36dKFeBLKcGCOvgHBXdOZloMF0YTRExw7hreEO9IoTGVHJ4teWsNr\nHdtagUHjkeZkdMMfnUGNv5aBNtFMqhcZH6EitEa9lGPkKBbJpoom3u8D8EHSIF1H5EZqqx9TLY5hWAIG\nPwJ4qwkpCGw5rCLVrjw7ARKukIFzNULANqjHUMcJ002TlUosJM4xJ4aAgckpLVGOGuPDhGAAexEcQmbg\nUsZdmqQrtuVUyyLteLbLbqtR6CTlcAIwY3xyMCmPgyefE0FEUODBoxQtRUuYTL9RC5o1sYb2PvcxUQfb\niJFi2CAl99pAzcckU2qVCxniARslIxM5pmMRGsQX9ZzYAfZrbg6ce6S74I8UMlgRQ2QVyvUjKKOE6IrJ\nLng370emHfe5m6LZULD5YiZutkD5ipjL2Bz77DvTE5kNPUhuoKBcTJcUgytfXAKUTWOcRKNlq0GImrxM\nJfr7AWbLFFNKGLeTrVDBwpcokJCv0zcOKWe8fd2xkeXkZTdmM66IgM27cyYmtQ6YF26Kd0qrWJeVZJV9\n3fyLYYvKN5csbRY2BHoYE5ERARRW65IrpkXMf48OrCXMtDIP0Z7wxI9DiTeKKeH4uuguhCJnwzR3WxLA\nVU6eBJEd7ZjS6JA83w7decq8uDI7LGKjcz1FySp3B7fE9DkHRGXxbsL7Fjar6vW2mAv8CuvI20B6jctp\n2yLDs24sPfB3sSxrrlhbuT1m6DZqiN0dl6umKx7NGZhmOTVGr20jfcxhqPQwTJfd7kel4rvxip4BqkvT\n7STy8knJ2BXGyJeNgwo1PXUZRDVy0LCTsSF1RFuRZe8cktHl9lgw8ntdPn1pVFL0MwJkJfdXBNUp5gNv\n50FTkrpo1t6wq4CVbcfj2XOrOzvBUzNH26sXGABI1gGxCdp2jEZrHgqQaWIaTJVTuguZhxqDvdYsrwFW\nYN58uuNcKHIrGdRSigyZInwQDYk0pjcqdSeU0WVU3Y9htzZBR7XRaCJr5YTZvq7fwermb5tuwb37lPLq\nB2IGg0iftkVbXaSyfCwVaRbfLBb88so0QqpmJGirFu8FcDiXOV1zTr8yW9XLdYQuUjh43xrXLdgsuYff\nCagInUk1eU1aLjVZoJRsNmStmOEpAqlYMwTvx7w6j2f421Cxr5cNZBIVlAxlXN2QiDqJ9v3sHhHkTanc\nlQuH8ptUyX8qncpBuXXBn7cSez9N0EoxCBl1GHUagbjstgJo4gzLvTmVIY6MiWYOBitzNUHfyqKwtKUr\nVoSCdZcGeA9lHUPA7PUprRRaT3m1hGKPyshtVS2ikG48w3oVerln1N1qGdtz46gZCrndw3LZ1B362RfW\nzDPuXbpsyLsRMTt1Rz1oKHRXp3iE41hkhQH6pxlvyCW2INnHt5XU8zRamOB3oW0udOhMpQFDjRkOcy06\nb4t0QTHvoRqmBna3WXzIMZyeK3GChF5eF8oDXRbjhk7BB6YKCgqwWUzEJ5K47HMSlhFkBUjaPRjdGM0z\nzOMwhW6b1NvSwP7XM1P5yi1oPvOspts1vr29SXqrMMrBhVogeodWyd69NqrO4jkyBxKmlXifoTowpfiY\n2cUCE0XMZqxUN39LCP09JqZifaEcBEo3mgtm1tWu5QR2GNq7UyQf4RIPSDOpDCAtwoPhRgdT1lJdcj4U\nlnH0wrJ8Uwu7c08L7ErnIrDATqCrOjpSbzGP1xHENABYONC4TknFPrJ8pe40A8fzGT0qBw9mAM1SKcHO\nfoiLcMC9AjHTqJzDG3xplSLPG9or2rMeq7Fzp9r0y7uJRMxgg51EbjfvYlH466A3ggvL2WQlDXjJqPW3\nBJGWAWDNN9LK8f46bADKPxakpkx23S9O47rGSXfDhVSIZsDympxWX1UOzWwMZRHkofVeKqizgbKkGgUT\nWykE9gRoRAOd9wfHZDYKa9i0LaPDiaUMvnU1gdBIqIoiVsdJ9swX47oxvMtOxtcS0zlD6llDkBuIiU5g\nPwRCYmtkkb25c8iRJXwGFPjI1wJ34I1z1ENicPdosPiUe9ZC2jnXIKzEdv01x2ER7DNDF3yxOwOhxNxI\nGqsmC92j25UQQFu9ZstOZ28AoCkuOYs0Uycm5u8jR1T39dMBwrko09rC65ENLnsxM8oebmyFCPiGJ1ED\n5Xqc9qZ237f1OnETAoEOwqUSvrdPTv56U7hV91EMTyC812MLQpr2710E3VVpsUCUMNhIxdt7UXZ1UNFb\njgzpZLXnf4DHrv6B7kq6UI50KMxcw1HZE2GpODfUTzNFLaqdrvzxKe5eUWdcojBaRbD4fFdVYJTElYDH\nNNVh6ofkoeWcs9CWGFmSBe0T4K8phFeygQg0prKMELNEy6qENzVtG9ZDcqj3a7L6ZLtvq50anWp7fAVu\nfwz55g4iM2Z2fA0pnwHDL7tt67zTxGITvsnJsZSpeq1EQsZcwtkBV9liu7Rl7jiVT1IIRtchB8TsTiaA\nwVHIQQ9RIOTiPQdKNqi1kC9iGlUqWK93gblNWlBw1eYB9Wk8FQogutwTf0caNMx8D4nPbANcmOOlskIy\nzALh15OlTrWnhP95rf08AN2J026zDE2DUF9k0eCevYBQIDjqKNW4XCZnjbHoIcKzbY5VzPbMs3ZyMz8K\nSucBmgPg6wrSK5ykbkapS5vuqvXc9GbjQJ8bPNzoxoWGyjbZvDs2OBrIqBmcQb2DLJ8v38McQ4mC4UsS\njf4PyfSCtpk274QZjvLCZbLiCBxQegk7jUU0NmTFJAcYCxd9xMWdlFkiszcltT2YzwuFFz7iA6aa4n5L\nHpBNfUA01GcAi1aCMYhmooS4zSlYcSOZkovMz36U3Fd9WtqIEOJLi7HMgHQDgNMdK6DTzAdHQtxerxVF\nHJnPrfNVG7270r3bp0bPnLNYLhObbAn6zqSAUeLtI2Y4KJDjBKCAh2vvYGbu0e2REYJWRj7MkGevsSSy\nb1kCXLt6tKGWAb7lt5c0xyJgUIJW7pdtnwgT0ZCa24BecCAwNnG5U2EwQbcjZGsFxqNGfaemd3oFEhES\nBaE0Fxms9UKTnMafu8wvZ2xymMrUduuRzOjDeX7oD5YsLC88V8CGMLxbbxIpt94KGykbr6e7L0R4oZl1\ntKMgFwQ2p9Txdbp0Y293LcsJymKizqI0F2xEp7y4SmWOJqHZtsbz80wVV9nv41CvtfxuSoGZJ5cNB7pI\nBgzNcQCeH3Jt0RaGGwboxxpuFbzilmkMFXxJm87tD4WNgu01nHfGCKeQcySEBZpVfJgi6sDFJ8uWnvKm\n9mPLHurtWzEfKqUEa1iC71bXjw5wrvhv9BYW8JSUELHmDquftQyKdq0DZXhULMHGQLf4e95WIaoA14LL\nbThz77kuhKULPTu2MNrBUKGorurhGugo5gs4ZUezSsUOe3KxYdrFMdGgny1GgTxMSMTp2RAZytKjv4kQ\nVx7XgzvpQLIbDjUPAkJv6lScwIRq1W3Ne0Rh0V6Bmn6U5uIuWnJjULmbaQiSODj3z0mAZvak0mSWIGwT\nTX83HztcC4W7e1f6a1thmcc5K61Icehla2hBELWPpixTkyC4eEVmk9Rq0m0ZXtx0JX2ZQXqXDEyePyMe\nJ70sdSzXk72zusqhY4yuOMGgbYNHqxOToK6NxujR7e4dV3Wk5JnSUthym8scjcPeCiKDNY4cHfTMnDXJ\n9zLVy01LtNKYpJ1s8FxVxigmxQNKEbIamxhx6yqwGC4aiISVOOUEjvNOdaUfXfUsE6jEwtwxyGxjlRK1\ncLyxXttq4QWN6PehgHv7jXykzPjInbEysebFvvPOOMdunmJvcCNMSvjUda8fL6xfGo0FDrLg8XZipd6S\noPVdYtyIM1Dg40KbBA3JuumPYtXuJaHrZnjZmdnM5OVo4ZNxktfCVT0c6bnD4bAeyn4bYt1ZPaX6hQHh\nJtvNYfpD0ONYlmqKuToQAMlz52Fh6bj45EbX89L5eLlSpWeyBlGotzriB0EPlclrGi5l2B5oPb1aB1ag\nyyYuu44l0F1oOVYnBIZsxIsHVITxi9lEuVPFkWASOUNuVQXfM4n5hxWR9qtuKnIcPsvbJsv1U10XlKh3\nKisqPhHU15xrCLr5gwFxPUKiNTLUBrkzgBOHXPVsHcLCiSD0YU56TRGfvEom43TWUKPPfl9Z54tgVQuT\njCRlaljAzeniQIcbbHZnn3f0HxbDG3DFYqWSxNrXabHhRsIOhhUHSPENyhGSTVO5t0XX5CdMspJPCd02\n3Oqv32ccbUK4O3YH6LEvp0WO3kSl5n50odVkI9B0i0iq4UPFGMkM8bEQJbgJoOH71P10vtdevJFQE4g2\nyhimiM53ZJRWgSZveHtENZc0Gjo0F9eioak9BnPpY1QxAFPC817svuhEstcU69bLCA4D1rO5R8AuIIBq\nyQJcifFLvbpAEYTLKJqysZrU8EEl3TSdC13A9hZvk4NC8VGEDAxcNrKw313dZp17kZPO5HSd1y6sljAW\nA9M1d6FMYV5SlBWf3WZNCUPS7qKNlda2YBsC6IUVB363f5RLGQOQHwbaijBSRCkrVoRxBHtc0Bd5J9V9\nP5uMTXkpZOxRcCQvImGgcmGuxxLb5zTqfS2xu7v3Sf3IIesSt9tVzcEcdbEvLGVJkLk4mb3G30DbIbri\nPZ09JkweDvMaQ3bxT2nfkz3Ilihkw9jqikkCCCz7E8h6z6KbhQErEW9VzJZzMCgJsyPjFam6iNwpe07S\nhyOvNVw2t9wpzL5xM11DvVzQwDaWEytNRHzDBs4KwEtpI2IpjUyVZHSwA0UGqqkzoCgrJFlNOvPlXqcS\nIcREouUIBmuttkrhPWJtSxOOgpsdvBR3kTOzAXNzSKxoaBAb0c5SDMUc6FIyGA8x5wg5DkUgjFUUodEt\nOYaB2VHVePW9mxHeBTdKWLzJow4ZZvjnoBuVigXljKCNh137ckV2y3Yg3Xi4UzJEI2V5Rw9AfnMs7xUw\nVHOFCg189maD3bmZAe7b4eaGZhyy4HVKjqCXmIH7vsEjRvbnfB0SQxxpuqBDJbHNCtW4vM643ZQQBVPP\na7oXSQIq9w2dHp0A7dtkocCZdQp9FKR9XdJAFIbVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n" @@ -2250,15 +2358,32 @@ { "description": "Test cases for SimpleScalarProperties operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { + "Double": { + "type": "double", + "box": true + }, + "Float": { + "type": "float", + "box": true + }, "SimpleScalarPropertiesInputOutput": { "type": "structure", "members": { @@ -2269,19 +2394,12 @@ "shape": "Double" } } - }, - "Float": { - "type": "float", - "box": true - }, - "Double": { - "type": "double", - "box": true } }, "cases": [ { "id": "AwsJson11SupportsNaNFloatInputs", + "description": "Supports handling NaN float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -2292,7 +2410,6 @@ "shape": "SimpleScalarPropertiesInputOutput" } }, - "description": "Supports handling NaN float values.", "params": { "floatValue": "NaN", "doubleValue": "NaN" @@ -2302,13 +2419,14 @@ "uri": "/", "body": "{\n \"floatValue\": \"NaN\",\n \"doubleValue\": \"NaN\"\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.SimpleScalarProperties" + "X-Amz-Target": "JsonProtocol.SimpleScalarProperties", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "AwsJson11SupportsInfinityFloatInputs", + "description": "Supports handling Infinity float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -2319,7 +2437,6 @@ "shape": "SimpleScalarPropertiesInputOutput" } }, - "description": "Supports handling Infinity float values.", "params": { "floatValue": "Infinity", "doubleValue": "Infinity" @@ -2329,13 +2446,14 @@ "uri": "/", "body": "{\n \"floatValue\": \"Infinity\",\n \"doubleValue\": \"Infinity\"\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.SimpleScalarProperties" + "X-Amz-Target": "JsonProtocol.SimpleScalarProperties", + "Content-Type": "application/x-amz-json-1.1" } } }, { "id": "AwsJson11SupportsNegativeInfinityFloatInputs", + "description": "Supports handling -Infinity float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -2346,7 +2464,6 @@ "shape": "SimpleScalarPropertiesInputOutput" } }, - "description": "Supports handling -Infinity float values.", "params": { "floatValue": "-Infinity", "doubleValue": "-Infinity" @@ -2356,8 +2473,120 @@ "uri": "/", "body": "{\n \"floatValue\": \"-Infinity\",\n \"doubleValue\": \"-Infinity\"\n}", "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.SimpleScalarProperties" + "X-Amz-Target": "JsonProtocol.SimpleScalarProperties", + "Content-Type": "application/x-amz-json-1.1" + } + } + } + ] + }, + { + "description": "Test cases for SparseNullsOperation operation", + "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", + "protocol": "json", + "protocols": [ + "json" + ], + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" + }, + "shapes": { + "SparseNullsOperationInputOutput": { + "type": "structure", + "members": { + "sparseStringList": { + "shape": "SparseStringList" + }, + "sparseStringMap": { + "shape": "SparseStringMap" + } + } + }, + "SparseStringList": { + "type": "list", + "member": { + "shape": "String" + }, + "sparse": true + }, + "SparseStringMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + }, + "sparse": true + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "id": "AwsJson11SparseMapsSerializeNullValues", + "description": "Serializes null values in maps", + "given": { + "name": "SparseNullsOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "SparseNullsOperationInputOutput" + } + }, + "params": { + "sparseStringMap": { + "foo": null + } + }, + "serialized": { + "method": "POST", + "uri": "/", + "body": "{\n \"sparseStringMap\": {\n \"foo\": null\n }\n}", + "headers": { + "X-Amz-Target": "JsonProtocol.SparseNullsOperation", + "Content-Type": "application/x-amz-json-1.1" + } + } + }, + { + "id": "AwsJson11SparseListsSerializeNull", + "description": "Serializes null values in lists", + "given": { + "name": "SparseNullsOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "SparseNullsOperationInputOutput" + } + }, + "params": { + "sparseStringList": [ + null + ] + }, + "serialized": { + "method": "POST", + "uri": "/", + "body": "{\n \"sparseStringList\": [\n null\n ]\n}", + "headers": { + "X-Amz-Target": "JsonProtocol.SparseNullsOperation", + "Content-Type": "application/x-amz-json-1.1" } } } diff --git a/tools/code-generation/protocol-tests/input/rest-json.json b/tools/code-generation/protocol-tests/input/rest-json.json index bc73a3d7adc8..02dd85a3e1f1 100644 --- a/tools/code-generation/protocol-tests/input/rest-json.json +++ b/tools/code-generation/protocol-tests/input/rest-json.json @@ -2,11 +2,20 @@ { "description": "Test cases for AllQueryStringTypes operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "AllQueryStringTypesInput": { @@ -118,45 +127,16 @@ } } }, - "String": { - "type": "string" - }, - "StringList": { - "type": "list", - "member": { - "shape": "String" - } - }, - "StringSet": { - "type": "list", - "member": { - "shape": "String" - } - }, - "Integer": { - "type": "integer", + "Boolean": { + "type": "boolean", "box": true }, - "IntegerList": { - "type": "list", - "member": { - "shape": "Integer" - } - }, - "IntegerSet": { + "BooleanList": { "type": "list", "member": { - "shape": "Integer" + "shape": "Boolean" } }, - "Long": { - "type": "long", - "box": true - }, - "Float": { - "type": "float", - "box": true - }, "Double": { "type": "double", "box": true @@ -167,25 +147,10 @@ "shape": "Double" } }, - "Boolean": { - "type": "boolean", + "Float": { + "type": "float", "box": true }, - "BooleanList": { - "type": "list", - "member": { - "shape": "Boolean" - } - }, - "Timestamp": { - "type": "timestamp" - }, - "TimestampList": { - "type": "list", - "member": { - "shape": "Timestamp" - } - }, "FooEnum": { "type": "string", "enum": [ @@ -202,6 +167,10 @@ "shape": "FooEnum" } }, + "Integer": { + "type": "integer", + "box": true + }, "IntegerEnum": { "type": "integer", "box": true @@ -212,6 +181,31 @@ "shape": "IntegerEnum" } }, + "IntegerList": { + "type": "list", + "member": { + "shape": "Integer" + } + }, + "IntegerSet": { + "type": "list", + "member": { + "shape": "Integer" + } + }, + "Long": { + "type": "long", + "box": true + }, + "String": { + "type": "string" + }, + "StringList": { + "type": "list", + "member": { + "shape": "String" + } + }, "StringListMap": { "type": "map", "key": { @@ -220,11 +214,27 @@ "value": { "shape": "StringList" } + }, + "StringSet": { + "type": "list", + "member": { + "shape": "String" + } + }, + "Timestamp": { + "type": "timestamp" + }, + "TimestampList": { + "type": "list", + "member": { + "shape": "Timestamp" + } } }, "cases": [ { "id": "RestJsonAllQueryStringTypes", + "description": "Serializes query string parameters with all supported types", "given": { "name": "AllQueryStringTypes", "http": { @@ -235,9 +245,9 @@ "input": { "shape": "AllQueryStringTypesInput" }, - "documentation": "

This example uses all query string types.

" + "documentation": "

This example uses all query string types.

", + "readonly": true }, - "description": "Serializes query string parameters with all supported types", "params": { "queryString": "Hello there", "queryStringList": [ @@ -384,6 +394,7 @@ }, { "id": "RestJsonQueryStringMap", + "description": "Handles query string maps", "given": { "name": "AllQueryStringTypes", "http": { @@ -394,9 +405,9 @@ "input": { "shape": "AllQueryStringTypesInput" }, - "documentation": "

This example uses all query string types.

" + "documentation": "

This example uses all query string types.

", + "readonly": true }, - "description": "Handles query string maps", "params": { "queryParamsMapOfStringList": { "QueryParamsStringKeyA": [ @@ -415,6 +426,7 @@ }, { "id": "RestJsonQueryStringEscaping", + "description": "Handles escaping all required characters in the query string.", "given": { "name": "AllQueryStringTypes", "http": { @@ -425,9 +437,9 @@ "input": { "shape": "AllQueryStringTypesInput" }, - "documentation": "

This example uses all query string types.

" + "documentation": "

This example uses all query string types.

", + "readonly": true }, - "description": "Handles escaping all required characters in the query string.", "params": { "queryString": " %:/?#[]@!$&'()*+,;=😹", "queryParamsMapOfStringList": { @@ -444,6 +456,7 @@ }, { "id": "RestJsonSupportsNaNFloatQueryValues", + "description": "Supports handling NaN float query values.", "given": { "name": "AllQueryStringTypes", "http": { @@ -454,9 +467,9 @@ "input": { "shape": "AllQueryStringTypesInput" }, - "documentation": "

This example uses all query string types.

" + "documentation": "

This example uses all query string types.

", + "readonly": true }, - "description": "Supports handling NaN float query values.", "params": { "queryFloat": "NaN", "queryDouble": "NaN", @@ -477,6 +490,7 @@ }, { "id": "RestJsonSupportsInfinityFloatQueryValues", + "description": "Supports handling Infinity float query values.", "given": { "name": "AllQueryStringTypes", "http": { @@ -487,9 +501,9 @@ "input": { "shape": "AllQueryStringTypesInput" }, - "documentation": "

This example uses all query string types.

" + "documentation": "

This example uses all query string types.

", + "readonly": true }, - "description": "Supports handling Infinity float query values.", "params": { "queryFloat": "Infinity", "queryDouble": "Infinity", @@ -510,6 +524,7 @@ }, { "id": "RestJsonSupportsNegativeInfinityFloatQueryValues", + "description": "Supports handling -Infinity float query values.", "given": { "name": "AllQueryStringTypes", "http": { @@ -520,9 +535,9 @@ "input": { "shape": "AllQueryStringTypesInput" }, - "documentation": "

This example uses all query string types.

" + "documentation": "

This example uses all query string types.

", + "readonly": true }, - "description": "Supports handling -Infinity float query values.", "params": { "queryFloat": "-Infinity", "queryDouble": "-Infinity", @@ -543,6 +558,7 @@ }, { "id": "RestJsonZeroAndFalseQueryValues", + "description": "Query values of 0 and false are serialized", "given": { "name": "AllQueryStringTypes", "http": { @@ -553,9 +569,9 @@ "input": { "shape": "AllQueryStringTypesInput" }, - "documentation": "

This example uses all query string types.

" + "documentation": "

This example uses all query string types.

", + "readonly": true }, - "description": "Query values of 0 and false are serialized", "params": { "queryInteger": 0, "queryBoolean": false, @@ -579,11 +595,20 @@ { "description": "Test cases for ConstantAndVariableQueryString operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "ConstantAndVariableQueryStringInput": { @@ -608,6 +633,7 @@ "cases": [ { "id": "RestJsonConstantAndVariableQueryStringMissingOneValue", + "description": "Mixes constant and variable query string parameters", "given": { "name": "ConstantAndVariableQueryString", "http": { @@ -618,9 +644,9 @@ "input": { "shape": "ConstantAndVariableQueryStringInput" }, - "documentation": "

This example uses fixed query string params and variable query string params. The fixed query string parameters and variable parameters must both be serialized (implementations may need to merge them together).

" + "documentation": "

This example uses fixed query string params and variable query string params. The fixed query string parameters and variable parameters must both be serialized (implementations may need to merge them together).

", + "readonly": true }, - "description": "Mixes constant and variable query string parameters", "params": { "baz": "bam" }, @@ -632,6 +658,7 @@ }, { "id": "RestJsonConstantAndVariableQueryStringAllValues", + "description": "Mixes constant and variable query string parameters", "given": { "name": "ConstantAndVariableQueryString", "http": { @@ -642,9 +669,9 @@ "input": { "shape": "ConstantAndVariableQueryStringInput" }, - "documentation": "

This example uses fixed query string params and variable query string params. The fixed query string parameters and variable parameters must both be serialized (implementations may need to merge them together).

" + "documentation": "

This example uses fixed query string params and variable query string params. The fixed query string parameters and variable parameters must both be serialized (implementations may need to merge them together).

", + "readonly": true }, - "description": "Mixes constant and variable query string parameters", "params": { "baz": "bam", "maybeSet": "yes" @@ -660,11 +687,20 @@ { "description": "Test cases for ConstantQueryString operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "ConstantQueryStringInput": { @@ -687,6 +723,7 @@ "cases": [ { "id": "RestJsonConstantQueryString", + "description": "Includes constant query string parameters", "given": { "name": "ConstantQueryString", "http": { @@ -697,9 +734,9 @@ "input": { "shape": "ConstantQueryStringInput" }, - "documentation": "

This example uses a constant query string parameters and a label. This simply tests that labels and query string parameters are compatible. The fixed query string parameter named "hello" should in no way conflict with the label, {hello}.

" + "documentation": "

This example uses a constant query string parameters and a label. This simply tests that labels and query string parameters are compatible. The fixed query string parameter named "hello" should in no way conflict with the label, {hello}.

", + "readonly": true }, - "description": "Includes constant query string parameters", "params": { "hello": "hi" }, @@ -714,13 +751,27 @@ { "description": "Test cases for DocumentType operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Document": { + "type": "structure", + "members": {}, + "document": true + }, "DocumentTypeInputOutput": { "type": "structure", "members": { @@ -734,16 +785,12 @@ }, "String": { "type": "string" - }, - "Document": { - "type": "structure", - "members": {}, - "document": true } }, "cases": [ { "id": "DocumentTypeInputWithObject", + "description": "Serializes document types as part of the JSON request payload with no escaping.", "given": { "name": "DocumentType", "http": { @@ -757,7 +804,6 @@ "documentation": "

This example serializes a document as part of the payload.

", "idempotent": true }, - "description": "Serializes document types as part of the JSON request payload with no escaping.", "params": { "stringValue": "string", "documentValue": { @@ -775,6 +821,7 @@ }, { "id": "DocumentInputWithString", + "description": "Serializes document types using a string.", "given": { "name": "DocumentType", "http": { @@ -788,7 +835,6 @@ "documentation": "

This example serializes a document as part of the payload.

", "idempotent": true }, - "description": "Serializes document types using a string.", "params": { "stringValue": "string", "documentValue": "hello" @@ -804,6 +850,7 @@ }, { "id": "DocumentInputWithNumber", + "description": "Serializes document types using a number.", "given": { "name": "DocumentType", "http": { @@ -817,7 +864,6 @@ "documentation": "

This example serializes a document as part of the payload.

", "idempotent": true }, - "description": "Serializes document types using a number.", "params": { "stringValue": "string", "documentValue": 10 @@ -833,6 +879,7 @@ }, { "id": "DocumentInputWithBoolean", + "description": "Serializes document types using a boolean.", "given": { "name": "DocumentType", "http": { @@ -846,7 +893,6 @@ "documentation": "

This example serializes a document as part of the payload.

", "idempotent": true }, - "description": "Serializes document types using a boolean.", "params": { "stringValue": "string", "documentValue": true @@ -862,6 +908,7 @@ }, { "id": "DocumentInputWithList", + "description": "Serializes document types using a list.", "given": { "name": "DocumentType", "http": { @@ -875,7 +922,6 @@ "documentation": "

This example serializes a document as part of the payload.

", "idempotent": true }, - "description": "Serializes document types using a list.", "params": { "stringValue": "string", "documentValue": [ @@ -909,13 +955,27 @@ { "description": "Test cases for DocumentTypeAsMapValue operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Document": { + "type": "structure", + "members": {}, + "document": true + }, "DocumentTypeAsMapValueInputOutput": { "type": "structure", "members": { @@ -933,11 +993,6 @@ "shape": "Document" } }, - "Document": { - "type": "structure", - "members": {}, - "document": true - }, "String": { "type": "string" } @@ -945,6 +1000,7 @@ "cases": [ { "id": "DocumentTypeAsMapValueInput", + "description": "Serializes a map that uses documents as the value.", "given": { "name": "DocumentTypeAsMapValue", "http": { @@ -958,7 +1014,6 @@ "documentation": "

This example serializes documents as the value of maps.

", "idempotent": true }, - "description": "Serializes a map that uses documents as the value.", "params": { "docValuedMap": { "foo": { @@ -987,13 +1042,27 @@ { "description": "Test cases for DocumentTypeAsPayload operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Document": { + "type": "structure", + "members": {}, + "document": true + }, "DocumentTypeAsPayloadInputOutput": { "type": "structure", "members": { @@ -1002,16 +1071,12 @@ } }, "payload": "documentValue" - }, - "Document": { - "type": "structure", - "members": {}, - "document": true } }, "cases": [ { "id": "DocumentTypeAsPayloadInput", + "description": "Serializes a document as the target of the httpPayload trait.", "given": { "name": "DocumentTypeAsPayload", "http": { @@ -1025,7 +1090,6 @@ "documentation": "

This example serializes a document as the entire HTTP payload.

", "idempotent": true }, - "description": "Serializes a document as the target of the httpPayload trait.", "params": { "documentValue": { "foo": "bar" @@ -1042,6 +1106,7 @@ }, { "id": "DocumentTypeAsPayloadInputString", + "description": "Serializes a document as the target of the httpPayload trait using a string.", "given": { "name": "DocumentTypeAsPayload", "http": { @@ -1055,7 +1120,6 @@ "documentation": "

This example serializes a document as the entire HTTP payload.

", "idempotent": true }, - "description": "Serializes a document as the target of the httpPayload trait using a string.", "params": { "documentValue": "hello" }, @@ -1073,11 +1137,20 @@ { "description": "Test cases for EmptyInputAndEmptyOutput operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "EmptyInputAndEmptyOutputInput": { @@ -1088,6 +1161,7 @@ "cases": [ { "id": "RestJsonEmptyInputAndEmptyOutput", + "description": "Clients should not serialize a JSON payload when no parameters\nare given that are sent in the body. A service will tolerate\nclients that omit a payload or that send a JSON object.", "given": { "name": "EmptyInputAndEmptyOutput", "http": { @@ -1100,7 +1174,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there's no request or response payload because the operation has an empty input and empty output structure that reuses the same shape. While this should be rare, code generators must support this.

" }, - "description": "Clients should not serialize a JSON payload when no parameters\nare given that are sent in the body. A service will tolerate\nclients that omit a payload or that send a JSON object.", "params": {}, "serialized": { "method": "POST", @@ -1112,17 +1185,28 @@ }, { "description": "Test cases for EndpointOperation operation", + "clientEndpoint": "https://example.com", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": {}, "cases": [ { "id": "RestJsonEndpointTrait", + "description": "Operations can prepend to the given host if they define the\nendpoint trait.", "given": { "name": "EndpointOperation", "http": { @@ -1134,7 +1218,6 @@ "hostPrefix": "foo." } }, - "description": "Operations can prepend to the given host if they define the\nendpoint trait.", "params": {}, "serialized": { "method": "POST", @@ -1143,17 +1226,26 @@ "host": "foo.example.com" } } - ], - "clientEndpoint": "https://example.com" + ] }, { "description": "Test cases for EndpointWithHostLabelOperation operation", + "clientEndpoint": "https://example.com", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HostLabelInput": { @@ -1175,6 +1267,7 @@ "cases": [ { "id": "RestJsonEndpointTraitWithHostLabel", + "description": "Operations can prepend to the given host if they define the\nendpoint trait, and can use the host label trait to define\nfurther customization based on user input.", "given": { "name": "EndpointWithHostLabelOperation", "http": { @@ -1189,7 +1282,6 @@ "hostPrefix": "foo.{label}." } }, - "description": "Operations can prepend to the given host if they define the\nendpoint trait, and can use the host label trait to define\nfurther customization based on user input.", "params": { "label": "bar" }, @@ -1200,31 +1292,41 @@ "host": "foo.bar.example.com" } } - ], - "clientEndpoint": "https://example.com" + ] }, { "description": "Test cases for HostWithPathOperation operation", + "clientEndpoint": "https://example.com/custom", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": {}, "cases": [ { "id": "RestJsonHostWithPath", + "description": "Custom endpoints supplied by users can have paths", "given": { "name": "HostWithPathOperation", "http": { "method": "GET", "requestUri": "/HostWithPathOperation", "responseCode": 200 - } + }, + "readonly": true }, - "description": "Custom endpoints supplied by users can have paths", "params": {}, "serialized": { "method": "GET", @@ -1233,17 +1335,25 @@ "host": "example.com/custom" } } - ], - "clientEndpoint": "https://example.com/custom" + ] }, { "description": "Test cases for HttpChecksumRequired operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpChecksumRequiredInputOutput": { @@ -1261,6 +1371,7 @@ "cases": [ { "id": "RestJsonHttpChecksumRequired", + "description": "Adds Content-MD5 header", "given": { "name": "HttpChecksumRequired", "http": { @@ -1274,7 +1385,6 @@ "documentation": "

This example tests httpChecksumRequired trait

", "httpChecksumRequired": true }, - "description": "Adds Content-MD5 header", "params": { "foo": "base64 encoded md5 checksum" }, @@ -1290,14 +1400,106 @@ } ] }, + { + "description": "Test cases for HttpEmptyPrefixHeaders operation", + "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", + "protocol": "rest-json", + "protocols": [ + "rest-json" + ], + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" + }, + "shapes": { + "HttpEmptyPrefixHeadersInput": { + "type": "structure", + "members": { + "prefixHeaders": { + "shape": "StringMap", + "location": "headers", + "locationName": "" + }, + "specificHeader": { + "shape": "String", + "location": "header", + "locationName": "hello" + } + } + }, + "String": { + "type": "string" + }, + "StringMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + } + } + }, + "cases": [ + { + "id": "RestJsonHttpEmptyPrefixHeadersRequestClient", + "description": "Serializes all request headers, using specific when present", + "given": { + "name": "HttpEmptyPrefixHeaders", + "http": { + "method": "GET", + "requestUri": "/HttpEmptyPrefixHeaders", + "responseCode": 200 + }, + "input": { + "shape": "HttpEmptyPrefixHeadersInput" + }, + "documentation": "

Clients that perform this test extract all headers from the response.

", + "readonly": true + }, + "params": { + "prefixHeaders": { + "x-foo": "Foo", + "hello": "Hello" + }, + "specificHeader": "There" + }, + "serialized": { + "method": "GET", + "uri": "/HttpEmptyPrefixHeaders", + "body": "", + "headers": { + "x-foo": "Foo", + "hello": "There" + } + } + } + ] + }, { "description": "Test cases for HttpEnumPayload operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "EnumPayloadInput": { @@ -1347,13 +1549,25 @@ { "description": "Test cases for HttpPayloadTraits operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Blob": { + "type": "blob" + }, "HttpPayloadTraitsInputOutput": { "type": "structure", "members": { @@ -1370,14 +1584,12 @@ }, "String": { "type": "string" - }, - "Blob": { - "type": "blob" } }, "cases": [ { "id": "RestJsonHttpPayloadTraitsWithBlob", + "description": "Serializes a blob in the HTTP payload", "given": { "name": "HttpPayloadTraits", "http": { @@ -1390,7 +1602,6 @@ }, "documentation": "

This example serializes a blob shape in the payload.

In this example, no JSON document is synthesized because the payload is not a structure or a union type.

" }, - "description": "Serializes a blob in the HTTP payload", "params": { "foo": "Foo", "blob": "blobby blob blob" @@ -1400,8 +1611,8 @@ "uri": "/HttpPayloadTraits", "body": "blobby blob blob", "headers": { - "Content-Type": "application/octet-stream", - "X-Foo": "Foo" + "X-Foo": "Foo", + "Content-Type": "application/octet-stream" }, "requireHeaders": [ "Content-Length" @@ -1410,6 +1621,7 @@ }, { "id": "RestJsonHttpPayloadTraitsWithNoBlobBody", + "description": "Serializes an empty blob in the HTTP payload", "given": { "name": "HttpPayloadTraits", "http": { @@ -1422,7 +1634,6 @@ }, "documentation": "

This example serializes a blob shape in the payload.

In this example, no JSON document is synthesized because the payload is not a structure or a union type.

" }, - "description": "Serializes an empty blob in the HTTP payload", "params": { "foo": "Foo" }, @@ -1440,11 +1651,20 @@ { "description": "Test cases for HttpPayloadWithStructure operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpPayloadWithStructureInputOutput": { @@ -1474,6 +1694,7 @@ "cases": [ { "id": "RestJsonHttpPayloadWithStructure", + "description": "Serializes a structure in the payload", "given": { "name": "HttpPayloadWithStructure", "http": { @@ -1487,7 +1708,6 @@ "documentation": "

This example serializes a structure in the payload.

Note that serializing a structure changes the wrapper element name to match the targeted structure.

", "idempotent": true }, - "description": "Serializes a structure in the payload", "params": { "nested": { "greeting": "hello", @@ -1511,11 +1731,20 @@ { "description": "Test cases for HttpPayloadWithUnion operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpPayloadWithUnionInputOutput": { @@ -1527,6 +1756,9 @@ }, "payload": "nested" }, + "String": { + "type": "string" + }, "UnionPayload": { "type": "structure", "members": { @@ -1535,14 +1767,12 @@ } }, "union": true - }, - "String": { - "type": "string" } }, "cases": [ { "id": "RestJsonHttpPayloadWithUnion", + "description": "Serializes a union in the payload.", "given": { "name": "HttpPayloadWithUnion", "http": { @@ -1556,7 +1786,6 @@ "documentation": "

This example serializes a union in the payload.

", "idempotent": true }, - "description": "Serializes a union in the payload.", "params": { "nested": { "greeting": "hello" @@ -1576,6 +1805,7 @@ }, { "id": "RestJsonHttpPayloadWithUnsetUnion", + "description": "No payload is sent if the union has no value.", "given": { "name": "HttpPayloadWithUnion", "http": { @@ -1589,7 +1819,6 @@ "documentation": "

This example serializes a union in the payload.

", "idempotent": true }, - "description": "No payload is sent if the union has no value.", "params": {}, "serialized": { "method": "PUT", @@ -1602,11 +1831,20 @@ { "description": "Test cases for HttpPrefixHeaders operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpPrefixHeadersInput": { @@ -1640,6 +1878,7 @@ "cases": [ { "id": "RestJsonHttpPrefixHeadersArePresent", + "description": "Adds headers by prefix", "given": { "name": "HttpPrefixHeaders", "http": { @@ -1650,9 +1889,9 @@ "input": { "shape": "HttpPrefixHeadersInput" }, - "documentation": "

This examples adds headers to the input of a request and response by prefix.

" + "documentation": "

This examples adds headers to the input of a request and response by prefix.

", + "readonly": true }, - "description": "Adds headers by prefix", "params": { "foo": "Foo", "fooMap": { @@ -1666,13 +1905,14 @@ "body": "", "headers": { "x-foo": "Foo", - "x-foo-abc": "Abc value", - "x-foo-def": "Def value" + "x-foo-def": "Def value", + "x-foo-abc": "Abc value" } } }, { "id": "RestJsonHttpPrefixHeadersAreNotPresent", + "description": "No prefix headers are serialized because the value is not present", "given": { "name": "HttpPrefixHeaders", "http": { @@ -1683,9 +1923,9 @@ "input": { "shape": "HttpPrefixHeadersInput" }, - "documentation": "

This examples adds headers to the input of a request and response by prefix.

" + "documentation": "

This examples adds headers to the input of a request and response by prefix.

", + "readonly": true }, - "description": "No prefix headers are serialized because the value is not present", "params": { "foo": "Foo", "fooMap": {} @@ -1701,6 +1941,7 @@ }, { "id": "RestJsonHttpPrefixEmptyHeaders", + "description": "Serialize prefix headers were the value is present but empty", "given": { "name": "HttpPrefixHeaders", "http": { @@ -1711,9 +1952,9 @@ "input": { "shape": "HttpPrefixHeadersInput" }, - "documentation": "

This examples adds headers to the input of a request and response by prefix.

" + "documentation": "

This examples adds headers to the input of a request and response by prefix.

", + "readonly": true }, - "description": "Serialize prefix headers were the value is present but empty", "params": { "fooMap": { "abc": "" @@ -1730,16 +1971,128 @@ } ] }, + { + "description": "Test cases for HttpQueryParamsOnlyOperation operation", + "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", + "protocol": "rest-json", + "protocols": [ + "rest-json" + ], + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" + }, + "shapes": { + "HttpQueryParamsOnlyInput": { + "type": "structure", + "members": { + "queryMap": { + "shape": "QueryMap", + "location": "querystring" + } + } + }, + "QueryMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + } + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "id": "HttpQueryParamsOnlyRequest", + "description": "Test that httpQueryParams are included in request when no other query parameters exist", + "given": { + "name": "HttpQueryParamsOnlyOperation", + "http": { + "method": "GET", + "requestUri": "/http-query-params-only", + "responseCode": 200 + }, + "input": { + "shape": "HttpQueryParamsOnlyInput" + }, + "documentation": "

This example tests httpQueryParams when no other query parameters exist.

", + "readonly": true + }, + "params": { + "queryMap": { + "a": "b", + "c": "d" + } + }, + "serialized": { + "method": "GET", + "uri": "/http-query-params-only?a=b&c=d" + } + }, + { + "id": "HttpQueryParamsOnlyEmptyRequest", + "description": "Test that empty httpQueryParams map results in no query parameters", + "given": { + "name": "HttpQueryParamsOnlyOperation", + "http": { + "method": "GET", + "requestUri": "/http-query-params-only", + "responseCode": 200 + }, + "input": { + "shape": "HttpQueryParamsOnlyInput" + }, + "documentation": "

This example tests httpQueryParams when no other query parameters exist.

", + "readonly": true + }, + "params": { + "queryMap": {} + }, + "serialized": { + "method": "GET", + "uri": "/http-query-params-only" + } + } + ] + }, { "description": "Test cases for HttpRequestWithFloatLabels operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Double": { + "type": "double", + "box": true + }, + "Float": { + "type": "float", + "box": true + }, "HttpRequestWithFloatLabelsInput": { "type": "structure", "required": [ @@ -1758,19 +2111,12 @@ "locationName": "double" } } - }, - "Float": { - "type": "float", - "box": true - }, - "Double": { - "type": "double", - "box": true } }, "cases": [ { "id": "RestJsonSupportsNaNFloatLabels", + "description": "Supports handling NaN float label values.", "given": { "name": "HttpRequestWithFloatLabels", "http": { @@ -1780,9 +2126,9 @@ }, "input": { "shape": "HttpRequestWithFloatLabelsInput" - } + }, + "readonly": true }, - "description": "Supports handling NaN float label values.", "params": { "float": "NaN", "double": "NaN" @@ -1795,6 +2141,7 @@ }, { "id": "RestJsonSupportsInfinityFloatLabels", + "description": "Supports handling Infinity float label values.", "given": { "name": "HttpRequestWithFloatLabels", "http": { @@ -1804,9 +2151,9 @@ }, "input": { "shape": "HttpRequestWithFloatLabelsInput" - } + }, + "readonly": true }, - "description": "Supports handling Infinity float label values.", "params": { "float": "Infinity", "double": "Infinity" @@ -1819,6 +2166,7 @@ }, { "id": "RestJsonSupportsNegativeInfinityFloatLabels", + "description": "Supports handling -Infinity float label values.", "given": { "name": "HttpRequestWithFloatLabels", "http": { @@ -1828,9 +2176,9 @@ }, "input": { "shape": "HttpRequestWithFloatLabelsInput" - } + }, + "readonly": true }, - "description": "Supports handling -Infinity float label values.", "params": { "float": "-Infinity", "double": "-Infinity" @@ -1846,11 +2194,20 @@ { "description": "Test cases for HttpRequestWithGreedyLabelInPath operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpRequestWithGreedyLabelInPathInput": { @@ -1879,6 +2236,7 @@ "cases": [ { "id": "RestJsonHttpRequestWithGreedyLabelInPath", + "description": "Serializes greedy labels and normal labels", "given": { "name": "HttpRequestWithGreedyLabelInPath", "http": { @@ -1888,9 +2246,9 @@ }, "input": { "shape": "HttpRequestWithGreedyLabelInPathInput" - } + }, + "readonly": true }, - "description": "Serializes greedy labels and normal labels", "params": { "foo": "hello/escape", "baz": "there/guy" @@ -1906,13 +2264,34 @@ { "description": "Test cases for HttpRequestWithLabels operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "Double": { + "type": "double", + "box": true + }, + "Float": { + "type": "float", + "box": true + }, "HttpRequestWithLabelsInput": { "type": "structure", "required": [ @@ -1970,9 +2349,6 @@ } } }, - "String": { - "type": "string" - }, "Integer": { "type": "integer", "box": true @@ -1981,17 +2357,8 @@ "type": "long", "box": true }, - "Float": { - "type": "float", - "box": true - }, - "Double": { - "type": "double", - "box": true - }, - "Boolean": { - "type": "boolean", - "box": true + "String": { + "type": "string" }, "Timestamp": { "type": "timestamp" @@ -2000,6 +2367,7 @@ "cases": [ { "id": "RestJsonInputWithHeadersAndAllParams", + "description": "Sends a GET request that uses URI label bindings", "given": { "name": "HttpRequestWithLabels", "http": { @@ -2010,9 +2378,9 @@ "input": { "shape": "HttpRequestWithLabelsInput" }, - "documentation": "

The example tests how requests are serialized when there's no input payload but there are HTTP labels.

" + "documentation": "

The example tests how requests are serialized when there's no input payload but there are HTTP labels.

", + "readonly": true }, - "description": "Sends a GET request that uses URI label bindings", "params": { "string": "string", "short": 1, @@ -2031,6 +2399,7 @@ }, { "id": "RestJsonHttpRequestLabelEscaping", + "description": "Sends a GET request that uses URI label bindings", "given": { "name": "HttpRequestWithLabels", "http": { @@ -2041,9 +2410,9 @@ "input": { "shape": "HttpRequestWithLabelsInput" }, - "documentation": "

The example tests how requests are serialized when there's no input payload but there are HTTP labels.

" + "documentation": "

The example tests how requests are serialized when there's no input payload but there are HTTP labels.

", + "readonly": true }, - "description": "Sends a GET request that uses URI label bindings", "params": { "string": " %:/?#[]@!$&'()*+,;=😹", "short": 1, @@ -2065,13 +2434,34 @@ { "description": "Test cases for HttpRequestWithLabelsAndTimestampFormat operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "DateTime": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, + "EpochSeconds": { + "type": "timestamp", + "timestampFormat": "unixTimestamp" + }, + "HttpDate": { + "type": "timestamp", + "timestampFormat": "rfc822" + }, "HttpRequestWithLabelsAndTimestampFormatInput": { "type": "structure", "required": [ @@ -2121,37 +2511,26 @@ } } }, - "SyntheticTimestamp_epoch_seconds": { - "type": "timestamp", - "timestampFormat": "unixTimestamp" - }, - "SyntheticTimestamp_http_date": { - "type": "timestamp", - "timestampFormat": "rfc822" - }, "SyntheticTimestamp_date_time": { "type": "timestamp", "timestampFormat": "iso8601" }, - "Timestamp": { - "type": "timestamp" - }, - "EpochSeconds": { + "SyntheticTimestamp_epoch_seconds": { "type": "timestamp", "timestampFormat": "unixTimestamp" }, - "HttpDate": { + "SyntheticTimestamp_http_date": { "type": "timestamp", "timestampFormat": "rfc822" }, - "DateTime": { - "type": "timestamp", - "timestampFormat": "iso8601" + "Timestamp": { + "type": "timestamp" } }, "cases": [ { "id": "RestJsonHttpRequestWithLabelsAndTimestampFormat", + "description": "Serializes different timestamp formats in URI labels", "given": { "name": "HttpRequestWithLabelsAndTimestampFormat", "http": { @@ -2162,9 +2541,9 @@ "input": { "shape": "HttpRequestWithLabelsAndTimestampFormatInput" }, - "documentation": "

The example tests how requests serialize different timestamp formats in the URI path.

" + "documentation": "

The example tests how requests serialize different timestamp formats in the URI path.

", + "readonly": true }, - "description": "Serializes different timestamp formats in URI labels", "params": { "memberEpochSeconds": 1576540098, "memberHttpDate": 1576540098, @@ -2185,11 +2564,20 @@ { "description": "Test cases for HttpRequestWithRegexLiteral operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpRequestWithRegexLiteralInput": { @@ -2212,6 +2600,7 @@ "cases": [ { "id": "RestJsonToleratesRegexCharsInSegments", + "description": "Path matching is not broken by regex expressions in literal segments", "given": { "name": "HttpRequestWithRegexLiteral", "http": { @@ -2221,9 +2610,9 @@ }, "input": { "shape": "HttpRequestWithRegexLiteralInput" - } + }, + "readonly": true }, - "description": "Path matching is not broken by regex expressions in literal segments", "params": { "str": "abc" }, @@ -2238,13 +2627,25 @@ { "description": "Test cases for HttpStringPayload operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "String": { + "type": "string" + }, "StringPayloadInput": { "type": "structure", "members": { @@ -2253,9 +2654,6 @@ } }, "payload": "payload" - }, - "String": { - "type": "string" } }, "cases": [ @@ -2292,13 +2690,56 @@ { "description": "Test cases for InputAndOutputWithHeaders operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "BooleanList": { + "type": "list", + "member": { + "shape": "Boolean" + } + }, + "Double": { + "type": "double", + "box": true + }, + "Float": { + "type": "float", + "box": true + }, + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] + }, + "FooEnumList": { + "type": "list", + "member": { + "shape": "FooEnum" + } + }, "InputAndOutputWithHeadersIO": { "type": "structure", "members": { @@ -2394,28 +2835,32 @@ } } }, - "String": { - "type": "string" - }, "Integer": { "type": "integer", "box": true }, + "IntegerEnum": { + "type": "integer", + "box": true + }, + "IntegerEnumList": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, + "IntegerList": { + "type": "list", + "member": { + "shape": "Integer" + } + }, "Long": { "type": "long", "box": true }, - "Float": { - "type": "float", - "box": true - }, - "Double": { - "type": "double", - "box": true - }, - "Boolean": { - "type": "boolean", - "box": true + "String": { + "type": "string" }, "StringList": { "type": "list", @@ -2429,57 +2874,20 @@ "shape": "String" } }, - "IntegerList": { - "type": "list", - "member": { - "shape": "Integer" - } - }, - "BooleanList": { - "type": "list", - "member": { - "shape": "Boolean" - } + "Timestamp": { + "type": "timestamp" }, "TimestampList": { "type": "list", "member": { "shape": "Timestamp" } - }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, - "FooEnumList": { - "type": "list", - "member": { - "shape": "FooEnum" - } - }, - "IntegerEnum": { - "type": "integer", - "box": true - }, - "IntegerEnumList": { - "type": "list", - "member": { - "shape": "IntegerEnum" - } - }, - "Timestamp": { - "type": "timestamp" } }, "cases": [ { "id": "RestJsonInputAndOutputWithStringHeaders", + "description": "Tests requests with string header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2492,7 +2900,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests requests with string header bindings", "params": { "headerString": "Hello", "headerStringList": [ @@ -2511,14 +2918,15 @@ "uri": "/InputAndOutputWithHeaders", "body": "", "headers": { - "X-String": "Hello", "X-StringList": "a, b, c", + "X-String": "Hello", "X-StringSet": "a, b, c" } } }, { "id": "RestJsonInputAndOutputWithQuotedStringHeaders", + "description": "Tests requests with string list header bindings that require quoting", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2531,7 +2939,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests requests with string list header bindings that require quoting", "params": { "headerStringList": [ "b,c", @@ -2550,6 +2957,7 @@ }, { "id": "RestJsonInputAndOutputWithNumericHeaders", + "description": "Tests requests with numeric header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2562,7 +2970,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests requests with numeric header bindings", "params": { "headerByte": 1, "headerShort": 123, @@ -2581,18 +2988,19 @@ "uri": "/InputAndOutputWithHeaders", "body": "", "headers": { + "X-Integer": "123", + "X-Short": "123", "X-Byte": "1", + "X-Long": "123", "X-Double": "1.1", "X-Float": "1.1", - "X-Integer": "123", - "X-IntegerList": "1, 2, 3", - "X-Long": "123", - "X-Short": "123" + "X-IntegerList": "1, 2, 3" } } }, { "id": "RestJsonInputAndOutputWithBooleanHeaders", + "description": "Tests requests with boolean header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2605,7 +3013,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests requests with boolean header bindings", "params": { "headerTrueBool": true, "headerFalseBool": false, @@ -2620,14 +3027,15 @@ "uri": "/InputAndOutputWithHeaders", "body": "", "headers": { + "X-BooleanList": "true, false, true", "X-Boolean1": "true", - "X-Boolean2": "false", - "X-BooleanList": "true, false, true" + "X-Boolean2": "false" } } }, { "id": "RestJsonInputAndOutputWithTimestampHeaders", + "description": "Tests requests with timestamp header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2640,7 +3048,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests requests with timestamp header bindings", "params": { "headerTimestampList": [ 1576540098, @@ -2658,6 +3065,7 @@ }, { "id": "RestJsonInputAndOutputWithEnumHeaders", + "description": "Tests requests with enum header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2670,7 +3078,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests requests with enum header bindings", "params": { "headerEnum": "Foo", "headerEnumList": [ @@ -2684,13 +3091,14 @@ "uri": "/InputAndOutputWithHeaders", "body": "", "headers": { - "X-Enum": "Foo", - "X-EnumList": "Foo, Bar, Baz" + "X-EnumList": "Foo, Bar, Baz", + "X-Enum": "Foo" } } }, { "id": "RestJsonInputAndOutputWithIntEnumHeaders", + "description": "Tests requests with intEnum header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2703,7 +3111,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests requests with intEnum header bindings", "params": { "headerIntegerEnum": 1, "headerIntegerEnumList": [ @@ -2717,13 +3124,14 @@ "uri": "/InputAndOutputWithHeaders", "body": "", "headers": { - "X-IntegerEnum": "1", - "X-IntegerEnumList": "1, 2, 3" + "X-IntegerEnumList": "1, 2, 3", + "X-IntegerEnum": "1" } } }, { "id": "RestJsonSupportsNaNFloatHeaderInputs", + "description": "Supports handling NaN float header values.", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2736,7 +3144,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Supports handling NaN float header values.", "params": { "headerFloat": "NaN", "headerDouble": "NaN" @@ -2746,13 +3153,14 @@ "uri": "/InputAndOutputWithHeaders", "body": "", "headers": { - "X-Double": "NaN", - "X-Float": "NaN" + "X-Float": "NaN", + "X-Double": "NaN" } } }, { "id": "RestJsonSupportsInfinityFloatHeaderInputs", + "description": "Supports handling Infinity float header values.", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2765,7 +3173,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Supports handling Infinity float header values.", "params": { "headerFloat": "Infinity", "headerDouble": "Infinity" @@ -2775,13 +3182,14 @@ "uri": "/InputAndOutputWithHeaders", "body": "", "headers": { - "X-Double": "Infinity", - "X-Float": "Infinity" + "X-Float": "Infinity", + "X-Double": "Infinity" } } }, { "id": "RestJsonSupportsNegativeInfinityFloatHeaderInputs", + "description": "Supports handling -Infinity float header values.", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2794,7 +3202,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Supports handling -Infinity float header values.", "params": { "headerFloat": "-Infinity", "headerDouble": "-Infinity" @@ -2804,8 +3211,8 @@ "uri": "/InputAndOutputWithHeaders", "body": "", "headers": { - "X-Double": "-Infinity", - "X-Float": "-Infinity" + "X-Float": "-Infinity", + "X-Double": "-Infinity" } } } @@ -2814,13 +3221,25 @@ { "description": "Test cases for JsonBlobs operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Blob": { + "type": "blob" + }, "JsonBlobsInputOutput": { "type": "structure", "members": { @@ -2828,14 +3247,12 @@ "shape": "Blob" } } - }, - "Blob": { - "type": "blob" } }, "cases": [ { "id": "RestJsonJsonBlobs", + "description": "Blobs are base64 encoded", "given": { "name": "JsonBlobs", "http": { @@ -2848,7 +3265,6 @@ }, "documentation": "

Blobs are base64 encoded

" }, - "description": "Blobs are base64 encoded", "params": { "data": "value" }, @@ -2866,36 +3282,22 @@ { "description": "Test cases for JsonEnums operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { - "JsonEnumsInputOutput": { - "type": "structure", - "members": { - "fooEnum1": { - "shape": "FooEnum" - }, - "fooEnum2": { - "shape": "FooEnum" - }, - "fooEnum3": { - "shape": "FooEnum" - }, - "fooEnumList": { - "shape": "FooEnumList" - }, - "fooEnumSet": { - "shape": "FooEnumSet" - }, - "fooEnumMap": { - "shape": "FooEnumMap" - } - } - }, "FooEnum": { "type": "string", "enum": [ @@ -2912,12 +3314,6 @@ "shape": "FooEnum" } }, - "FooEnumSet": { - "type": "list", - "member": { - "shape": "FooEnum" - } - }, "FooEnumMap": { "type": "map", "key": { @@ -2927,6 +3323,35 @@ "shape": "FooEnum" } }, + "FooEnumSet": { + "type": "list", + "member": { + "shape": "FooEnum" + } + }, + "JsonEnumsInputOutput": { + "type": "structure", + "members": { + "fooEnum1": { + "shape": "FooEnum" + }, + "fooEnum2": { + "shape": "FooEnum" + }, + "fooEnum3": { + "shape": "FooEnum" + }, + "fooEnumList": { + "shape": "FooEnumList" + }, + "fooEnumSet": { + "shape": "FooEnumSet" + }, + "fooEnumMap": { + "shape": "FooEnumMap" + } + } + }, "String": { "type": "string" } @@ -2934,6 +3359,7 @@ "cases": [ { "id": "RestJsonJsonEnums", + "description": "Serializes simple scalar properties", "given": { "name": "JsonEnums", "http": { @@ -2947,7 +3373,6 @@ "documentation": "

This example serializes enums as top level properties, in lists, sets, and maps.

", "idempotent": true }, - "description": "Serializes simple scalar properties", "params": { "fooEnum1": "Foo", "fooEnum2": "0", @@ -2979,13 +3404,47 @@ { "description": "Test cases for JsonIntEnums operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "IntegerEnum": { + "type": "integer", + "box": true + }, + "IntegerEnumList": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, + "IntegerEnumMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "IntegerEnum" + } + }, + "IntegerEnumSet": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, "JsonIntEnumsInputOutput": { "type": "structure", "members": { @@ -3009,31 +3468,6 @@ } } }, - "IntegerEnum": { - "type": "integer", - "box": true - }, - "IntegerEnumList": { - "type": "list", - "member": { - "shape": "IntegerEnum" - } - }, - "IntegerEnumSet": { - "type": "list", - "member": { - "shape": "IntegerEnum" - } - }, - "IntegerEnumMap": { - "type": "map", - "key": { - "shape": "String" - }, - "value": { - "shape": "IntegerEnum" - } - }, "String": { "type": "string" } @@ -3041,6 +3475,7 @@ "cases": [ { "id": "RestJsonJsonIntEnums", + "description": "Serializes intEnums as integers", "given": { "name": "JsonIntEnums", "http": { @@ -3054,7 +3489,6 @@ "documentation": "

This example serializes intEnums as top level properties, in lists, sets, and maps.

", "idempotent": true }, - "description": "Serializes intEnums as integers", "params": { "integerEnum1": 1, "integerEnum2": 2, @@ -3087,13 +3521,68 @@ { "description": "Test cases for JsonLists operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "BooleanList": { + "type": "list", + "member": { + "shape": "Boolean" + } + }, + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] + }, + "FooEnumList": { + "type": "list", + "member": { + "shape": "FooEnum" + } + }, + "Integer": { + "type": "integer", + "box": true + }, + "IntegerEnum": { + "type": "integer", + "box": true + }, + "IntegerEnumList": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, + "IntegerList": { + "type": "list", + "member": { + "shape": "Integer" + } + }, "JsonListsInputOutput": { "type": "structure", "members": { @@ -3127,55 +3616,28 @@ } } }, - "StringList": { + "NestedStringList": { "type": "list", "member": { - "shape": "String" - } - }, - "StringSet": { - "type": "list", - "member": { - "shape": "String" - } - }, - "IntegerList": { - "type": "list", - "member": { - "shape": "Integer" - } - }, - "BooleanList": { - "type": "list", - "member": { - "shape": "Boolean" - } + "shape": "StringList" + }, + "documentation": "

A list of lists of strings.

" }, - "TimestampList": { - "type": "list", - "member": { - "shape": "Timestamp" - } + "String": { + "type": "string" }, - "FooEnumList": { + "StringList": { "type": "list", "member": { - "shape": "FooEnum" + "shape": "String" } }, - "IntegerEnumList": { + "StringSet": { "type": "list", "member": { - "shape": "IntegerEnum" + "shape": "String" } }, - "NestedStringList": { - "type": "list", - "member": { - "shape": "StringList" - }, - "documentation": "

A list of lists of strings.

" - }, "StructureList": { "type": "list", "member": { @@ -3195,38 +3657,20 @@ } } }, - "String": { - "type": "string" - }, - "IntegerEnum": { - "type": "integer", - "box": true - }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, "Timestamp": { "type": "timestamp" }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true + "TimestampList": { + "type": "list", + "member": { + "shape": "Timestamp" + } } }, "cases": [ { "id": "RestJsonLists", + "description": "Serializes JSON lists", "given": { "name": "JsonLists", "http": { @@ -3240,7 +3684,6 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal JSON lists.
  2. Normal JSON sets.
  3. JSON lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Serializes JSON lists", "params": { "stringList": [ "foo", @@ -3302,6 +3745,7 @@ }, { "id": "RestJsonListsEmpty", + "description": "Serializes empty JSON lists", "given": { "name": "JsonLists", "http": { @@ -3315,7 +3759,6 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal JSON lists.
  2. Normal JSON sets.
  3. JSON lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Serializes empty JSON lists", "params": { "stringList": [] }, @@ -3333,40 +3776,33 @@ { "description": "Test cases for JsonMaps operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { - "JsonMapsInputOutput": { - "type": "structure", - "members": { - "denseStructMap": { - "shape": "DenseStructMap" - }, - "denseNumberMap": { - "shape": "DenseNumberMap" - }, - "denseBooleanMap": { - "shape": "DenseBooleanMap" - }, - "denseStringMap": { - "shape": "DenseStringMap" - }, - "denseSetMap": { - "shape": "DenseSetMap" - } - } + "Boolean": { + "type": "boolean", + "box": true }, - "DenseStructMap": { + "DenseBooleanMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "GreetingStruct" + "shape": "Boolean" } }, "DenseNumberMap": { @@ -3378,13 +3814,13 @@ "shape": "Integer" } }, - "DenseBooleanMap": { + "DenseSetMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "Boolean" + "shape": "StringSet" } }, "DenseStringMap": { @@ -3396,44 +3832,61 @@ "shape": "String" } }, - "DenseSetMap": { + "DenseStructMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "StringSet" + "shape": "GreetingStruct" } }, - "StringSet": { - "type": "list", - "member": { - "shape": "String" + "GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "shape": "String" + } } }, - "String": { - "type": "string" - }, - "Boolean": { - "type": "boolean", - "box": true - }, "Integer": { "type": "integer", "box": true }, - "GreetingStruct": { + "JsonMapsInputOutput": { "type": "structure", "members": { - "hi": { - "shape": "String" + "denseStructMap": { + "shape": "DenseStructMap" + }, + "denseNumberMap": { + "shape": "DenseNumberMap" + }, + "denseBooleanMap": { + "shape": "DenseBooleanMap" + }, + "denseStringMap": { + "shape": "DenseStringMap" + }, + "denseSetMap": { + "shape": "DenseSetMap" } } + }, + "String": { + "type": "string" + }, + "StringSet": { + "type": "list", + "member": { + "shape": "String" + } } }, "cases": [ { "id": "RestJsonJsonMaps", + "description": "Serializes JSON maps", "given": { "name": "JsonMaps", "http": { @@ -3446,7 +3899,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "Serializes JSON maps", "params": { "denseStructMap": { "foo": { @@ -3468,6 +3920,7 @@ }, { "id": "RestJsonSerializesZeroValuesInMaps", + "description": "Ensure that 0 and false are sent over the wire in all maps and lists", "given": { "name": "JsonMaps", "http": { @@ -3480,7 +3933,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "Ensure that 0 and false are sent over the wire in all maps and lists", "params": { "denseNumberMap": { "x": 0 @@ -3500,6 +3952,7 @@ }, { "id": "RestJsonSerializesDenseSetMap", + "description": "A request that contains a dense map of sets.", "given": { "name": "JsonMaps", "http": { @@ -3512,7 +3965,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "A request that contains a dense map of sets.", "params": { "denseSetMap": { "x": [], @@ -3536,13 +3988,34 @@ { "description": "Test cases for JsonTimestamps operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "DateTime": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, + "EpochSeconds": { + "type": "timestamp", + "timestampFormat": "unixTimestamp" + }, + "HttpDate": { + "type": "timestamp", + "timestampFormat": "rfc822" + }, "JsonTimestampsInputOutput": { "type": "structure", "members": { @@ -3569,37 +4042,26 @@ } } }, - "Timestamp": { - "type": "timestamp" - }, "SyntheticTimestamp_date_time": { "type": "timestamp", "timestampFormat": "iso8601" }, - "DateTime": { - "type": "timestamp", - "timestampFormat": "iso8601" - }, "SyntheticTimestamp_epoch_seconds": { "type": "timestamp", "timestampFormat": "unixTimestamp" }, - "EpochSeconds": { - "type": "timestamp", - "timestampFormat": "unixTimestamp" - }, "SyntheticTimestamp_http_date": { "type": "timestamp", "timestampFormat": "rfc822" }, - "HttpDate": { - "type": "timestamp", - "timestampFormat": "rfc822" + "Timestamp": { + "type": "timestamp" } }, "cases": [ { "id": "RestJsonJsonTimestamps", + "description": "Tests how normal timestamps are serialized", "given": { "name": "JsonTimestamps", "http": { @@ -3612,7 +4074,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Tests how normal timestamps are serialized", "params": { "normal": 1398796238 }, @@ -3627,6 +4088,7 @@ }, { "id": "RestJsonJsonTimestampsWithDateTimeFormat", + "description": "Ensures that the timestampFormat of date-time works like normal timestamps", "given": { "name": "JsonTimestamps", "http": { @@ -3639,7 +4101,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of date-time works like normal timestamps", "params": { "dateTime": 1398796238 }, @@ -3654,6 +4115,7 @@ }, { "id": "RestJsonJsonTimestampsWithDateTimeOnTargetFormat", + "description": "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps", "given": { "name": "JsonTimestamps", "http": { @@ -3666,7 +4128,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps", "params": { "dateTimeOnTarget": 1398796238 }, @@ -3681,6 +4142,7 @@ }, { "id": "RestJsonJsonTimestampsWithEpochSecondsFormat", + "description": "Ensures that the timestampFormat of epoch-seconds works", "given": { "name": "JsonTimestamps", "http": { @@ -3693,7 +4155,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of epoch-seconds works", "params": { "epochSeconds": 1398796238 }, @@ -3708,6 +4169,7 @@ }, { "id": "RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat", + "description": "Ensures that the timestampFormat of epoch-seconds on the target shape works", "given": { "name": "JsonTimestamps", "http": { @@ -3720,7 +4182,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of epoch-seconds on the target shape works", "params": { "epochSecondsOnTarget": 1398796238 }, @@ -3735,6 +4196,7 @@ }, { "id": "RestJsonJsonTimestampsWithHttpDateFormat", + "description": "Ensures that the timestampFormat of http-date works", "given": { "name": "JsonTimestamps", "http": { @@ -3747,7 +4209,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of http-date works", "params": { "httpDate": 1398796238 }, @@ -3762,6 +4223,7 @@ }, { "id": "RestJsonJsonTimestampsWithHttpDateOnTargetFormat", + "description": "Ensures that the timestampFormat of http-date on the target shape works", "given": { "name": "JsonTimestamps", "http": { @@ -3774,7 +4236,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of http-date on the target shape works", "params": { "httpDateOnTarget": 1398796238 }, @@ -3792,21 +4253,50 @@ { "description": "Test cases for JsonUnions operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { - "UnionInputOutput": { + "Blob": { + "type": "blob" + }, + "Boolean": { + "type": "boolean", + "box": true + }, + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] + }, + "GreetingStruct": { "type": "structure", "members": { - "contents": { - "shape": "MyUnion" + "hi": { + "shape": "String" } - }, - "documentation": "

A shared structure that contains a single union member.

" + } + }, + "Integer": { + "type": "integer", + "box": true }, "MyUnion": { "type": "structure", @@ -3845,38 +4335,22 @@ "documentation": "

A union with a representative set of types for members.

", "union": true }, + "RenamedGreeting": { + "type": "structure", + "members": { + "salutation": { + "shape": "String" + } + } + }, "String": { "type": "string" }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true - }, - "Blob": { - "type": "blob" - }, - "Timestamp": { - "type": "timestamp" - }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, - "StringList": { - "type": "list", - "member": { - "shape": "String" - } + "StringList": { + "type": "list", + "member": { + "shape": "String" + } }, "StringMap": { "type": "map", @@ -3887,26 +4361,23 @@ "shape": "String" } }, - "GreetingStruct": { - "type": "structure", - "members": { - "hi": { - "shape": "String" - } - } + "Timestamp": { + "type": "timestamp" }, - "RenamedGreeting": { + "UnionInputOutput": { "type": "structure", "members": { - "salutation": { - "shape": "String" + "contents": { + "shape": "MyUnion" } - } + }, + "documentation": "

A shared structure that contains a single union member.

" } }, "cases": [ { "id": "RestJsonSerializeStringUnionValue", + "description": "Serializes a string union value", "given": { "name": "JsonUnions", "http": { @@ -3920,7 +4391,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a string union value", "params": { "contents": { "stringValue": "foo" @@ -3937,6 +4407,7 @@ }, { "id": "RestJsonSerializeBooleanUnionValue", + "description": "Serializes a boolean union value", "given": { "name": "JsonUnions", "http": { @@ -3950,7 +4421,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a boolean union value", "params": { "contents": { "booleanValue": true @@ -3967,6 +4437,7 @@ }, { "id": "RestJsonSerializeNumberUnionValue", + "description": "Serializes a number union value", "given": { "name": "JsonUnions", "http": { @@ -3980,7 +4451,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a number union value", "params": { "contents": { "numberValue": 1 @@ -3997,6 +4467,7 @@ }, { "id": "RestJsonSerializeBlobUnionValue", + "description": "Serializes a blob union value", "given": { "name": "JsonUnions", "http": { @@ -4010,7 +4481,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a blob union value", "params": { "contents": { "blobValue": "foo" @@ -4027,6 +4497,7 @@ }, { "id": "RestJsonSerializeTimestampUnionValue", + "description": "Serializes a timestamp union value", "given": { "name": "JsonUnions", "http": { @@ -4040,7 +4511,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a timestamp union value", "params": { "contents": { "timestampValue": 1398796238 @@ -4057,6 +4527,7 @@ }, { "id": "RestJsonSerializeEnumUnionValue", + "description": "Serializes an enum union value", "given": { "name": "JsonUnions", "http": { @@ -4070,7 +4541,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes an enum union value", "params": { "contents": { "enumValue": "Foo" @@ -4087,6 +4557,7 @@ }, { "id": "RestJsonSerializeListUnionValue", + "description": "Serializes a list union value", "given": { "name": "JsonUnions", "http": { @@ -4100,7 +4571,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a list union value", "params": { "contents": { "listValue": [ @@ -4120,6 +4590,7 @@ }, { "id": "RestJsonSerializeMapUnionValue", + "description": "Serializes a map union value", "given": { "name": "JsonUnions", "http": { @@ -4133,7 +4604,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a map union value", "params": { "contents": { "mapValue": { @@ -4153,6 +4623,7 @@ }, { "id": "RestJsonSerializeStructureUnionValue", + "description": "Serializes a structure union value", "given": { "name": "JsonUnions", "http": { @@ -4166,7 +4637,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a structure union value", "params": { "contents": { "structureValue": { @@ -4185,6 +4655,7 @@ }, { "id": "RestJsonSerializeRenamedStructureUnionValue", + "description": "Serializes a renamed structure union value", "given": { "name": "JsonUnions", "http": { @@ -4198,7 +4669,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Serializes a renamed structure union value", "params": { "contents": { "renamedStructureValue": { @@ -4220,13 +4690,25 @@ { "description": "Test cases for MediaTypeHeader operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "JsonValue": { + "type": "string" + }, "MediaTypeHeaderInput": { "type": "structure", "members": { @@ -4237,14 +4719,12 @@ "locationName": "X-Json" } } - }, - "JsonValue": { - "type": "string" } }, "cases": [ { "id": "MediaTypeHeaderInputBase64", + "description": "Headers that target strings with a mediaType are base64 encoded", "given": { "name": "MediaTypeHeader", "http": { @@ -4255,9 +4735,9 @@ "input": { "shape": "MediaTypeHeaderInput" }, - "documentation": "

This example ensures that mediaType strings are base64 encoded in headers.

" + "documentation": "

This example ensures that mediaType strings are base64 encoded in headers.

", + "readonly": true }, - "description": "Headers that target strings with a mediaType are base64 encoded", "params": { "json": "true" }, @@ -4275,16 +4755,26 @@ { "description": "Test cases for NoInputAndNoOutput operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": {}, "cases": [ { "id": "RestJsonNoInputAndNoOutput", + "description": "No input serializes no payload. When clients do not need to\nserialize any data in the payload, they should omit a payload\naltogether.", "given": { "name": "NoInputAndNoOutput", "http": { @@ -4294,7 +4784,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input or output. While this should be rare, code generators must support this.

" }, - "description": "No input serializes no payload. When clients do not need to\nserialize any data in the payload, they should omit a payload\naltogether.", "params": {}, "serialized": { "method": "POST", @@ -4307,16 +4796,26 @@ { "description": "Test cases for NoInputAndOutput operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": {}, "cases": [ { "id": "RestJsonNoInputAndOutput", + "description": "No input serializes no payload. When clients do not need to\nserialize any data in the payload, they should omit a payload\naltogether.", "given": { "name": "NoInputAndOutput", "http": { @@ -4326,7 +4825,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input and the output is empty. While this should be rare, code generators must support this.

" }, - "description": "No input serializes no payload. When clients do not need to\nserialize any data in the payload, they should omit a payload\naltogether.", "params": {}, "serialized": { "method": "POST", @@ -4339,11 +4837,20 @@ { "description": "Test cases for NullAndEmptyHeadersClient operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "NullAndEmptyHeadersIO": { @@ -4379,6 +4886,7 @@ "cases": [ { "id": "RestJsonNullAndEmptyHeaders", + "description": "Do not send null values, but do send empty strings and empty lists over the wire in headers", "given": { "name": "NullAndEmptyHeadersClient", "http": { @@ -4389,9 +4897,9 @@ "input": { "shape": "NullAndEmptyHeadersIO" }, - "documentation": "

Null headers are not sent over the wire, empty headers are serialized to ""

" + "documentation": "

Null headers are not sent over the wire, empty headers are serialized to ""

", + "readonly": true }, - "description": "Do not send null values, but do send empty strings and empty lists over the wire in headers", "params": { "a": null, "b": "", @@ -4415,11 +4923,20 @@ { "description": "Test cases for OmitsNullSerializesEmptyString operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "OmitsNullSerializesEmptyStringInput": { @@ -4444,6 +4961,7 @@ "cases": [ { "id": "RestJsonOmitsNullQuery", + "description": "Omits null query values", "given": { "name": "OmitsNullSerializesEmptyString", "http": { @@ -4454,9 +4972,9 @@ "input": { "shape": "OmitsNullSerializesEmptyStringInput" }, - "documentation": "

Omits null, but serializes empty string value.

" + "documentation": "

Omits null, but serializes empty string value.

", + "readonly": true }, - "description": "Omits null query values", "params": { "nullValue": null }, @@ -4468,6 +4986,7 @@ }, { "id": "RestJsonSerializesEmptyQueryValue", + "description": "Serializes empty query strings", "given": { "name": "OmitsNullSerializesEmptyString", "http": { @@ -4478,9 +4997,9 @@ "input": { "shape": "OmitsNullSerializesEmptyStringInput" }, - "documentation": "

Omits null, but serializes empty string value.

" + "documentation": "

Omits null, but serializes empty string value.

", + "readonly": true }, - "description": "Serializes empty query strings", "params": { "emptyString": "" }, @@ -4495,13 +5014,78 @@ { "description": "Test cases for OmitsSerializingEmptyLists operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "BooleanList": { + "type": "list", + "member": { + "shape": "Boolean" + } + }, + "Double": { + "type": "double", + "box": true + }, + "DoubleList": { + "type": "list", + "member": { + "shape": "Double" + } + }, + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] + }, + "FooEnumList": { + "type": "list", + "member": { + "shape": "FooEnum" + } + }, + "Integer": { + "type": "integer", + "box": true + }, + "IntegerEnum": { + "type": "integer", + "box": true + }, + "IntegerEnumList": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, + "IntegerList": { + "type": "list", + "member": { + "shape": "Integer" + } + }, "OmitsSerializingEmptyListsInput": { "type": "structure", "members": { @@ -4542,84 +5126,29 @@ } } }, + "String": { + "type": "string" + }, "StringList": { "type": "list", "member": { "shape": "String" } }, - "IntegerList": { - "type": "list", - "member": { - "shape": "Integer" - } - }, - "DoubleList": { - "type": "list", - "member": { - "shape": "Double" - } - }, - "BooleanList": { - "type": "list", - "member": { - "shape": "Boolean" - } + "Timestamp": { + "type": "timestamp" }, "TimestampList": { "type": "list", "member": { "shape": "Timestamp" } - }, - "FooEnumList": { - "type": "list", - "member": { - "shape": "FooEnum" - } - }, - "IntegerEnumList": { - "type": "list", - "member": { - "shape": "IntegerEnum" - } - }, - "IntegerEnum": { - "type": "integer", - "box": true - }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, - "Timestamp": { - "type": "timestamp" - }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Double": { - "type": "double", - "box": true - }, - "Integer": { - "type": "integer", - "box": true - }, - "String": { - "type": "string" } }, "cases": [ { "id": "RestJsonOmitsEmptyListQueryValues", + "description": "Supports omitting empty lists.", "given": { "name": "OmitsSerializingEmptyLists", "http": { @@ -4632,7 +5161,6 @@ }, "documentation": "

Omits serializing empty lists. Because empty strings are serilized as Foo=, empty lists cannot also be serialized as Foo= and instead must be omitted.

" }, - "description": "Supports omitting empty lists.", "params": { "queryStringList": [], "queryIntegerList": [], @@ -4653,11 +5181,20 @@ { "description": "Test cases for PostUnionWithJsonName operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "PostUnionWithJsonNameInput": { @@ -4668,6 +5205,9 @@ } } }, + "String": { + "type": "string" + }, "UnionWithJsonName": { "type": "structure", "members": { @@ -4684,14 +5224,12 @@ } }, "union": true - }, - "String": { - "type": "string" } }, "cases": [ { "id": "PostUnionWithJsonNameRequest1", + "description": "Tests that jsonName works with union members.", "given": { "name": "PostUnionWithJsonName", "http": { @@ -4704,7 +5242,6 @@ }, "documentation": "

This operation defines a union that uses jsonName on some members.

" }, - "description": "Tests that jsonName works with union members.", "params": { "value": { "foo": "hi" @@ -4721,6 +5258,7 @@ }, { "id": "PostUnionWithJsonNameRequest2", + "description": "Tests that jsonName works with union members.", "given": { "name": "PostUnionWithJsonName", "http": { @@ -4733,7 +5271,6 @@ }, "documentation": "

This operation defines a union that uses jsonName on some members.

" }, - "description": "Tests that jsonName works with union members.", "params": { "value": { "baz": "hi" @@ -4750,6 +5287,7 @@ }, { "id": "PostUnionWithJsonNameRequest3", + "description": "Tests that jsonName works with union members.", "given": { "name": "PostUnionWithJsonName", "http": { @@ -4762,7 +5300,6 @@ }, "documentation": "

This operation defines a union that uses jsonName on some members.

" }, - "description": "Tests that jsonName works with union members.", "params": { "value": { "bar": "hi" @@ -4782,11 +5319,20 @@ { "description": "Test cases for PutWithContentEncoding operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "PutWithContentEncodingInput": { @@ -4809,6 +5355,7 @@ "cases": [ { "id": "SDKAppliedContentEncoding_restJson1", + "description": "Compression algorithm encoding is appended to the Content-Encoding header.", "given": { "name": "PutWithContentEncoding", "http": { @@ -4825,7 +5372,6 @@ ] } }, - "description": "Compression algorithm encoding is appended to the Content-Encoding header.", "params": { "data": "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsmcKPr1crqiXjM\noVWdM4ObOO6QA7Pu4c1hT68CrTmbcecjFcxHkgsqdixnFtN6keMGL9Z2YMjZOjYYzbUEwLJqUVWalkIB\nBkgBRqZpzxx5nB5t0qDH35KjsfKM5cinQaFoRq9y9Z82xdCoKZOsUbxZkk1kVmy1jPDCBhkhixkc5PKS\nFoSKTbeK7kuCEZCtR9OfF2k2MqbygGFsFu2sgb1Zn2YdDbaRwRGeaLhswta09UNSMUo8aTixgoYVHxwy\nvraLB6olPSPegeLOnmBeWyKmEfPdbpdGm4ev4vA2AUFuLIeFz0LkCSN0NgQMrr8ALEm1UNpJLReg1ZAX\nzZh7gtQTZUaBVdMJokaJpLk6FPxSA6zkwB5TegSqhrFIsmvpY3VNWmTUq7H0iADdh3dRQ8Is97bTsbwu\nvAEOjh4FQ9wPSFzEtcSJeYQft5GfWYPisDImjjvHVFshFFkNy2nN18pJmhVPoJc456tgbdfEIdGhIADC\n6UPcSSzE1FxlPpILqZrp3i4NvvKoiOa4a8tnALd2XRHHmsvALn2Wmfu07b86gZlu4yOyuUFNoWI6tFvd\nbHnqSJYNQlFESv13gJw609DBzNnrIgBGYBAcDRrIGAnflRKwVDUnDFrUQmE8xNG6jRlyb1p2Y2RrfBtG\ncKqhuGNiT2DfxpY89ektZ98waPhJrFEPJToNH8EADzBorh3T0h4YP1IeLmaI7SOxeuVrk1kjRqMK0rUB\nlUJgJNtCE35jCyoHMwPQlyi78ZaVv8COVQ24zcGpw0MTy6JUsDzAC3jLNY6xCb40SZV9XzG7nWvXA5Ej\nYC1gTXxF4AtFexIdDZ4RJbtYMyXt8LsEJerwwpkfqvDwsiFuqYC6vIn9RoZO5kI0F35XtUITDQYKZ4eq\nWBV0itxTyyR5Rp6g30pZEmEqOusDaIh96CEmHpOBYAQZ7u1QTfzRdysIGMpzbx5gj9Dxm2PO1glWzY7P\nlVqQiBlXSGDOkBkrB6SkiAxknt9zsPdTTsf3r3nid4hdiPrZmGWNgjOO1khSxZSzBdltrCESNnQmlnP5\nZOHA0eSYXwy8j4od5ZmjA3IpFOEPW2MutMbxIbJpg5dIx2x7WxespftenRLgl3CxcpPDcnb9w8LCHBg7\nSEjrEer6Y8wVLFWsQiv6nTdCPZz9cGqwgtCaiHRy8lTWFgdfWd397vw9rduGld3uUFeFRGjYrphqEmHi\nhiG0GhE6wRFVUsGJtvOCYkVREvbEdxPFeJvlAvOcs9HKbtptlTusvYB86vR2bNcIY4f5JZu2X6sGa354\n7LRk0ps2zqYjat3hMR7XDC8KiKceBteFsXoDjfVxTYKelpedTxqWAafrKhaoAVuNM98PSnkuIWGzjSUC\nNsDJTt6vt1D1afBVPWVmnQ7ZQdtEtLIEwAWYjemAztreELIr1E9fPEILm1Ke4KctP9I0I72Dh4eylNZD\n0DEr2Hg7cWFckuZ0Av5d0IPRARXikEGDHl8uh12TXL9v2Uh0ZVSJMEYvxGSbZvkWz8TjWSk3hKA2a7GL\nJm3Ho7e1C34gE1XRGcEthxvURxt4OKBqN3ZNaMIuDTWinoQAutMcUqtm4MoL7RGPiCHUrvTwQPSirsmA\nQmOEu8nOpnP77Fivh9jLGx5ta7nL6jrsWUsBqiN1lzpdPYLRR4mUIAj6sNWiDEk4pkbHSMEcqbWw6Zl7\npsEyPDHalCNhWMA3RSK3skURzQDZ0oBV5W7vjVIZ4d3uCKsk6zrzEI9u5mx7p9RdNKodXfzqYt0ULdtc\n3RW0hIfw2KvrO3BD2QrtgAkfrFBGVvlJSUoh0MvLz8DeXxfuiuq9Ttu7wvsqVI4Piah6WNEXtHHGPJO3\nGhc75Bnv2To4VS2v8rmyKAPIIVTuYBHZN6sZ4FhFzbrslCIdk0eadaU60naqiNWU3CsxplIYGyeThmJ7\n9u4h6Y2OmiPZjFPS2bAzwgAozYTVefII9aEaWZ0hxHZeu1FW7r79dkdO73ZqRfas9u8Z7LLBPCw5pV0F\n5I0pHDgNb6MogoxF4NZJfVtIX1vCHhhVLrXjrYNJU2fD9Fw8kT8Ie2HDBJnqAvYKmryQ1r9ulo3Me3rH\nq9s2Y5uCDxu9iQNhnpwIm57WYGFeqd2fnQeY2IziD3Jgx0KSrmOH0jgi0RwJyfGXaORPq3bQQqljuACo\nkO6io9t5VI8PbNxSHTRbtYiPciUslbT0g7SpCLrRPOBRJ4DDk56pjghpeoUagJ5xJ4wjBzBuXnAGkNnP\nTfpiuz2r3oSBAi8sB9wiYK2z9sp4gZyQsqdVNzAEgKatOxBRBmJCBYpjO98ZQrF83XApPpfFg0ujB2PW\n1iYF9NkgwIKB5oB6KVTOmSKJk11mVermPgeugHbzdd2zUP6fP8fWbhseqk2t8ahGvqjs2CDHFIWXl5jc\nfCknbykE3ANt7lnAfJQ2ddduLGiqrX4HWx6jcWw08Es6BkleO0IDbaWrb95d5isvFlzJsf0TyDIXF4uq\nbBDCi0XPWqtRJ2iqmnJa2GbBe9GmAOWMkBFSilMyC4sR395WSDpD56fx0NGoU6cHrRu9xF2Bgh7RGSfl\nch2GXEeE02fDpSHFNvJBlOEqqfkIX6oCa6KY9NThqeIjYsT184XR2ZI7akXRaw1gMOGpk4FmUxk6WIuX\n4ei1SLQgSdl7OEdRtJklZ76eFrMbkJQ2TDhu8f7mVuiy53GUMIvCrP9xYGZGmCIDm2e4U2BDi3F7C5xK\n3bDZXwlQp6z4BSqTy2OVEWxXUJfjPMOL5Mc7AvDeKtxAS73pVIv0HgHIa4NBAdC7uLG0zXuu1FF6z2XY\nyUhk03fMZhYe7vVxsul3WE7U01fuN8z2y0eKwBW1RFBE1eKIaR9Y01sIWQWbSrfHfDrdZiElhmhHehfs\n0EfrR4sLYdQshJuvhTeKGJDaEhtPQwwJ9mUYGtuCL9RozWx1XI4bHNlzBTW0BVokYiJGlPe7wdxNzJD7\nJgS7Lwv6jGKngVf86imGZyzqwiteWFPdNUoWdTvUPSMO5xIUK9mo5QpwbBOAmyYzVq42o3Qs90N9khEV\nU36LB99fw8PtGHH5wsCHshfauwnNPj0blGXzke0kQ4JNCVH7Jtn0Y0aeejkSxFtwtxoYs6zHl1Lxxpsd\nsw5vBy49CEtoltDW367lVAwDjWdx20msGB7qJCkEDrzu7EXSO22782QX9NBRcN9ppX0C25I0FMA4Wnhz\n9zIpiXRrsTH35jzM8Cjt4EVLGNU3O0HuEvAer3cENnMJtngdrT86ox3fihMQbiuy4Bh4DEcP5in2VjbT\n3qbnoCNvOi8Fmmf7KlGlWAOceL5OHVE5lljjQEMzEQOCEgrk5mDKgwSBJQBNauIDSC1a5iEQjB8Xxp4C\nqeKyyWY9IOntNrtU5ny4lNprHJd36dKFeBLKcGCOvgHBXdOZloMF0YTRExw7hreEO9IoTGVHJ4teWsNr\nHdtagUHjkeZkdMMfnUGNv5aBNtFMqhcZH6EitEa9lGPkKBbJpoom3u8D8EHSIF1H5EZqqx9TLY5hWAIG\nPwJ4qwkpCGw5rCLVrjw7ARKukIFzNULANqjHUMcJ002TlUosJM4xJ4aAgckpLVGOGuPDhGAAexEcQmbg\nUsZdmqQrtuVUyyLteLbLbqtR6CTlcAIwY3xyMCmPgyefE0FEUODBoxQtRUuYTL9RC5o1sYb2PvcxUQfb\niJFi2CAl99pAzcckU2qVCxniARslIxM5pmMRGsQX9ZzYAfZrbg6ce6S74I8UMlgRQ2QVyvUjKKOE6IrJ\nLng370emHfe5m6LZULD5YiZutkD5ipjL2Bz77DvTE5kNPUhuoKBcTJcUgytfXAKUTWOcRKNlq0GImrxM\nJfr7AWbLFFNKGLeTrVDBwpcokJCv0zcOKWe8fd2xkeXkZTdmM66IgM27cyYmtQ6YF26Kd0qrWJeVZJV9\n3fyLYYvKN5csbRY2BHoYE5ERARRW65IrpkXMf48OrCXMtDIP0Z7wxI9DiTeKKeH4uuguhCJnwzR3WxLA\nVU6eBJEd7ZjS6JA83w7decq8uDI7LGKjcz1FySp3B7fE9DkHRGXxbsL7Fjar6vW2mAv8CuvI20B6jctp\n2yLDs24sPfB3sSxrrlhbuT1m6DZqiN0dl6umKx7NGZhmOTVGr20jfcxhqPQwTJfd7kel4rvxip4BqkvT\n7STy8knJ2BXGyJeNgwo1PXUZRDVy0LCTsSF1RFuRZe8cktHl9lgw8ntdPn1pVFL0MwJkJfdXBNUp5gNv\n50FTkrpo1t6wq4CVbcfj2XOrOzvBUzNH26sXGABI1gGxCdp2jEZrHgqQaWIaTJVTuguZhxqDvdYsrwFW\nYN58uuNcKHIrGdRSigyZInwQDYk0pjcqdSeU0WVU3Y9htzZBR7XRaCJr5YTZvq7fwermb5tuwb37lPLq\nB2IGg0iftkVbXaSyfCwVaRbfLBb88so0QqpmJGirFu8FcDiXOV1zTr8yW9XLdYQuUjh43xrXLdgsuYff\nCagInUk1eU1aLjVZoJRsNmStmOEpAqlYMwTvx7w6j2f421Cxr5cNZBIVlAxlXN2QiDqJ9v3sHhHkTanc\nlQuH8ptUyX8qncpBuXXBn7cSez9N0EoxCBl1GHUagbjstgJo4gzLvTmVIY6MiWYOBitzNUHfyqKwtKUr\nVoSCdZcGeA9lHUPA7PUprRRaT3m1hGKPyshtVS2ikG48w3oVerln1N1qGdtz46gZCrndw3LZ1B362RfW\nzDPuXbpsyLsRMTt1Rz1oKHRXp3iE41hkhQH6pxlvyCW2INnHt5XU8zRamOB3oW0udOhMpQFDjRkOcy06\nb4t0QTHvoRqmBna3WXzIMZyeK3GChF5eF8oDXRbjhk7BB6YKCgqwWUzEJ5K47HMSlhFkBUjaPRjdGM0z\nzOMwhW6b1NvSwP7XM1P5yi1oPvOspts1vr29SXqrMMrBhVogeodWyd69NqrO4jkyBxKmlXifoTowpfiY\n2cUCE0XMZqxUN39LCP09JqZifaEcBEo3mgtm1tWu5QR2GNq7UyQf4RIPSDOpDCAtwoPhRgdT1lJdcj4U\nlnH0wrJ8Uwu7c08L7ErnIrDATqCrOjpSbzGP1xHENABYONC4TknFPrJ8pe40A8fzGT0qBw9mAM1SKcHO\nfoiLcMC9AjHTqJzDG3xplSLPG9or2rMeq7Fzp9r0y7uJRMxgg51EbjfvYlH466A3ggvL2WQlDXjJqPW3\nBJGWAWDNN9LK8f46bADKPxakpkx23S9O47rGSXfDhVSIZsDympxWX1UOzWwMZRHkofVeKqizgbKkGgUT\nWykE9gRoRAOd9wfHZDYKa9i0LaPDiaUMvnU1gdBIqIoiVsdJ9swX47oxvMtOxtcS0zlD6llDkBuIiU5g\nPwRCYmtkkb25c8iRJXwGFPjI1wJ34I1z1ENicPdosPiUe9ZC2jnXIKzEdv01x2ER7DNDF3yxOwOhxNxI\nGqsmC92j25UQQFu9ZstOZ28AoCkuOYs0Uycm5u8jR1T39dMBwrko09rC65ENLnsxM8oebmyFCPiGJ1ED\n5Xqc9qZ237f1OnETAoEOwqUSvrdPTv56U7hV91EMTyC812MLQpr2710E3VVpsUCUMNhIxdt7UXZ1UNFb\njgzpZLXnf4DHrv6B7kq6UI50KMxcw1HZE2GpODfUTzNFLaqdrvzxKe5eUWdcojBaRbD4fFdVYJTElYDH\nNNVh6ofkoeWcs9CWGFmSBe0T4K8phFeygQg0prKMELNEy6qENzVtG9ZDcqj3a7L6ZLtvq50anWp7fAVu\nfwz55g4iM2Z2fA0pnwHDL7tt67zTxGITvsnJsZSpeq1EQsZcwtkBV9liu7Rl7jiVT1IIRtchB8TsTiaA\nwVHIQQ9RIOTiPQdKNqi1kC9iGlUqWK93gblNWlBw1eYB9Wk8FQogutwTf0caNMx8D4nPbANcmOOlskIy\nzALh15OlTrWnhP95rf08AN2J026zDE2DUF9k0eCevYBQIDjqKNW4XCZnjbHoIcKzbY5VzPbMs3ZyMz8K\nSucBmgPg6wrSK5ykbkapS5vuqvXc9GbjQJ8bPNzoxoWGyjbZvDs2OBrIqBmcQb2DLJ8v38McQ4mC4UsS\njf4PyfSCtpk274QZjvLCZbLiCBxQegk7jUU0NmTFJAcYCxd9xMWdlFkiszcltT2YzwuFFz7iA6aa4n5L\nHpBNfUA01GcAi1aCMYhmooS4zSlYcSOZkovMz36U3Fd9WtqIEOJLi7HMgHQDgNMdK6DTzAdHQtxerxVF\nHJnPrfNVG7270r3bp0bPnLNYLhObbAn6zqSAUeLtI2Y4KJDjBKCAh2vvYGbu0e2REYJWRj7MkGevsSSy\nb1kCXLt6tKGWAb7lt5c0xyJgUIJW7pdtnwgT0ZCa24BecCAwNnG5U2EwQbcjZGsFxqNGfaemd3oFEhES\nBaE0Fxms9UKTnMafu8wvZ2xymMrUduuRzOjDeX7oD5YsLC88V8CGMLxbbxIpt94KGykbr6e7L0R4oZl1\ntKMgFwQ2p9Txdbp0Y293LcsJymKizqI0F2xEp7y4SmWOJqHZtsbz80wVV9nv41CvtfxuSoGZJ5cNB7pI\nBgzNcQCeH3Jt0RaGGwboxxpuFbzilmkMFXxJm87tD4WNgu01nHfGCKeQcySEBZpVfJgi6sDFJ8uWnvKm\n9mPLHurtWzEfKqUEa1iC71bXjw5wrvhv9BYW8JSUELHmDquftQyKdq0DZXhULMHGQLf4e95WIaoA14LL\nbThz77kuhKULPTu2MNrBUKGorurhGugo5gs4ZUezSsUOe3KxYdrFMdGgny1GgTxMSMTp2RAZytKjv4kQ\nVx7XgzvpQLIbDjUPAkJv6lScwIRq1W3Ne0Rh0V6Bmn6U5uIuWnJjULmbaQiSODj3z0mAZvak0mSWIGwT\nTX83HztcC4W7e1f6a1thmcc5K61Icehla2hBELWPpixTkyC4eEVmk9Rq0m0ZXtx0JX2ZQXqXDEyePyMe\nJ70sdSzXk72zusqhY4yuOMGgbYNHqxOToK6NxujR7e4dV3Wk5JnSUthym8scjcPeCiKDNY4cHfTMnDXJ\n9zLVy01LtNKYpJ1s8FxVxigmxQNKEbIamxhx6yqwGC4aiISVOOUEjvNOdaUfXfUsE6jEwtwxyGxjlRK1\ncLyxXttq4QWN6PehgHv7jXykzPjInbEysebFvvPOOMdunmJvcCNMSvjUda8fL6xfGo0FDrLg8XZipd6S\noPVdYtyIM1Dg40KbBA3JuumPYtXuJaHrZnjZmdnM5OVo4ZNxktfCVT0c6bnD4bAeyn4bYt1ZPaX6hQHh\nJtvNYfpD0ONYlmqKuToQAMlz52Fh6bj45EbX89L5eLlSpWeyBlGotzriB0EPlclrGi5l2B5oPb1aB1ag\nyyYuu44l0F1oOVYnBIZsxIsHVITxi9lEuVPFkWASOUNuVQXfM4n5hxWR9qtuKnIcPsvbJsv1U10XlKh3\nKisqPhHU15xrCLr5gwFxPUKiNTLUBrkzgBOHXPVsHcLCiSD0YU56TRGfvEom43TWUKPPfl9Z54tgVQuT\njCRlaljAzeniQIcbbHZnn3f0HxbDG3DFYqWSxNrXabHhRsIOhhUHSPENyhGSTVO5t0XX5CdMspJPCd02\n3Oqv32ccbUK4O3YH6LEvp0WO3kSl5n50odVkI9B0i0iq4UPFGMkM8bEQJbgJoOH71P10vtdevJFQE4g2\nyhimiM53ZJRWgSZveHtENZc0Gjo0F9eioak9BnPpY1QxAFPC817svuhEstcU69bLCA4D1rO5R8AuIIBq\nyQJcifFLvbpAEYTLKJqysZrU8EEl3TSdC13A9hZvk4NC8VGEDAxcNrKw313dZp17kZPO5HSd1y6sljAW\nA9M1d6FMYV5SlBWf3WZNCUPS7qKNlda2YBsC6IUVB363f5RLGQOQHwbaijBSRCkrVoRxBHtc0Bd5J9V9\nP5uMTXkpZOxRcCQvImGgcmGuxxLb5zTqfS2xu7v3Sf3IIesSt9tVzcEcdbEvLGVJkLk4mb3G30DbIbri\nPZ09JkweDvMaQ3bxT2nfkz3Ilihkw9jqikkCCCz7E8h6z6KbhQErEW9VzJZzMCgJsyPjFam6iNwpe07S\nhyOvNVw2t9wpzL5xM11DvVzQwDaWEytNRHzDBs4KwEtpI2IpjUyVZHSwA0UGqqkzoCgrJFlNOvPlXqcS\nIcREouUIBmuttkrhPWJtSxOOgpsdvBR3kTOzAXNzSKxoaBAb0c5SDMUc6FIyGA8x5wg5DkUgjFUUodEt\nOYaB2VHVePW9mxHeBTdKWLzJow4ZZvjnoBuVigXljKCNh137ckV2y3Yg3Xi4UzJEI2V5Rw9AfnMs7xUw\nVHOFCg189maD3bmZAe7b4eaGZhyy4HVKjqCXmIH7vsEjRvbnfB0SQxxpuqBDJbHNCtW4vM643ZQQBVPP\na7oXSQIq9w2dHp0A7dtkocCZdQp9FKR9XdJAFIbVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n" }, @@ -4839,6 +5385,7 @@ }, { "id": "SDKAppendedGzipAfterProvidedEncoding_restJson1", + "description": "Compression algorithm encoding is appended to the Content-Encoding header, and the\nuser-provided content-encoding is in the Content-Encoding header before the\nrequest compression encoding from the HTTP binding.\n", "given": { "name": "PutWithContentEncoding", "http": { @@ -4855,7 +5402,6 @@ ] } }, - "description": "Compression algorithm encoding is appended to the Content-Encoding header, and the\nuser-provided content-encoding is in the Content-Encoding header before the\nrequest compression encoding from the HTTP binding.\n", "params": { "encoding": "custom", "data": "RjCEL3kBwqPivZUXGiyA5JCujtWgJAkKRlnTEsNYfBRGOS0f7LT6R3bCSOXeJ4auSHzQ4BEZZTklUyj5\n1HEojihShQC2jkQJrNdGOZNSW49yRO0XbnGmeczUHbZqZRelLFKW4xjru9uTuB8lFCtwoGgciFsgqTF8\n5HYcoqINTRxuAwGuRUMoNO473QT0BtCQoKUkAyVaypG0hBZdGNoJhunBfW0d3HWTYlzz9pXElyZhq3C1\n2PDB17GEoOYXmTxDecysmPOdo5z6T0HFhujfeJFIQQ8dirmXcG4F3v0bZdf6AZ3jsiVh6RnEXIPxPbOi\ngIXDWTMUr4Pg3f2LdYCM01eAb2qTdgsEN0MUDhEIfn68I2tnWvcozyUFpg1ez6pyWP8ssWVfFrckREIM\nMb0cTUVqSVSM8bnFiF9SoXM6ZoGMKfX1mT708OYk7SqZ1JlCTkecDJDoR5ED2q2MWKUGR6jjnEV0GtD8\nWJO6AcF0DptY9Hk16Bav3z6c5FeBvrGDrxTFVgRUk8SychzjrcqJ4qskwN8rL3zslC0oqobQRnLFOvwJ\nprSzBIwdH2yAuxokXAdVRa1u9NGNRvfWJfKkwbbVz8yV76RUF9KNhAUmwyYDrLnxNj8ROl8B7dv8Gans\n7Bit52wcdiJyjBW1pAodB7zqqVwtBx5RaSpF7kEMXexYXp9N0J1jlXzdeg5Wgg4pO7TJNr2joiPVAiFf\nefwMMCNBkYx2z7cRxVxCJZMXXzxSKMGgdTN24bJ5UgE0TxyV52RC0wGWG49S1x5jGrvmxKCIgYPs0w3Z\n0I3XcdB0WEj4x4xRztB9Cx2Mc4qFYQdzS9kOioAgNBti1rBySZ8lFZM2zqxvBsJTTJsmcKPr1crqiXjM\noVWdM4ObOO6QA7Pu4c1hT68CrTmbcecjFcxHkgsqdixnFtN6keMGL9Z2YMjZOjYYzbUEwLJqUVWalkIB\nBkgBRqZpzxx5nB5t0qDH35KjsfKM5cinQaFoRq9y9Z82xdCoKZOsUbxZkk1kVmy1jPDCBhkhixkc5PKS\nFoSKTbeK7kuCEZCtR9OfF2k2MqbygGFsFu2sgb1Zn2YdDbaRwRGeaLhswta09UNSMUo8aTixgoYVHxwy\nvraLB6olPSPegeLOnmBeWyKmEfPdbpdGm4ev4vA2AUFuLIeFz0LkCSN0NgQMrr8ALEm1UNpJLReg1ZAX\nzZh7gtQTZUaBVdMJokaJpLk6FPxSA6zkwB5TegSqhrFIsmvpY3VNWmTUq7H0iADdh3dRQ8Is97bTsbwu\nvAEOjh4FQ9wPSFzEtcSJeYQft5GfWYPisDImjjvHVFshFFkNy2nN18pJmhVPoJc456tgbdfEIdGhIADC\n6UPcSSzE1FxlPpILqZrp3i4NvvKoiOa4a8tnALd2XRHHmsvALn2Wmfu07b86gZlu4yOyuUFNoWI6tFvd\nbHnqSJYNQlFESv13gJw609DBzNnrIgBGYBAcDRrIGAnflRKwVDUnDFrUQmE8xNG6jRlyb1p2Y2RrfBtG\ncKqhuGNiT2DfxpY89ektZ98waPhJrFEPJToNH8EADzBorh3T0h4YP1IeLmaI7SOxeuVrk1kjRqMK0rUB\nlUJgJNtCE35jCyoHMwPQlyi78ZaVv8COVQ24zcGpw0MTy6JUsDzAC3jLNY6xCb40SZV9XzG7nWvXA5Ej\nYC1gTXxF4AtFexIdDZ4RJbtYMyXt8LsEJerwwpkfqvDwsiFuqYC6vIn9RoZO5kI0F35XtUITDQYKZ4eq\nWBV0itxTyyR5Rp6g30pZEmEqOusDaIh96CEmHpOBYAQZ7u1QTfzRdysIGMpzbx5gj9Dxm2PO1glWzY7P\nlVqQiBlXSGDOkBkrB6SkiAxknt9zsPdTTsf3r3nid4hdiPrZmGWNgjOO1khSxZSzBdltrCESNnQmlnP5\nZOHA0eSYXwy8j4od5ZmjA3IpFOEPW2MutMbxIbJpg5dIx2x7WxespftenRLgl3CxcpPDcnb9w8LCHBg7\nSEjrEer6Y8wVLFWsQiv6nTdCPZz9cGqwgtCaiHRy8lTWFgdfWd397vw9rduGld3uUFeFRGjYrphqEmHi\nhiG0GhE6wRFVUsGJtvOCYkVREvbEdxPFeJvlAvOcs9HKbtptlTusvYB86vR2bNcIY4f5JZu2X6sGa354\n7LRk0ps2zqYjat3hMR7XDC8KiKceBteFsXoDjfVxTYKelpedTxqWAafrKhaoAVuNM98PSnkuIWGzjSUC\nNsDJTt6vt1D1afBVPWVmnQ7ZQdtEtLIEwAWYjemAztreELIr1E9fPEILm1Ke4KctP9I0I72Dh4eylNZD\n0DEr2Hg7cWFckuZ0Av5d0IPRARXikEGDHl8uh12TXL9v2Uh0ZVSJMEYvxGSbZvkWz8TjWSk3hKA2a7GL\nJm3Ho7e1C34gE1XRGcEthxvURxt4OKBqN3ZNaMIuDTWinoQAutMcUqtm4MoL7RGPiCHUrvTwQPSirsmA\nQmOEu8nOpnP77Fivh9jLGx5ta7nL6jrsWUsBqiN1lzpdPYLRR4mUIAj6sNWiDEk4pkbHSMEcqbWw6Zl7\npsEyPDHalCNhWMA3RSK3skURzQDZ0oBV5W7vjVIZ4d3uCKsk6zrzEI9u5mx7p9RdNKodXfzqYt0ULdtc\n3RW0hIfw2KvrO3BD2QrtgAkfrFBGVvlJSUoh0MvLz8DeXxfuiuq9Ttu7wvsqVI4Piah6WNEXtHHGPJO3\nGhc75Bnv2To4VS2v8rmyKAPIIVTuYBHZN6sZ4FhFzbrslCIdk0eadaU60naqiNWU3CsxplIYGyeThmJ7\n9u4h6Y2OmiPZjFPS2bAzwgAozYTVefII9aEaWZ0hxHZeu1FW7r79dkdO73ZqRfas9u8Z7LLBPCw5pV0F\n5I0pHDgNb6MogoxF4NZJfVtIX1vCHhhVLrXjrYNJU2fD9Fw8kT8Ie2HDBJnqAvYKmryQ1r9ulo3Me3rH\nq9s2Y5uCDxu9iQNhnpwIm57WYGFeqd2fnQeY2IziD3Jgx0KSrmOH0jgi0RwJyfGXaORPq3bQQqljuACo\nkO6io9t5VI8PbNxSHTRbtYiPciUslbT0g7SpCLrRPOBRJ4DDk56pjghpeoUagJ5xJ4wjBzBuXnAGkNnP\nTfpiuz2r3oSBAi8sB9wiYK2z9sp4gZyQsqdVNzAEgKatOxBRBmJCBYpjO98ZQrF83XApPpfFg0ujB2PW\n1iYF9NkgwIKB5oB6KVTOmSKJk11mVermPgeugHbzdd2zUP6fP8fWbhseqk2t8ahGvqjs2CDHFIWXl5jc\nfCknbykE3ANt7lnAfJQ2ddduLGiqrX4HWx6jcWw08Es6BkleO0IDbaWrb95d5isvFlzJsf0TyDIXF4uq\nbBDCi0XPWqtRJ2iqmnJa2GbBe9GmAOWMkBFSilMyC4sR395WSDpD56fx0NGoU6cHrRu9xF2Bgh7RGSfl\nch2GXEeE02fDpSHFNvJBlOEqqfkIX6oCa6KY9NThqeIjYsT184XR2ZI7akXRaw1gMOGpk4FmUxk6WIuX\n4ei1SLQgSdl7OEdRtJklZ76eFrMbkJQ2TDhu8f7mVuiy53GUMIvCrP9xYGZGmCIDm2e4U2BDi3F7C5xK\n3bDZXwlQp6z4BSqTy2OVEWxXUJfjPMOL5Mc7AvDeKtxAS73pVIv0HgHIa4NBAdC7uLG0zXuu1FF6z2XY\nyUhk03fMZhYe7vVxsul3WE7U01fuN8z2y0eKwBW1RFBE1eKIaR9Y01sIWQWbSrfHfDrdZiElhmhHehfs\n0EfrR4sLYdQshJuvhTeKGJDaEhtPQwwJ9mUYGtuCL9RozWx1XI4bHNlzBTW0BVokYiJGlPe7wdxNzJD7\nJgS7Lwv6jGKngVf86imGZyzqwiteWFPdNUoWdTvUPSMO5xIUK9mo5QpwbBOAmyYzVq42o3Qs90N9khEV\nU36LB99fw8PtGHH5wsCHshfauwnNPj0blGXzke0kQ4JNCVH7Jtn0Y0aeejkSxFtwtxoYs6zHl1Lxxpsd\nsw5vBy49CEtoltDW367lVAwDjWdx20msGB7qJCkEDrzu7EXSO22782QX9NBRcN9ppX0C25I0FMA4Wnhz\n9zIpiXRrsTH35jzM8Cjt4EVLGNU3O0HuEvAer3cENnMJtngdrT86ox3fihMQbiuy4Bh4DEcP5in2VjbT\n3qbnoCNvOi8Fmmf7KlGlWAOceL5OHVE5lljjQEMzEQOCEgrk5mDKgwSBJQBNauIDSC1a5iEQjB8Xxp4C\nqeKyyWY9IOntNrtU5ny4lNprHJd36dKFeBLKcGCOvgHBXdOZloMF0YTRExw7hreEO9IoTGVHJ4teWsNr\nHdtagUHjkeZkdMMfnUGNv5aBNtFMqhcZH6EitEa9lGPkKBbJpoom3u8D8EHSIF1H5EZqqx9TLY5hWAIG\nPwJ4qwkpCGw5rCLVrjw7ARKukIFzNULANqjHUMcJ002TlUosJM4xJ4aAgckpLVGOGuPDhGAAexEcQmbg\nUsZdmqQrtuVUyyLteLbLbqtR6CTlcAIwY3xyMCmPgyefE0FEUODBoxQtRUuYTL9RC5o1sYb2PvcxUQfb\niJFi2CAl99pAzcckU2qVCxniARslIxM5pmMRGsQX9ZzYAfZrbg6ce6S74I8UMlgRQ2QVyvUjKKOE6IrJ\nLng370emHfe5m6LZULD5YiZutkD5ipjL2Bz77DvTE5kNPUhuoKBcTJcUgytfXAKUTWOcRKNlq0GImrxM\nJfr7AWbLFFNKGLeTrVDBwpcokJCv0zcOKWe8fd2xkeXkZTdmM66IgM27cyYmtQ6YF26Kd0qrWJeVZJV9\n3fyLYYvKN5csbRY2BHoYE5ERARRW65IrpkXMf48OrCXMtDIP0Z7wxI9DiTeKKeH4uuguhCJnwzR3WxLA\nVU6eBJEd7ZjS6JA83w7decq8uDI7LGKjcz1FySp3B7fE9DkHRGXxbsL7Fjar6vW2mAv8CuvI20B6jctp\n2yLDs24sPfB3sSxrrlhbuT1m6DZqiN0dl6umKx7NGZhmOTVGr20jfcxhqPQwTJfd7kel4rvxip4BqkvT\n7STy8knJ2BXGyJeNgwo1PXUZRDVy0LCTsSF1RFuRZe8cktHl9lgw8ntdPn1pVFL0MwJkJfdXBNUp5gNv\n50FTkrpo1t6wq4CVbcfj2XOrOzvBUzNH26sXGABI1gGxCdp2jEZrHgqQaWIaTJVTuguZhxqDvdYsrwFW\nYN58uuNcKHIrGdRSigyZInwQDYk0pjcqdSeU0WVU3Y9htzZBR7XRaCJr5YTZvq7fwermb5tuwb37lPLq\nB2IGg0iftkVbXaSyfCwVaRbfLBb88so0QqpmJGirFu8FcDiXOV1zTr8yW9XLdYQuUjh43xrXLdgsuYff\nCagInUk1eU1aLjVZoJRsNmStmOEpAqlYMwTvx7w6j2f421Cxr5cNZBIVlAxlXN2QiDqJ9v3sHhHkTanc\nlQuH8ptUyX8qncpBuXXBn7cSez9N0EoxCBl1GHUagbjstgJo4gzLvTmVIY6MiWYOBitzNUHfyqKwtKUr\nVoSCdZcGeA9lHUPA7PUprRRaT3m1hGKPyshtVS2ikG48w3oVerln1N1qGdtz46gZCrndw3LZ1B362RfW\nzDPuXbpsyLsRMTt1Rz1oKHRXp3iE41hkhQH6pxlvyCW2INnHt5XU8zRamOB3oW0udOhMpQFDjRkOcy06\nb4t0QTHvoRqmBna3WXzIMZyeK3GChF5eF8oDXRbjhk7BB6YKCgqwWUzEJ5K47HMSlhFkBUjaPRjdGM0z\nzOMwhW6b1NvSwP7XM1P5yi1oPvOspts1vr29SXqrMMrBhVogeodWyd69NqrO4jkyBxKmlXifoTowpfiY\n2cUCE0XMZqxUN39LCP09JqZifaEcBEo3mgtm1tWu5QR2GNq7UyQf4RIPSDOpDCAtwoPhRgdT1lJdcj4U\nlnH0wrJ8Uwu7c08L7ErnIrDATqCrOjpSbzGP1xHENABYONC4TknFPrJ8pe40A8fzGT0qBw9mAM1SKcHO\nfoiLcMC9AjHTqJzDG3xplSLPG9or2rMeq7Fzp9r0y7uJRMxgg51EbjfvYlH466A3ggvL2WQlDXjJqPW3\nBJGWAWDNN9LK8f46bADKPxakpkx23S9O47rGSXfDhVSIZsDympxWX1UOzWwMZRHkofVeKqizgbKkGgUT\nWykE9gRoRAOd9wfHZDYKa9i0LaPDiaUMvnU1gdBIqIoiVsdJ9swX47oxvMtOxtcS0zlD6llDkBuIiU5g\nPwRCYmtkkb25c8iRJXwGFPjI1wJ34I1z1ENicPdosPiUe9ZC2jnXIKzEdv01x2ER7DNDF3yxOwOhxNxI\nGqsmC92j25UQQFu9ZstOZ28AoCkuOYs0Uycm5u8jR1T39dMBwrko09rC65ENLnsxM8oebmyFCPiGJ1ED\n5Xqc9qZ237f1OnETAoEOwqUSvrdPTv56U7hV91EMTyC812MLQpr2710E3VVpsUCUMNhIxdt7UXZ1UNFb\njgzpZLXnf4DHrv6B7kq6UI50KMxcw1HZE2GpODfUTzNFLaqdrvzxKe5eUWdcojBaRbD4fFdVYJTElYDH\nNNVh6ofkoeWcs9CWGFmSBe0T4K8phFeygQg0prKMELNEy6qENzVtG9ZDcqj3a7L6ZLtvq50anWp7fAVu\nfwz55g4iM2Z2fA0pnwHDL7tt67zTxGITvsnJsZSpeq1EQsZcwtkBV9liu7Rl7jiVT1IIRtchB8TsTiaA\nwVHIQQ9RIOTiPQdKNqi1kC9iGlUqWK93gblNWlBw1eYB9Wk8FQogutwTf0caNMx8D4nPbANcmOOlskIy\nzALh15OlTrWnhP95rf08AN2J026zDE2DUF9k0eCevYBQIDjqKNW4XCZnjbHoIcKzbY5VzPbMs3ZyMz8K\nSucBmgPg6wrSK5ykbkapS5vuqvXc9GbjQJ8bPNzoxoWGyjbZvDs2OBrIqBmcQb2DLJ8v38McQ4mC4UsS\njf4PyfSCtpk274QZjvLCZbLiCBxQegk7jUU0NmTFJAcYCxd9xMWdlFkiszcltT2YzwuFFz7iA6aa4n5L\nHpBNfUA01GcAi1aCMYhmooS4zSlYcSOZkovMz36U3Fd9WtqIEOJLi7HMgHQDgNMdK6DTzAdHQtxerxVF\nHJnPrfNVG7270r3bp0bPnLNYLhObbAn6zqSAUeLtI2Y4KJDjBKCAh2vvYGbu0e2REYJWRj7MkGevsSSy\nb1kCXLt6tKGWAb7lt5c0xyJgUIJW7pdtnwgT0ZCa24BecCAwNnG5U2EwQbcjZGsFxqNGfaemd3oFEhES\nBaE0Fxms9UKTnMafu8wvZ2xymMrUduuRzOjDeX7oD5YsLC88V8CGMLxbbxIpt94KGykbr6e7L0R4oZl1\ntKMgFwQ2p9Txdbp0Y293LcsJymKizqI0F2xEp7y4SmWOJqHZtsbz80wVV9nv41CvtfxuSoGZJ5cNB7pI\nBgzNcQCeH3Jt0RaGGwboxxpuFbzilmkMFXxJm87tD4WNgu01nHfGCKeQcySEBZpVfJgi6sDFJ8uWnvKm\n9mPLHurtWzEfKqUEa1iC71bXjw5wrvhv9BYW8JSUELHmDquftQyKdq0DZXhULMHGQLf4e95WIaoA14LL\nbThz77kuhKULPTu2MNrBUKGorurhGugo5gs4ZUezSsUOe3KxYdrFMdGgny1GgTxMSMTp2RAZytKjv4kQ\nVx7XgzvpQLIbDjUPAkJv6lScwIRq1W3Ne0Rh0V6Bmn6U5uIuWnJjULmbaQiSODj3z0mAZvak0mSWIGwT\nTX83HztcC4W7e1f6a1thmcc5K61Icehla2hBELWPpixTkyC4eEVmk9Rq0m0ZXtx0JX2ZQXqXDEyePyMe\nJ70sdSzXk72zusqhY4yuOMGgbYNHqxOToK6NxujR7e4dV3Wk5JnSUthym8scjcPeCiKDNY4cHfTMnDXJ\n9zLVy01LtNKYpJ1s8FxVxigmxQNKEbIamxhx6yqwGC4aiISVOOUEjvNOdaUfXfUsE6jEwtwxyGxjlRK1\ncLyxXttq4QWN6PehgHv7jXykzPjInbEysebFvvPOOMdunmJvcCNMSvjUda8fL6xfGo0FDrLg8XZipd6S\noPVdYtyIM1Dg40KbBA3JuumPYtXuJaHrZnjZmdnM5OVo4ZNxktfCVT0c6bnD4bAeyn4bYt1ZPaX6hQHh\nJtvNYfpD0ONYlmqKuToQAMlz52Fh6bj45EbX89L5eLlSpWeyBlGotzriB0EPlclrGi5l2B5oPb1aB1ag\nyyYuu44l0F1oOVYnBIZsxIsHVITxi9lEuVPFkWASOUNuVQXfM4n5hxWR9qtuKnIcPsvbJsv1U10XlKh3\nKisqPhHU15xrCLr5gwFxPUKiNTLUBrkzgBOHXPVsHcLCiSD0YU56TRGfvEom43TWUKPPfl9Z54tgVQuT\njCRlaljAzeniQIcbbHZnn3f0HxbDG3DFYqWSxNrXabHhRsIOhhUHSPENyhGSTVO5t0XX5CdMspJPCd02\n3Oqv32ccbUK4O3YH6LEvp0WO3kSl5n50odVkI9B0i0iq4UPFGMkM8bEQJbgJoOH71P10vtdevJFQE4g2\nyhimiM53ZJRWgSZveHtENZc0Gjo0F9eioak9BnPpY1QxAFPC817svuhEstcU69bLCA4D1rO5R8AuIIBq\nyQJcifFLvbpAEYTLKJqysZrU8EEl3TSdC13A9hZvk4NC8VGEDAxcNrKw313dZp17kZPO5HSd1y6sljAW\nA9M1d6FMYV5SlBWf3WZNCUPS7qKNlda2YBsC6IUVB363f5RLGQOQHwbaijBSRCkrVoRxBHtc0Bd5J9V9\nP5uMTXkpZOxRcCQvImGgcmGuxxLb5zTqfS2xu7v3Sf3IIesSt9tVzcEcdbEvLGVJkLk4mb3G30DbIbri\nPZ09JkweDvMaQ3bxT2nfkz3Ilihkw9jqikkCCCz7E8h6z6KbhQErEW9VzJZzMCgJsyPjFam6iNwpe07S\nhyOvNVw2t9wpzL5xM11DvVzQwDaWEytNRHzDBs4KwEtpI2IpjUyVZHSwA0UGqqkzoCgrJFlNOvPlXqcS\nIcREouUIBmuttkrhPWJtSxOOgpsdvBR3kTOzAXNzSKxoaBAb0c5SDMUc6FIyGA8x5wg5DkUgjFUUodEt\nOYaB2VHVePW9mxHeBTdKWLzJow4ZZvjnoBuVigXljKCNh137ckV2y3Yg3Xi4UzJEI2V5Rw9AfnMs7xUw\nVHOFCg189maD3bmZAe7b4eaGZhyy4HVKjqCXmIH7vsEjRvbnfB0SQxxpuqBDJbHNCtW4vM643ZQQBVPP\na7oXSQIq9w2dHp0A7dtkocCZdQp9FKR9XdJAFIbVSHzIF1ZogeZlc0pXuNE0tagvD57xwDRFkAuoQyMu\nYDdZasXrpSmEE5UjHVkyYsISn8QsfXurzDybX468aoRoks654jjmRY5zi1oB8TcMdC2c3sicNaqfeuhd\nH1nPX7l4RpdqWMR7gGx9slXtG8S3KxpOi4qCD7yg3saD66nun4dzksQURoTUdXyrJR5UpHsfIlTF1aJa\nMdXyQtQnrkl00TeghQd00rRFZsCnhi0qrCSKiBfB2EVrd9RPpbgwJGZHuIQecdBmNetc2ylSEClqVBPR\nGOPPIxrnswEZjmnS0jxKW9VSM1QVxSPJnPFswCqT95SoKD6CP4xdX28WIUGiNaIKodXXJHEIsXBCxLsr\nPwWPCtoplC6hhpKmW5dQo92iCTyY2KioKzO8XR6FKm6qonMKVEwQNtlYE9c97KMtEnp25VOdMP46SQXS\nYsSVp7vm8LP87VYI8SOKcW3s2oedYFtt45rvDzoTF0GmS6wELQ9uo98HhjQAI1Dt91cgjJOwygNmLoZE\nX5K2zQiNA163uMCl5xzaBqY4YTL0wgALg3IFdYSp0RFYLWdt6IxoGI1tnoxcjlUEPo5eGIc3mS3SmaLn\nOdumfUQQ4Jgmgaa5anUVQsfBDrlAN5oaX7O0JO71SSPSWiHBsT9WIPy2J1Cace9ZZLRxblFPSXcvsuHh\nhvnhWQltEDAe7MgvkFQ8lGVFa8jhzijoF9kLmMhMILSzYnfXnZPNP7TlAAwlLHK1RqlpHskJqb6CPpGP\nQvOAhEMsM3zJ2KejZx0esxkjxA0ZufVvGAMN3vTUMplQaF4RiQkp9fzBXf3CMk01dWjOMMIEXTeKzIQe\nEcffzjixWU9FpAyGp2rVl4ETRgqljOGw4UgK31r0ZIEGnH0xGz1FtbW1OcQM008JVujRqulCucEMmntr\n" @@ -4873,11 +5419,20 @@ { "description": "Test cases for QueryIdempotencyTokenAutoFill operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "QueryIdempotencyTokenAutoFillInput": { @@ -4898,6 +5453,7 @@ "cases": [ { "id": "RestJsonQueryIdempotencyTokenAutoFill", + "description": "Automatically adds idempotency token when not set", "given": { "name": "QueryIdempotencyTokenAutoFill", "http": { @@ -4910,7 +5466,6 @@ }, "documentation": "

Automatically adds idempotency tokens.

" }, - "description": "Automatically adds idempotency token when not set", "params": {}, "serialized": { "method": "POST", @@ -4920,6 +5475,7 @@ }, { "id": "RestJsonQueryIdempotencyTokenAutoFillIsSet", + "description": "Uses the given idempotency token as-is", "given": { "name": "QueryIdempotencyTokenAutoFill", "http": { @@ -4932,7 +5488,6 @@ }, "documentation": "

Automatically adds idempotency tokens.

" }, - "description": "Uses the given idempotency token as-is", "params": { "token": "00000000-0000-4000-8000-000000000000" }, @@ -4947,11 +5502,20 @@ { "description": "Test cases for QueryParamsAsStringListMap operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "QueryParamsAsStringListMapInput": { @@ -4971,6 +5535,12 @@ "String": { "type": "string" }, + "StringList": { + "type": "list", + "member": { + "shape": "String" + } + }, "StringListMap": { "type": "map", "key": { @@ -4979,17 +5549,12 @@ "value": { "shape": "StringList" } - }, - "StringList": { - "type": "list", - "member": { - "shape": "String" - } } }, "cases": [ { "id": "RestJsonQueryParamsStringListMap", + "description": "Serialize query params from map of list strings", "given": { "name": "QueryParamsAsStringListMap", "http": { @@ -5001,7 +5566,6 @@ "shape": "QueryParamsAsStringListMapInput" } }, - "description": "Serialize query params from map of list strings", "params": { "qux": "named", "foo": { @@ -5022,11 +5586,20 @@ { "description": "Test cases for QueryPrecedence operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "QueryPrecedenceInput": { @@ -5059,6 +5632,7 @@ "cases": [ { "id": "RestJsonQueryPrecedence", + "description": "Prefer named query parameters when serializing", "given": { "name": "QueryPrecedence", "http": { @@ -5070,7 +5644,6 @@ "shape": "QueryPrecedenceInput" } }, - "description": "Prefer named query parameters when serializing", "params": { "foo": "named", "baz": { @@ -5089,11 +5662,20 @@ { "description": "Test cases for RecursiveShapes operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "RecursiveShapesInputOutput": { @@ -5115,9 +5697,6 @@ } } }, - "String": { - "type": "string" - }, "RecursiveShapesInputOutputNested2": { "type": "structure", "members": { @@ -5128,11 +5707,15 @@ "shape": "RecursiveShapesInputOutputNested1" } } + }, + "String": { + "type": "string" } }, "cases": [ { "id": "RestJsonRecursiveShapes", + "description": "Serializes recursive structures", "given": { "name": "RecursiveShapes", "http": { @@ -5146,7 +5729,6 @@ "documentation": "

Recursive shapes

", "idempotent": true }, - "description": "Serializes recursive structures", "params": { "nested": { "foo": "Foo1", @@ -5175,13 +5757,42 @@ { "description": "Test cases for SimpleScalarProperties operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "Double": { + "type": "double", + "box": true + }, + "Float": { + "type": "float", + "box": true + }, + "Integer": { + "type": "integer", + "box": true + }, + "Long": { + "type": "long", + "box": true + }, "SimpleScalarPropertiesInputOutput": { "type": "structure", "members": { @@ -5222,31 +5833,12 @@ }, "String": { "type": "string" - }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true - }, - "Long": { - "type": "long", - "box": true - }, - "Float": { - "type": "float", - "box": true - }, - "Double": { - "type": "double", - "box": true } }, "cases": [ { "id": "RestJsonSimpleScalarProperties", + "description": "Serializes simple scalar properties", "given": { "name": "SimpleScalarProperties", "http": { @@ -5259,7 +5851,6 @@ }, "idempotent": true }, - "description": "Serializes simple scalar properties", "params": { "foo": "Foo", "stringValue": "string", @@ -5273,121 +5864,499 @@ "doubleValue": 6.5 }, "serialized": { - "method": "PUT", - "uri": "/SimpleScalarProperties", - "body": "{\n \"stringValue\": \"string\",\n \"trueBooleanValue\": true,\n \"falseBooleanValue\": false,\n \"byteValue\": 1,\n \"shortValue\": 2,\n \"integerValue\": 3,\n \"longValue\": 4,\n \"floatValue\": 5.5,\n \"DoubleDribble\": 6.5\n}", + "method": "PUT", + "uri": "/SimpleScalarProperties", + "body": "{\n \"stringValue\": \"string\",\n \"trueBooleanValue\": true,\n \"falseBooleanValue\": false,\n \"byteValue\": 1,\n \"shortValue\": 2,\n \"integerValue\": 3,\n \"longValue\": 4,\n \"floatValue\": 5.5,\n \"DoubleDribble\": 6.5\n}", + "headers": { + "X-Foo": "Foo", + "Content-Type": "application/json" + } + } + }, + { + "id": "RestJsonDoesntSerializeNullStructureValues", + "description": "Rest Json should not serialize null structure values", + "given": { + "name": "SimpleScalarProperties", + "http": { + "method": "PUT", + "requestUri": "/SimpleScalarProperties", + "responseCode": 200 + }, + "input": { + "shape": "SimpleScalarPropertiesInputOutput" + }, + "idempotent": true + }, + "params": { + "stringValue": null + }, + "serialized": { + "method": "PUT", + "uri": "/SimpleScalarProperties", + "body": "{}", + "headers": { + "Content-Type": "application/json" + } + } + }, + { + "id": "RestJsonSupportsNaNFloatInputs", + "description": "Supports handling NaN float values.", + "given": { + "name": "SimpleScalarProperties", + "http": { + "method": "PUT", + "requestUri": "/SimpleScalarProperties", + "responseCode": 200 + }, + "input": { + "shape": "SimpleScalarPropertiesInputOutput" + }, + "idempotent": true + }, + "params": { + "floatValue": "NaN", + "doubleValue": "NaN" + }, + "serialized": { + "method": "PUT", + "uri": "/SimpleScalarProperties", + "body": "{\n \"floatValue\": \"NaN\",\n \"DoubleDribble\": \"NaN\"\n}", + "headers": { + "Content-Type": "application/json" + } + } + }, + { + "id": "RestJsonSupportsInfinityFloatInputs", + "description": "Supports handling Infinity float values.", + "given": { + "name": "SimpleScalarProperties", + "http": { + "method": "PUT", + "requestUri": "/SimpleScalarProperties", + "responseCode": 200 + }, + "input": { + "shape": "SimpleScalarPropertiesInputOutput" + }, + "idempotent": true + }, + "params": { + "floatValue": "Infinity", + "doubleValue": "Infinity" + }, + "serialized": { + "method": "PUT", + "uri": "/SimpleScalarProperties", + "body": "{\n \"floatValue\": \"Infinity\",\n \"DoubleDribble\": \"Infinity\"\n}", + "headers": { + "Content-Type": "application/json" + } + } + }, + { + "id": "RestJsonSupportsNegativeInfinityFloatInputs", + "description": "Supports handling -Infinity float values.", + "given": { + "name": "SimpleScalarProperties", + "http": { + "method": "PUT", + "requestUri": "/SimpleScalarProperties", + "responseCode": 200 + }, + "input": { + "shape": "SimpleScalarPropertiesInputOutput" + }, + "idempotent": true + }, + "params": { + "floatValue": "-Infinity", + "doubleValue": "-Infinity" + }, + "serialized": { + "method": "PUT", + "uri": "/SimpleScalarProperties", + "body": "{\n \"floatValue\": \"-Infinity\",\n \"DoubleDribble\": \"-Infinity\"\n}", + "headers": { + "Content-Type": "application/json" + } + } + } + ] + }, + { + "description": "Test cases for SparseJsonLists operation", + "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", + "protocol": "rest-json", + "protocols": [ + "rest-json" + ], + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" + }, + "shapes": { + "Integer": { + "type": "integer", + "box": true + }, + "SparseJsonListsInputOutput": { + "type": "structure", + "members": { + "sparseStringList": { + "shape": "SparseStringList" + }, + "sparseShortList": { + "shape": "SparseShortList" + } + } + }, + "SparseShortList": { + "type": "list", + "member": { + "shape": "Integer" + }, + "sparse": true + }, + "SparseStringList": { + "type": "list", + "member": { + "shape": "String" + }, + "sparse": true + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "id": "RestJsonSparseListsSerializeNull", + "description": "Serializes null values in sparse lists", + "given": { + "name": "SparseJsonLists", + "http": { + "method": "PUT", + "requestUri": "/SparseJsonLists", + "responseCode": 200 + }, + "input": { + "shape": "SparseJsonListsInputOutput" + }, + "idempotent": true + }, + "params": { + "sparseStringList": [ + null, + "hi" + ], + "sparseShortList": [ + null, + 2 + ] + }, + "serialized": { + "method": "PUT", + "uri": "/SparseJsonLists", + "body": "{\n \"sparseStringList\": [\n null,\n \"hi\"\n ],\n \"sparseShortList\": [\n null,\n 2\n ]\n}", + "headers": { + "Content-Type": "application/json" + } + } + } + ] + }, + { + "description": "Test cases for SparseJsonMaps operation", + "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", + "protocol": "rest-json", + "protocols": [ + "rest-json" + ], + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" + }, + "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "shape": "String" + } + } + }, + "Integer": { + "type": "integer", + "box": true + }, + "SparseBooleanMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "Boolean" + }, + "sparse": true + }, + "SparseJsonMapsInputOutput": { + "type": "structure", + "members": { + "sparseStructMap": { + "shape": "SparseStructMap" + }, + "sparseNumberMap": { + "shape": "SparseNumberMap" + }, + "sparseBooleanMap": { + "shape": "SparseBooleanMap" + }, + "sparseStringMap": { + "shape": "SparseStringMap" + }, + "sparseSetMap": { + "shape": "SparseSetMap" + } + } + }, + "SparseNumberMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "Integer" + }, + "sparse": true + }, + "SparseSetMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "StringSet" + }, + "sparse": true + }, + "SparseStringMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + }, + "sparse": true + }, + "SparseStructMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "GreetingStruct" + }, + "sparse": true + }, + "String": { + "type": "string" + }, + "StringSet": { + "type": "list", + "member": { + "shape": "String" + } + } + }, + "cases": [ + { + "id": "RestJsonSparseJsonMaps", + "description": "Serializes JSON maps", + "given": { + "name": "SparseJsonMaps", + "http": { + "method": "POST", + "requestUri": "/SparseJsonMaps", + "responseCode": 200 + }, + "input": { + "shape": "SparseJsonMapsInputOutput" + }, + "documentation": "

This example tests sparse map serialization.

" + }, + "params": { + "sparseStructMap": { + "foo": { + "hi": "there" + }, + "baz": { + "hi": "bye" + } + } + }, + "serialized": { + "method": "POST", + "uri": "/SparseJsonMaps", + "body": "{\n \"sparseStructMap\": {\n \"foo\": {\n \"hi\": \"there\"\n },\n \"baz\": {\n \"hi\": \"bye\"\n }\n }\n}", "headers": { - "Content-Type": "application/json", - "X-Foo": "Foo" + "Content-Type": "application/json" } } }, { - "id": "RestJsonDoesntSerializeNullStructureValues", + "id": "RestJsonSerializesSparseNullMapValues", + "description": "Serializes JSON map values in sparse maps", "given": { - "name": "SimpleScalarProperties", + "name": "SparseJsonMaps", "http": { - "method": "PUT", - "requestUri": "/SimpleScalarProperties", + "method": "POST", + "requestUri": "/SparseJsonMaps", "responseCode": 200 }, "input": { - "shape": "SimpleScalarPropertiesInputOutput" + "shape": "SparseJsonMapsInputOutput" }, - "idempotent": true + "documentation": "

This example tests sparse map serialization.

" }, - "description": "Rest Json should not serialize null structure values", "params": { - "stringValue": null + "sparseBooleanMap": { + "x": null + }, + "sparseNumberMap": { + "x": null + }, + "sparseStringMap": { + "x": null + }, + "sparseStructMap": { + "x": null + } }, "serialized": { - "method": "PUT", - "uri": "/SimpleScalarProperties", - "body": "{}", + "method": "POST", + "uri": "/SparseJsonMaps", + "body": "{\n \"sparseBooleanMap\": {\n \"x\": null\n },\n \"sparseNumberMap\": {\n \"x\": null\n },\n \"sparseStringMap\": {\n \"x\": null\n },\n \"sparseStructMap\": {\n \"x\": null\n }\n}", "headers": { "Content-Type": "application/json" } } }, { - "id": "RestJsonSupportsNaNFloatInputs", + "id": "RestJsonSerializesZeroValuesInSparseMaps", + "description": "Ensure that 0 and false are sent over the wire in all maps and lists", "given": { - "name": "SimpleScalarProperties", + "name": "SparseJsonMaps", "http": { - "method": "PUT", - "requestUri": "/SimpleScalarProperties", + "method": "POST", + "requestUri": "/SparseJsonMaps", "responseCode": 200 }, "input": { - "shape": "SimpleScalarPropertiesInputOutput" + "shape": "SparseJsonMapsInputOutput" }, - "idempotent": true + "documentation": "

This example tests sparse map serialization.

" }, - "description": "Supports handling NaN float values.", "params": { - "floatValue": "NaN", - "doubleValue": "NaN" + "sparseNumberMap": { + "x": 0 + }, + "sparseBooleanMap": { + "x": false + } }, "serialized": { - "method": "PUT", - "uri": "/SimpleScalarProperties", - "body": "{\n \"floatValue\": \"NaN\",\n \"DoubleDribble\": \"NaN\"\n}", + "method": "POST", + "uri": "/SparseJsonMaps", + "body": "{\n \"sparseNumberMap\": {\n \"x\": 0\n },\n \"sparseBooleanMap\": {\n \"x\": false\n }\n}", "headers": { "Content-Type": "application/json" } } }, { - "id": "RestJsonSupportsInfinityFloatInputs", + "id": "RestJsonSerializesSparseSetMap", + "description": "A request that contains a sparse map of sets", "given": { - "name": "SimpleScalarProperties", + "name": "SparseJsonMaps", "http": { - "method": "PUT", - "requestUri": "/SimpleScalarProperties", + "method": "POST", + "requestUri": "/SparseJsonMaps", "responseCode": 200 }, "input": { - "shape": "SimpleScalarPropertiesInputOutput" + "shape": "SparseJsonMapsInputOutput" }, - "idempotent": true + "documentation": "

This example tests sparse map serialization.

" }, - "description": "Supports handling Infinity float values.", "params": { - "floatValue": "Infinity", - "doubleValue": "Infinity" + "sparseSetMap": { + "x": [], + "y": [ + "a", + "b" + ] + } }, "serialized": { - "method": "PUT", - "uri": "/SimpleScalarProperties", - "body": "{\n \"floatValue\": \"Infinity\",\n \"DoubleDribble\": \"Infinity\"\n}", + "method": "POST", + "uri": "/SparseJsonMaps", + "body": "{\n \"sparseSetMap\": {\n \"x\": [],\n \"y\": [\"a\", \"b\"]\n }\n}", "headers": { "Content-Type": "application/json" } } }, { - "id": "RestJsonSupportsNegativeInfinityFloatInputs", + "id": "RestJsonSerializesSparseSetMapAndRetainsNull", + "description": "A request that contains a sparse map of sets.", "given": { - "name": "SimpleScalarProperties", + "name": "SparseJsonMaps", "http": { - "method": "PUT", - "requestUri": "/SimpleScalarProperties", + "method": "POST", + "requestUri": "/SparseJsonMaps", "responseCode": 200 }, "input": { - "shape": "SimpleScalarPropertiesInputOutput" + "shape": "SparseJsonMapsInputOutput" }, - "idempotent": true + "documentation": "

This example tests sparse map serialization.

" }, - "description": "Supports handling -Infinity float values.", "params": { - "floatValue": "-Infinity", - "doubleValue": "-Infinity" + "sparseSetMap": { + "x": [], + "y": [ + "a", + "b" + ], + "z": null + } }, "serialized": { - "method": "PUT", - "uri": "/SimpleScalarProperties", - "body": "{\n \"floatValue\": \"-Infinity\",\n \"DoubleDribble\": \"-Infinity\"\n}", + "method": "POST", + "uri": "/SparseJsonMaps", + "body": "{\n \"sparseSetMap\": {\n \"x\": [],\n \"y\": [\"a\", \"b\"],\n \"z\": null\n }\n}", "headers": { "Content-Type": "application/json" } @@ -5398,13 +6367,29 @@ { "description": "Test cases for TestBodyStructure operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Integer": { + "type": "integer", + "box": true + }, + "String": { + "type": "string" + }, "TestBodyStructureInputOutput": { "type": "structure", "members": { @@ -5418,9 +6403,6 @@ } } }, - "String": { - "type": "string" - }, "TestConfig": { "type": "structure", "members": { @@ -5428,15 +6410,12 @@ "shape": "Integer" } } - }, - "Integer": { - "type": "integer", - "box": true } }, "cases": [ { "id": "RestJsonTestBodyStructure", + "description": "Serializes a structure", "given": { "name": "TestBodyStructure", "http": { @@ -5450,7 +6429,6 @@ "documentation": "

This example operation serializes a structure in the HTTP body.

It should ensure Content-Type: application/json is used in all requests and that an "empty" body is an empty JSON document ({}).

", "idempotent": true }, - "description": "Serializes a structure", "params": { "testConfig": { "timeout": 10 @@ -5470,6 +6448,7 @@ }, { "id": "RestJsonHttpWithEmptyBody", + "description": "Serializes an empty structure in the body", "given": { "name": "TestBodyStructure", "http": { @@ -5483,7 +6462,6 @@ "documentation": "

This example operation serializes a structure in the HTTP body.

It should ensure Content-Type: application/json is used in all requests and that an "empty" body is an empty JSON document ({}).

", "idempotent": true }, - "description": "Serializes an empty structure in the body", "params": {}, "serialized": { "method": "POST", @@ -5502,16 +6480,26 @@ { "description": "Test cases for TestGetNoInputNoPayload operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": {}, "cases": [ { "id": "RestJsonHttpGetWithNoInput", + "description": "Serializes a GET request for an operation with no input, and therefore no modeled body", "given": { "name": "TestGetNoInputNoPayload", "http": { @@ -5519,9 +6507,9 @@ "requestUri": "/no_input_no_payload", "responseCode": 200 }, - "documentation": "

This example GET operation has no input and serializes a request without a HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.

" + "documentation": "

This example GET operation has no input and serializes a request without a HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.

", + "readonly": true }, - "description": "Serializes a GET request for an operation with no input, and therefore no modeled body", "params": {}, "serialized": { "method": "GET", @@ -5538,13 +6526,25 @@ { "description": "Test cases for TestGetNoPayload operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "String": { + "type": "string" + }, "TestNoPayloadInputOutput": { "type": "structure", "members": { @@ -5554,14 +6554,12 @@ "locationName": "X-Amz-Test-Id" } } - }, - "String": { - "type": "string" } }, "cases": [ { "id": "RestJsonHttpGetWithNoModeledBody", + "description": "Serializes a GET request with no modeled body", "given": { "name": "TestGetNoPayload", "http": { @@ -5572,9 +6570,9 @@ "input": { "shape": "TestNoPayloadInputOutput" }, - "documentation": "

This example GET operation serializes a request without a modeled HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.

" + "documentation": "

This example GET operation serializes a request without a modeled HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.

", + "readonly": true }, - "description": "Serializes a GET request with no modeled body", "params": {}, "serialized": { "method": "GET", @@ -5588,6 +6586,7 @@ }, { "id": "RestJsonHttpGetWithHeaderMemberNoModeledBody", + "description": "Serializes a GET request with header member but no modeled body", "given": { "name": "TestGetNoPayload", "http": { @@ -5598,9 +6597,9 @@ "input": { "shape": "TestNoPayloadInputOutput" }, - "documentation": "

This example GET operation serializes a request without a modeled HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.

" + "documentation": "

This example GET operation serializes a request without a modeled HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.

", + "readonly": true }, - "description": "Serializes a GET request with header member but no modeled body", "params": { "testId": "t-12345" }, @@ -5622,13 +6621,28 @@ { "description": "Test cases for TestPayloadBlob operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Blob": { + "type": "blob" + }, + "String": { + "type": "string" + }, "TestPayloadBlobInputOutput": { "type": "structure", "members": { @@ -5642,17 +6656,12 @@ } }, "payload": "data" - }, - "String": { - "type": "string" - }, - "Blob": { - "type": "blob" } }, "cases": [ { "id": "RestJsonHttpWithEmptyBlobPayload", + "description": "Serializes a payload targeting an empty blob", "given": { "name": "TestPayloadBlob", "http": { @@ -5666,7 +6675,6 @@ "documentation": "

This example operation serializes a payload targeting a blob.

The Blob shape is not structured content and we cannot make assumptions about what data will be sent. This test ensures only a generic "Content-Type: application/octet-stream" header is used, and that we are not treating an empty body as an empty JSON document.

", "idempotent": true }, - "description": "Serializes a payload targeting an empty blob", "params": {}, "serialized": { "method": "POST", @@ -5676,6 +6684,7 @@ }, { "id": "RestJsonTestPayloadBlob", + "description": "Serializes a payload targeting a blob", "given": { "name": "TestPayloadBlob", "http": { @@ -5689,7 +6698,6 @@ "documentation": "

This example operation serializes a payload targeting a blob.

The Blob shape is not structured content and we cannot make assumptions about what data will be sent. This test ensures only a generic "Content-Type: application/octet-stream" header is used, and that we are not treating an empty body as an empty JSON document.

", "idempotent": true }, - "description": "Serializes a payload targeting a blob", "params": { "contentType": "image/jpg", "data": "1234" @@ -5711,13 +6719,37 @@ { "description": "Test cases for TestPayloadStructure operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Integer": { + "type": "integer", + "box": true + }, + "PayloadConfig": { + "type": "structure", + "members": { + "data": { + "shape": "Integer" + } + } + }, + "String": { + "type": "string" + }, "TestPayloadStructureInputOutput": { "type": "structure", "members": { @@ -5731,26 +6763,12 @@ } }, "payload": "payloadConfig" - }, - "String": { - "type": "string" - }, - "PayloadConfig": { - "type": "structure", - "members": { - "data": { - "shape": "Integer" - } - } - }, - "Integer": { - "type": "integer", - "box": true } }, "cases": [ { "id": "RestJsonHttpWithEmptyStructurePayload", + "description": "Serializes a payload targeting an empty structure", "given": { "name": "TestPayloadStructure", "http": { @@ -5764,7 +6782,6 @@ "documentation": "

This example operation serializes a payload targeting a structure.

This enforces the same requirements as TestBodyStructure but with the body specified by the @httpPayload trait.

", "idempotent": true }, - "description": "Serializes a payload targeting an empty structure", "params": {}, "serialized": { "method": "POST", @@ -5780,6 +6797,7 @@ }, { "id": "RestJsonTestPayloadStructure", + "description": "Serializes a payload targeting a structure", "given": { "name": "TestPayloadStructure", "http": { @@ -5793,7 +6811,6 @@ "documentation": "

This example operation serializes a payload targeting a structure.

This enforces the same requirements as TestBodyStructure but with the body specified by the @httpPayload trait.

", "idempotent": true }, - "description": "Serializes a payload targeting a structure", "params": { "payloadConfig": { "data": 25 @@ -5813,6 +6830,7 @@ }, { "id": "RestJsonHttpWithHeadersButNoPayload", + "description": "Serializes an request with header members but no payload", "given": { "name": "TestPayloadStructure", "http": { @@ -5826,7 +6844,6 @@ "documentation": "

This example operation serializes a payload targeting a structure.

This enforces the same requirements as TestBodyStructure but with the body specified by the @httpPayload trait.

", "idempotent": true }, - "description": "Serializes an request with header members but no payload", "params": { "testId": "t-12345" }, @@ -5835,8 +6852,8 @@ "uri": "/payload", "body": "{}", "headers": { - "Content-Type": "application/json", - "X-Amz-Test-Id": "t-12345" + "X-Amz-Test-Id": "t-12345", + "Content-Type": "application/json" }, "requireHeaders": [ "Content-Length" @@ -5848,16 +6865,26 @@ { "description": "Test cases for TestPostNoInputNoPayload operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": {}, "cases": [ { "id": "RestJsonHttpPostWithNoInput", + "description": "Serializes a POST request for an operation with no input, and therefore no modeled body", "given": { "name": "TestPostNoInputNoPayload", "http": { @@ -5867,7 +6894,6 @@ }, "documentation": "

This example POST operation has no input and serializes a request without a HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Type) to a POST operation with no modeled input.

" }, - "description": "Serializes a POST request for an operation with no input, and therefore no modeled body", "params": {}, "serialized": { "method": "POST", @@ -5883,13 +6909,25 @@ { "description": "Test cases for TestPostNoPayload operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "String": { + "type": "string" + }, "TestNoPayloadInputOutput": { "type": "structure", "members": { @@ -5899,14 +6937,12 @@ "locationName": "X-Amz-Test-Id" } } - }, - "String": { - "type": "string" } }, "cases": [ { "id": "RestJsonHttpPostWithNoModeledBody", + "description": "Serializes a POST request with no modeled body", "given": { "name": "TestPostNoPayload", "http": { @@ -5919,7 +6955,6 @@ }, "documentation": "

This example POST operation serializes a request without a modeled HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Type) to a POST operation with no modeled payload.

" }, - "description": "Serializes a POST request with no modeled body", "params": {}, "serialized": { "method": "POST", @@ -5932,6 +6967,7 @@ }, { "id": "RestJsonHttpWithPostHeaderMemberNoModeledBody", + "description": "Serializes a POST request with header member but no modeled body", "given": { "name": "TestPostNoPayload", "http": { @@ -5944,7 +6980,6 @@ }, "documentation": "

This example POST operation serializes a request without a modeled HTTP body.

These tests are to ensure we do not attach a body or related headers (Content-Type) to a POST operation with no modeled payload.

" }, - "description": "Serializes a POST request with header member but no modeled body", "params": { "testId": "t-12345" }, @@ -5965,13 +7000,49 @@ { "description": "Test cases for TimestampFormatHeaders operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "DateTime": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, + "EpochSeconds": { + "type": "timestamp", + "timestampFormat": "unixTimestamp" + }, + "HttpDate": { + "type": "timestamp", + "timestampFormat": "rfc822" + }, + "SyntheticTimestamp_date_time": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, + "SyntheticTimestamp_epoch_seconds": { + "type": "timestamp", + "timestampFormat": "unixTimestamp" + }, + "SyntheticTimestamp_http_date": { + "type": "timestamp", + "timestampFormat": "rfc822" + }, + "Timestamp": { + "type": "timestamp" + }, "TimestampFormatHeadersIO": { "type": "structure", "members": { @@ -6011,38 +7082,12 @@ "locationName": "X-targetDateTime" } } - }, - "SyntheticTimestamp_epoch_seconds": { - "type": "timestamp", - "timestampFormat": "unixTimestamp" - }, - "SyntheticTimestamp_http_date": { - "type": "timestamp", - "timestampFormat": "rfc822" - }, - "SyntheticTimestamp_date_time": { - "type": "timestamp", - "timestampFormat": "iso8601" - }, - "Timestamp": { - "type": "timestamp" - }, - "EpochSeconds": { - "type": "timestamp", - "timestampFormat": "unixTimestamp" - }, - "HttpDate": { - "type": "timestamp", - "timestampFormat": "rfc822" - }, - "DateTime": { - "type": "timestamp", - "timestampFormat": "iso8601" } }, "cases": [ { "id": "RestJsonTimestampFormatHeaders", + "description": "Tests how timestamp request headers are serialized", "given": { "name": "TimestampFormatHeaders", "http": { @@ -6055,7 +7100,6 @@ }, "documentation": "

This example tests how timestamp request and response headers are serialized.

" }, - "description": "Tests how timestamp request headers are serialized", "params": { "memberEpochSeconds": 1576540098, "memberHttpDate": 1576540098, @@ -6070,13 +7114,13 @@ "uri": "/TimestampFormatHeaders", "body": "", "headers": { - "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT", "X-memberDateTime": "2019-12-16T23:48:18Z", - "X-memberEpochSeconds": "1576540098", + "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-memberHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-targetDateTime": "2019-12-16T23:48:18Z", "X-targetEpochSeconds": "1576540098", - "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT" + "X-memberEpochSeconds": "1576540098", + "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT" } } } @@ -6085,16 +7129,26 @@ { "description": "Test cases for UnitInputAndOutput operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": {}, "cases": [ { "id": "RestJsonUnitInputAndOutput", + "description": "A unit type input serializes no payload. When clients do not\nneed to serialize any data in the payload, they should omit\na payload altogether.", "given": { "name": "UnitInputAndOutput", "http": { @@ -6104,7 +7158,6 @@ }, "documentation": "

This test is similar to NoInputAndNoOutput, but uses explicit Unit types.

" }, - "description": "A unit type input serializes no payload. When clients do not\nneed to serialize any data in the payload, they should omit\na payload altogether.", "params": {}, "serialized": { "method": "POST", diff --git a/tools/code-generation/protocol-tests/input/smithy-rpc-v2-cbor.json b/tools/code-generation/protocol-tests/input/smithy-rpc-v2-cbor.json index f790704fd343..151c34c39183 100644 --- a/tools/code-generation/protocol-tests/input/smithy-rpc-v2-cbor.json +++ b/tools/code-generation/protocol-tests/input/smithy-rpc-v2-cbor.json @@ -2,12 +2,21 @@ { "description": "Test cases for EmptyInputOutput operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { "EmptyStructure": { @@ -18,6 +27,7 @@ "cases": [ { "id": "empty_input", + "description": "When Input structure is empty we write CBOR equivalent of {}", "given": { "name": "EmptyInputOutput", "http": { @@ -28,16 +38,15 @@ "shape": "EmptyStructure" } }, - "description": "When Input structure is empty we write CBOR equivalent of {}", "params": {}, "serialized": { "method": "POST", "uri": "/service/RpcV2Protocol/operation/EmptyInputOutput", "body": "v/8=", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "forbidHeaders": [ "X-Amz-Target" @@ -52,17 +61,27 @@ { "description": "Test cases for NoInputOutput operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": {}, "cases": [ { "id": "no_input", + "description": "Body is empty and no Content-Type header if no input", "given": { "name": "NoInputOutput", "http": { @@ -70,7 +89,6 @@ "requestUri": "/" } }, - "description": "Body is empty and no Content-Type header if no input", "params": {}, "serialized": { "method": "POST", @@ -91,12 +109,21 @@ { "description": "Test cases for OptionalInputOutput operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { "SimpleStructure": { @@ -114,6 +141,7 @@ "cases": [ { "id": "optional_input", + "description": "When input is empty we write CBOR equivalent of {}", "given": { "name": "OptionalInputOutput", "http": { @@ -124,16 +152,15 @@ "shape": "SimpleStructure" } }, - "description": "When input is empty we write CBOR equivalent of {}", "params": {}, "serialized": { "method": "POST", "uri": "/service/RpcV2Protocol/operation/OptionalInputOutput", "body": "v/8=", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "forbidHeaders": [ "X-Amz-Target" @@ -145,12 +172,21 @@ { "description": "Test cases for RecursiveShapes operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { "RecursiveShapesInputOutput": { @@ -172,9 +208,6 @@ } } }, - "String": { - "type": "string" - }, "RecursiveShapesInputOutputNested2": { "type": "structure", "members": { @@ -185,11 +218,15 @@ "shape": "RecursiveShapesInputOutputNested1" } } + }, + "String": { + "type": "string" } }, "cases": [ { "id": "RpcV2CborRecursiveShapes", + "description": "Serializes recursive structures", "given": { "name": "RecursiveShapes", "http": { @@ -200,7 +237,6 @@ "shape": "RecursiveShapesInputOutput" } }, - "description": "Serializes recursive structures", "params": { "nested": { "foo": "Foo1", @@ -220,9 +256,9 @@ "uri": "/service/RpcV2Protocol/operation/RecursiveShapes", "body": "v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8=", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -234,41 +270,34 @@ { "description": "Test cases for RpcV2CborDenseMaps operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { - "RpcV2CborDenseMapsInputOutput": { - "type": "structure", - "members": { - "denseStructMap": { - "shape": "DenseStructMap" - }, - "denseNumberMap": { - "shape": "DenseNumberMap" - }, - "denseBooleanMap": { - "shape": "DenseBooleanMap" - }, - "denseStringMap": { - "shape": "DenseStringMap" - }, - "denseSetMap": { - "shape": "DenseSetMap" - } - } + "Boolean": { + "type": "boolean", + "box": true }, - "DenseStructMap": { + "DenseBooleanMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "GreetingStruct" + "shape": "Boolean" } }, "DenseNumberMap": { @@ -280,13 +309,13 @@ "shape": "Integer" } }, - "DenseBooleanMap": { + "DenseSetMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "Boolean" + "shape": "StringSet" } }, "DenseStringMap": { @@ -298,44 +327,61 @@ "shape": "String" } }, - "DenseSetMap": { + "DenseStructMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "StringSet" + "shape": "GreetingStruct" } }, - "StringSet": { - "type": "list", - "member": { - "shape": "String" + "GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "shape": "String" + } } }, - "String": { - "type": "string" - }, - "Boolean": { - "type": "boolean", - "box": true - }, "Integer": { "type": "integer", "box": true }, - "GreetingStruct": { + "RpcV2CborDenseMapsInputOutput": { "type": "structure", "members": { - "hi": { - "shape": "String" + "denseStructMap": { + "shape": "DenseStructMap" + }, + "denseNumberMap": { + "shape": "DenseNumberMap" + }, + "denseBooleanMap": { + "shape": "DenseBooleanMap" + }, + "denseStringMap": { + "shape": "DenseStringMap" + }, + "denseSetMap": { + "shape": "DenseSetMap" } } + }, + "String": { + "type": "string" + }, + "StringSet": { + "type": "list", + "member": { + "shape": "String" + } } }, "cases": [ { "id": "RpcV2CborMaps", + "description": "Serializes maps", "given": { "name": "RpcV2CborDenseMaps", "http": { @@ -347,7 +393,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "Serializes maps", "params": { "denseStructMap": { "foo": { @@ -363,9 +408,9 @@ "uri": "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps", "body": "oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ==", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -374,6 +419,7 @@ }, { "id": "RpcV2CborSerializesZeroValuesInMaps", + "description": "Ensure that 0 and false are sent over the wire in all maps and lists", "given": { "name": "RpcV2CborDenseMaps", "http": { @@ -385,7 +431,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "Ensure that 0 and false are sent over the wire in all maps and lists", "params": { "denseNumberMap": { "x": 0 @@ -399,9 +444,9 @@ "uri": "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps", "body": "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A==", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -410,6 +455,7 @@ }, { "id": "RpcV2CborSerializesDenseSetMap", + "description": "A request that contains a dense map of sets.", "given": { "name": "RpcV2CborDenseMaps", "http": { @@ -421,7 +467,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "A request that contains a dense map of sets.", "params": { "denseSetMap": { "x": [], @@ -436,9 +481,9 @@ "uri": "/service/RpcV2Protocol/operation/RpcV2CborDenseMaps", "body": "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -450,14 +495,85 @@ { "description": "Test cases for RpcV2CborLists operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { + "Blob": { + "type": "blob" + }, + "BlobList": { + "type": "list", + "member": { + "shape": "Blob" + } + }, + "Boolean": { + "type": "boolean", + "box": true + }, + "BooleanList": { + "type": "list", + "member": { + "shape": "Boolean" + } + }, + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] + }, + "FooEnumList": { + "type": "list", + "member": { + "shape": "FooEnum" + } + }, + "Integer": { + "type": "integer", + "box": true + }, + "IntegerEnum": { + "type": "integer", + "box": true + }, + "IntegerEnumList": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, + "IntegerList": { + "type": "list", + "member": { + "shape": "Integer" + } + }, + "NestedStringList": { + "type": "list", + "member": { + "shape": "StringList" + }, + "documentation": "

A list of lists of strings.

" + }, "RpcV2CborListInputOutput": { "type": "structure", "members": { @@ -493,6 +609,9 @@ } } }, + "String": { + "type": "string" + }, "StringList": { "type": "list", "member": { @@ -505,58 +624,12 @@ "shape": "String" } }, - "IntegerList": { - "type": "list", - "member": { - "shape": "Integer" - } - }, - "BooleanList": { - "type": "list", - "member": { - "shape": "Boolean" - } - }, - "TimestampList": { - "type": "list", - "member": { - "shape": "Timestamp" - } - }, - "FooEnumList": { - "type": "list", - "member": { - "shape": "FooEnum" - } - }, - "IntegerEnumList": { - "type": "list", - "member": { - "shape": "IntegerEnum" - } - }, - "NestedStringList": { - "type": "list", - "member": { - "shape": "StringList" - }, - "documentation": "

A list of lists of strings.

" - }, "StructureList": { "type": "list", "member": { "shape": "StructureListMember" } }, - "BlobList": { - "type": "list", - "member": { - "shape": "Blob" - } - }, - "Blob": { - "type": "blob" - }, "StructureListMember": { "type": "structure", "members": { @@ -568,38 +641,20 @@ } } }, - "String": { - "type": "string" - }, - "IntegerEnum": { - "type": "integer", - "box": true - }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, "Timestamp": { "type": "timestamp" }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true + "TimestampList": { + "type": "list", + "member": { + "shape": "Timestamp" + } } }, "cases": [ { "id": "RpcV2CborLists", + "description": "Serializes RpcV2 Cbor lists", "given": { "name": "RpcV2CborLists", "http": { @@ -612,7 +667,6 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal lists.
  2. Normal sets.
  3. Lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Serializes RpcV2 Cbor lists", "params": { "stringList": [ "foo", @@ -672,9 +726,9 @@ "uri": "/service/RpcV2Protocol/operation/RpcV2CborLists", "body": "v2pzdHJpbmdMaXN0gmNmb29jYmFyaXN0cmluZ1NldIJjZm9vY2JhcmtpbnRlZ2VyTGlzdIIBAmtib29sZWFuTGlzdIL19G10aW1lc3RhbXBMaXN0gsH7QdTX+/OAAADB+0HU1/vzgAAAaGVudW1MaXN0gmNGb29hMGtpbnRFbnVtTGlzdIIBAnBuZXN0ZWRTdHJpbmdMaXN0goJjZm9vY2JhcoJjYmF6Y3F1eG1zdHJ1Y3R1cmVMaXN0gqJhYWExYWJhMqJhYWEzYWJhNGhibG9iTGlzdIJDZm9vQ2Jhcv8=", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -683,6 +737,7 @@ }, { "id": "RpcV2CborListsEmpty", + "description": "Serializes empty JSON lists", "given": { "name": "RpcV2CborLists", "http": { @@ -695,7 +750,6 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal lists.
  2. Normal sets.
  3. Lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Serializes empty JSON lists", "params": { "stringList": [] }, @@ -704,9 +758,9 @@ "uri": "/service/RpcV2Protocol/operation/RpcV2CborLists", "body": "v2pzdHJpbmdMaXN0n///", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -715,6 +769,7 @@ }, { "id": "RpcV2CborListsEmptyUsingDefiniteLength", + "description": "Serializes empty JSON definite length lists", "given": { "name": "RpcV2CborLists", "http": { @@ -727,7 +782,6 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal lists.
  2. Normal sets.
  3. Lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Serializes empty JSON definite length lists", "params": { "stringList": [] }, @@ -736,9 +790,9 @@ "uri": "/service/RpcV2Protocol/operation/RpcV2CborLists", "body": "oWpzdHJpbmdMaXN0gA==", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -748,16 +802,353 @@ ] }, { - "description": "Test cases for SimpleScalarProperties operation", + "description": "Test cases for RpcV2CborSparseMaps operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" + }, + "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "shape": "String" + } + } + }, + "Integer": { + "type": "integer", + "box": true + }, + "RpcV2CborSparseMapsInputOutput": { + "type": "structure", + "members": { + "sparseStructMap": { + "shape": "SparseStructMap" + }, + "sparseNumberMap": { + "shape": "SparseNumberMap" + }, + "sparseBooleanMap": { + "shape": "SparseBooleanMap" + }, + "sparseStringMap": { + "shape": "SparseStringMap" + }, + "sparseSetMap": { + "shape": "SparseSetMap" + } + } + }, + "SparseBooleanMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "Boolean" + }, + "sparse": true + }, + "SparseNumberMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "Integer" + }, + "sparse": true + }, + "SparseSetMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "StringSet" + }, + "sparse": true + }, + "SparseStringMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + }, + "sparse": true + }, + "SparseStructMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "GreetingStruct" + }, + "sparse": true + }, + "String": { + "type": "string" + }, + "StringSet": { + "type": "list", + "member": { + "shape": "String" + } + } + }, + "cases": [ + { + "id": "RpcV2CborSparseMaps", + "description": "Serializes sparse maps", + "given": { + "name": "RpcV2CborSparseMaps", + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "RpcV2CborSparseMapsInputOutput" + } + }, + "params": { + "sparseStructMap": { + "foo": { + "hi": "there" + }, + "baz": { + "hi": "bye" + } + } + }, + "serialized": { + "method": "POST", + "uri": "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps", + "body": "v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////", + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Accept": "application/cbor", + "Content-Type": "application/cbor" + }, + "requireHeaders": [ + "Content-Length" + ] + } + }, + { + "id": "RpcV2CborSerializesNullMapValues", + "description": "Serializes null map values in sparse maps", + "given": { + "name": "RpcV2CborSparseMaps", + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "RpcV2CborSparseMapsInputOutput" + } + }, + "params": { + "sparseBooleanMap": { + "x": null + }, + "sparseNumberMap": { + "x": null + }, + "sparseStringMap": { + "x": null + }, + "sparseStructMap": { + "x": null + } + }, + "serialized": { + "method": "POST", + "uri": "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps", + "body": "v3BzcGFyc2VCb29sZWFuTWFwv2F49v9vc3BhcnNlTnVtYmVyTWFwv2F49v9vc3BhcnNlU3RyaW5nTWFwv2F49v9vc3BhcnNlU3RydWN0TWFwv2F49v//", + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Accept": "application/cbor", + "Content-Type": "application/cbor" + }, + "requireHeaders": [ + "Content-Length" + ] + } + }, + { + "id": "RpcV2CborSerializesSparseSetMap", + "description": "A request that contains a sparse map of sets", + "given": { + "name": "RpcV2CborSparseMaps", + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "RpcV2CborSparseMapsInputOutput" + } + }, + "params": { + "sparseSetMap": { + "x": [], + "y": [ + "a", + "b" + ] + } + }, + "serialized": { + "method": "POST", + "uri": "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps", + "body": "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL///8=", + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Accept": "application/cbor", + "Content-Type": "application/cbor" + }, + "requireHeaders": [ + "Content-Length" + ] + } + }, + { + "id": "RpcV2CborSerializesSparseSetMapAndRetainsNull", + "description": "A request that contains a sparse map of sets.", + "given": { + "name": "RpcV2CborSparseMaps", + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "RpcV2CborSparseMapsInputOutput" + } + }, + "params": { + "sparseSetMap": { + "x": [], + "y": [ + "a", + "b" + ], + "z": null + } + }, + "serialized": { + "method": "POST", + "uri": "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps", + "body": "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8=", + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Accept": "application/cbor", + "Content-Type": "application/cbor" + }, + "requireHeaders": [ + "Content-Length" + ] + } + }, + { + "id": "RpcV2CborSerializesZeroValuesInSparseMaps", + "description": "Ensure that 0 and false are sent over the wire in all maps and lists", + "given": { + "name": "RpcV2CborSparseMaps", + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "RpcV2CborSparseMapsInputOutput" + } + }, + "params": { + "sparseNumberMap": { + "x": 0 + }, + "sparseBooleanMap": { + "x": false + } + }, + "serialized": { + "method": "POST", + "uri": "/service/RpcV2Protocol/operation/RpcV2CborSparseMaps", + "body": "v29zcGFyc2VOdW1iZXJNYXC/YXgA/3BzcGFyc2VCb29sZWFuTWFwv2F49P//", + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Accept": "application/cbor", + "Content-Type": "application/cbor" + }, + "requireHeaders": [ + "Content-Length" + ] + } + } + ] + }, + { + "description": "Test cases for SimpleScalarProperties operation", + "metadata": { "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", + "protocol": "smithy-rpc-v2-cbor", + "protocols": [ + "smithy-rpc-v2-cbor" + ], + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { + "Blob": { + "type": "blob" + }, + "Boolean": { + "type": "boolean", + "box": true + }, + "Double": { + "type": "double", + "box": true + }, + "Float": { + "type": "float", + "box": true + }, + "Integer": { + "type": "integer", + "box": true + }, + "Long": { + "type": "long", + "box": true + }, "SimpleScalarStructure": { "type": "structure", "members": { @@ -793,36 +1184,14 @@ } } }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true - }, - "Double": { - "type": "double", - "box": true - }, - "Float": { - "type": "float", - "box": true - }, - "Long": { - "type": "long", - "box": true - }, "String": { "type": "string" - }, - "Blob": { - "type": "blob" } }, "cases": [ { "id": "RpcV2CborSimpleScalarProperties", + "description": "Serializes simple scalar properties", "given": { "name": "SimpleScalarProperties", "http": { @@ -833,7 +1202,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "Serializes simple scalar properties", "params": { "byteValue": 5, "doubleValue": 1.889, @@ -851,9 +1219,9 @@ "uri": "/service/RpcV2Protocol/operation/SimpleScalarProperties", "body": "v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -862,6 +1230,7 @@ }, { "id": "RpcV2CborClientDoesntSerializeNullStructureValues", + "description": "RpcV2 Cbor should not serialize null structure values", "given": { "name": "SimpleScalarProperties", "http": { @@ -872,7 +1241,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "RpcV2 Cbor should not serialize null structure values", "params": { "stringValue": null }, @@ -881,9 +1249,9 @@ "uri": "/service/RpcV2Protocol/operation/SimpleScalarProperties", "body": "v/8=", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -892,6 +1260,7 @@ }, { "id": "RpcV2CborSupportsNaNFloatInputs", + "description": "Supports handling NaN float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -902,7 +1271,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "Supports handling NaN float values.", "params": { "doubleValue": "NaN", "floatValue": "NaN" @@ -912,9 +1280,9 @@ "uri": "/service/RpcV2Protocol/operation/SimpleScalarProperties", "body": "v2tkb3VibGVWYWx1Zft/+AAAAAAAAGpmbG9hdFZhbHVl+n/AAAD/", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -923,6 +1291,7 @@ }, { "id": "RpcV2CborSupportsInfinityFloatInputs", + "description": "Supports handling Infinity float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -933,7 +1302,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "Supports handling Infinity float values.", "params": { "doubleValue": "Infinity", "floatValue": "Infinity" @@ -943,9 +1311,9 @@ "uri": "/service/RpcV2Protocol/operation/SimpleScalarProperties", "body": "v2tkb3VibGVWYWx1Zft/8AAAAAAAAGpmbG9hdFZhbHVl+n+AAAD/", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" @@ -954,6 +1322,7 @@ }, { "id": "RpcV2CborSupportsNegativeInfinityFloatInputs", + "description": "Supports handling Infinity float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -964,7 +1333,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "Supports handling Infinity float values.", "params": { "doubleValue": "-Infinity", "floatValue": "-Infinity" @@ -974,9 +1342,128 @@ "uri": "/service/RpcV2Protocol/operation/SimpleScalarProperties", "body": "v2tkb3VibGVWYWx1Zfv/8AAAAAAAAGpmbG9hdFZhbHVl+v+AAAD/", "headers": { + "smithy-protocol": "rpc-v2-cbor", "Accept": "application/cbor", - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "Content-Type": "application/cbor" + }, + "requireHeaders": [ + "Content-Length" + ] + } + } + ] + }, + { + "description": "Test cases for SparseNullsOperation operation", + "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", + "protocol": "smithy-rpc-v2-cbor", + "protocols": [ + "smithy-rpc-v2-cbor" + ], + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" + }, + "shapes": { + "SparseNullsOperationInputOutput": { + "type": "structure", + "members": { + "sparseStringList": { + "shape": "SparseStringList" + }, + "sparseStringMap": { + "shape": "SparseStringMap" + } + } + }, + "SparseStringList": { + "type": "list", + "member": { + "shape": "String" + }, + "sparse": true + }, + "SparseStringMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + }, + "sparse": true + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "id": "RpcV2CborSparseMapsSerializeNullValues", + "description": "Serializes null values in maps", + "given": { + "name": "SparseNullsOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "SparseNullsOperationInputOutput" + } + }, + "params": { + "sparseStringMap": { + "foo": null + } + }, + "serialized": { + "method": "POST", + "uri": "/service/RpcV2Protocol/operation/SparseNullsOperation", + "body": "v29zcGFyc2VTdHJpbmdNYXC/Y2Zvb/b//w==", + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Accept": "application/cbor", + "Content-Type": "application/cbor" + }, + "requireHeaders": [ + "Content-Length" + ] + } + }, + { + "id": "RpcV2CborSparseListsSerializeNull", + "description": "Serializes null values in lists", + "given": { + "name": "SparseNullsOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "input": { + "shape": "SparseNullsOperationInputOutput" + } + }, + "params": { + "sparseStringList": [ + null + ] + }, + "serialized": { + "method": "POST", + "uri": "/service/RpcV2Protocol/operation/SparseNullsOperation", + "body": "v3BzcGFyc2VTdHJpbmdMaXN0n/b//w==", + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Accept": "application/cbor", + "Content-Type": "application/cbor" }, "requireHeaders": [ "Content-Length" diff --git a/tools/code-generation/protocol-tests/output/json.json b/tools/code-generation/protocol-tests/output/json.json index 158b3747f402..c5ffd0062e18 100644 --- a/tools/code-generation/protocol-tests/output/json.json +++ b/tools/code-generation/protocol-tests/output/json.json @@ -2,15 +2,28 @@ { "description": "Test cases for DatetimeOffsets operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { + "DateTime": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, "DatetimeOffsetsOutput": { "type": "structure", "members": { @@ -18,15 +31,12 @@ "shape": "DateTime" } } - }, - "DateTime": { - "type": "timestamp", - "timestampFormat": "iso8601" } }, "cases": [ { "id": "AwsJson11DateTimeWithNegativeOffset", + "description": "Ensures that clients can correctly parse datetime (timestamps) with offsets", "given": { "name": "DatetimeOffsets", "http": { @@ -37,7 +47,6 @@ "shape": "DatetimeOffsetsOutput" } }, - "description": "Ensures that clients can correctly parse datetime (timestamps) with offsets", "result": { "datetime": 1576540098 }, @@ -51,6 +60,7 @@ }, { "id": "AwsJson11DateTimeWithPositiveOffset", + "description": "Ensures that clients can correctly parse datetime (timestamps) with offsets", "given": { "name": "DatetimeOffsets", "http": { @@ -61,7 +71,6 @@ "shape": "DatetimeOffsetsOutput" } }, - "description": "Ensures that clients can correctly parse datetime (timestamps) with offsets", "result": { "datetime": 1576540098 }, @@ -78,18 +87,28 @@ { "description": "Test cases for EmptyOperation operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": {}, "cases": [ { "id": "handles_empty_output_shape", + "description": "When no output is defined, the service is expected to return\nan empty payload, however, client must ignore a JSON payload\nif one is returned. This ensures that if output is added later,\nthen it will not break the client.", "given": { "name": "EmptyOperation", "http": { @@ -97,7 +116,6 @@ "requestUri": "/" } }, - "description": "When no output is defined, the service is expected to return\nan empty payload, however, client must ignore a JSON payload\nif one is returned. This ensures that if output is added later,\nthen it will not break the client.", "result": {}, "response": { "status_code": 200, @@ -109,6 +127,7 @@ }, { "id": "handles_unexpected_json_output", + "description": "This client-only test builds on handles_empty_output_shape,\nby including unexpected fields in the JSON. A client\nneeds to ignore JSON output that is empty or that contains\nJSON object data.", "given": { "name": "EmptyOperation", "http": { @@ -116,7 +135,6 @@ "requestUri": "/" } }, - "description": "This client-only test builds on handles_empty_output_shape,\nby including unexpected fields in the JSON. A client\nneeds to ignore JSON output that is empty or that contains\nJSON object data.", "result": {}, "response": { "status_code": 200, @@ -128,6 +146,7 @@ }, { "id": "json_1_1_service_responds_with_no_payload", + "description": "When no output is defined, the service is expected to return\nan empty payload. Despite the lack of a payload, the service\nis expected to always send a Content-Type header. Clients must\nhandle cases where a service returns a JSON object and where\na service returns no JSON at all.", "given": { "name": "EmptyOperation", "http": { @@ -135,7 +154,6 @@ "requestUri": "/" } }, - "description": "When no output is defined, the service is expected to return\nan empty payload. Despite the lack of a payload, the service\nis expected to always send a Content-Type header. Clients must\nhandle cases where a service returns a JSON object and where\na service returns no JSON at all.", "result": {}, "response": { "status_code": 200, @@ -150,15 +168,28 @@ { "description": "Test cases for FractionalSeconds operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { + "DateTime": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, "FractionalSecondsOutput": { "type": "structure", "members": { @@ -166,15 +197,12 @@ "shape": "DateTime" } } - }, - "DateTime": { - "type": "timestamp", - "timestampFormat": "iso8601" } }, "cases": [ { "id": "AwsJson11DateTimeWithFractionalSeconds", + "description": "Ensures that clients can correctly parse datetime timestamps with fractional seconds", "given": { "name": "FractionalSeconds", "http": { @@ -185,7 +213,6 @@ "shape": "FractionalSecondsOutput" } }, - "description": "Ensures that clients can correctly parse datetime timestamps with fractional seconds", "result": { "datetime": 9.46845296123E8 }, @@ -202,13 +229,22 @@ { "description": "Test cases for GreetingWithErrors operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { "InvalidGreeting": { @@ -228,6 +264,7 @@ "cases": [ { "id": "AwsJson11InvalidGreetingError", + "description": "Parses simple JSON errors", "given": { "name": "GreetingWithErrors", "http": { @@ -242,7 +279,6 @@ } ] }, - "description": "Parses simple JSON errors", "errorCode": "InvalidGreeting", "errorMessage": "Hi", "error": { @@ -261,13 +297,22 @@ { "description": "Test cases for GreetingWithErrors operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { "ComplexError": { @@ -283,9 +328,6 @@ "documentation": "

This error is thrown when a request is invalid.

", "exception": true }, - "String": { - "type": "string" - }, "ComplexNestedErrorData": { "type": "structure", "members": { @@ -293,11 +335,15 @@ "shape": "String" } } + }, + "String": { + "type": "string" } }, "cases": [ { "id": "AwsJson11ComplexError", + "description": "Parses a complex error with no message member", "given": { "name": "GreetingWithErrors", "http": { @@ -312,7 +358,6 @@ } ] }, - "description": "Parses a complex error with no message member", "errorCode": "ComplexError", "error": { "TopLevel": "Top level", @@ -359,13 +404,22 @@ { "description": "Test cases for GreetingWithErrors operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { "FooError": { @@ -379,6 +433,7 @@ "cases": [ { "id": "AwsJson11FooErrorUsingXAmznErrorType", + "description": "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS.", "given": { "name": "GreetingWithErrors", "http": { @@ -393,7 +448,6 @@ } ] }, - "description": "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS.", "errorCode": "FooError", "error": {}, "response": { @@ -405,6 +459,7 @@ }, { "id": "AwsJson11FooErrorUsingXAmznErrorTypeWithUri", + "description": "Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'\nis to be interpreted as 'ValidationException'.\n\nFor an example service see Amazon Polly.", "given": { "name": "GreetingWithErrors", "http": { @@ -419,7 +474,6 @@ } ] }, - "description": "Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'\nis to be interpreted as 'ValidationException'.\n\nFor an example service see Amazon Polly.", "errorCode": "FooError", "error": {}, "response": { @@ -431,6 +485,7 @@ }, { "id": "AwsJson11FooErrorUsingXAmznErrorTypeWithUriAndNamespace", + "description": "X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape name. This is a pathalogical case that might not actually happen in any deployed AWS service.", "given": { "name": "GreetingWithErrors", "http": { @@ -445,7 +500,6 @@ } ] }, - "description": "X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape name. This is a pathalogical case that might not actually happen in any deployed AWS service.", "errorCode": "FooError", "error": {}, "response": { @@ -457,6 +511,7 @@ }, { "id": "AwsJson11FooErrorUsingCode", + "description": "This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some services do this though it's preferable to send the X-Amzn-Errortype. Client implementations must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.\n\nFor example service see Amazon S3 Glacier.", "given": { "name": "GreetingWithErrors", "http": { @@ -471,7 +526,6 @@ } ] }, - "description": "This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some services do this though it's preferable to send the X-Amzn-Errortype. Client implementations must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.\n\nFor example service see Amazon S3 Glacier.", "errorCode": "FooError", "error": {}, "response": { @@ -484,6 +538,7 @@ }, { "id": "AwsJson11FooErrorUsingCodeAndNamespace", + "description": "Some services serialize errors using code, and it might contain a namespace. Clients should just take the last part of the string after '#'.", "given": { "name": "GreetingWithErrors", "http": { @@ -498,7 +553,6 @@ } ] }, - "description": "Some services serialize errors using code, and it might contain a namespace. Clients should just take the last part of the string after '#'.", "errorCode": "FooError", "error": {}, "response": { @@ -511,6 +565,7 @@ }, { "id": "AwsJson11FooErrorUsingCodeUriAndNamespace", + "description": "Some services serialize errors using code, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", "given": { "name": "GreetingWithErrors", "http": { @@ -525,7 +580,6 @@ } ] }, - "description": "Some services serialize errors using code, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", "errorCode": "FooError", "error": {}, "response": { @@ -538,6 +592,7 @@ }, { "id": "AwsJson11FooErrorWithDunderType", + "description": "Some services serialize errors using __type.", "given": { "name": "GreetingWithErrors", "http": { @@ -552,7 +607,6 @@ } ] }, - "description": "Some services serialize errors using __type.", "errorCode": "FooError", "error": {}, "response": { @@ -565,6 +619,7 @@ }, { "id": "AwsJson11FooErrorWithDunderTypeAndNamespace", + "description": "Some services serialize errors using __type, and it might contain a namespace. Clients should just take the last part of the string after '#'.", "given": { "name": "GreetingWithErrors", "http": { @@ -579,7 +634,6 @@ } ] }, - "description": "Some services serialize errors using __type, and it might contain a namespace. Clients should just take the last part of the string after '#'.", "errorCode": "FooError", "error": {}, "response": { @@ -592,6 +646,7 @@ }, { "id": "AwsJson11FooErrorWithDunderTypeUriAndNamespace", + "description": "Some services serialize errors using __type, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", "given": { "name": "GreetingWithErrors", "http": { @@ -606,7 +661,6 @@ } ] }, - "description": "Some services serialize errors using __type, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", "errorCode": "FooError", "error": {}, "response": { @@ -616,44 +670,57 @@ }, "body": "{\n \"__type\": \"aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/\"\n}" } + }, + { + "id": "AwsJson11FooErrorWithNestedTypeProperty", + "description": "Some services serialize errors using __type, and if the response includes additional shapes that belong to a different namespace there'll be a nested __type property that must not be considered when determining which error to be surfaced.\n\nFor an example service see Amazon DynamoDB.", + "given": { + "name": "GreetingWithErrors", + "http": { + "method": "POST", + "requestUri": "/" + }, + "documentation": "

This operation has three possible return values:

  1. A successful response in the form of GreetingWithErrorsOutput
  2. An InvalidGreeting error.
  3. A ComplexError error.

Implementations must be able to successfully take a response and properly deserialize successful and error responses.

", + "idempotent": true, + "errors": [ + { + "shape": "FooError" + } + ] + }, + "errorCode": "FooError", + "error": {}, + "response": { + "status_code": 500, + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "body": "{\n \"__type\": \"aws.protocoltests.restjson#FooError\",\n \"ErrorDetails\": [\n {\n \"__type\": \"com.amazon.internal#ErrorDetails\",\n \"reason\": \"Some reason\"\n }\n ]\n}" + } } ] }, { "description": "Test cases for JsonEnums operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { - "JsonEnumsInputOutput": { - "type": "structure", - "members": { - "fooEnum1": { - "shape": "FooEnum" - }, - "fooEnum2": { - "shape": "FooEnum" - }, - "fooEnum3": { - "shape": "FooEnum" - }, - "fooEnumList": { - "shape": "FooEnumList" - }, - "fooEnumSet": { - "shape": "FooEnumSet" - }, - "fooEnumMap": { - "shape": "FooEnumMap" - } - } - }, "FooEnum": { "type": "string", "enum": [ @@ -670,12 +737,6 @@ "shape": "FooEnum" } }, - "FooEnumSet": { - "type": "list", - "member": { - "shape": "FooEnum" - } - }, "FooEnumMap": { "type": "map", "key": { @@ -685,6 +746,35 @@ "shape": "FooEnum" } }, + "FooEnumSet": { + "type": "list", + "member": { + "shape": "FooEnum" + } + }, + "JsonEnumsInputOutput": { + "type": "structure", + "members": { + "fooEnum1": { + "shape": "FooEnum" + }, + "fooEnum2": { + "shape": "FooEnum" + }, + "fooEnum3": { + "shape": "FooEnum" + }, + "fooEnumList": { + "shape": "FooEnumList" + }, + "fooEnumSet": { + "shape": "FooEnumSet" + }, + "fooEnumMap": { + "shape": "FooEnumMap" + } + } + }, "String": { "type": "string" } @@ -692,6 +782,7 @@ "cases": [ { "id": "AwsJson11Enums", + "description": "Serializes simple scalar properties", "given": { "name": "JsonEnums", "http": { @@ -704,7 +795,6 @@ "documentation": "

This example serializes enums as top level properties, in lists, sets, and maps.

", "idempotent": true }, - "description": "Serializes simple scalar properties", "result": { "fooEnum1": "Foo", "fooEnum2": "0", @@ -735,15 +825,49 @@ { "description": "Test cases for JsonIntEnums operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { + "IntegerEnum": { + "type": "integer", + "box": true + }, + "IntegerEnumList": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, + "IntegerEnumMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "IntegerEnum" + } + }, + "IntegerEnumSet": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, "JsonIntEnumsInputOutput": { "type": "structure", "members": { @@ -767,31 +891,6 @@ } } }, - "IntegerEnum": { - "type": "integer", - "box": true - }, - "IntegerEnumList": { - "type": "list", - "member": { - "shape": "IntegerEnum" - } - }, - "IntegerEnumSet": { - "type": "list", - "member": { - "shape": "IntegerEnum" - } - }, - "IntegerEnumMap": { - "type": "map", - "key": { - "shape": "String" - }, - "value": { - "shape": "IntegerEnum" - } - }, "String": { "type": "string" } @@ -799,6 +898,7 @@ "cases": [ { "id": "AwsJson11IntEnums", + "description": "Serializes simple scalar properties", "given": { "name": "JsonIntEnums", "http": { @@ -811,7 +911,6 @@ "documentation": "

This example serializes intEnums as top level properties, in lists, sets, and maps.

", "idempotent": true }, - "description": "Serializes simple scalar properties", "result": { "intEnum1": 1, "intEnum2": 2, @@ -832,8 +931,8 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/x-amz-json-1.1", - "X-Amz-Target": "JsonProtocol.JsonIntEnums" + "X-Amz-Target": "JsonProtocol.JsonIntEnums", + "Content-Type": "application/x-amz-json-1.1" }, "body": "{\n \"intEnum1\": 1,\n \"intEnum2\": 2,\n \"intEnum3\": 3,\n \"intEnumList\": [\n 1,\n 2\n ],\n \"intEnumSet\": [\n 1,\n 2\n ],\n \"intEnumMap\": {\n \"a\": 1,\n \"b\": 2\n }\n}" } @@ -843,23 +942,52 @@ { "description": "Test cases for JsonUnions operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { - "UnionInputOutput": { + "Blob": { + "type": "blob" + }, + "Boolean": { + "type": "boolean", + "box": true + }, + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] + }, + "GreetingStruct": { "type": "structure", "members": { - "contents": { - "shape": "MyUnion" + "hi": { + "shape": "String" } - }, - "documentation": "

A shared structure that contains a single union member.

" + } + }, + "Integer": { + "type": "integer", + "box": true }, "MyUnion": { "type": "structure", @@ -898,30 +1026,6 @@ "String": { "type": "string" }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true - }, - "Blob": { - "type": "blob" - }, - "Timestamp": { - "type": "timestamp" - }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, "StringList": { "type": "list", "member": { @@ -937,18 +1041,23 @@ "shape": "String" } }, - "GreetingStruct": { + "Timestamp": { + "type": "timestamp" + }, + "UnionInputOutput": { "type": "structure", "members": { - "hi": { - "shape": "String" + "contents": { + "shape": "MyUnion" } - } + }, + "documentation": "

A shared structure that contains a single union member.

" } }, "cases": [ { "id": "AwsJson11DeserializeStringUnionValue", + "description": "Deserializes a string union value", "given": { "name": "JsonUnions", "http": { @@ -961,7 +1070,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a string union value", "result": { "contents": { "stringValue": "foo" @@ -977,6 +1085,7 @@ }, { "id": "AwsJson11DeserializeBooleanUnionValue", + "description": "Deserializes a boolean union value", "given": { "name": "JsonUnions", "http": { @@ -989,7 +1098,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a boolean union value", "result": { "contents": { "booleanValue": true @@ -1005,6 +1113,7 @@ }, { "id": "AwsJson11DeserializeNumberUnionValue", + "description": "Deserializes a number union value", "given": { "name": "JsonUnions", "http": { @@ -1017,7 +1126,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a number union value", "result": { "contents": { "numberValue": 1 @@ -1033,6 +1141,7 @@ }, { "id": "AwsJson11DeserializeBlobUnionValue", + "description": "Deserializes a blob union value", "given": { "name": "JsonUnions", "http": { @@ -1045,7 +1154,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a blob union value", "result": { "contents": { "blobValue": "foo" @@ -1061,6 +1169,7 @@ }, { "id": "AwsJson11DeserializeTimestampUnionValue", + "description": "Deserializes a timestamp union value", "given": { "name": "JsonUnions", "http": { @@ -1073,7 +1182,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a timestamp union value", "result": { "contents": { "timestampValue": 1398796238 @@ -1089,6 +1197,7 @@ }, { "id": "AwsJson11DeserializeEnumUnionValue", + "description": "Deserializes an enum union value", "given": { "name": "JsonUnions", "http": { @@ -1101,7 +1210,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes an enum union value", "result": { "contents": { "enumValue": "Foo" @@ -1117,6 +1225,7 @@ }, { "id": "AwsJson11DeserializeListUnionValue", + "description": "Deserializes a list union value", "given": { "name": "JsonUnions", "http": { @@ -1129,7 +1238,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a list union value", "result": { "contents": { "listValue": [ @@ -1148,6 +1256,7 @@ }, { "id": "AwsJson11DeserializeMapUnionValue", + "description": "Deserializes a map union value", "given": { "name": "JsonUnions", "http": { @@ -1160,7 +1269,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a map union value", "result": { "contents": { "mapValue": { @@ -1179,6 +1287,7 @@ }, { "id": "AwsJson11DeserializeStructureUnionValue", + "description": "Deserializes a structure union value", "given": { "name": "JsonUnions", "http": { @@ -1191,7 +1300,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a structure union value", "result": { "contents": { "structureValue": { @@ -1209,6 +1317,7 @@ }, { "id": "AwsJson11DeserializeIgnoreType", + "description": "Ignores an unrecognized __type property", "given": { "name": "JsonUnions", "http": { @@ -1221,7 +1330,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Ignores an unrecognized __type property", "result": { "contents": { "structureValue": { @@ -1242,15 +1350,50 @@ { "description": "Test cases for KitchenSinkOperation operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { + "Blob": { + "type": "blob" + }, + "Boolean": { + "type": "boolean", + "box": true + }, + "Double": { + "type": "double", + "box": true + }, + "EmptyStruct": { + "type": "structure", + "members": {} + }, + "Float": { + "type": "float", + "box": true + }, + "Integer": { + "type": "integer", + "box": true + }, + "JsonValue": { + "type": "string" + }, "KitchenSink": { "type": "structure", "members": { @@ -1335,39 +1478,11 @@ } } }, - "Blob": { - "type": "blob" - }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Double": { - "type": "double", - "box": true - }, - "EmptyStruct": { - "type": "structure", - "members": {} - }, - "Float": { - "type": "float", - "box": true - }, - "SyntheticTimestamp_http_date": { - "type": "timestamp", - "timestampFormat": "rfc822" - }, - "Integer": { - "type": "integer", - "box": true - }, - "SyntheticTimestamp_date_time": { - "type": "timestamp", - "timestampFormat": "iso8601" - }, - "JsonValue": { - "type": "string" + "ListOfKitchenSinks": { + "type": "list", + "member": { + "shape": "KitchenSink" + } }, "ListOfListOfStrings": { "type": "list", @@ -1397,6 +1512,15 @@ "type": "long", "box": true }, + "MapOfKitchenSinks": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "KitchenSink" + } + }, "MapOfListsOfStrings": { "type": "map", "key": { @@ -1433,21 +1557,6 @@ "shape": "SimpleStruct" } }, - "ListOfKitchenSinks": { - "type": "list", - "member": { - "shape": "KitchenSink" - } - }, - "MapOfKitchenSinks": { - "type": "map", - "key": { - "shape": "String" - }, - "value": { - "shape": "KitchenSink" - } - }, "SimpleStruct": { "type": "structure", "members": { @@ -1467,17 +1576,26 @@ } } }, - "Timestamp": { - "type": "timestamp" + "SyntheticTimestamp_date_time": { + "type": "timestamp", + "timestampFormat": "iso8601" }, "SyntheticTimestamp_epoch_seconds": { "type": "timestamp", "timestampFormat": "unixTimestamp" + }, + "SyntheticTimestamp_http_date": { + "type": "timestamp", + "timestampFormat": "rfc822" + }, + "Timestamp": { + "type": "timestamp" } }, "cases": [ { "id": "parses_operations_with_empty_json_bodies", + "description": "Parses operations with empty JSON bodies", "given": { "name": "KitchenSinkOperation", "http": { @@ -1488,7 +1606,6 @@ "shape": "KitchenSink" } }, - "description": "Parses operations with empty JSON bodies", "result": {}, "response": { "status_code": 200, @@ -1500,6 +1617,7 @@ }, { "id": "parses_string_shapes", + "description": "Parses string shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1510,7 +1628,6 @@ "shape": "KitchenSink" } }, - "description": "Parses string shapes", "result": { "String": "string-value" }, @@ -1524,6 +1641,7 @@ }, { "id": "parses_integer_shapes", + "description": "Parses integer shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1534,7 +1652,6 @@ "shape": "KitchenSink" } }, - "description": "Parses integer shapes", "result": { "Integer": 1234 }, @@ -1548,6 +1665,7 @@ }, { "id": "parses_long_shapes", + "description": "Parses long shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1558,7 +1676,6 @@ "shape": "KitchenSink" } }, - "description": "Parses long shapes", "result": { "Long": 1234567890123456789 }, @@ -1572,6 +1689,7 @@ }, { "id": "parses_float_shapes", + "description": "Parses float shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1582,7 +1700,6 @@ "shape": "KitchenSink" } }, - "description": "Parses float shapes", "result": { "Float": 1234.5 }, @@ -1596,6 +1713,7 @@ }, { "id": "parses_double_shapes", + "description": "Parses double shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1606,7 +1724,6 @@ "shape": "KitchenSink" } }, - "description": "Parses double shapes", "result": { "Double": 1.2345678912345679E8 }, @@ -1620,6 +1737,7 @@ }, { "id": "parses_boolean_shapes_true", + "description": "Parses boolean shapes (true)", "given": { "name": "KitchenSinkOperation", "http": { @@ -1630,7 +1748,6 @@ "shape": "KitchenSink" } }, - "description": "Parses boolean shapes (true)", "result": { "Boolean": true }, @@ -1644,6 +1761,7 @@ }, { "id": "parses_boolean_false", + "description": "Parses boolean (false)", "given": { "name": "KitchenSinkOperation", "http": { @@ -1654,7 +1772,6 @@ "shape": "KitchenSink" } }, - "description": "Parses boolean (false)", "result": { "Boolean": false }, @@ -1668,6 +1785,7 @@ }, { "id": "parses_blob_shapes", + "description": "Parses blob shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1678,7 +1796,6 @@ "shape": "KitchenSink" } }, - "description": "Parses blob shapes", "result": { "Blob": "binary-value" }, @@ -1692,6 +1809,7 @@ }, { "id": "parses_timestamp_shapes", + "description": "Parses timestamp shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1702,7 +1820,6 @@ "shape": "KitchenSink" } }, - "description": "Parses timestamp shapes", "result": { "Timestamp": 946845296 }, @@ -1716,6 +1833,7 @@ }, { "id": "parses_iso8601_timestamps", + "description": "Parses iso8601 timestamps", "given": { "name": "KitchenSinkOperation", "http": { @@ -1726,7 +1844,6 @@ "shape": "KitchenSink" } }, - "description": "Parses iso8601 timestamps", "result": { "Iso8601Timestamp": 946845296 }, @@ -1740,6 +1857,7 @@ }, { "id": "parses_httpdate_timestamps", + "description": "Parses httpdate timestamps", "given": { "name": "KitchenSinkOperation", "http": { @@ -1750,7 +1868,6 @@ "shape": "KitchenSink" } }, - "description": "Parses httpdate timestamps", "result": { "HttpdateTimestamp": 946845296 }, @@ -1764,6 +1881,7 @@ }, { "id": "parses_list_shapes", + "description": "Parses list shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1774,7 +1892,6 @@ "shape": "KitchenSink" } }, - "description": "Parses list shapes", "result": { "ListOfStrings": [ "abc", @@ -1792,6 +1909,7 @@ }, { "id": "parses_list_of_map_shapes", + "description": "Parses list of map shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1802,7 +1920,6 @@ "shape": "KitchenSink" } }, - "description": "Parses list of map shapes", "result": { "ListOfMapsOfStrings": [ { @@ -1823,6 +1940,7 @@ }, { "id": "parses_list_of_list_shapes", + "description": "Parses list of list shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1833,7 +1951,6 @@ "shape": "KitchenSink" } }, - "description": "Parses list of list shapes", "result": { "ListOfLists": [ [ @@ -1858,6 +1975,7 @@ }, { "id": "parses_list_of_structure_shapes", + "description": "Parses list of structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1868,7 +1986,6 @@ "shape": "KitchenSink" } }, - "description": "Parses list of structure shapes", "result": { "ListOfStructs": [ { @@ -1889,6 +2006,7 @@ }, { "id": "parses_list_of_recursive_structure_shapes", + "description": "Parses list of recursive structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1899,7 +2017,6 @@ "shape": "KitchenSink" } }, - "description": "Parses list of recursive structure shapes", "result": { "RecursiveList": [ { @@ -1925,6 +2042,7 @@ }, { "id": "parses_map_shapes", + "description": "Parses map shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1935,7 +2053,6 @@ "shape": "KitchenSink" } }, - "description": "Parses map shapes", "result": { "MapOfStrings": { "size": "large", @@ -1952,6 +2069,7 @@ }, { "id": "parses_map_of_list_shapes", + "description": "Parses map of list shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1962,7 +2080,6 @@ "shape": "KitchenSink" } }, - "description": "Parses map of list shapes", "result": { "MapOfListsOfStrings": { "sizes": [ @@ -1985,6 +2102,7 @@ }, { "id": "parses_map_of_map_shapes", + "description": "Parses map of map shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -1995,7 +2113,6 @@ "shape": "KitchenSink" } }, - "description": "Parses map of map shapes", "result": { "MapOfMaps": { "sizes": { @@ -2018,6 +2135,7 @@ }, { "id": "parses_map_of_structure_shapes", + "description": "Parses map of structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -2028,7 +2146,6 @@ "shape": "KitchenSink" } }, - "description": "Parses map of structure shapes", "result": { "MapOfStructs": { "size": { @@ -2049,6 +2166,7 @@ }, { "id": "parses_map_of_recursive_structure_shapes", + "description": "Parses map of recursive structure shapes", "given": { "name": "KitchenSinkOperation", "http": { @@ -2059,7 +2177,6 @@ "shape": "KitchenSink" } }, - "description": "Parses map of recursive structure shapes", "result": { "RecursiveMap": { "key-1": { @@ -2085,6 +2202,7 @@ }, { "id": "parses_the_request_id_from_the_response", + "description": "Parses the request id from the response", "given": { "name": "KitchenSinkOperation", "http": { @@ -2095,7 +2213,6 @@ "shape": "KitchenSink" } }, - "description": "Parses the request id from the response", "result": {}, "response": { "status_code": 200, @@ -2111,13 +2228,22 @@ { "description": "Test cases for NullOperation operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { "NullOperationInputOutput": { @@ -2135,6 +2261,7 @@ "cases": [ { "id": "AwsJson11StructuresDontDeserializeNullValues", + "description": "Null structure values are dropped", "given": { "name": "NullOperation", "http": { @@ -2145,7 +2272,6 @@ "shape": "NullOperationInputOutput" } }, - "description": "Null structure values are dropped", "result": {}, "response": { "status_code": 200, @@ -2160,15 +2286,29 @@ { "description": "Test cases for PutAndGetInlineDocuments operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { + "Document": { + "type": "structure", + "members": {}, + "document": true + }, "PutAndGetInlineDocumentsInputOutput": { "type": "structure", "members": { @@ -2176,16 +2316,12 @@ "shape": "Document" } } - }, - "Document": { - "type": "structure", - "members": {}, - "document": true } }, "cases": [ { "id": "PutAndGetInlineDocumentsInput", + "description": "Serializes inline documents in a JSON response.", "given": { "name": "PutAndGetInlineDocuments", "http": { @@ -2197,7 +2333,6 @@ }, "documentation": "

This example serializes an inline document as part of the payload.

" }, - "description": "Serializes inline documents in a JSON response.", "result": { "inlineDocument": { "foo": "bar" @@ -2216,15 +2351,32 @@ { "description": "Test cases for SimpleScalarProperties operation", "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], - "apiVersion": "2018-01-01", - "jsonVersion": "1.1", - "targetPrefix": "JsonProtocol" + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" }, "shapes": { + "Double": { + "type": "double", + "box": true + }, + "Float": { + "type": "float", + "box": true + }, "SimpleScalarPropertiesInputOutput": { "type": "structure", "members": { @@ -2235,19 +2387,12 @@ "shape": "Double" } } - }, - "Float": { - "type": "float", - "box": true - }, - "Double": { - "type": "double", - "box": true } }, "cases": [ { "id": "AwsJson11SupportsNaNFloatInputs", + "description": "Supports handling NaN float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -2258,7 +2403,6 @@ "shape": "SimpleScalarPropertiesInputOutput" } }, - "description": "Supports handling NaN float values.", "result": { "floatValue": "NaN", "doubleValue": "NaN" @@ -2273,6 +2417,7 @@ }, { "id": "AwsJson11SupportsInfinityFloatInputs", + "description": "Supports handling Infinity float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -2283,7 +2428,6 @@ "shape": "SimpleScalarPropertiesInputOutput" } }, - "description": "Supports handling Infinity float values.", "result": { "floatValue": "Infinity", "doubleValue": "Infinity" @@ -2298,6 +2442,7 @@ }, { "id": "AwsJson11SupportsNegativeInfinityFloatInputs", + "description": "Supports handling -Infinity float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -2308,7 +2453,6 @@ "shape": "SimpleScalarPropertiesInputOutput" } }, - "description": "Supports handling -Infinity float values.", "result": { "floatValue": "-Infinity", "doubleValue": "-Infinity" @@ -2322,5 +2466,113 @@ } } ] + }, + { + "description": "Test cases for SparseNullsOperation operation", + "metadata": { + "apiVersion": "2018-01-01", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "jsonprotocol", + "jsonVersion": "1.1", + "protocol": "json", + "protocols": [ + "json" + ], + "serviceFullName": "JsonProtocol", + "serviceId": "Json Protocol", + "signatureVersion": "v4", + "signingName": "JsonProtocol", + "targetPrefix": "JsonProtocol", + "uid": "json-protocol-2018-01-01" + }, + "shapes": { + "SparseNullsOperationInputOutput": { + "type": "structure", + "members": { + "sparseStringList": { + "shape": "SparseStringList" + }, + "sparseStringMap": { + "shape": "SparseStringMap" + } + } + }, + "SparseStringList": { + "type": "list", + "member": { + "shape": "String" + }, + "sparse": true + }, + "SparseStringMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + }, + "sparse": true + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "id": "AwsJson11SparseMapsDeserializeNullValues", + "description": "Deserializes null values in maps", + "given": { + "name": "SparseNullsOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "output": { + "shape": "SparseNullsOperationInputOutput" + } + }, + "result": { + "sparseStringMap": { + "foo": null + } + }, + "response": { + "status_code": 200, + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "body": "{\n \"sparseStringMap\": {\n \"foo\": null\n }\n}" + } + }, + { + "id": "AwsJson11SparseListsDeserializeNull", + "description": "Deserializes null values in lists", + "given": { + "name": "SparseNullsOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "output": { + "shape": "SparseNullsOperationInputOutput" + } + }, + "result": { + "sparseStringList": [ + null + ] + }, + "response": { + "status_code": 200, + "headers": { + "Content-Type": "application/x-amz-json-1.1" + }, + "body": "{\n \"sparseStringList\": [\n null\n ]\n}" + } + } + ] } ] diff --git a/tools/code-generation/protocol-tests/output/rest-json.json b/tools/code-generation/protocol-tests/output/rest-json.json index bf69fd944d4c..f115c4161a83 100644 --- a/tools/code-generation/protocol-tests/output/rest-json.json +++ b/tools/code-generation/protocol-tests/output/rest-json.json @@ -2,13 +2,26 @@ { "description": "Test cases for DatetimeOffsets operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "DateTime": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, "DatetimeOffsetsOutput": { "type": "structure", "members": { @@ -16,15 +29,12 @@ "shape": "DateTime" } } - }, - "DateTime": { - "type": "timestamp", - "timestampFormat": "iso8601" } }, "cases": [ { "id": "RestJsonDateTimeWithNegativeOffset", + "description": "Ensures that clients can correctly parse datetime (timestamps) with offsets", "given": { "name": "DatetimeOffsets", "http": { @@ -36,7 +46,6 @@ "shape": "DatetimeOffsetsOutput" } }, - "description": "Ensures that clients can correctly parse datetime (timestamps) with offsets", "result": { "datetime": 1576540098 }, @@ -47,6 +56,7 @@ }, { "id": "RestJsonDateTimeWithPositiveOffset", + "description": "Ensures that clients can correctly parse datetime (timestamps) with offsets", "given": { "name": "DatetimeOffsets", "http": { @@ -58,7 +68,6 @@ "shape": "DatetimeOffsetsOutput" } }, - "description": "Ensures that clients can correctly parse datetime (timestamps) with offsets", "result": { "datetime": 1576540098 }, @@ -72,13 +81,27 @@ { "description": "Test cases for DocumentType operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Document": { + "type": "structure", + "members": {}, + "document": true + }, "DocumentTypeInputOutput": { "type": "structure", "members": { @@ -92,16 +115,12 @@ }, "String": { "type": "string" - }, - "Document": { - "type": "structure", - "members": {}, - "document": true } }, "cases": [ { "id": "DocumentOutput", + "description": "Serializes documents as part of the JSON response payload with no escaping.", "given": { "name": "DocumentType", "http": { @@ -115,7 +134,6 @@ "documentation": "

This example serializes a document as part of the payload.

", "idempotent": true }, - "description": "Serializes documents as part of the JSON response payload with no escaping.", "result": { "stringValue": "string", "documentValue": { @@ -132,6 +150,7 @@ }, { "id": "DocumentOutputString", + "description": "Document types can be JSON scalars too.", "given": { "name": "DocumentType", "http": { @@ -145,7 +164,6 @@ "documentation": "

This example serializes a document as part of the payload.

", "idempotent": true }, - "description": "Document types can be JSON scalars too.", "result": { "stringValue": "string", "documentValue": "hello" @@ -160,6 +178,7 @@ }, { "id": "DocumentOutputNumber", + "description": "Document types can be JSON scalars too.", "given": { "name": "DocumentType", "http": { @@ -173,7 +192,6 @@ "documentation": "

This example serializes a document as part of the payload.

", "idempotent": true }, - "description": "Document types can be JSON scalars too.", "result": { "stringValue": "string", "documentValue": 10 @@ -188,6 +206,7 @@ }, { "id": "DocumentOutputBoolean", + "description": "Document types can be JSON scalars too.", "given": { "name": "DocumentType", "http": { @@ -201,7 +220,6 @@ "documentation": "

This example serializes a document as part of the payload.

", "idempotent": true }, - "description": "Document types can be JSON scalars too.", "result": { "stringValue": "string", "documentValue": false @@ -216,6 +234,7 @@ }, { "id": "DocumentOutputArray", + "description": "Document types can be JSON arrays.", "given": { "name": "DocumentType", "http": { @@ -229,7 +248,6 @@ "documentation": "

This example serializes a document as part of the payload.

", "idempotent": true }, - "description": "Document types can be JSON arrays.", "result": { "stringValue": "string", "documentValue": [ @@ -250,13 +268,27 @@ { "description": "Test cases for DocumentTypeAsMapValue operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Document": { + "type": "structure", + "members": {}, + "document": true + }, "DocumentTypeAsMapValueInputOutput": { "type": "structure", "members": { @@ -274,11 +306,6 @@ "shape": "Document" } }, - "Document": { - "type": "structure", - "members": {}, - "document": true - }, "String": { "type": "string" } @@ -286,6 +313,7 @@ "cases": [ { "id": "DocumentTypeAsMapValueOutput", + "description": "Serializes a map that uses documents as the value.", "given": { "name": "DocumentTypeAsMapValue", "http": { @@ -299,7 +327,6 @@ "documentation": "

This example serializes documents as the value of maps.

", "idempotent": true }, - "description": "Serializes a map that uses documents as the value.", "result": { "docValuedMap": { "foo": { @@ -327,13 +354,27 @@ { "description": "Test cases for DocumentTypeAsPayload operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Document": { + "type": "structure", + "members": {}, + "document": true + }, "DocumentTypeAsPayloadInputOutput": { "type": "structure", "members": { @@ -342,16 +383,12 @@ } }, "payload": "documentValue" - }, - "Document": { - "type": "structure", - "members": {}, - "document": true } }, "cases": [ { "id": "DocumentTypeAsPayloadOutput", + "description": "Serializes a document as the target of the httpPayload trait.", "given": { "name": "DocumentTypeAsPayload", "http": { @@ -365,7 +402,6 @@ "documentation": "

This example serializes a document as the entire HTTP payload.

", "idempotent": true }, - "description": "Serializes a document as the target of the httpPayload trait.", "result": { "documentValue": { "foo": "bar" @@ -381,6 +417,7 @@ }, { "id": "DocumentTypeAsPayloadOutputString", + "description": "Serializes a document as a payload string.", "given": { "name": "DocumentTypeAsPayload", "http": { @@ -394,7 +431,6 @@ "documentation": "

This example serializes a document as the entire HTTP payload.

", "idempotent": true }, - "description": "Serializes a document as a payload string.", "result": { "documentValue": "hello" }, @@ -411,11 +447,20 @@ { "description": "Test cases for EmptyInputAndEmptyOutput operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "EmptyInputAndEmptyOutputOutput": { @@ -426,6 +471,7 @@ "cases": [ { "id": "RestJsonEmptyInputAndEmptyOutput", + "description": "As of January 2021, server implementations are expected to\nrespond with a JSON object regardless of if the output\nparameters are empty.", "given": { "name": "EmptyInputAndEmptyOutput", "http": { @@ -438,7 +484,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there's no request or response payload because the operation has an empty input and empty output structure that reuses the same shape. While this should be rare, code generators must support this.

" }, - "description": "As of January 2021, server implementations are expected to\nrespond with a JSON object regardless of if the output\nparameters are empty.", "result": {}, "response": { "status_code": 200, @@ -450,6 +495,7 @@ }, { "id": "RestJsonEmptyInputAndEmptyOutputJsonObjectOutput", + "description": "This test ensures that clients can gracefully handle\nsituations where a service omits a JSON payload entirely.", "given": { "name": "EmptyInputAndEmptyOutput", "http": { @@ -462,7 +508,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there's no request or response payload because the operation has an empty input and empty output structure that reuses the same shape. While this should be rare, code generators must support this.

" }, - "description": "This test ensures that clients can gracefully handle\nsituations where a service omits a JSON payload entirely.", "result": {}, "response": { "status_code": 200, @@ -474,13 +519,26 @@ { "description": "Test cases for FractionalSeconds operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "DateTime": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, "FractionalSecondsOutput": { "type": "structure", "members": { @@ -488,15 +546,12 @@ "shape": "DateTime" } } - }, - "DateTime": { - "type": "timestamp", - "timestampFormat": "iso8601" } }, "cases": [ { "id": "RestJsonDateTimeWithFractionalSeconds", + "description": "Ensures that clients can correctly parse datetime timestamps with fractional seconds", "given": { "name": "FractionalSeconds", "http": { @@ -508,7 +563,6 @@ "shape": "FractionalSecondsOutput" } }, - "description": "Ensures that clients can correctly parse datetime timestamps with fractional seconds", "result": { "datetime": 9.46845296123E8 }, @@ -522,11 +576,20 @@ { "description": "Test cases for GreetingWithErrors operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "GreetingWithErrorsOutput": { @@ -546,6 +609,7 @@ "cases": [ { "id": "RestJsonGreetingWithErrors", + "description": "Ensures that operations with errors successfully know how\nto deserialize a successful response. As of January 2021,\nserver implementations are expected to respond with a\nJSON object regardless of if the output parameters are\nempty.", "given": { "name": "GreetingWithErrors", "http": { @@ -559,7 +623,6 @@ "documentation": "

This operation has four possible return values:

  1. A successful response in the form of GreetingWithErrorsOutput
  2. An InvalidGreeting error.
  3. A BadRequest error.
  4. A FooError.

Implementations must be able to successfully take a response and properly (de)serialize successful and error responses based on the the presence of the

", "idempotent": true }, - "description": "Ensures that operations with errors successfully know how\nto deserialize a successful response. As of January 2021,\nserver implementations are expected to respond with a\nJSON object regardless of if the output parameters are\nempty.", "result": { "greeting": "Hello" }, @@ -573,6 +636,7 @@ }, { "id": "RestJsonGreetingWithErrorsNoPayload", + "description": "This test is similar to RestJsonGreetingWithErrors, but it\nensures that clients can gracefully deal with a server\nomitting a response payload.", "given": { "name": "GreetingWithErrors", "http": { @@ -586,7 +650,6 @@ "documentation": "

This operation has four possible return values:

  1. A successful response in the form of GreetingWithErrorsOutput
  2. An InvalidGreeting error.
  3. A BadRequest error.
  4. A FooError.

Implementations must be able to successfully take a response and properly (de)serialize successful and error responses based on the the presence of the

", "idempotent": true }, - "description": "This test is similar to RestJsonGreetingWithErrors, but it\nensures that clients can gracefully deal with a server\nomitting a response payload.", "result": { "greeting": "Hello" }, @@ -603,27 +666,44 @@ { "description": "Test cases for GreetingWithErrors operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { - "FooError": { + "InvalidGreeting": { "type": "structure", - "members": {}, - "documentation": "

This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.

", + "members": { + "Message": { + "shape": "String" + } + }, + "documentation": "

This error is thrown when an invalid greeting value is provided.

", "error": { - "httpStatusCode": 500 + "httpStatusCode": 400, + "senderFault": true }, - "exception": true, - "fault": true + "exception": true + }, + "String": { + "type": "string" } }, "cases": [ { - "id": "RestJsonFooErrorUsingXAmznErrorType", + "id": "RestJsonInvalidGreetingError", + "description": "Parses simple JSON errors", "given": { "name": "GreetingWithErrors", "http": { @@ -635,22 +715,84 @@ "idempotent": true, "errors": [ { - "shape": "FooError" + "shape": "InvalidGreeting" } ] }, - "description": "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS.", - "errorCode": "FooError", - "error": {}, + "errorCode": "InvalidGreeting", + "errorMessage": "Hi", + "error": { + "Message": "Hi" + }, "response": { - "status_code": 500, + "status_code": 400, "headers": { - "X-Amzn-Errortype": "FooError" + "X-Amzn-Errortype": "InvalidGreeting", + "Content-Type": "application/json" + }, + "body": "{\n \"Message\": \"Hi\"\n}" + } + } + ] + }, + { + "description": "Test cases for GreetingWithErrors operation", + "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", + "protocol": "rest-json", + "protocols": [ + "rest-json" + ], + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" + }, + "shapes": { + "ComplexError": { + "type": "structure", + "members": { + "Header": { + "shape": "String", + "location": "header", + "locationName": "X-Header" + }, + "TopLevel": { + "shape": "String" + }, + "Nested": { + "shape": "ComplexNestedErrorData" + } + }, + "documentation": "

This error is thrown when a request is invalid.

", + "error": { + "httpStatusCode": 403, + "senderFault": true + }, + "exception": true + }, + "ComplexNestedErrorData": { + "type": "structure", + "members": { + "Foo": { + "shape": "String", + "locationName": "Fooooo" } } }, + "String": { + "type": "string" + } + }, + "cases": [ { - "id": "RestJsonFooErrorUsingXAmznErrorTypeWithUri", + "id": "RestJsonComplexErrorWithNoMessage", + "description": "Serializes a complex error with no message member", "given": { "name": "GreetingWithErrors", "http": { @@ -662,22 +804,30 @@ "idempotent": true, "errors": [ { - "shape": "FooError" + "shape": "ComplexError" } ] }, - "description": "Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'\nis to be interpreted as 'ValidationException'.\n\nFor an example service see Amazon Polly.", - "errorCode": "FooError", - "error": {}, + "errorCode": "ComplexError", + "error": { + "Header": "Header", + "TopLevel": "Top level", + "Nested": { + "Foo": "bar" + } + }, "response": { - "status_code": 500, + "status_code": 403, "headers": { - "X-Amzn-Errortype": "FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" - } + "X-Amzn-Errortype": "ComplexError", + "X-Header": "Header", + "Content-Type": "application/json" + }, + "body": "{\n \"TopLevel\": \"Top level\",\n \"Nested\": {\n \"Fooooo\": \"bar\"\n }\n}" } }, { - "id": "RestJsonFooErrorUsingXAmznErrorTypeWithUriAndNamespace", + "id": "RestJsonEmptyComplexErrorWithNoMessage", "given": { "name": "GreetingWithErrors", "http": { @@ -689,22 +839,57 @@ "idempotent": true, "errors": [ { - "shape": "FooError" + "shape": "ComplexError" } ] }, - "description": "X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape name. This is a pathalogical case that might not actually happen in any deployed AWS service.", - "errorCode": "FooError", + "errorCode": "ComplexError", "error": {}, "response": { - "status_code": 500, + "status_code": 403, "headers": { - "X-Amzn-Errortype": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" - } + "X-Amzn-Errortype": "ComplexError", + "Content-Type": "application/json" + }, + "body": "{}" } - }, + } + ] + }, + { + "description": "Test cases for GreetingWithErrors operation", + "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", + "protocol": "rest-json", + "protocols": [ + "rest-json" + ], + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" + }, + "shapes": { + "FooError": { + "type": "structure", + "members": {}, + "documentation": "

This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.

", + "error": { + "httpStatusCode": 500 + }, + "exception": true, + "fault": true + } + }, + "cases": [ { - "id": "RestJsonFooErrorUsingCode", + "id": "RestJsonFooErrorUsingXAmznErrorType", + "description": "Serializes the X-Amzn-ErrorType header. For an example service, see Amazon EKS.", "given": { "name": "GreetingWithErrors", "http": { @@ -720,19 +905,18 @@ } ] }, - "description": "This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some services do this though it's preferable to send the X-Amzn-Errortype. Client implementations must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.\n\nFor example service see Amazon S3 Glacier.", "errorCode": "FooError", "error": {}, "response": { "status_code": 500, "headers": { - "Content-Type": "application/json" - }, - "body": "{\n \"code\": \"FooError\"\n}" + "X-Amzn-Errortype": "FooError" + } } }, { - "id": "RestJsonFooErrorUsingCodeAndNamespace", + "id": "RestJsonFooErrorUsingXAmznErrorTypeWithUri", + "description": "Some X-Amzn-Errortype headers contain URLs. Clients need to split the URL on ':' and take only the first half of the string. For example, 'ValidationException:http://internal.amazon.com/coral/com.amazon.coral.validate/'\nis to be interpreted as 'ValidationException'.\n\nFor an example service see Amazon Polly.", "given": { "name": "GreetingWithErrors", "http": { @@ -748,19 +932,45 @@ } ] }, - "description": "Some services serialize errors using code, and it might contain a namespace. Clients should just take the last part of the string after '#'.", "errorCode": "FooError", "error": {}, "response": { "status_code": 500, "headers": { - "Content-Type": "application/json" - }, - "body": "{\n \"code\": \"aws.protocoltests.restjson#FooError\"\n}" + "X-Amzn-Errortype": "FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" + } } }, { - "id": "RestJsonFooErrorUsingCodeUriAndNamespace", + "id": "RestJsonFooErrorUsingXAmznErrorTypeWithUriAndNamespace", + "description": "X-Amzn-Errortype might contain a URL and a namespace. Client should extract only the shape name. This is a pathalogical case that might not actually happen in any deployed AWS service.", + "given": { + "name": "GreetingWithErrors", + "http": { + "method": "PUT", + "requestUri": "/GreetingWithErrors", + "responseCode": 200 + }, + "documentation": "

This operation has four possible return values:

  1. A successful response in the form of GreetingWithErrorsOutput
  2. An InvalidGreeting error.
  3. A BadRequest error.
  4. A FooError.

Implementations must be able to successfully take a response and properly (de)serialize successful and error responses based on the the presence of the

", + "idempotent": true, + "errors": [ + { + "shape": "FooError" + } + ] + }, + "errorCode": "FooError", + "error": {}, + "response": { + "status_code": 500, + "headers": { + "X-Amzn-Errortype": "aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/" + } + } + }, + { + "id": "RestJsonFooErrorUsingCode", + "description": "This example uses the 'code' property in the output rather than X-Amzn-Errortype. Some services do this though it's preferable to send the X-Amzn-Errortype. Client implementations must first check for the X-Amzn-Errortype and then check for a top-level 'code' property.\n\nFor example service see Amazon S3 Glacier.", "given": { "name": "GreetingWithErrors", "http": { @@ -776,7 +986,6 @@ } ] }, - "description": "Some services serialize errors using code, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", "errorCode": "FooError", "error": {}, "response": { @@ -784,11 +993,12 @@ "headers": { "Content-Type": "application/json" }, - "body": "{\n \"code\": \"aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/\"\n}" + "body": "{\n \"code\": \"FooError\"\n}" } }, { - "id": "RestJsonFooErrorWithDunderType", + "id": "RestJsonFooErrorUsingCodeAndNamespace", + "description": "Some services serialize errors using code, and it might contain a namespace. Clients should just take the last part of the string after '#'.", "given": { "name": "GreetingWithErrors", "http": { @@ -804,7 +1014,6 @@ } ] }, - "description": "Some services serialize errors using __type.", "errorCode": "FooError", "error": {}, "response": { @@ -812,11 +1021,12 @@ "headers": { "Content-Type": "application/json" }, - "body": "{\n \"__type\": \"FooError\"\n}" + "body": "{\n \"code\": \"aws.protocoltests.restjson#FooError\"\n}" } }, { - "id": "RestJsonFooErrorWithDunderTypeAndNamespace", + "id": "RestJsonFooErrorUsingCodeUriAndNamespace", + "description": "Some services serialize errors using code, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", "given": { "name": "GreetingWithErrors", "http": { @@ -832,7 +1042,6 @@ } ] }, - "description": "Some services serialize errors using __type, and it might contain a namespace. Clients should just take the last part of the string after '#'.", "errorCode": "FooError", "error": {}, "response": { @@ -840,11 +1049,12 @@ "headers": { "Content-Type": "application/json" }, - "body": "{\n \"__type\": \"aws.protocoltests.restjson#FooError\"\n}" + "body": "{\n \"code\": \"aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/\"\n}" } }, { - "id": "RestJsonFooErrorWithDunderTypeUriAndNamespace", + "id": "RestJsonFooErrorWithDunderType", + "description": "Some services serialize errors using __type.", "given": { "name": "GreetingWithErrors", "http": { @@ -860,7 +1070,6 @@ } ] }, - "description": "Some services serialize errors using __type, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", "errorCode": "FooError", "error": {}, "response": { @@ -868,59 +1077,40 @@ "headers": { "Content-Type": "application/json" }, - "body": "{\n \"__type\": \"aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/\"\n}" + "body": "{\n \"__type\": \"FooError\"\n}" } - } - ] - }, - { - "description": "Test cases for GreetingWithErrors operation", - "metadata": { - "protocol": "rest-json", - "protocols": [ - "rest-json" - ], - "apiVersion": "2019-12-16" - }, - "shapes": { - "ComplexError": { - "type": "structure", - "members": { - "Header": { - "shape": "String", - "location": "header", - "locationName": "X-Header" - }, - "TopLevel": { - "shape": "String" + }, + { + "id": "RestJsonFooErrorWithDunderTypeAndNamespace", + "description": "Some services serialize errors using __type, and it might contain a namespace. Clients should just take the last part of the string after '#'.", + "given": { + "name": "GreetingWithErrors", + "http": { + "method": "PUT", + "requestUri": "/GreetingWithErrors", + "responseCode": 200 }, - "Nested": { - "shape": "ComplexNestedErrorData" - } - }, - "documentation": "

This error is thrown when a request is invalid.

", - "error": { - "httpStatusCode": 403, - "senderFault": true + "documentation": "

This operation has four possible return values:

  1. A successful response in the form of GreetingWithErrorsOutput
  2. An InvalidGreeting error.
  3. A BadRequest error.
  4. A FooError.

Implementations must be able to successfully take a response and properly (de)serialize successful and error responses based on the the presence of the

", + "idempotent": true, + "errors": [ + { + "shape": "FooError" + } + ] }, - "exception": true - }, - "String": { - "type": "string" - }, - "ComplexNestedErrorData": { - "type": "structure", - "members": { - "Foo": { - "shape": "String", - "locationName": "Fooooo" - } + "errorCode": "FooError", + "error": {}, + "response": { + "status_code": 500, + "headers": { + "Content-Type": "application/json" + }, + "body": "{\n \"__type\": \"aws.protocoltests.restjson#FooError\"\n}" } - } - }, - "cases": [ + }, { - "id": "RestJsonComplexErrorWithNoMessage", + "id": "RestJsonFooErrorWithDunderTypeUriAndNamespace", + "description": "Some services serialize errors using __type, and it might contain a namespace. It also might contain a URI. Clients should just take the last part of the string after '#' and before \":\". This is a pathalogical case that might not occur in any deployed AWS service.", "given": { "name": "GreetingWithErrors", "http": { @@ -932,31 +1122,23 @@ "idempotent": true, "errors": [ { - "shape": "ComplexError" + "shape": "FooError" } ] }, - "description": "Serializes a complex error with no message member", - "errorCode": "ComplexError", - "error": { - "Header": "Header", - "TopLevel": "Top level", - "Nested": { - "Foo": "bar" - } - }, + "errorCode": "FooError", + "error": {}, "response": { - "status_code": 403, + "status_code": 500, "headers": { - "Content-Type": "application/json", - "X-Amzn-Errortype": "ComplexError", - "X-Header": "Header" + "Content-Type": "application/json" }, - "body": "{\n \"TopLevel\": \"Top level\",\n \"Nested\": {\n \"Fooooo\": \"bar\"\n }\n}" + "body": "{\n \"__type\": \"aws.protocoltests.restjson#FooError:http://internal.amazon.com/coral/com.amazon.coral.validate/\"\n}" } }, { - "id": "RestJsonEmptyComplexErrorWithNoMessage", + "id": "RestJsonFooErrorWithNestedTypeProperty", + "description": "Some services serialize errors using __type, and if the response includes additional shapes that belong to a different namespace there'll be a nested __type property that must not be considered when determining which error to be surfaced.\n\nFor an example service see Amazon DynamoDB.", "given": { "name": "GreetingWithErrors", "http": { @@ -968,82 +1150,99 @@ "idempotent": true, "errors": [ { - "shape": "ComplexError" + "shape": "FooError" } ] }, - "errorCode": "ComplexError", + "errorCode": "FooError", "error": {}, "response": { - "status_code": 403, + "status_code": 500, "headers": { - "Content-Type": "application/json", - "X-Amzn-Errortype": "ComplexError" + "Content-Type": "application/json" }, - "body": "{}" + "body": "{\n \"__type\": \"aws.protocoltests.restjson#FooError\",\n \"ErrorDetails\": [\n {\n \"__type\": \"com.amazon.internal#ErrorDetails\",\n \"reason\": \"Some reason\"\n }\n ]\n}" } } ] }, { - "description": "Test cases for GreetingWithErrors operation", + "description": "Test cases for HttpEmptyPrefixHeaders operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { - "InvalidGreeting": { + "HttpEmptyPrefixHeadersOutput": { "type": "structure", "members": { - "Message": { - "shape": "String" + "prefixHeaders": { + "shape": "StringMap", + "location": "headers", + "locationName": "" + }, + "specificHeader": { + "shape": "String", + "location": "header", + "locationName": "hello" } - }, - "documentation": "

This error is thrown when an invalid greeting value is provided.

", - "error": { - "httpStatusCode": 400, - "senderFault": true - }, - "exception": true + } }, "String": { "type": "string" + }, + "StringMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + } } }, "cases": [ { - "id": "RestJsonInvalidGreetingError", + "id": "RestJsonHttpEmptyPrefixHeadersResponseClient", + "description": "Deserializes all response headers with the same for prefix and specific", "given": { - "name": "GreetingWithErrors", + "name": "HttpEmptyPrefixHeaders", "http": { - "method": "PUT", - "requestUri": "/GreetingWithErrors", + "method": "GET", + "requestUri": "/HttpEmptyPrefixHeaders", "responseCode": 200 }, - "documentation": "

This operation has four possible return values:

  1. A successful response in the form of GreetingWithErrorsOutput
  2. An InvalidGreeting error.
  3. A BadRequest error.
  4. A FooError.

Implementations must be able to successfully take a response and properly (de)serialize successful and error responses based on the the presence of the

", - "idempotent": true, - "errors": [ - { - "shape": "InvalidGreeting" - } - ] + "output": { + "shape": "HttpEmptyPrefixHeadersOutput" + }, + "documentation": "

Clients that perform this test extract all headers from the response.

", + "readonly": true }, - "description": "Parses simple JSON errors", - "errorCode": "InvalidGreeting", - "errorMessage": "Hi", - "error": { - "Message": "Hi" + "result": { + "prefixHeaders": { + "x-foo": "Foo", + "hello": "There" + }, + "specificHeader": "There" }, "response": { - "status_code": 400, + "status_code": 200, "headers": { - "Content-Type": "application/json", - "X-Amzn-Errortype": "InvalidGreeting" - }, - "body": "{\n \"Message\": \"Hi\"\n}" + "x-foo": "Foo", + "hello": "There" + } } } ] @@ -1051,11 +1250,20 @@ { "description": "Test cases for HttpEnumPayload operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "EnumPayloadInput": { @@ -1104,13 +1312,25 @@ { "description": "Test cases for HttpPayloadTraits operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Blob": { + "type": "blob" + }, "HttpPayloadTraitsInputOutput": { "type": "structure", "members": { @@ -1127,14 +1347,12 @@ }, "String": { "type": "string" - }, - "Blob": { - "type": "blob" } }, "cases": [ { "id": "RestJsonHttpPayloadTraitsWithBlob", + "description": "Serializes a blob in the HTTP payload", "given": { "name": "HttpPayloadTraits", "http": { @@ -1147,7 +1365,6 @@ }, "documentation": "

This example serializes a blob shape in the payload.

In this example, no JSON document is synthesized because the payload is not a structure or a union type.

" }, - "description": "Serializes a blob in the HTTP payload", "result": { "foo": "Foo", "blob": "blobby blob blob" @@ -1162,6 +1379,7 @@ }, { "id": "RestJsonHttpPayloadTraitsWithNoBlobBody", + "description": "Serializes an empty blob in the HTTP payload", "given": { "name": "HttpPayloadTraits", "http": { @@ -1174,7 +1392,6 @@ }, "documentation": "

This example serializes a blob shape in the payload.

In this example, no JSON document is synthesized because the payload is not a structure or a union type.

" }, - "description": "Serializes an empty blob in the HTTP payload", "result": { "foo": "Foo" }, @@ -1191,11 +1408,20 @@ { "description": "Test cases for HttpPayloadWithStructure operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpPayloadWithStructureInputOutput": { @@ -1225,6 +1451,7 @@ "cases": [ { "id": "RestJsonHttpPayloadWithStructure", + "description": "Serializes a structure in the payload", "given": { "name": "HttpPayloadWithStructure", "http": { @@ -1238,7 +1465,6 @@ "documentation": "

This example serializes a structure in the payload.

Note that serializing a structure changes the wrapper element name to match the targeted structure.

", "idempotent": true }, - "description": "Serializes a structure in the payload", "result": { "nested": { "greeting": "hello", @@ -1252,17 +1478,50 @@ }, "body": "{\n \"greeting\": \"hello\",\n \"name\": \"Phreddy\"\n}" } + }, + { + "id": "RestJsonHttpPayloadWithStructureAndEmptyResponseBody", + "description": "Serializes a structure in the payload", + "given": { + "name": "HttpPayloadWithStructure", + "http": { + "method": "PUT", + "requestUri": "/HttpPayloadWithStructure", + "responseCode": 200 + }, + "output": { + "shape": "HttpPayloadWithStructureInputOutput" + }, + "documentation": "

This example serializes a structure in the payload.

Note that serializing a structure changes the wrapper element name to match the targeted structure.

", + "idempotent": true + }, + "result": { + "nested": null + }, + "response": { + "status_code": 200, + "body": "" + } } ] }, { "description": "Test cases for HttpPayloadWithUnion operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpPayloadWithUnionInputOutput": { @@ -1274,6 +1533,9 @@ }, "payload": "nested" }, + "String": { + "type": "string" + }, "UnionPayload": { "type": "structure", "members": { @@ -1282,14 +1544,12 @@ } }, "union": true - }, - "String": { - "type": "string" } }, "cases": [ { "id": "RestJsonHttpPayloadWithUnion", + "description": "Serializes a union in the payload.", "given": { "name": "HttpPayloadWithUnion", "http": { @@ -1303,7 +1563,6 @@ "documentation": "

This example serializes a union in the payload.

", "idempotent": true }, - "description": "Serializes a union in the payload.", "result": { "nested": { "greeting": "hello" @@ -1319,6 +1578,7 @@ }, { "id": "RestJsonHttpPayloadWithUnsetUnion", + "description": "No payload is sent if the union has no value.", "given": { "name": "HttpPayloadWithUnion", "http": { @@ -1332,7 +1592,6 @@ "documentation": "

This example serializes a union in the payload.

", "idempotent": true }, - "description": "No payload is sent if the union has no value.", "result": {}, "response": { "status_code": 200, @@ -1347,11 +1606,20 @@ { "description": "Test cases for HttpPrefixHeaders operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpPrefixHeadersOutput": { @@ -1385,6 +1653,7 @@ "cases": [ { "id": "RestJsonHttpPrefixHeadersArePresent", + "description": "Adds headers by prefix", "given": { "name": "HttpPrefixHeaders", "http": { @@ -1395,9 +1664,9 @@ "output": { "shape": "HttpPrefixHeadersOutput" }, - "documentation": "

This examples adds headers to the input of a request and response by prefix.

" + "documentation": "

This examples adds headers to the input of a request and response by prefix.

", + "readonly": true }, - "description": "Adds headers by prefix", "result": { "foo": "Foo", "fooMap": { @@ -1409,8 +1678,8 @@ "status_code": 200, "headers": { "x-foo": "Foo", - "x-foo-abc": "Abc value", - "x-foo-def": "Def value" + "x-foo-def": "Def value", + "x-foo-abc": "Abc value" } } } @@ -1419,11 +1688,20 @@ { "description": "Test cases for HttpPrefixHeadersInResponse operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpPrefixHeadersInResponseOutput": { @@ -1436,6 +1714,9 @@ } } }, + "String": { + "type": "string" + }, "StringMap": { "type": "map", "key": { @@ -1444,14 +1725,12 @@ "value": { "shape": "String" } - }, - "String": { - "type": "string" } }, "cases": [ { "id": "HttpPrefixHeadersResponse", + "description": "(de)serializes all response headers", "given": { "name": "HttpPrefixHeadersInResponse", "http": { @@ -1462,9 +1741,9 @@ "output": { "shape": "HttpPrefixHeadersInResponseOutput" }, - "documentation": "

Clients that perform this test extract all headers from the response.

" + "documentation": "

Clients that perform this test extract all headers from the response.

", + "readonly": true }, - "description": "(de)serializes all response headers", "result": { "prefixHeaders": { "x-foo": "Foo", @@ -1474,8 +1753,8 @@ "response": { "status_code": 200, "headers": { - "hello": "Hello", - "x-foo": "Foo" + "x-foo": "Foo", + "hello": "Hello" } } } @@ -1484,11 +1763,20 @@ { "description": "Test cases for HttpResponseCode operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "HttpResponseCodeOutput": { @@ -1508,6 +1796,7 @@ "cases": [ { "id": "RestJsonHttpResponseCode", + "description": "Binds the http response code to an output structure. Note that\neven though all members are bound outside of the payload, an\nempty JSON object is serialized in the response. However,\nclients should be able to handle an empty JSON object or an\nempty payload without failing to deserialize a response.", "given": { "name": "HttpResponseCode", "http": { @@ -1520,7 +1809,6 @@ }, "idempotent": true }, - "description": "Binds the http response code to an output structure. Note that\neven though all members are bound outside of the payload, an\nempty JSON object is serialized in the response. However,\nclients should be able to handle an empty JSON object or an\nempty payload without failing to deserialize a response.", "result": { "Status": 201 }, @@ -1534,6 +1822,7 @@ }, { "id": "RestJsonHttpResponseCodeWithNoPayload", + "description": "This test ensures that clients gracefully handle cases where\nthe service responds with no payload rather than an empty JSON\nobject.", "given": { "name": "HttpResponseCode", "http": { @@ -1546,7 +1835,6 @@ }, "idempotent": true }, - "description": "This test ensures that clients gracefully handle cases where\nthe service responds with no payload rather than an empty JSON\nobject.", "result": { "Status": 201 }, @@ -1560,13 +1848,25 @@ { "description": "Test cases for HttpStringPayload operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "String": { + "type": "string" + }, "StringPayloadInput": { "type": "structure", "members": { @@ -1575,9 +1875,6 @@ } }, "payload": "payload" - }, - "String": { - "type": "string" } }, "cases": [ @@ -1610,11 +1907,20 @@ { "description": "Test cases for IgnoreQueryParamsInResponse operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "IgnoreQueryParamsInResponseOutput": { @@ -1634,6 +1940,7 @@ "cases": [ { "id": "RestJsonIgnoreQueryParamsInResponse", + "description": "Query parameters must be ignored when serializing the output\nof an operation. As of January 2021, server implementations\nare expected to respond with a JSON object regardless of\nif the output parameters are empty.", "given": { "name": "IgnoreQueryParamsInResponse", "http": { @@ -1644,37 +1951,18 @@ "output": { "shape": "IgnoreQueryParamsInResponseOutput" }, - "documentation": "

This example ensures that query string bound request parameters are serialized in the body of responses if the structure is used in both the request and response.

" + "documentation": "

This example ensures that query string bound request parameters are serialized in the body of responses if the structure is used in both the request and response.

", + "readonly": true + }, + "result": { + "baz": "bam" }, - "description": "Query parameters must be ignored when serializing the output\nof an operation. As of January 2021, server implementations\nare expected to respond with a JSON object regardless of\nif the output parameters are empty.", - "result": {}, "response": { "status_code": 200, "headers": { "Content-Type": "application/json" }, - "body": "{}" - } - }, - { - "id": "RestJsonIgnoreQueryParamsInResponseNoPayload", - "given": { - "name": "IgnoreQueryParamsInResponse", - "http": { - "method": "GET", - "requestUri": "/IgnoreQueryParamsInResponse", - "responseCode": 200 - }, - "output": { - "shape": "IgnoreQueryParamsInResponseOutput" - }, - "documentation": "

This example ensures that query string bound request parameters are serialized in the body of responses if the structure is used in both the request and response.

" - }, - "description": "This test is similar to RestJsonIgnoreQueryParamsInResponse,\nbut it ensures that clients gracefully handle responses from\nthe server that do not serialize an empty JSON object.", - "result": {}, - "response": { - "status_code": 200, - "body": "" + "body": "{\"baz\":\"bam\"}" } } ] @@ -1682,13 +1970,56 @@ { "description": "Test cases for InputAndOutputWithHeaders operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "BooleanList": { + "type": "list", + "member": { + "shape": "Boolean" + } + }, + "Double": { + "type": "double", + "box": true + }, + "Float": { + "type": "float", + "box": true + }, + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] + }, + "FooEnumList": { + "type": "list", + "member": { + "shape": "FooEnum" + } + }, "InputAndOutputWithHeadersIO": { "type": "structure", "members": { @@ -1784,39 +2115,18 @@ } } }, - "String": { - "type": "string" - }, "Integer": { "type": "integer", "box": true }, - "Long": { - "type": "long", - "box": true - }, - "Float": { - "type": "float", - "box": true - }, - "Double": { - "type": "double", - "box": true - }, - "Boolean": { - "type": "boolean", + "IntegerEnum": { + "type": "integer", "box": true }, - "StringList": { - "type": "list", - "member": { - "shape": "String" - } - }, - "StringSet": { + "IntegerEnumList": { "type": "list", "member": { - "shape": "String" + "shape": "IntegerEnum" } }, "IntegerList": { @@ -1825,51 +2135,39 @@ "shape": "Integer" } }, - "BooleanList": { - "type": "list", - "member": { - "shape": "Boolean" - } + "Long": { + "type": "long", + "box": true }, - "TimestampList": { + "String": { + "type": "string" + }, + "StringList": { "type": "list", "member": { - "shape": "Timestamp" + "shape": "String" } }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, - "FooEnumList": { + "StringSet": { "type": "list", "member": { - "shape": "FooEnum" + "shape": "String" } }, - "IntegerEnum": { - "type": "integer", - "box": true + "Timestamp": { + "type": "timestamp" }, - "IntegerEnumList": { + "TimestampList": { "type": "list", "member": { - "shape": "IntegerEnum" + "shape": "Timestamp" } - }, - "Timestamp": { - "type": "timestamp" } }, "cases": [ { "id": "RestJsonInputAndOutputWithStringHeaders", + "description": "Tests responses with string header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -1882,7 +2180,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests responses with string header bindings", "result": { "headerString": "Hello", "headerStringList": [ @@ -1899,14 +2196,15 @@ "response": { "status_code": 200, "headers": { - "X-String": "Hello", "X-StringList": "a, b, c", + "X-String": "Hello", "X-StringSet": "a, b, c" } } }, { "id": "RestJsonInputAndOutputWithQuotedStringHeaders", + "description": "Tests responses with string list header bindings that require quoting", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -1919,7 +2217,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests responses with string list header bindings that require quoting", "result": { "headerStringList": [ "b,c", @@ -1936,6 +2233,7 @@ }, { "id": "RestJsonInputAndOutputWithNumericHeaders", + "description": "Tests responses with numeric header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -1948,7 +2246,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests responses with numeric header bindings", "result": { "headerByte": 1, "headerShort": 123, @@ -1965,18 +2262,19 @@ "response": { "status_code": 200, "headers": { + "X-Integer": "123", + "X-Short": "123", "X-Byte": "1", + "X-Long": "123", "X-Double": "1.1", "X-Float": "1.1", - "X-Integer": "123", - "X-IntegerList": "1, 2, 3", - "X-Long": "123", - "X-Short": "123" + "X-IntegerList": "1, 2, 3" } } }, { "id": "RestJsonInputAndOutputWithBooleanHeaders", + "description": "Tests responses with boolean header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -1989,7 +2287,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests responses with boolean header bindings", "result": { "headerTrueBool": true, "headerFalseBool": false, @@ -2002,14 +2299,15 @@ "response": { "status_code": 200, "headers": { + "X-BooleanList": "true, false, true", "X-Boolean1": "true", - "X-Boolean2": "false", - "X-BooleanList": "true, false, true" + "X-Boolean2": "false" } } }, { "id": "RestJsonInputAndOutputWithTimestampHeaders", + "description": "Tests responses with timestamp header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2022,7 +2320,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests responses with timestamp header bindings", "result": { "headerTimestampList": [ 1576540098, @@ -2038,6 +2335,7 @@ }, { "id": "RestJsonInputAndOutputWithEnumHeaders", + "description": "Tests responses with enum header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2050,7 +2348,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests responses with enum header bindings", "result": { "headerEnum": "Foo", "headerEnumList": [ @@ -2062,13 +2359,14 @@ "response": { "status_code": 200, "headers": { - "X-Enum": "Foo", - "X-EnumList": "Foo, Bar, Baz" + "X-EnumList": "Foo, Bar, Baz", + "X-Enum": "Foo" } } }, { "id": "RestJsonInputAndOutputWithIntEnumHeaders", + "description": "Tests responses with intEnum header bindings", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2081,7 +2379,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Tests responses with intEnum header bindings", "result": { "headerIntegerEnum": 1, "headerIntegerEnumList": [ @@ -2093,13 +2390,14 @@ "response": { "status_code": 200, "headers": { - "X-IntegerEnum": "1", - "X-IntegerEnumList": "1, 2, 3" + "X-IntegerEnumList": "1, 2, 3", + "X-IntegerEnum": "1" } } }, { "id": "RestJsonSupportsNaNFloatHeaderOutputs", + "description": "Supports handling NaN float header values.", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2112,7 +2410,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Supports handling NaN float header values.", "result": { "headerFloat": "NaN", "headerDouble": "NaN" @@ -2120,13 +2417,14 @@ "response": { "status_code": 200, "headers": { - "X-Double": "NaN", - "X-Float": "NaN" + "X-Float": "NaN", + "X-Double": "NaN" } } }, { "id": "RestJsonSupportsInfinityFloatHeaderOutputs", + "description": "Supports handling Infinity float header values.", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2139,7 +2437,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Supports handling Infinity float header values.", "result": { "headerFloat": "Infinity", "headerDouble": "Infinity" @@ -2147,13 +2444,14 @@ "response": { "status_code": 200, "headers": { - "X-Double": "Infinity", - "X-Float": "Infinity" + "X-Float": "Infinity", + "X-Double": "Infinity" } } }, { "id": "RestJsonSupportsNegativeInfinityFloatHeaderOutputs", + "description": "Supports handling -Infinity float header values.", "given": { "name": "InputAndOutputWithHeaders", "http": { @@ -2166,7 +2464,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there is no input or output payload but there are HTTP header bindings.

" }, - "description": "Supports handling -Infinity float header values.", "result": { "headerFloat": "-Infinity", "headerDouble": "-Infinity" @@ -2174,8 +2471,8 @@ "response": { "status_code": 200, "headers": { - "X-Double": "-Infinity", - "X-Float": "-Infinity" + "X-Float": "-Infinity", + "X-Double": "-Infinity" } } } @@ -2184,13 +2481,25 @@ { "description": "Test cases for JsonBlobs operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Blob": { + "type": "blob" + }, "JsonBlobsInputOutput": { "type": "structure", "members": { @@ -2198,14 +2507,12 @@ "shape": "Blob" } } - }, - "Blob": { - "type": "blob" } }, "cases": [ { "id": "RestJsonJsonBlobs", + "description": "Blobs are base64 encoded", "given": { "name": "JsonBlobs", "http": { @@ -2218,7 +2525,6 @@ }, "documentation": "

Blobs are base64 encoded

" }, - "description": "Blobs are base64 encoded", "result": { "data": "value" }, @@ -2235,36 +2541,22 @@ { "description": "Test cases for JsonEnums operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { - "JsonEnumsInputOutput": { - "type": "structure", - "members": { - "fooEnum1": { - "shape": "FooEnum" - }, - "fooEnum2": { - "shape": "FooEnum" - }, - "fooEnum3": { - "shape": "FooEnum" - }, - "fooEnumList": { - "shape": "FooEnumList" - }, - "fooEnumSet": { - "shape": "FooEnumSet" - }, - "fooEnumMap": { - "shape": "FooEnumMap" - } - } - }, "FooEnum": { "type": "string", "enum": [ @@ -2281,12 +2573,6 @@ "shape": "FooEnum" } }, - "FooEnumSet": { - "type": "list", - "member": { - "shape": "FooEnum" - } - }, "FooEnumMap": { "type": "map", "key": { @@ -2296,6 +2582,35 @@ "shape": "FooEnum" } }, + "FooEnumSet": { + "type": "list", + "member": { + "shape": "FooEnum" + } + }, + "JsonEnumsInputOutput": { + "type": "structure", + "members": { + "fooEnum1": { + "shape": "FooEnum" + }, + "fooEnum2": { + "shape": "FooEnum" + }, + "fooEnum3": { + "shape": "FooEnum" + }, + "fooEnumList": { + "shape": "FooEnumList" + }, + "fooEnumSet": { + "shape": "FooEnumSet" + }, + "fooEnumMap": { + "shape": "FooEnumMap" + } + } + }, "String": { "type": "string" } @@ -2303,6 +2618,7 @@ "cases": [ { "id": "RestJsonJsonEnums", + "description": "Serializes simple scalar properties", "given": { "name": "JsonEnums", "http": { @@ -2316,7 +2632,6 @@ "documentation": "

This example serializes enums as top level properties, in lists, sets, and maps.

", "idempotent": true }, - "description": "Serializes simple scalar properties", "result": { "fooEnum1": "Foo", "fooEnum2": "0", @@ -2347,36 +2662,22 @@ { "description": "Test cases for JsonIntEnums operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { - "JsonIntEnumsInputOutput": { - "type": "structure", - "members": { - "integerEnum1": { - "shape": "IntegerEnum" - }, - "integerEnum2": { - "shape": "IntegerEnum" - }, - "integerEnum3": { - "shape": "IntegerEnum" - }, - "integerEnumList": { - "shape": "IntegerEnumList" - }, - "integerEnumSet": { - "shape": "IntegerEnumSet" - }, - "integerEnumMap": { - "shape": "IntegerEnumMap" - } - } - }, "IntegerEnum": { "type": "integer", "box": true @@ -2387,12 +2688,6 @@ "shape": "IntegerEnum" } }, - "IntegerEnumSet": { - "type": "list", - "member": { - "shape": "IntegerEnum" - } - }, "IntegerEnumMap": { "type": "map", "key": { @@ -2402,6 +2697,35 @@ "shape": "IntegerEnum" } }, + "IntegerEnumSet": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, + "JsonIntEnumsInputOutput": { + "type": "structure", + "members": { + "integerEnum1": { + "shape": "IntegerEnum" + }, + "integerEnum2": { + "shape": "IntegerEnum" + }, + "integerEnum3": { + "shape": "IntegerEnum" + }, + "integerEnumList": { + "shape": "IntegerEnumList" + }, + "integerEnumSet": { + "shape": "IntegerEnumSet" + }, + "integerEnumMap": { + "shape": "IntegerEnumMap" + } + } + }, "String": { "type": "string" } @@ -2409,6 +2733,7 @@ "cases": [ { "id": "RestJsonJsonIntEnums", + "description": "Serializes intEnums as integers", "given": { "name": "JsonIntEnums", "http": { @@ -2422,7 +2747,6 @@ "documentation": "

This example serializes intEnums as top level properties, in lists, sets, and maps.

", "idempotent": true }, - "description": "Serializes intEnums as integers", "result": { "integerEnum1": 1, "integerEnum2": 2, @@ -2454,13 +2778,68 @@ { "description": "Test cases for JsonLists operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "BooleanList": { + "type": "list", + "member": { + "shape": "Boolean" + } + }, + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] + }, + "FooEnumList": { + "type": "list", + "member": { + "shape": "FooEnum" + } + }, + "Integer": { + "type": "integer", + "box": true + }, + "IntegerEnum": { + "type": "integer", + "box": true + }, + "IntegerEnumList": { + "type": "list", + "member": { + "shape": "IntegerEnum" + } + }, + "IntegerList": { + "type": "list", + "member": { + "shape": "Integer" + } + }, "JsonListsInputOutput": { "type": "structure", "members": { @@ -2494,55 +2873,28 @@ } } }, - "StringList": { - "type": "list", - "member": { - "shape": "String" - } - }, - "StringSet": { - "type": "list", - "member": { - "shape": "String" - } - }, - "IntegerList": { - "type": "list", - "member": { - "shape": "Integer" - } - }, - "BooleanList": { + "NestedStringList": { "type": "list", "member": { - "shape": "Boolean" - } + "shape": "StringList" + }, + "documentation": "

A list of lists of strings.

" }, - "TimestampList": { - "type": "list", - "member": { - "shape": "Timestamp" - } + "String": { + "type": "string" }, - "FooEnumList": { + "StringList": { "type": "list", "member": { - "shape": "FooEnum" + "shape": "String" } }, - "IntegerEnumList": { + "StringSet": { "type": "list", "member": { - "shape": "IntegerEnum" + "shape": "String" } }, - "NestedStringList": { - "type": "list", - "member": { - "shape": "StringList" - }, - "documentation": "

A list of lists of strings.

" - }, "StructureList": { "type": "list", "member": { @@ -2562,38 +2914,20 @@ } } }, - "String": { - "type": "string" - }, - "IntegerEnum": { - "type": "integer", - "box": true - }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, "Timestamp": { "type": "timestamp" }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true + "TimestampList": { + "type": "list", + "member": { + "shape": "Timestamp" + } } }, "cases": [ { "id": "RestJsonLists", + "description": "Serializes JSON lists", "given": { "name": "JsonLists", "http": { @@ -2607,7 +2941,6 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal JSON lists.
  2. Normal JSON sets.
  3. JSON lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Serializes JSON lists", "result": { "stringList": [ "foo", @@ -2668,6 +3001,7 @@ }, { "id": "RestJsonListsEmpty", + "description": "Serializes empty JSON lists", "given": { "name": "JsonLists", "http": { @@ -2681,7 +3015,6 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal JSON lists.
  2. Normal JSON sets.
  3. JSON lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Serializes empty JSON lists", "result": { "stringList": [] }, @@ -2698,40 +3031,33 @@ { "description": "Test cases for JsonMaps operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { - "JsonMapsInputOutput": { - "type": "structure", - "members": { - "denseStructMap": { - "shape": "DenseStructMap" - }, - "denseNumberMap": { - "shape": "DenseNumberMap" - }, - "denseBooleanMap": { - "shape": "DenseBooleanMap" - }, - "denseStringMap": { - "shape": "DenseStringMap" - }, - "denseSetMap": { - "shape": "DenseSetMap" - } - } + "Boolean": { + "type": "boolean", + "box": true }, - "DenseStructMap": { + "DenseBooleanMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "GreetingStruct" + "shape": "Boolean" } }, "DenseNumberMap": { @@ -2743,13 +3069,13 @@ "shape": "Integer" } }, - "DenseBooleanMap": { + "DenseSetMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "Boolean" + "shape": "StringSet" } }, "DenseStringMap": { @@ -2761,44 +3087,61 @@ "shape": "String" } }, - "DenseSetMap": { + "DenseStructMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "StringSet" + "shape": "GreetingStruct" } }, - "StringSet": { - "type": "list", - "member": { - "shape": "String" + "GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "shape": "String" + } } }, - "String": { - "type": "string" - }, - "Boolean": { - "type": "boolean", - "box": true - }, "Integer": { "type": "integer", "box": true }, - "GreetingStruct": { + "JsonMapsInputOutput": { "type": "structure", "members": { - "hi": { - "shape": "String" + "denseStructMap": { + "shape": "DenseStructMap" + }, + "denseNumberMap": { + "shape": "DenseNumberMap" + }, + "denseBooleanMap": { + "shape": "DenseBooleanMap" + }, + "denseStringMap": { + "shape": "DenseStringMap" + }, + "denseSetMap": { + "shape": "DenseSetMap" } } - } - }, - "cases": [ + }, + "String": { + "type": "string" + }, + "StringSet": { + "type": "list", + "member": { + "shape": "String" + } + } + }, + "cases": [ { "id": "RestJsonJsonMaps", + "description": "Deserializes JSON maps", "given": { "name": "JsonMaps", "http": { @@ -2811,7 +3154,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "Deserializes JSON maps", "result": { "denseStructMap": { "foo": { @@ -2832,6 +3174,7 @@ }, { "id": "RestJsonDeserializesZeroValuesInMaps", + "description": "Ensure that 0 and false are sent over the wire in all maps and lists", "given": { "name": "JsonMaps", "http": { @@ -2844,7 +3187,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "Ensure that 0 and false are sent over the wire in all maps and lists", "result": { "denseNumberMap": { "x": 0 @@ -2863,38 +3205,7 @@ }, { "id": "RestJsonDeserializesDenseSetMap", - "given": { - "name": "JsonMaps", - "http": { - "method": "POST", - "requestUri": "/JsonMaps", - "responseCode": 200 - }, - "output": { - "shape": "JsonMapsInputOutput" - }, - "documentation": "

The example tests basic map serialization.

" - }, "description": "A response that contains a dense map of sets.", - "result": { - "denseSetMap": { - "x": [], - "y": [ - "a", - "b" - ] - } - }, - "response": { - "status_code": 200, - "headers": { - "Content-Type": "application/json" - }, - "body": "{\n \"denseSetMap\": {\n \"x\": [],\n \"y\": [\"a\", \"b\"]\n }\n}" - } - }, - { - "id": "RestJsonDeserializesDenseSetMapAndSkipsNull", "given": { "name": "JsonMaps", "http": { @@ -2907,7 +3218,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "Clients SHOULD tolerate seeing a null value in a dense map, and they SHOULD\ndrop the null key-value pair.", "result": { "denseSetMap": { "x": [], @@ -2922,7 +3232,7 @@ "headers": { "Content-Type": "application/json" }, - "body": "{\n \"denseSetMap\": {\n \"x\": [],\n \"y\": [\"a\", \"b\"],\n \"z\": null\n }\n}" + "body": "{\n \"denseSetMap\": {\n \"x\": [],\n \"y\": [\"a\", \"b\"]\n }\n}" } } ] @@ -2930,13 +3240,34 @@ { "description": "Test cases for JsonTimestamps operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "DateTime": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, + "EpochSeconds": { + "type": "timestamp", + "timestampFormat": "unixTimestamp" + }, + "HttpDate": { + "type": "timestamp", + "timestampFormat": "rfc822" + }, "JsonTimestampsInputOutput": { "type": "structure", "members": { @@ -2963,37 +3294,26 @@ } } }, - "Timestamp": { - "type": "timestamp" - }, "SyntheticTimestamp_date_time": { "type": "timestamp", "timestampFormat": "iso8601" }, - "DateTime": { - "type": "timestamp", - "timestampFormat": "iso8601" - }, "SyntheticTimestamp_epoch_seconds": { "type": "timestamp", "timestampFormat": "unixTimestamp" }, - "EpochSeconds": { - "type": "timestamp", - "timestampFormat": "unixTimestamp" - }, "SyntheticTimestamp_http_date": { "type": "timestamp", "timestampFormat": "rfc822" }, - "HttpDate": { - "type": "timestamp", - "timestampFormat": "rfc822" + "Timestamp": { + "type": "timestamp" } }, "cases": [ { "id": "RestJsonJsonTimestamps", + "description": "Tests how normal timestamps are serialized", "given": { "name": "JsonTimestamps", "http": { @@ -3006,7 +3326,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Tests how normal timestamps are serialized", "result": { "normal": 1398796238 }, @@ -3020,6 +3339,7 @@ }, { "id": "RestJsonJsonTimestampsWithDateTimeFormat", + "description": "Ensures that the timestampFormat of date-time works like normal timestamps", "given": { "name": "JsonTimestamps", "http": { @@ -3032,7 +3352,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of date-time works like normal timestamps", "result": { "dateTime": 1398796238 }, @@ -3046,6 +3365,7 @@ }, { "id": "RestJsonJsonTimestampsWithDateTimeOnTargetFormat", + "description": "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps", "given": { "name": "JsonTimestamps", "http": { @@ -3058,7 +3378,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of date-time on the target shape works like normal timestamps", "result": { "dateTimeOnTarget": 1398796238 }, @@ -3072,6 +3391,7 @@ }, { "id": "RestJsonJsonTimestampsWithEpochSecondsFormat", + "description": "Ensures that the timestampFormat of epoch-seconds works", "given": { "name": "JsonTimestamps", "http": { @@ -3084,7 +3404,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of epoch-seconds works", "result": { "epochSeconds": 1398796238 }, @@ -3098,6 +3417,7 @@ }, { "id": "RestJsonJsonTimestampsWithEpochSecondsOnTargetFormat", + "description": "Ensures that the timestampFormat of epoch-seconds on the target shape works", "given": { "name": "JsonTimestamps", "http": { @@ -3110,7 +3430,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of epoch-seconds on the target shape works", "result": { "epochSecondsOnTarget": 1398796238 }, @@ -3124,6 +3443,7 @@ }, { "id": "RestJsonJsonTimestampsWithHttpDateFormat", + "description": "Ensures that the timestampFormat of http-date works", "given": { "name": "JsonTimestamps", "http": { @@ -3136,7 +3456,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of http-date works", "result": { "httpDate": 1398796238 }, @@ -3150,6 +3469,7 @@ }, { "id": "RestJsonJsonTimestampsWithHttpDateOnTargetFormat", + "description": "Ensures that the timestampFormat of http-date on the target shape works", "given": { "name": "JsonTimestamps", "http": { @@ -3162,7 +3482,6 @@ }, "documentation": "

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

" }, - "description": "Ensures that the timestampFormat of http-date on the target shape works", "result": { "httpDateOnTarget": 1398796238 }, @@ -3179,21 +3498,50 @@ { "description": "Test cases for JsonUnions operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { - "UnionInputOutput": { + "Blob": { + "type": "blob" + }, + "Boolean": { + "type": "boolean", + "box": true + }, + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] + }, + "GreetingStruct": { "type": "structure", "members": { - "contents": { - "shape": "MyUnion" + "hi": { + "shape": "String" } - }, - "documentation": "

A shared structure that contains a single union member.

" + } + }, + "Integer": { + "type": "integer", + "box": true }, "MyUnion": { "type": "structure", @@ -3232,33 +3580,17 @@ "documentation": "

A union with a representative set of types for members.

", "union": true }, + "RenamedGreeting": { + "type": "structure", + "members": { + "salutation": { + "shape": "String" + } + } + }, "String": { "type": "string" }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true - }, - "Blob": { - "type": "blob" - }, - "Timestamp": { - "type": "timestamp" - }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, "StringList": { "type": "list", "member": { @@ -3274,26 +3606,23 @@ "shape": "String" } }, - "GreetingStruct": { - "type": "structure", - "members": { - "hi": { - "shape": "String" - } - } + "Timestamp": { + "type": "timestamp" }, - "RenamedGreeting": { + "UnionInputOutput": { "type": "structure", "members": { - "salutation": { - "shape": "String" + "contents": { + "shape": "MyUnion" } - } + }, + "documentation": "

A shared structure that contains a single union member.

" } }, "cases": [ { "id": "RestJsonDeserializeStringUnionValue", + "description": "Deserializes a string union value", "given": { "name": "JsonUnions", "http": { @@ -3307,7 +3636,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a string union value", "result": { "contents": { "stringValue": "foo" @@ -3323,6 +3651,7 @@ }, { "id": "RestJsonDeserializeBooleanUnionValue", + "description": "Deserializes a boolean union value", "given": { "name": "JsonUnions", "http": { @@ -3336,7 +3665,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a boolean union value", "result": { "contents": { "booleanValue": true @@ -3352,6 +3680,7 @@ }, { "id": "RestJsonDeserializeNumberUnionValue", + "description": "Deserializes a number union value", "given": { "name": "JsonUnions", "http": { @@ -3365,7 +3694,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a number union value", "result": { "contents": { "numberValue": 1 @@ -3381,6 +3709,7 @@ }, { "id": "RestJsonDeserializeBlobUnionValue", + "description": "Deserializes a blob union value", "given": { "name": "JsonUnions", "http": { @@ -3394,7 +3723,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a blob union value", "result": { "contents": { "blobValue": "foo" @@ -3410,6 +3738,7 @@ }, { "id": "RestJsonDeserializeTimestampUnionValue", + "description": "Deserializes a timestamp union value", "given": { "name": "JsonUnions", "http": { @@ -3423,7 +3752,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a timestamp union value", "result": { "contents": { "timestampValue": 1398796238 @@ -3439,6 +3767,7 @@ }, { "id": "RestJsonDeserializeEnumUnionValue", + "description": "Deserializes an enum union value", "given": { "name": "JsonUnions", "http": { @@ -3452,7 +3781,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes an enum union value", "result": { "contents": { "enumValue": "Foo" @@ -3468,6 +3796,7 @@ }, { "id": "RestJsonDeserializeListUnionValue", + "description": "Deserializes a list union value", "given": { "name": "JsonUnions", "http": { @@ -3481,7 +3810,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a list union value", "result": { "contents": { "listValue": [ @@ -3500,6 +3828,7 @@ }, { "id": "RestJsonDeserializeMapUnionValue", + "description": "Deserializes a map union value", "given": { "name": "JsonUnions", "http": { @@ -3513,7 +3842,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a map union value", "result": { "contents": { "mapValue": { @@ -3532,6 +3860,7 @@ }, { "id": "RestJsonDeserializeStructureUnionValue", + "description": "Deserializes a structure union value", "given": { "name": "JsonUnions", "http": { @@ -3545,7 +3874,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Deserializes a structure union value", "result": { "contents": { "structureValue": { @@ -3563,6 +3891,7 @@ }, { "id": "RestJsonDeserializeIgnoreType", + "description": "Ignores an unrecognized __type property", "given": { "name": "JsonUnions", "http": { @@ -3576,7 +3905,6 @@ "documentation": "

This operation uses unions for inputs and outputs.

", "idempotent": true }, - "description": "Ignores an unrecognized __type property", "result": { "contents": { "structureValue": { @@ -3597,13 +3925,25 @@ { "description": "Test cases for MediaTypeHeader operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "JsonValue": { + "type": "string" + }, "MediaTypeHeaderOutput": { "type": "structure", "members": { @@ -3614,14 +3954,12 @@ "locationName": "X-Json" } } - }, - "JsonValue": { - "type": "string" } }, "cases": [ { "id": "MediaTypeHeaderOutputBase64", + "description": "Headers that target strings with a mediaType are base64 encoded", "given": { "name": "MediaTypeHeader", "http": { @@ -3632,9 +3970,9 @@ "output": { "shape": "MediaTypeHeaderOutput" }, - "documentation": "

This example ensures that mediaType strings are base64 encoded in headers.

" + "documentation": "

This example ensures that mediaType strings are base64 encoded in headers.

", + "readonly": true }, - "description": "Headers that target strings with a mediaType are base64 encoded", "result": { "json": "true" }, @@ -3650,16 +3988,26 @@ { "description": "Test cases for NoInputAndNoOutput operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": {}, "cases": [ { "id": "RestJsonNoInputAndNoOutput", + "description": "When an operation does not define output, the service will respond\nwith an empty payload, and may optionally include the content-type\nheader.", "given": { "name": "NoInputAndNoOutput", "http": { @@ -3669,7 +4017,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input or output. While this should be rare, code generators must support this.

" }, - "description": "When an operation does not define output, the service will respond\nwith an empty payload, and may optionally include the content-type\nheader.", "result": {}, "response": { "status_code": 200, @@ -3681,11 +4028,20 @@ { "description": "Test cases for NoInputAndOutput operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "NoInputAndOutputOutput": { @@ -3696,6 +4052,7 @@ "cases": [ { "id": "RestJsonNoInputAndOutputWithJson", + "description": "Operations that define output and do not bind anything to\nthe payload return a JSON object in the response.", "given": { "name": "NoInputAndOutput", "http": { @@ -3708,7 +4065,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input and the output is empty. While this should be rare, code generators must support this.

" }, - "description": "Operations that define output and do not bind anything to\nthe payload return a JSON object in the response.", "result": {}, "response": { "status_code": 200, @@ -3720,6 +4076,7 @@ }, { "id": "RestJsonNoInputAndOutputNoPayload", + "description": "This test is similar to RestJsonNoInputAndOutputWithJson, but\nit ensures that clients can gracefully handle responses that\nomit a JSON payload.", "given": { "name": "NoInputAndOutput", "http": { @@ -3732,7 +4089,6 @@ }, "documentation": "

The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input and the output is empty. While this should be rare, code generators must support this.

" }, - "description": "This test is similar to RestJsonNoInputAndOutputWithJson, but\nit ensures that clients can gracefully handle responses that\nomit a JSON payload.", "result": {}, "response": { "status_code": 200, @@ -3744,11 +4100,20 @@ { "description": "Test cases for PostUnionWithJsonName operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "PostUnionWithJsonNameOutput": { @@ -3762,6 +4127,9 @@ } } }, + "String": { + "type": "string" + }, "UnionWithJsonName": { "type": "structure", "members": { @@ -3778,14 +4146,12 @@ } }, "union": true - }, - "String": { - "type": "string" } }, "cases": [ { "id": "PostUnionWithJsonNameResponse1", + "description": "Tests that jsonName works with union members.", "given": { "name": "PostUnionWithJsonName", "http": { @@ -3798,7 +4164,6 @@ }, "documentation": "

This operation defines a union that uses jsonName on some members.

" }, - "description": "Tests that jsonName works with union members.", "result": { "value": { "foo": "hi" @@ -3814,6 +4179,7 @@ }, { "id": "PostUnionWithJsonNameResponse2", + "description": "Tests that jsonName works with union members.", "given": { "name": "PostUnionWithJsonName", "http": { @@ -3826,7 +4192,6 @@ }, "documentation": "

This operation defines a union that uses jsonName on some members.

" }, - "description": "Tests that jsonName works with union members.", "result": { "value": { "baz": "hi" @@ -3842,6 +4207,7 @@ }, { "id": "PostUnionWithJsonNameResponse3", + "description": "Tests that jsonName works with union members.", "given": { "name": "PostUnionWithJsonName", "http": { @@ -3854,7 +4220,6 @@ }, "documentation": "

This operation defines a union that uses jsonName on some members.

" }, - "description": "Tests that jsonName works with union members.", "result": { "value": { "bar": "hi" @@ -3873,11 +4238,20 @@ { "description": "Test cases for RecursiveShapes operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { "RecursiveShapesInputOutput": { @@ -3899,9 +4273,6 @@ } } }, - "String": { - "type": "string" - }, "RecursiveShapesInputOutputNested2": { "type": "structure", "members": { @@ -3912,11 +4283,15 @@ "shape": "RecursiveShapesInputOutputNested1" } } + }, + "String": { + "type": "string" } }, "cases": [ { "id": "RestJsonRecursiveShapes", + "description": "Serializes recursive structures", "given": { "name": "RecursiveShapes", "http": { @@ -3930,7 +4305,6 @@ "documentation": "

Recursive shapes

", "idempotent": true }, - "description": "Serializes recursive structures", "result": { "nested": { "foo": "Foo1", @@ -3958,13 +4332,42 @@ { "description": "Test cases for SimpleScalarProperties operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "Double": { + "type": "double", + "box": true + }, + "Float": { + "type": "float", + "box": true + }, + "Integer": { + "type": "integer", + "box": true + }, + "Long": { + "type": "long", + "box": true + }, "SimpleScalarPropertiesInputOutput": { "type": "structure", "members": { @@ -4005,31 +4408,12 @@ }, "String": { "type": "string" - }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true - }, - "Long": { - "type": "long", - "box": true - }, - "Float": { - "type": "float", - "box": true - }, - "Double": { - "type": "double", - "box": true } }, "cases": [ { "id": "RestJsonSimpleScalarProperties", + "description": "Serializes simple scalar properties", "given": { "name": "SimpleScalarProperties", "http": { @@ -4042,7 +4426,6 @@ }, "idempotent": true }, - "description": "Serializes simple scalar properties", "result": { "foo": "Foo", "stringValue": "string", @@ -4058,14 +4441,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/json", - "X-Foo": "Foo" + "X-Foo": "Foo", + "Content-Type": "application/json" }, "body": "{\n \"stringValue\": \"string\",\n \"trueBooleanValue\": true,\n \"falseBooleanValue\": false,\n \"byteValue\": 1,\n \"shortValue\": 2,\n \"integerValue\": 3,\n \"longValue\": 4,\n \"floatValue\": 5.5,\n \"DoubleDribble\": 6.5\n}" } }, { "id": "RestJsonDoesntDeserializeNullStructureValues", + "description": "Rest Json should not deserialize null structure values", "given": { "name": "SimpleScalarProperties", "http": { @@ -4078,7 +4462,6 @@ }, "idempotent": true }, - "description": "Rest Json should not deserialize null structure values", "result": {}, "response": { "status_code": 200, @@ -4090,6 +4473,7 @@ }, { "id": "RestJsonSupportsNaNFloatInputs", + "description": "Supports handling NaN float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -4102,7 +4486,6 @@ }, "idempotent": true }, - "description": "Supports handling NaN float values.", "result": { "floatValue": "NaN", "doubleValue": "NaN" @@ -4117,6 +4500,7 @@ }, { "id": "RestJsonSupportsInfinityFloatInputs", + "description": "Supports handling Infinity float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -4129,7 +4513,6 @@ }, "idempotent": true }, - "description": "Supports handling Infinity float values.", "result": { "floatValue": "Infinity", "doubleValue": "Infinity" @@ -4144,6 +4527,7 @@ }, { "id": "RestJsonSupportsNegativeInfinityFloatInputs", + "description": "Supports handling -Infinity float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -4156,7 +4540,6 @@ }, "idempotent": true }, - "description": "Supports handling -Infinity float values.", "result": { "floatValue": "-Infinity", "doubleValue": "-Infinity" @@ -4171,16 +4554,424 @@ } ] }, + { + "description": "Test cases for SparseJsonLists operation", + "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", + "protocol": "rest-json", + "protocols": [ + "rest-json" + ], + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" + }, + "shapes": { + "Integer": { + "type": "integer", + "box": true + }, + "SparseJsonListsInputOutput": { + "type": "structure", + "members": { + "sparseStringList": { + "shape": "SparseStringList" + }, + "sparseShortList": { + "shape": "SparseShortList" + } + } + }, + "SparseShortList": { + "type": "list", + "member": { + "shape": "Integer" + }, + "sparse": true + }, + "SparseStringList": { + "type": "list", + "member": { + "shape": "String" + }, + "sparse": true + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "id": "RestJsonSparseListsSerializeNull", + "description": "Serializes null values in sparse lists", + "given": { + "name": "SparseJsonLists", + "http": { + "method": "PUT", + "requestUri": "/SparseJsonLists", + "responseCode": 200 + }, + "output": { + "shape": "SparseJsonListsInputOutput" + }, + "idempotent": true + }, + "result": { + "sparseStringList": [ + null, + "hi" + ], + "sparseShortList": [ + null, + 2 + ] + }, + "response": { + "status_code": 200, + "headers": { + "Content-Type": "application/json" + }, + "body": "{\n \"sparseStringList\": [\n null,\n \"hi\"\n ],\n \"sparseShortList\": [\n null,\n 2\n ]\n}" + } + } + ] + }, + { + "description": "Test cases for SparseJsonMaps operation", + "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", + "protocol": "rest-json", + "protocols": [ + "rest-json" + ], + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" + }, + "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "shape": "String" + } + } + }, + "Integer": { + "type": "integer", + "box": true + }, + "SparseBooleanMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "Boolean" + }, + "sparse": true + }, + "SparseJsonMapsInputOutput": { + "type": "structure", + "members": { + "sparseStructMap": { + "shape": "SparseStructMap" + }, + "sparseNumberMap": { + "shape": "SparseNumberMap" + }, + "sparseBooleanMap": { + "shape": "SparseBooleanMap" + }, + "sparseStringMap": { + "shape": "SparseStringMap" + }, + "sparseSetMap": { + "shape": "SparseSetMap" + } + } + }, + "SparseNumberMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "Integer" + }, + "sparse": true + }, + "SparseSetMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "StringSet" + }, + "sparse": true + }, + "SparseStringMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + }, + "sparse": true + }, + "SparseStructMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "GreetingStruct" + }, + "sparse": true + }, + "String": { + "type": "string" + }, + "StringSet": { + "type": "list", + "member": { + "shape": "String" + } + } + }, + "cases": [ + { + "id": "RestJsonSparseJsonMaps", + "description": "Deserializes JSON maps", + "given": { + "name": "SparseJsonMaps", + "http": { + "method": "POST", + "requestUri": "/SparseJsonMaps", + "responseCode": 200 + }, + "output": { + "shape": "SparseJsonMapsInputOutput" + }, + "documentation": "

This example tests sparse map serialization.

" + }, + "result": { + "sparseStructMap": { + "foo": { + "hi": "there" + }, + "baz": { + "hi": "bye" + } + } + }, + "response": { + "status_code": 200, + "headers": { + "Content-Type": "application/json" + }, + "body": "{\n \"sparseStructMap\": {\n \"foo\": {\n \"hi\": \"there\"\n },\n \"baz\": {\n \"hi\": \"bye\"\n }\n }\n}" + } + }, + { + "id": "RestJsonDeserializesSparseNullMapValues", + "description": "Deserializes null JSON map values", + "given": { + "name": "SparseJsonMaps", + "http": { + "method": "POST", + "requestUri": "/SparseJsonMaps", + "responseCode": 200 + }, + "output": { + "shape": "SparseJsonMapsInputOutput" + }, + "documentation": "

This example tests sparse map serialization.

" + }, + "result": { + "sparseBooleanMap": { + "x": null + }, + "sparseNumberMap": { + "x": null + }, + "sparseStringMap": { + "x": null + }, + "sparseStructMap": { + "x": null + } + }, + "response": { + "status_code": 200, + "headers": { + "Content-Type": "application/json" + }, + "body": "{\n \"sparseBooleanMap\": {\n \"x\": null\n },\n \"sparseNumberMap\": {\n \"x\": null\n },\n \"sparseStringMap\": {\n \"x\": null\n },\n \"sparseStructMap\": {\n \"x\": null\n }\n}" + } + }, + { + "id": "RestJsonDeserializesZeroValuesInSparseMaps", + "description": "Ensure that 0 and false are sent over the wire in all maps and lists", + "given": { + "name": "SparseJsonMaps", + "http": { + "method": "POST", + "requestUri": "/SparseJsonMaps", + "responseCode": 200 + }, + "output": { + "shape": "SparseJsonMapsInputOutput" + }, + "documentation": "

This example tests sparse map serialization.

" + }, + "result": { + "sparseNumberMap": { + "x": 0 + }, + "sparseBooleanMap": { + "x": false + } + }, + "response": { + "status_code": 200, + "headers": { + "Content-Type": "application/json" + }, + "body": "{\n \"sparseNumberMap\": {\n \"x\": 0\n },\n \"sparseBooleanMap\": {\n \"x\": false\n }\n}" + } + }, + { + "id": "RestJsonDeserializesSparseSetMap", + "description": "A response that contains a sparse map of sets", + "given": { + "name": "SparseJsonMaps", + "http": { + "method": "POST", + "requestUri": "/SparseJsonMaps", + "responseCode": 200 + }, + "output": { + "shape": "SparseJsonMapsInputOutput" + }, + "documentation": "

This example tests sparse map serialization.

" + }, + "result": { + "sparseSetMap": { + "x": [], + "y": [ + "a", + "b" + ] + } + }, + "response": { + "status_code": 200, + "headers": { + "Content-Type": "application/json" + }, + "body": "{\n \"sparseSetMap\": {\n \"x\": [],\n \"y\": [\"a\", \"b\"]\n }\n}" + } + }, + { + "id": "RestJsonDeserializesSparseSetMapAndRetainsNull", + "description": "A response that contains a sparse map of sets.", + "given": { + "name": "SparseJsonMaps", + "http": { + "method": "POST", + "requestUri": "/SparseJsonMaps", + "responseCode": 200 + }, + "output": { + "shape": "SparseJsonMapsInputOutput" + }, + "documentation": "

This example tests sparse map serialization.

" + }, + "result": { + "sparseSetMap": { + "x": [], + "y": [ + "a", + "b" + ], + "z": null + } + }, + "response": { + "status_code": 200, + "headers": { + "Content-Type": "application/json" + }, + "body": "{\n \"sparseSetMap\": {\n \"x\": [],\n \"y\": [\"a\", \"b\"],\n \"z\": null\n }\n}" + } + } + ] + }, { "description": "Test cases for TimestampFormatHeaders operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": { + "DateTime": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, + "EpochSeconds": { + "type": "timestamp", + "timestampFormat": "unixTimestamp" + }, + "HttpDate": { + "type": "timestamp", + "timestampFormat": "rfc822" + }, + "SyntheticTimestamp_date_time": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, + "SyntheticTimestamp_epoch_seconds": { + "type": "timestamp", + "timestampFormat": "unixTimestamp" + }, + "SyntheticTimestamp_http_date": { + "type": "timestamp", + "timestampFormat": "rfc822" + }, + "Timestamp": { + "type": "timestamp" + }, "TimestampFormatHeadersIO": { "type": "structure", "members": { @@ -4220,38 +5011,12 @@ "locationName": "X-targetDateTime" } } - }, - "SyntheticTimestamp_epoch_seconds": { - "type": "timestamp", - "timestampFormat": "unixTimestamp" - }, - "SyntheticTimestamp_http_date": { - "type": "timestamp", - "timestampFormat": "rfc822" - }, - "SyntheticTimestamp_date_time": { - "type": "timestamp", - "timestampFormat": "iso8601" - }, - "Timestamp": { - "type": "timestamp" - }, - "EpochSeconds": { - "type": "timestamp", - "timestampFormat": "unixTimestamp" - }, - "HttpDate": { - "type": "timestamp", - "timestampFormat": "rfc822" - }, - "DateTime": { - "type": "timestamp", - "timestampFormat": "iso8601" } }, "cases": [ { "id": "RestJsonTimestampFormatHeaders", + "description": "Tests how timestamp response headers are serialized", "given": { "name": "TimestampFormatHeaders", "http": { @@ -4264,7 +5029,6 @@ }, "documentation": "

This example tests how timestamp request and response headers are serialized.

" }, - "description": "Tests how timestamp response headers are serialized", "result": { "memberEpochSeconds": 1576540098, "memberHttpDate": 1576540098, @@ -4277,13 +5041,13 @@ "response": { "status_code": 200, "headers": { - "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT", "X-memberDateTime": "2019-12-16T23:48:18Z", - "X-memberEpochSeconds": "1576540098", + "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-memberHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT", "X-targetDateTime": "2019-12-16T23:48:18Z", "X-targetEpochSeconds": "1576540098", - "X-targetHttpDate": "Mon, 16 Dec 2019 23:48:18 GMT" + "X-memberEpochSeconds": "1576540098", + "X-defaultFormat": "Mon, 16 Dec 2019 23:48:18 GMT" } } } @@ -4292,16 +5056,26 @@ { "description": "Test cases for UnitInputAndOutput operation", "metadata": { + "apiVersion": "2019-12-16", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "restjson", "protocol": "rest-json", "protocols": [ "rest-json" ], - "apiVersion": "2019-12-16" + "serviceFullName": "RestJson", + "serviceId": "Rest Json Protocol", + "signatureVersion": "v4", + "signingName": "RestJson", + "uid": "rest-json-protocol-2019-12-16" }, "shapes": {}, "cases": [ { "id": "RestJsonUnitInputAndOutputNoOutput", + "description": "When an operation defines Unit output, the service will respond\nwith an empty payload, and may optionally include the content-type\nheader.", "given": { "name": "UnitInputAndOutput", "http": { @@ -4311,7 +5085,6 @@ }, "documentation": "

This test is similar to NoInputAndNoOutput, but uses explicit Unit types.

" }, - "description": "When an operation defines Unit output, the service will respond\nwith an empty payload, and may optionally include the content-type\nheader.", "result": {}, "response": { "status_code": 200, diff --git a/tools/code-generation/protocol-tests/output/smithy-rpc-v2-cbor.json b/tools/code-generation/protocol-tests/output/smithy-rpc-v2-cbor.json index 4dea762e03b5..5752fdc4dee3 100644 --- a/tools/code-generation/protocol-tests/output/smithy-rpc-v2-cbor.json +++ b/tools/code-generation/protocol-tests/output/smithy-rpc-v2-cbor.json @@ -2,12 +2,21 @@ { "description": "Test cases for EmptyInputOutput operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { "EmptyStructure": { @@ -18,6 +27,7 @@ "cases": [ { "id": "empty_output", + "description": "When output structure is empty we write CBOR equivalent of {}", "given": { "name": "EmptyInputOutput", "http": { @@ -28,19 +38,19 @@ "shape": "EmptyStructure" } }, - "description": "When output structure is empty we write CBOR equivalent of {}", "result": {}, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v/8=" } }, { "id": "empty_output_no_body", + "description": "When output structure is empty the client should accept an empty body", "given": { "name": "EmptyInputOutput", "http": { @@ -51,13 +61,12 @@ "shape": "EmptyStructure" } }, - "description": "When output structure is empty the client should accept an empty body", "result": {}, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "" } @@ -67,14 +76,27 @@ { "description": "Test cases for Float16 operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { + "Double": { + "type": "double", + "box": true + }, "Float16Output": { "type": "structure", "members": { @@ -82,15 +104,12 @@ "shape": "Double" } } - }, - "Double": { - "type": "double", - "box": true } }, "cases": [ { "id": "RpcV2CborFloat16Inf", + "description": "Ensures that clients can correctly parse float16 +Inf.", "given": { "name": "Float16", "http": { @@ -101,21 +120,21 @@ "shape": "Float16Output" } }, - "description": "Ensures that clients can correctly parse float16 +Inf.", "result": { "value": "Infinity" }, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "oWV2YWx1Zfl8AA==" } }, { "id": "RpcV2CborFloat16NegInf", + "description": "Ensures that clients can correctly parse float16 -Inf.", "given": { "name": "Float16", "http": { @@ -126,21 +145,21 @@ "shape": "Float16Output" } }, - "description": "Ensures that clients can correctly parse float16 -Inf.", "result": { "value": "-Infinity" }, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "oWV2YWx1Zfn8AA==" } }, { "id": "RpcV2CborFloat16LSBNaN", + "description": "Ensures that clients can correctly parse float16 NaN with high LSB.", "given": { "name": "Float16", "http": { @@ -151,21 +170,21 @@ "shape": "Float16Output" } }, - "description": "Ensures that clients can correctly parse float16 NaN with high LSB.", "result": { "value": "NaN" }, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "oWV2YWx1Zfl8AQ==" } }, { "id": "RpcV2CborFloat16MSBNaN", + "description": "Ensures that clients can correctly parse float16 NaN with high MSB.", "given": { "name": "Float16", "http": { @@ -176,21 +195,21 @@ "shape": "Float16Output" } }, - "description": "Ensures that clients can correctly parse float16 NaN with high MSB.", "result": { "value": "NaN" }, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "oWV2YWx1Zfl+AA==" } }, { "id": "RpcV2CborFloat16Subnormal", + "description": "Ensures that clients can correctly parse a subnormal float16.", "given": { "name": "Float16", "http": { @@ -201,15 +220,14 @@ "shape": "Float16Output" } }, - "description": "Ensures that clients can correctly parse a subnormal float16.", "result": { "value": 4.76837158203125E-6 }, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "oWV2YWx1ZfkAUA==" } @@ -219,14 +237,27 @@ { "description": "Test cases for FractionalSeconds operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { + "DateTime": { + "type": "timestamp", + "timestampFormat": "iso8601" + }, "FractionalSecondsOutput": { "type": "structure", "members": { @@ -234,15 +265,12 @@ "shape": "DateTime" } } - }, - "DateTime": { - "type": "timestamp", - "timestampFormat": "iso8601" } }, "cases": [ { "id": "RpcV2CborDateTimeWithFractionalSeconds", + "description": "Ensures that clients can correctly parse timestamps with fractional seconds", "given": { "name": "FractionalSeconds", "http": { @@ -253,15 +281,14 @@ "shape": "FractionalSecondsOutput" } }, - "description": "Ensures that clients can correctly parse timestamps with fractional seconds", "result": { "datetime": 9.46845296123E8 }, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2hkYXRldGltZcH7Qcw32zgPvnf/" } @@ -271,12 +298,21 @@ { "description": "Test cases for GreetingWithErrors operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { "InvalidGreeting": { @@ -296,6 +332,7 @@ "cases": [ { "id": "RpcV2CborInvalidGreetingError", + "description": "Parses simple RpcV2 Cbor errors", "given": { "name": "GreetingWithErrors", "http": { @@ -310,7 +347,6 @@ } ] }, - "description": "Parses simple RpcV2 Cbor errors", "errorCode": "InvalidGreeting", "errorMessage": "Hi", "error": { @@ -319,8 +355,8 @@ "response": { "status_code": 400, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2ZfX3R5cGV4LnNtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNJbnZhbGlkR3JlZXRpbmdnTWVzc2FnZWJIaf8=" } @@ -330,12 +366,21 @@ { "description": "Test cases for GreetingWithErrors operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { "ComplexError": { @@ -351,9 +396,6 @@ "documentation": "

This error is thrown when a request is invalid.

", "exception": true }, - "String": { - "type": "string" - }, "ComplexNestedErrorData": { "type": "structure", "members": { @@ -361,11 +403,15 @@ "shape": "String" } } + }, + "String": { + "type": "string" } }, "cases": [ { "id": "RpcV2CborComplexError", + "description": "Parses a complex error with no message member", "given": { "name": "GreetingWithErrors", "http": { @@ -380,7 +426,6 @@ } ] }, - "description": "Parses a complex error with no message member", "errorCode": "ComplexError", "error": { "TopLevel": "Top level", @@ -391,8 +436,8 @@ "response": { "status_code": 400, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2ZfX3R5cGV4K3NtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNDb21wbGV4RXJyb3JoVG9wTGV2ZWxpVG9wIGxldmVsZk5lc3RlZL9jRm9vY2Jhcv//" } @@ -418,8 +463,8 @@ "response": { "status_code": 400, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2ZfX3R5cGV4K3NtaXRoeS5wcm90b2NvbHRlc3RzLnJwY3YyQ2JvciNDb21wbGV4RXJyb3L/" } @@ -429,17 +474,27 @@ { "description": "Test cases for NoInputOutput operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": {}, "cases": [ { "id": "no_output", + "description": "A `Content-Type` header should not be set if the response body is empty.", "given": { "name": "NoInputOutput", "http": { @@ -447,7 +502,6 @@ "requestUri": "/" } }, - "description": "A `Content-Type` header should not be set if the response body is empty.", "result": {}, "response": { "status_code": 200, @@ -459,6 +513,7 @@ }, { "id": "NoOutputClientAllowsEmptyCbor", + "description": "Clients should accept a CBOR empty struct if there is no output.", "given": { "name": "NoInputOutput", "http": { @@ -466,19 +521,19 @@ "requestUri": "/" } }, - "description": "Clients should accept a CBOR empty struct if there is no output.", "result": {}, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v/8=" } }, { "id": "NoOutputClientAllowsEmptyBody", + "description": "Clients should accept an empty body if there is no output and\nshould not raise an error if the `Content-Type` header is set.", "given": { "name": "NoInputOutput", "http": { @@ -486,13 +541,12 @@ "requestUri": "/" } }, - "description": "Clients should accept an empty body if there is no output and\nshould not raise an error if the `Content-Type` header is set.", "result": {}, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "" } @@ -502,12 +556,21 @@ { "description": "Test cases for OptionalInputOutput operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { "SimpleStructure": { @@ -525,6 +588,7 @@ "cases": [ { "id": "optional_output", + "description": "When output is empty we write CBOR equivalent of {}", "given": { "name": "OptionalInputOutput", "http": { @@ -535,13 +599,12 @@ "shape": "SimpleStructure" } }, - "description": "When output is empty we write CBOR equivalent of {}", "result": {}, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v/8=" } @@ -551,12 +614,21 @@ { "description": "Test cases for RecursiveShapes operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { "RecursiveShapesInputOutput": { @@ -578,9 +650,6 @@ } } }, - "String": { - "type": "string" - }, "RecursiveShapesInputOutputNested2": { "type": "structure", "members": { @@ -591,11 +660,15 @@ "shape": "RecursiveShapesInputOutputNested1" } } + }, + "String": { + "type": "string" } }, "cases": [ { "id": "RpcV2CborRecursiveShapes", + "description": "Serializes recursive structures", "given": { "name": "RecursiveShapes", "http": { @@ -606,7 +679,6 @@ "shape": "RecursiveShapesInputOutput" } }, - "description": "Serializes recursive structures", "result": { "nested": { "foo": "Foo1", @@ -624,14 +696,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8=" } }, { "id": "RpcV2CborRecursiveShapesUsingDefiniteLength", + "description": "Deserializes recursive structures encoded using a map with definite length", "given": { "name": "RecursiveShapes", "http": { @@ -642,7 +715,6 @@ "shape": "RecursiveShapesInputOutput" } }, - "description": "Deserializes recursive structures encoded using a map with definite length", "result": { "nested": { "foo": "Foo1", @@ -660,8 +732,8 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "oWZuZXN0ZWSiY2Zvb2RGb28xZm5lc3RlZKJjYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyomNmb29kRm9vMmZuZXN0ZWShY2JhcmRCYXIy" } @@ -671,41 +743,34 @@ { "description": "Test cases for RpcV2CborDenseMaps operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { - "RpcV2CborDenseMapsInputOutput": { - "type": "structure", - "members": { - "denseStructMap": { - "shape": "DenseStructMap" - }, - "denseNumberMap": { - "shape": "DenseNumberMap" - }, - "denseBooleanMap": { - "shape": "DenseBooleanMap" - }, - "denseStringMap": { - "shape": "DenseStringMap" - }, - "denseSetMap": { - "shape": "DenseSetMap" - } - } + "Boolean": { + "type": "boolean", + "box": true }, - "DenseStructMap": { + "DenseBooleanMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "GreetingStruct" + "shape": "Boolean" } }, "DenseNumberMap": { @@ -717,13 +782,13 @@ "shape": "Integer" } }, - "DenseBooleanMap": { + "DenseSetMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "Boolean" + "shape": "StringSet" } }, "DenseStringMap": { @@ -735,44 +800,61 @@ "shape": "String" } }, - "DenseSetMap": { + "DenseStructMap": { "type": "map", "key": { "shape": "String" }, "value": { - "shape": "StringSet" + "shape": "GreetingStruct" } }, - "StringSet": { - "type": "list", - "member": { - "shape": "String" + "GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "shape": "String" + } } }, - "String": { - "type": "string" - }, - "Boolean": { - "type": "boolean", - "box": true - }, "Integer": { "type": "integer", "box": true }, - "GreetingStruct": { + "RpcV2CborDenseMapsInputOutput": { "type": "structure", "members": { - "hi": { - "shape": "String" + "denseStructMap": { + "shape": "DenseStructMap" + }, + "denseNumberMap": { + "shape": "DenseNumberMap" + }, + "denseBooleanMap": { + "shape": "DenseBooleanMap" + }, + "denseStringMap": { + "shape": "DenseStringMap" + }, + "denseSetMap": { + "shape": "DenseSetMap" } } + }, + "String": { + "type": "string" + }, + "StringSet": { + "type": "list", + "member": { + "shape": "String" + } } }, "cases": [ { "id": "RpcV2CborMaps", + "description": "Deserializes maps", "given": { "name": "RpcV2CborDenseMaps", "http": { @@ -784,7 +866,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "Deserializes maps", "result": { "denseStructMap": { "foo": { @@ -798,14 +879,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ==" } }, { "id": "RpcV2CborDeserializesZeroValuesInMaps", + "description": "Ensure that 0 and false are sent over the wire in all maps and lists", "given": { "name": "RpcV2CborDenseMaps", "http": { @@ -817,7 +899,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "Ensure that 0 and false are sent over the wire in all maps and lists", "result": { "denseNumberMap": { "x": 0 @@ -829,46 +910,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A==" } }, { "id": "RpcV2CborDeserializesDenseSetMap", - "given": { - "name": "RpcV2CborDenseMaps", - "http": { - "method": "POST", - "requestUri": "/" - }, - "output": { - "shape": "RpcV2CborDenseMapsInputOutput" - }, - "documentation": "

The example tests basic map serialization.

" - }, "description": "A response that contains a dense map of sets", - "result": { - "denseSetMap": { - "x": [], - "y": [ - "a", - "b" - ] - } - }, - "response": { - "status_code": 200, - "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" - }, - "body": "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi" - } - }, - { - "id": "RpcV2CborDeserializesDenseSetMapAndSkipsNull", "given": { "name": "RpcV2CborDenseMaps", "http": { @@ -880,7 +930,6 @@ }, "documentation": "

The example tests basic map serialization.

" }, - "description": "Clients SHOULD tolerate seeing a null value in a dense map, and they SHOULD\ndrop the null key-value pair.", "result": { "denseSetMap": { "x": [], @@ -893,10 +942,10 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, - "body": "oWtkZW5zZVNldE1hcKNheIBheYJhYWFiYXr2" + "body": "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi" } } ] @@ -904,66 +953,35 @@ { "description": "Test cases for RpcV2CborLists operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], - "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { - "RpcV2CborListInputOutput": { - "type": "structure", - "members": { - "stringList": { - "shape": "StringList" - }, - "stringSet": { - "shape": "StringSet" - }, - "integerList": { - "shape": "IntegerList" - }, - "booleanList": { - "shape": "BooleanList" - }, - "timestampList": { - "shape": "TimestampList" - }, - "enumList": { - "shape": "FooEnumList" - }, - "intEnumList": { - "shape": "IntegerEnumList" - }, - "nestedStringList": { - "shape": "NestedStringList" - }, - "structureList": { - "shape": "StructureList" - }, - "blobList": { - "shape": "BlobList" - } - } - }, - "StringList": { - "type": "list", - "member": { - "shape": "String" - } + "Blob": { + "type": "blob" }, - "StringSet": { + "BlobList": { "type": "list", "member": { - "shape": "String" + "shape": "Blob" } }, - "IntegerList": { - "type": "list", - "member": { - "shape": "Integer" - } + "Boolean": { + "type": "boolean", + "box": true }, "BooleanList": { "type": "list", @@ -971,11 +989,15 @@ "shape": "Boolean" } }, - "TimestampList": { - "type": "list", - "member": { - "shape": "Timestamp" - } + "FooEnum": { + "type": "string", + "enum": [ + "Foo", + "Baz", + "Bar", + "1", + "0" + ] }, "FooEnumList": { "type": "list", @@ -983,12 +1005,26 @@ "shape": "FooEnum" } }, + "Integer": { + "type": "integer", + "box": true + }, + "IntegerEnum": { + "type": "integer", + "box": true + }, "IntegerEnumList": { "type": "list", "member": { "shape": "IntegerEnum" } }, + "IntegerList": { + "type": "list", + "member": { + "shape": "Integer" + } + }, "NestedStringList": { "type": "list", "member": { @@ -996,20 +1032,61 @@ }, "documentation": "

A list of lists of strings.

" }, - "StructureList": { + "RpcV2CborListInputOutput": { + "type": "structure", + "members": { + "stringList": { + "shape": "StringList" + }, + "stringSet": { + "shape": "StringSet" + }, + "integerList": { + "shape": "IntegerList" + }, + "booleanList": { + "shape": "BooleanList" + }, + "timestampList": { + "shape": "TimestampList" + }, + "enumList": { + "shape": "FooEnumList" + }, + "intEnumList": { + "shape": "IntegerEnumList" + }, + "nestedStringList": { + "shape": "NestedStringList" + }, + "structureList": { + "shape": "StructureList" + }, + "blobList": { + "shape": "BlobList" + } + } + }, + "String": { + "type": "string" + }, + "StringList": { "type": "list", "member": { - "shape": "StructureListMember" + "shape": "String" } }, - "BlobList": { + "StringSet": { "type": "list", "member": { - "shape": "Blob" + "shape": "String" } }, - "Blob": { - "type": "blob" + "StructureList": { + "type": "list", + "member": { + "shape": "StructureListMember" + } }, "StructureListMember": { "type": "structure", @@ -1022,38 +1099,20 @@ } } }, - "String": { - "type": "string" - }, - "IntegerEnum": { - "type": "integer", - "box": true - }, - "FooEnum": { - "type": "string", - "enum": [ - "Foo", - "Baz", - "Bar", - "1", - "0" - ] - }, "Timestamp": { "type": "timestamp" }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true + "TimestampList": { + "type": "list", + "member": { + "shape": "Timestamp" + } } }, "cases": [ { "id": "RpcV2CborLists", + "description": "Serializes RpcV2 Cbor lists", "given": { "name": "RpcV2CborLists", "http": { @@ -1066,7 +1125,6 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal lists.
  2. Normal sets.
  3. Lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Serializes RpcV2 Cbor lists", "result": { "stringList": [ "foo", @@ -1124,14 +1182,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2pzdHJpbmdMaXN0n2Nmb29jYmFy/2lzdHJpbmdTZXSfY2Zvb2NiYXL/a2ludGVnZXJMaXN0nwEC/2tib29sZWFuTGlzdJ/19P9tdGltZXN0YW1wTGlzdJ/B+0HU1/vzgAAAwftB1Nf784AAAP9oZW51bUxpc3SfY0Zvb2Ew/2tpbnRFbnVtTGlzdJ8BAv9wbmVzdGVkU3RyaW5nTGlzdJ+fY2Zvb2NiYXL/n2NiYXpjcXV4//9tc3RydWN0dXJlTGlzdJ+/YWFhMWFiYTL/v2FhYTNhYmE0//9oYmxvYkxpc3SfQ2Zvb0NiYXL//w==" } }, { "id": "RpcV2CborListsEmpty", + "description": "Serializes empty RpcV2 Cbor lists", "given": { "name": "RpcV2CborLists", "http": { @@ -1144,21 +1203,21 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal lists.
  2. Normal sets.
  3. Lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Serializes empty RpcV2 Cbor lists", "result": { "stringList": [] }, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2pzdHJpbmdMaXN0n///" } }, { "id": "RpcV2CborIndefiniteStringInsideIndefiniteListCanDeserialize", + "description": "Can deserialize indefinite length text strings inside an indefinite length list", "given": { "name": "RpcV2CborLists", "http": { @@ -1171,7 +1230,6 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal lists.
  2. Normal sets.
  3. Lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Can deserialize indefinite length text strings inside an indefinite length list", "result": { "stringList": [ "An example indefinite string, which will be chunked, on each comma", @@ -1182,14 +1240,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2pzdHJpbmdMaXN0n394HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcsdyB3aGljaCB3aWxsIGJlIGNodW5rZWQsbiBvbiBlYWNoIGNvbW1h/394NUFub3RoZXIgZXhhbXBsZSBpbmRlZmluaXRlIHN0cmluZyB3aXRoIG9ubHkgb25lIGNodW5r/3ZUaGlzIGlzIGEgcGxhaW4gc3RyaW5n//8=" } }, { "id": "RpcV2CborIndefiniteStringInsideDefiniteListCanDeserialize", + "description": "Can deserialize indefinite length text strings inside a definite length list", "given": { "name": "RpcV2CborLists", "http": { @@ -1202,7 +1261,6 @@ "documentation": "

This test case serializes JSON lists for the following cases for both input and output:

  1. Normal lists.
  2. Normal sets.
  3. Lists of lists.
  4. Lists of structures.
", "idempotent": true }, - "description": "Can deserialize indefinite length text strings inside a definite length list", "result": { "stringList": [ "An example indefinite string, which will be chunked, on each comma", @@ -1213,8 +1271,8 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "oWpzdHJpbmdMaXN0g394HUFuIGV4YW1wbGUgaW5kZWZpbml0ZSBzdHJpbmcsdyB3aGljaCB3aWxsIGJlIGNodW5rZWQsbiBvbiBlYWNoIGNvbW1h/394NUFub3RoZXIgZXhhbXBsZSBpbmRlZmluaXRlIHN0cmluZyB3aXRoIG9ubHkgb25lIGNodW5r/3ZUaGlzIGlzIGEgcGxhaW4gc3RyaW5n" } @@ -1222,16 +1280,328 @@ ] }, { - "description": "Test cases for SimpleScalarProperties operation", + "description": "Test cases for RpcV2CborSparseMaps operation", "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", "protocol": "smithy-rpc-v2-cbor", "protocols": [ "smithy-rpc-v2-cbor" ], + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" + }, + "shapes": { + "Boolean": { + "type": "boolean", + "box": true + }, + "GreetingStruct": { + "type": "structure", + "members": { + "hi": { + "shape": "String" + } + } + }, + "Integer": { + "type": "integer", + "box": true + }, + "RpcV2CborSparseMapsInputOutput": { + "type": "structure", + "members": { + "sparseStructMap": { + "shape": "SparseStructMap" + }, + "sparseNumberMap": { + "shape": "SparseNumberMap" + }, + "sparseBooleanMap": { + "shape": "SparseBooleanMap" + }, + "sparseStringMap": { + "shape": "SparseStringMap" + }, + "sparseSetMap": { + "shape": "SparseSetMap" + } + } + }, + "SparseBooleanMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "Boolean" + }, + "sparse": true + }, + "SparseNumberMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "Integer" + }, + "sparse": true + }, + "SparseSetMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "StringSet" + }, + "sparse": true + }, + "SparseStringMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + }, + "sparse": true + }, + "SparseStructMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "GreetingStruct" + }, + "sparse": true + }, + "String": { + "type": "string" + }, + "StringSet": { + "type": "list", + "member": { + "shape": "String" + } + } + }, + "cases": [ + { + "id": "RpcV2CborSparseJsonMaps", + "description": "Deserializes sparse maps", + "given": { + "name": "RpcV2CborSparseMaps", + "http": { + "method": "POST", + "requestUri": "/" + }, + "output": { + "shape": "RpcV2CborSparseMapsInputOutput" + } + }, + "result": { + "sparseStructMap": { + "foo": { + "hi": "there" + }, + "baz": { + "hi": "bye" + } + } + }, + "response": { + "status_code": 200, + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" + }, + "body": "v29zcGFyc2VTdHJ1Y3RNYXC/Y2Zvb79iaGlldGhlcmX/Y2Jher9iaGljYnll////" + } + }, + { + "id": "RpcV2CborDeserializesNullMapValues", + "description": "Deserializes null map values", + "given": { + "name": "RpcV2CborSparseMaps", + "http": { + "method": "POST", + "requestUri": "/" + }, + "output": { + "shape": "RpcV2CborSparseMapsInputOutput" + } + }, + "result": { + "sparseBooleanMap": { + "x": null + }, + "sparseNumberMap": { + "x": null + }, + "sparseStringMap": { + "x": null + }, + "sparseStructMap": { + "x": null + } + }, + "response": { + "status_code": 200, + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" + }, + "body": "v3BzcGFyc2VCb29sZWFuTWFwv2F49v9vc3BhcnNlTnVtYmVyTWFwv2F49v9vc3BhcnNlU3RyaW5nTWFwv2F49v9vc3BhcnNlU3RydWN0TWFwv2F49v//" + } + }, + { + "id": "RpcV2CborDeserializesSparseSetMap", + "description": "A response that contains a sparse map of sets", + "given": { + "name": "RpcV2CborSparseMaps", + "http": { + "method": "POST", + "requestUri": "/" + }, + "output": { + "shape": "RpcV2CborSparseMapsInputOutput" + } + }, + "result": { + "sparseSetMap": { + "x": [], + "y": [ + "a", + "b" + ] + } + }, + "response": { + "status_code": 200, + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" + }, + "body": "v2xzcGFyc2VTZXRNYXC/YXmfYWFhYv9heJ////8=" + } + }, + { + "id": "RpcV2CborDeserializesSparseSetMapAndRetainsNull", + "description": "A response that contains a sparse map of sets with a null", + "given": { + "name": "RpcV2CborSparseMaps", + "http": { + "method": "POST", + "requestUri": "/" + }, + "output": { + "shape": "RpcV2CborSparseMapsInputOutput" + } + }, + "result": { + "sparseSetMap": { + "x": [], + "y": [ + "a", + "b" + ], + "z": null + } + }, + "response": { + "status_code": 200, + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" + }, + "body": "v2xzcGFyc2VTZXRNYXC/YXif/2F5n2FhYWL/YXr2//8=" + } + }, + { + "id": "RpcV2CborDeserializesZeroValuesInSparseMaps", + "description": "Ensure that 0 and false are sent over the wire in all maps and lists", + "given": { + "name": "RpcV2CborSparseMaps", + "http": { + "method": "POST", + "requestUri": "/" + }, + "output": { + "shape": "RpcV2CborSparseMapsInputOutput" + } + }, + "result": { + "sparseNumberMap": { + "x": 0 + }, + "sparseBooleanMap": { + "x": false + } + }, + "response": { + "status_code": 200, + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" + }, + "body": "v29zcGFyc2VOdW1iZXJNYXC/YXgA/3BzcGFyc2VCb29sZWFuTWFwv2F49P//" + } + } + ] + }, + { + "description": "Test cases for SimpleScalarProperties operation", + "metadata": { "apiVersion": "2020-07-14", - "targetPrefix": "RpcV2Protocol" + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", + "protocol": "smithy-rpc-v2-cbor", + "protocols": [ + "smithy-rpc-v2-cbor" + ], + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" }, "shapes": { + "Blob": { + "type": "blob" + }, + "Boolean": { + "type": "boolean", + "box": true + }, + "Double": { + "type": "double", + "box": true + }, + "Float": { + "type": "float", + "box": true + }, + "Integer": { + "type": "integer", + "box": true + }, + "Long": { + "type": "long", + "box": true + }, "SimpleScalarStructure": { "type": "structure", "members": { @@ -1267,36 +1637,14 @@ } } }, - "Boolean": { - "type": "boolean", - "box": true - }, - "Integer": { - "type": "integer", - "box": true - }, - "Double": { - "type": "double", - "box": true - }, - "Float": { - "type": "float", - "box": true - }, - "Long": { - "type": "long", - "box": true - }, "String": { "type": "string" - }, - "Blob": { - "type": "blob" } }, "cases": [ { "id": "RpcV2CborSimpleScalarProperties", + "description": "Serializes simple scalar properties", "given": { "name": "SimpleScalarProperties", "http": { @@ -1307,7 +1655,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "Serializes simple scalar properties", "result": { "trueBooleanValue": true, "falseBooleanValue": false, @@ -1322,14 +1669,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v3B0cnVlQm9vbGVhblZhbHVl9XFmYWxzZUJvb2xlYW5WYWx1ZfRpYnl0ZVZhbHVlBWtkb3VibGVWYWx1Zfs//jlYEGJN02pmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAanNob3J0VmFsdWUZJqprc3RyaW5nVmFsdWVmc2ltcGxlaWJsb2JWYWx1ZUNmb2//" } }, { "id": "RpcV2CborSimpleScalarPropertiesUsingDefiniteLength", + "description": "Deserializes simple scalar properties encoded using a map with definite length", "given": { "name": "SimpleScalarProperties", "http": { @@ -1340,7 +1688,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "Deserializes simple scalar properties encoded using a map with definite length", "result": { "trueBooleanValue": true, "falseBooleanValue": false, @@ -1355,14 +1702,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "qXB0cnVlQm9vbGVhblZhbHVl9XFmYWxzZUJvb2xlYW5WYWx1ZfRpYnl0ZVZhbHVlBWtkb3VibGVWYWx1Zfs//jlYEGJN02pmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAanNob3J0VmFsdWUZJqprc3RyaW5nVmFsdWVmc2ltcGxlaWJsb2JWYWx1ZUNmb28=" } }, { "id": "RpcV2CborClientDoesntDeserializeNullStructureValues", + "description": "RpcV2 Cbor should not deserialize null structure values", "given": { "name": "SimpleScalarProperties", "http": { @@ -1373,19 +1721,19 @@ "shape": "SimpleScalarStructure" } }, - "description": "RpcV2 Cbor should not deserialize null structure values", "result": {}, "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2tzdHJpbmdWYWx1Zfb/" } }, { "id": "RpcV2CborSupportsNaNFloatOutputs", + "description": "Supports handling NaN float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -1396,7 +1744,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "Supports handling NaN float values.", "result": { "doubleValue": "NaN", "floatValue": "NaN" @@ -1404,14 +1751,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2tkb3VibGVWYWx1Zft/+AAAAAAAAGpmbG9hdFZhbHVl+n/AAAD/" } }, { "id": "RpcV2CborSupportsInfinityFloatOutputs", + "description": "Supports handling Infinity float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -1422,7 +1770,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "Supports handling Infinity float values.", "result": { "doubleValue": "Infinity", "floatValue": "Infinity" @@ -1430,14 +1777,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2tkb3VibGVWYWx1Zft/8AAAAAAAAGpmbG9hdFZhbHVl+n+AAAD/" } }, { "id": "RpcV2CborSupportsNegativeInfinityFloatOutputs", + "description": "Supports handling Negative Infinity float values.", "given": { "name": "SimpleScalarProperties", "http": { @@ -1448,7 +1796,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "Supports handling Negative Infinity float values.", "result": { "doubleValue": "-Infinity", "floatValue": "-Infinity" @@ -1456,14 +1803,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2tkb3VibGVWYWx1Zfv/8AAAAAAAAGpmbG9hdFZhbHVl+v+AAAD/" } }, { "id": "RpcV2CborSupportsUpcastingDataOnDeserialize", + "description": "Supports upcasting from a smaller byte representation of the same data type.", "given": { "name": "SimpleScalarProperties", "http": { @@ -1474,7 +1822,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "Supports upcasting from a smaller byte representation of the same data type.", "result": { "doubleValue": 1.5, "floatValue": 7.625, @@ -1485,14 +1832,15 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2tkb3VibGVWYWx1Zfk+AGpmbG9hdFZhbHVl+UegbGludGVnZXJWYWx1ZRg4aWxvbmdWYWx1ZRkBAGpzaG9ydFZhbHVlCv8=" } }, { "id": "RpcV2CborExtraFieldsInTheBodyShouldBeSkippedByClients", + "description": "The client should skip over additional fields that are not part of the structure. This allows a\nclient generated against an older Smithy model to be able to communicate with a server that is\ngenerated against a newer Smithy model.", "given": { "name": "SimpleScalarProperties", "http": { @@ -1503,7 +1851,6 @@ "shape": "SimpleScalarStructure" } }, - "description": "The client should skip over additional fields that are not part of the structure. This allows a\nclient generated against an older Smithy model to be able to communicate with a server that is\ngenerated against a newer Smithy model.", "result": { "byteValue": 5, "doubleValue": 1.889, @@ -1519,12 +1866,121 @@ "response": { "status_code": 200, "headers": { - "Content-Type": "application/cbor", - "smithy-protocol": "rpc-v2-cbor" + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" }, "body": "v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kD0AABrZXh0cmFPYmplY3S/c2luZGVmaW5pdGVMZW5ndGhNYXC/a3dpdGhBbkFycmF5nwECA///cWRlZmluaXRlTGVuZ3RoTWFwo3J3aXRoQURlZmluaXRlQXJyYXmDAQIDeB1hbmRTb21lSW5kZWZpbml0ZUxlbmd0aFN0cmluZ3gfdGhhdCBoYXMsIGJlZW4gY2h1bmtlZCBvbiBjb21tYWxub3JtYWxTdHJpbmdjZm9vanNob3J0VmFsdWUZJw9uc29tZU90aGVyRmllbGR2dGhpcyBzaG91bGQgYmUgc2tpcHBlZP9saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==" } } ] + }, + { + "description": "Test cases for SparseNullsOperation operation", + "metadata": { + "apiVersion": "2020-07-14", + "auth": [ + "aws.auth#sigv4" + ], + "endpointPrefix": "rpcv2protocol", + "protocol": "smithy-rpc-v2-cbor", + "protocols": [ + "smithy-rpc-v2-cbor" + ], + "serviceFullName": "RpcV2Protocol", + "serviceId": "RpcV2Protocol", + "signatureVersion": "v4", + "signingName": "RpcV2Protocol", + "targetPrefix": "RpcV2Protocol", + "uid": "rpcv2protocol-2020-07-14" + }, + "shapes": { + "SparseNullsOperationInputOutput": { + "type": "structure", + "members": { + "sparseStringList": { + "shape": "SparseStringList" + }, + "sparseStringMap": { + "shape": "SparseStringMap" + } + } + }, + "SparseStringList": { + "type": "list", + "member": { + "shape": "String" + }, + "sparse": true + }, + "SparseStringMap": { + "type": "map", + "key": { + "shape": "String" + }, + "value": { + "shape": "String" + }, + "sparse": true + }, + "String": { + "type": "string" + } + }, + "cases": [ + { + "id": "RpcV2CborSparseMapsDeserializeNullValues", + "description": "Deserializes null values in maps", + "given": { + "name": "SparseNullsOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "output": { + "shape": "SparseNullsOperationInputOutput" + } + }, + "result": { + "sparseStringMap": { + "foo": null + } + }, + "response": { + "status_code": 200, + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" + }, + "body": "v29zcGFyc2VTdHJpbmdNYXC/Y2Zvb/b//w==" + } + }, + { + "id": "RpcV2CborSparseListsDeserializeNull", + "description": "Deserializes null values in lists", + "given": { + "name": "SparseNullsOperation", + "http": { + "method": "POST", + "requestUri": "/" + }, + "output": { + "shape": "SparseNullsOperationInputOutput" + } + }, + "result": { + "sparseStringList": [ + null + ] + }, + "response": { + "status_code": 200, + "headers": { + "smithy-protocol": "rpc-v2-cbor", + "Content-Type": "application/cbor" + }, + "body": "v3BzcGFyc2VTdHJpbmdMaXN0n/b//w==" + } + } + ] } ] diff --git a/tools/scripts/run_code_generation.py b/tools/scripts/run_code_generation.py index 82a5a5acecee..787c66a94ae5 100644 --- a/tools/scripts/run_code_generation.py +++ b/tools/scripts/run_code_generation.py @@ -161,7 +161,10 @@ def main(): return -1 if args["generate_protocol_tests"]: - protocol_tests_generator = ProtocolTestsGen(args) + # Disable smithy generation for protocol tests + protocol_args = args.copy() + protocol_args["disable_smithy_generation"] = True + protocol_tests_generator = ProtocolTestsGen(protocol_args) if protocol_tests_generator.generate(executor, max_workers) != 0: print("ERROR: Failed to generate protocol test(s)!") return -1