From bf799b4286cad09878775f7b6913860792e91af7 Mon Sep 17 00:00:00 2001 From: aws-sdk-cpp-automation Date: Wed, 17 Dec 2025 19:53:27 +0000 Subject: [PATCH 1/6] Update API model --- .../test-new-service-sdk-testing.json | 852 ++++++++++++++++++ 1 file changed, 852 insertions(+) create mode 100644 tools/code-generation/smithy/api-descriptions/test-new-service-sdk-testing.json diff --git a/tools/code-generation/smithy/api-descriptions/test-new-service-sdk-testing.json b/tools/code-generation/smithy/api-descriptions/test-new-service-sdk-testing.json new file mode 100644 index 000000000000..48ed40eb56e5 --- /dev/null +++ b/tools/code-generation/smithy/api-descriptions/test-new-service-sdk-testing.json @@ -0,0 +1,852 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.testnewservicesdktesting#FooIdString": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[A-Za-z0-9 ]+$" + } + }, + "com.amazonaws.testnewservicesdktesting#FooList": { + "type": "list", + "member": { + "target": "com.amazonaws.testnewservicesdktesting#FooSummary" + } + }, + "com.amazonaws.testnewservicesdktesting#FooSummary": { + "type": "structure", + "members": { + "fooId": { + "target": "com.amazonaws.testnewservicesdktesting#FooIdString", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String" + }, + "count": { + "target": "smithy.api#Integer" + } + }, + "traits": { + "smithy.api#references": [] + } + }, + "com.amazonaws.testnewservicesdktesting#GetFoo": { + "type": "operation", + "input": { + "target": "com.amazonaws.testnewservicesdktesting#GetFooInput" + }, + "output": { + "target": "com.amazonaws.testnewservicesdktesting#GetFooOutput" + }, + "errors": [ + { + "target": "com.amazonaws.testnewservicesdktesting#NoSuchResource" + } + ], + "traits": { + "smithy.api#readonly": {} + } + }, + "com.amazonaws.testnewservicesdktesting#GetFooInput": { + "type": "structure", + "members": { + "fooId": { + "target": "com.amazonaws.testnewservicesdktesting#FooIdString", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.testnewservicesdktesting#GetFooOutput": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#notProperty": {}, + "smithy.api#required": {} + } + }, + "count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#notProperty": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.testnewservicesdktesting#GetFoos": { + "type": "operation", + "input": { + "target": "com.amazonaws.testnewservicesdktesting#GetFoosInput" + }, + "output": { + "target": "com.amazonaws.testnewservicesdktesting#GetFoosOutput" + }, + "traits": { + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "foos" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.testnewservicesdktesting#GetFoosInput": { + "type": "structure", + "members": { + "nextToken": { + "target": "smithy.api#String" + }, + "maxResults": { + "target": "smithy.api#Integer" + }, + "debug": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.testnewservicesdktesting#GetFoosOutput": { + "type": "structure", + "members": { + "foos": { + "target": "com.amazonaws.testnewservicesdktesting#FooList" + }, + "nextToken": { + "target": "smithy.api#String" + }, + "filter": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.testnewservicesdktesting#LeaveEvent": { + "type": "structure", + "members": {} + }, + "com.amazonaws.testnewservicesdktesting#Message": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + } + }, + "com.amazonaws.testnewservicesdktesting#NoSuchResource": { + "type": "structure", + "members": { + "resourceType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#error": "client" + } + }, + "com.amazonaws.testnewservicesdktesting#PublishEvents": { + "type": "union", + "members": { + "message": { + "target": "com.amazonaws.testnewservicesdktesting#Message" + }, + "leave": { + "target": "com.amazonaws.testnewservicesdktesting#LeaveEvent" + } + }, + "traits": { + "smithy.api#streaming": {} + } + }, + "com.amazonaws.testnewservicesdktesting#PublishFoos": { + "type": "operation", + "input": { + "target": "com.amazonaws.testnewservicesdktesting#PublishFoosInput" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#readonly": {} + } + }, + "com.amazonaws.testnewservicesdktesting#PublishFoosInput": { + "type": "structure", + "members": { + "room": { + "target": "smithy.api#String" + }, + "messages": { + "target": "com.amazonaws.testnewservicesdktesting#PublishEvents" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.testnewservicesdktesting#TestNewServiceSDKTesting": { + "type": "service", + "version": "2024-03-20", + "operations": [ + { + "target": "com.amazonaws.testnewservicesdktesting#GetFoo" + }, + { + "target": "com.amazonaws.testnewservicesdktesting#GetFoos" + }, + { + "target": "com.amazonaws.testnewservicesdktesting#PublishFoos" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Test New Service SDK Testing" + }, + "aws.auth#sigv4": { + "name": "testnewservicesdktesting" + }, + "aws.protocols#awsJson1_0": {}, + "smithy.api#title": "Test New Service SDK Testing", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "string" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "string" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://testnewservicesdktesting-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://testnewservicesdktesting-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://testnewservicesdktesting.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://testnewservicesdktesting.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + } + } +} \ No newline at end of file From 0ce806faeb9391b85f8d099a4974a655c74b3f3a Mon Sep 17 00:00:00 2001 From: aws-sdk-cpp-automation Date: Wed, 17 Dec 2025 20:17:08 +0000 Subject: [PATCH 2/6] null # Conflicts: # VERSION # src/aws-cpp-sdk-core/include/aws/core/VersionConfig.h # tools/code-generation/smithy/codegen/cpp-smoke-tests/smithy-build.json --- .../CMakeLists.txt | 76 ++++ .../TestNewServiceSDKTestingClient.h | 146 +++++++ ...TestNewServiceSDKTestingEndpointProvider.h | 56 +++ .../TestNewServiceSDKTestingEndpointRules.h | 21 + .../TestNewServiceSDKTestingErrorMarshaller.h | 20 + .../TestNewServiceSDKTestingErrors.h | 71 +++ .../TestNewServiceSDKTestingRequest.h | 42 ++ ...stNewServiceSDKTestingServiceClientModel.h | 98 +++++ .../TestNewServiceSDKTesting_EXPORTS.h | 32 ++ .../model/FooSummary.h | 87 ++++ .../model/GetFooRequest.h | 55 +++ .../model/GetFooResult.h | 84 ++++ .../model/GetFoosRequest.h | 91 ++++ .../model/GetFoosResult.h | 112 +++++ .../model/LeaveEvent.h | 29 ++ .../model/Message.h | 51 +++ .../model/NoSuchResource.h | 51 +++ .../model/PublishEvents.h | 41 ++ .../model/PublishFoosRequest.h | 77 ++++ .../source/TestNewServiceSDKTestingClient.cpp | 251 +++++++++++ ...stNewServiceSDKTestingEndpointProvider.cpp | 12 + .../TestNewServiceSDKTestingEndpointRules.cpp | 161 +++++++ ...estNewServiceSDKTestingErrorMarshaller.cpp | 20 + .../source/TestNewServiceSDKTestingErrors.cpp | 39 ++ .../TestNewServiceSDKTestingRequest.cpp | 10 + .../source/model/FooSummary.cpp | 56 +++ .../source/model/GetFooRequest.cpp | 29 ++ .../source/model/GetFooResult.cpp | 41 ++ .../source/model/GetFoosRequest.cpp | 37 ++ .../source/model/GetFoosResult.cpp | 48 +++ .../source/model/LeaveEvent.cpp | 33 ++ .../source/model/Message.cpp | 40 ++ .../source/model/NoSuchResource.cpp | 40 ++ .../source/model/PublishFoosRequest.cpp | 23 + .../CMakeLists.txt | 42 ++ .../RunTests.cpp | 29 ++ ...ServiceSDKTestingEndpointProviderTests.cpp | 404 ++++++++++++++++++ .../TestNewServiceSDKTestingIncludeTests.cpp | 38 ++ ...service-sdk-testing-2024-03-20.normal.json | 141 ++++++ ...-testing-2024-03-20.endpoint-rule-set.json | 350 +++++++++++++++ ...sdk-testing-2024-03-20.endpoint-tests.json | 270 ++++++++++++ 41 files changed, 3354 insertions(+) create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/CMakeLists.txt create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingClient.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingEndpointProvider.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingEndpointRules.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingErrorMarshaller.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingErrors.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingRequest.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingServiceClientModel.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTesting_EXPORTS.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/FooSummary.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFooRequest.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFooResult.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFoosRequest.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFoosResult.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/LeaveEvent.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/Message.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/NoSuchResource.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishEvents.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishFoosRequest.h create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingClient.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingEndpointProvider.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingEndpointRules.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingErrorMarshaller.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingErrors.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingRequest.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/FooSummary.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFooRequest.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFooResult.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFoosRequest.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFoosResult.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/LeaveEvent.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/Message.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/NoSuchResource.cpp create mode 100644 generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/PublishFoosRequest.cpp create mode 100644 generated/tests/test-new-service-sdk-testing-gen-tests/CMakeLists.txt create mode 100644 generated/tests/test-new-service-sdk-testing-gen-tests/RunTests.cpp create mode 100644 generated/tests/test-new-service-sdk-testing-gen-tests/TestNewServiceSDKTestingEndpointProviderTests.cpp create mode 100644 generated/tests/test-new-service-sdk-testing-gen-tests/TestNewServiceSDKTestingIncludeTests.cpp create mode 100644 tools/code-generation/api-descriptions/test-new-service-sdk-testing-2024-03-20.normal.json create mode 100644 tools/code-generation/endpoints/test-new-service-sdk-testing-2024-03-20.endpoint-rule-set.json create mode 100644 tools/code-generation/endpoints/test-new-service-sdk-testing-2024-03-20.endpoint-tests.json diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/CMakeLists.txt b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/CMakeLists.txt new file mode 100644 index 000000000000..2337231d6b61 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/CMakeLists.txt @@ -0,0 +1,76 @@ +add_project(aws-cpp-sdk-test-new-service-sdk-testing "C++ SDK for the AWS test-new-service-sdk-testing service" aws-cpp-sdk-core) + +file(GLOB AWS_TEST-NEW-SERVICE-SDK-TESTING_HEADERS + "include/aws/test-new-service-sdk-testing/*.h" +) + +file(GLOB AWS_TEST-NEW-SERVICE-SDK-TESTING_MODEL_HEADERS + "include/aws/test-new-service-sdk-testing/model/*.h" +) + +file(GLOB AWS_TEST-NEW-SERVICE-SDK-TESTING_SOURCE + "source/*.cpp" +) + +file(GLOB AWS_TEST-NEW-SERVICE-SDK-TESTING_MODEL_SOURCE + "source/model/*.cpp" +) + +file(GLOB TEST-NEW-SERVICE-SDK-TESTING_UNIFIED_HEADERS + ${AWS_TEST-NEW-SERVICE-SDK-TESTING_HEADERS} + ${AWS_TEST-NEW-SERVICE-SDK-TESTING_MODEL_HEADERS} +) + +file(GLOB TEST-NEW-SERVICE-SDK-TESTING_UNITY_SRC + ${AWS_TEST-NEW-SERVICE-SDK-TESTING_SOURCE} + ${AWS_TEST-NEW-SERVICE-SDK-TESTING_MODEL_SOURCE} +) + +if(ENABLE_UNITY_BUILD) + enable_unity_build("TEST-NEW-SERVICE-SDK-TESTING" TEST-NEW-SERVICE-SDK-TESTING_UNITY_SRC) +endif() + +file(GLOB TEST-NEW-SERVICE-SDK-TESTING_SRC + ${TEST-NEW-SERVICE-SDK-TESTING_UNIFIED_HEADERS} + ${TEST-NEW-SERVICE-SDK-TESTING_UNITY_SRC} +) + +if(WIN32) + #if we are compiling for visual studio, create a sane directory tree. + if(MSVC) + source_group("Header Files\\aws\\test-new-service-sdk-testing" FILES ${AWS_TEST-NEW-SERVICE-SDK-TESTING_HEADERS}) + source_group("Header Files\\aws\\test-new-service-sdk-testing\\model" FILES ${AWS_TEST-NEW-SERVICE-SDK-TESTING_MODEL_HEADERS}) + source_group("Source Files" FILES ${AWS_TEST-NEW-SERVICE-SDK-TESTING_SOURCE}) + source_group("Source Files\\model" FILES ${AWS_TEST-NEW-SERVICE-SDK-TESTING_MODEL_SOURCE}) + endif(MSVC) +endif() + +set(TEST-NEW-SERVICE-SDK-TESTING_INCLUDES + "${CMAKE_CURRENT_SOURCE_DIR}/include/" +) + +add_library(${PROJECT_NAME} ${TEST-NEW-SERVICE-SDK-TESTING_SRC}) +add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) + +set_compiler_flags(${PROJECT_NAME}) +set_compiler_warnings(${PROJECT_NAME}) + +if(USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS) + target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_TESTNEWSERVICESDKTESTING_EXPORTS") +endif() + +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $) + +target_link_libraries(${PROJECT_NAME} PRIVATE ${PLATFORM_DEP_LIBS} ${PROJECT_LIBS}) + + +setup_install() + +install (FILES ${AWS_TEST-NEW-SERVICE-SDK-TESTING_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/test-new-service-sdk-testing) +install (FILES ${AWS_TEST-NEW-SERVICE-SDK-TESTING_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/test-new-service-sdk-testing/model) + +do_packaging() + + diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingClient.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingClient.h new file mode 100644 index 000000000000..a3b74a4d1905 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingClient.h @@ -0,0 +1,146 @@ +/** + * 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 TestNewServiceSDKTesting { +class AWS_TESTNEWSERVICESDKTESTING_API TestNewServiceSDKTestingClient + : public Aws::Client::AWSJsonClient, + public Aws::Client::ClientWithAsyncTemplateMethods { + public: + typedef Aws::Client::AWSJsonClient BASECLASS; + static const char* GetServiceName(); + static const char* GetAllocationTag(); + + typedef TestNewServiceSDKTestingClientConfiguration ClientConfigurationType; + typedef TestNewServiceSDKTestingEndpointProvider EndpointProviderType; + + /** + * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client + * config is not specified, it will be initialized to default values. + */ + TestNewServiceSDKTestingClient(const Aws::TestNewServiceSDKTesting::TestNewServiceSDKTestingClientConfiguration& clientConfiguration = + Aws::TestNewServiceSDKTesting::TestNewServiceSDKTestingClientConfiguration(), + std::shared_ptr endpointProvider = nullptr); + + /** + * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config + * is not specified, it will be initialized to default values. + */ + TestNewServiceSDKTestingClient(const Aws::Auth::AWSCredentials& credentials, + std::shared_ptr endpointProvider = nullptr, + const Aws::TestNewServiceSDKTesting::TestNewServiceSDKTestingClientConfiguration& clientConfiguration = + Aws::TestNewServiceSDKTesting::TestNewServiceSDKTestingClientConfiguration()); + + /** + * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, + * the default http client factory will be used + */ + TestNewServiceSDKTestingClient(const std::shared_ptr& credentialsProvider, + std::shared_ptr endpointProvider = nullptr, + const Aws::TestNewServiceSDKTesting::TestNewServiceSDKTestingClientConfiguration& clientConfiguration = + Aws::TestNewServiceSDKTesting::TestNewServiceSDKTestingClientConfiguration()); + + /* Legacy constructors due deprecation */ + /** + * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client + * config is not specified, it will be initialized to default values. + */ + TestNewServiceSDKTestingClient(const Aws::Client::ClientConfiguration& clientConfiguration); + + /** + * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config + * is not specified, it will be initialized to default values. + */ + TestNewServiceSDKTestingClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration); + + /** + * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, + * the default http client factory will be used + */ + TestNewServiceSDKTestingClient(const std::shared_ptr& credentialsProvider, + const Aws::Client::ClientConfiguration& clientConfiguration); + + /* End of legacy constructors due deprecation */ + virtual ~TestNewServiceSDKTestingClient(); + + /** + * + */ + virtual Model::GetFooOutcome GetFoo(const Model::GetFooRequest& request) const; + + /** + * A Callable wrapper for GetFoo that returns a future to the operation so that it can be executed in parallel to other requests. + */ + template + Model::GetFooOutcomeCallable GetFooCallable(const GetFooRequestT& request) const { + return SubmitCallable(&TestNewServiceSDKTestingClient::GetFoo, request); + } + + /** + * An Async wrapper for GetFoo that queues the request into a thread executor and triggers associated callback when operation has + * finished. + */ + template + void GetFooAsync(const GetFooRequestT& request, const GetFooResponseReceivedHandler& handler, + const std::shared_ptr& context = nullptr) const { + return SubmitAsync(&TestNewServiceSDKTestingClient::GetFoo, request, handler, context); + } + + /** + * + */ + virtual Model::GetFoosOutcome GetFoos(const Model::GetFoosRequest& request = {}) const; + + /** + * A Callable wrapper for GetFoos that returns a future to the operation so that it can be executed in parallel to other requests. + */ + template + Model::GetFoosOutcomeCallable GetFoosCallable(const GetFoosRequestT& request = {}) const { + return SubmitCallable(&TestNewServiceSDKTestingClient::GetFoos, request); + } + + /** + * An Async wrapper for GetFoos that queues the request into a thread executor and triggers associated callback when operation has + * finished. + */ + template + void GetFoosAsync(const GetFoosResponseReceivedHandler& handler, + const std::shared_ptr& context = nullptr, + const GetFoosRequestT& request = {}) const { + return SubmitAsync(&TestNewServiceSDKTestingClient::GetFoos, request, handler, context); + } + + /** + * + * + * Queues the request into a thread executor. + * The streamReadyHandler is triggered when the stream is ready to be written to. + * The handler is triggered when the request is finished. + */ + virtual void PublishFoosAsync(Model::PublishFoosRequest& request, const PublishFoosStreamReadyHandler& streamReadyHandler, + const PublishFoosResponseReceivedHandler& handler, + const std::shared_ptr& handlerContext = nullptr) const; + + void OverrideEndpoint(const Aws::String& endpoint); + std::shared_ptr& accessEndpointProvider(); + + private: + friend class Aws::Client::ClientWithAsyncTemplateMethods; + void init(const TestNewServiceSDKTestingClientConfiguration& clientConfiguration); + + TestNewServiceSDKTestingClientConfiguration m_clientConfiguration; + std::shared_ptr m_endpointProvider; +}; + +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingEndpointProvider.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingEndpointProvider.h new file mode 100644 index 000000000000..100a34d8b7f6 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingEndpointProvider.h @@ -0,0 +1,56 @@ +/** + * 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 TestNewServiceSDKTesting { +namespace Endpoint { +using EndpointParameters = Aws::Endpoint::EndpointParameters; +using Aws::Endpoint::DefaultEndpointProvider; +using Aws::Endpoint::EndpointProviderBase; + +using TestNewServiceSDKTestingClientContextParameters = Aws::Endpoint::ClientContextParameters; + +using TestNewServiceSDKTestingClientConfiguration = Aws::Client::GenericClientConfiguration; +using TestNewServiceSDKTestingBuiltInParameters = Aws::Endpoint::BuiltInParameters; + +/** + * The type for the TestNewServiceSDKTesting Client Endpoint Provider. + * Inherit from this Base class / "Interface" should you want to provide a custom endpoint provider. + * The SDK must use service-specific type for each service per specification. + */ +using TestNewServiceSDKTestingEndpointProviderBase = + EndpointProviderBase; + +using TestNewServiceSDKTestingDefaultEpProviderBase = + DefaultEndpointProvider; + +/** + * Default endpoint provider used for this service + */ +class AWS_TESTNEWSERVICESDKTESTING_API TestNewServiceSDKTestingEndpointProvider : public TestNewServiceSDKTestingDefaultEpProviderBase { + public: + using TestNewServiceSDKTestingResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; + + TestNewServiceSDKTestingEndpointProvider() + : TestNewServiceSDKTestingDefaultEpProviderBase(Aws::TestNewServiceSDKTesting::TestNewServiceSDKTestingEndpointRules::GetRulesBlob(), + Aws::TestNewServiceSDKTesting::TestNewServiceSDKTestingEndpointRules::RulesBlobSize) { + } + + ~TestNewServiceSDKTestingEndpointProvider() {} +}; +} // namespace Endpoint +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingEndpointRules.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingEndpointRules.h new file mode 100644 index 000000000000..59263536d9af --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingEndpointRules.h @@ -0,0 +1,21 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include + +#include + +namespace Aws { +namespace TestNewServiceSDKTesting { +class TestNewServiceSDKTestingEndpointRules { + public: + static const size_t RulesBlobStrLen; + static const size_t RulesBlobSize; + + static const char* GetRulesBlob(); +}; +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingErrorMarshaller.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingErrorMarshaller.h new file mode 100644 index 000000000000..496af710fbf5 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingErrorMarshaller.h @@ -0,0 +1,20 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once + +#include +#include + +namespace Aws { +namespace Client { + +class AWS_TESTNEWSERVICESDKTESTING_API TestNewServiceSDKTestingErrorMarshaller : public Aws::Client::JsonErrorMarshaller { + public: + Aws::Client::AWSError FindErrorByName(const char* exceptionName) const override; +}; + +} // namespace Client +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingErrors.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingErrors.h new file mode 100644 index 000000000000..8f5441ce4b0b --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingErrors.h @@ -0,0 +1,71 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once + +#include +#include +#include + +namespace Aws { +namespace TestNewServiceSDKTesting { +enum class TestNewServiceSDKTestingErrors { + // From Core// + ////////////////////////////////////////////////////////////////////////////////////////// + INCOMPLETE_SIGNATURE = 0, + INTERNAL_FAILURE = 1, + INVALID_ACTION = 2, + INVALID_CLIENT_TOKEN_ID = 3, + INVALID_PARAMETER_COMBINATION = 4, + INVALID_QUERY_PARAMETER = 5, + INVALID_PARAMETER_VALUE = 6, + MISSING_ACTION = 7, // SDK should never allow + MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow + MISSING_PARAMETER = 9, // SDK should never allow + OPT_IN_REQUIRED = 10, + REQUEST_EXPIRED = 11, + SERVICE_UNAVAILABLE = 12, + THROTTLING = 13, + VALIDATION = 14, + ACCESS_DENIED = 15, + RESOURCE_NOT_FOUND = 16, + UNRECOGNIZED_CLIENT = 17, + MALFORMED_QUERY_STRING = 18, + SLOW_DOWN = 19, + REQUEST_TIME_TOO_SKEWED = 20, + INVALID_SIGNATURE = 21, + SIGNATURE_DOES_NOT_MATCH = 22, + INVALID_ACCESS_KEY_ID = 23, + REQUEST_TIMEOUT = 24, + NETWORK_CONNECTION = 99, + + UNKNOWN = 100, + /////////////////////////////////////////////////////////////////////////////////////////// + + NO_SUCH_RESOURCE = static_cast(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1 +}; + +class AWS_TESTNEWSERVICESDKTESTING_API TestNewServiceSDKTestingError : public Aws::Client::AWSError { + public: + TestNewServiceSDKTestingError() {} + TestNewServiceSDKTestingError(const Aws::Client::AWSError& rhs) + : Aws::Client::AWSError(rhs) {} + TestNewServiceSDKTestingError(Aws::Client::AWSError&& rhs) + : Aws::Client::AWSError(rhs) {} + TestNewServiceSDKTestingError(const Aws::Client::AWSError& rhs) + : Aws::Client::AWSError(rhs) {} + TestNewServiceSDKTestingError(Aws::Client::AWSError&& rhs) + : Aws::Client::AWSError(rhs) {} + + template + T GetModeledError(); +}; + +namespace TestNewServiceSDKTestingErrorMapper { +AWS_TESTNEWSERVICESDKTESTING_API Aws::Client::AWSError GetErrorForName(const char* errorName); +} + +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingRequest.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingRequest.h new file mode 100644 index 000000000000..d8b8141883d9 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingRequest.h @@ -0,0 +1,42 @@ +/** + * 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 TestNewServiceSDKTesting { +class AWS_TESTNEWSERVICESDKTESTING_API TestNewServiceSDKTestingRequest : public Aws::AmazonSerializableWebServiceRequest { + public: + using EndpointParameter = Aws::Endpoint::EndpointParameter; + using EndpointParameters = Aws::Endpoint::EndpointParameters; + + virtual ~TestNewServiceSDKTestingRequest() {} + + void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); } + + inline Aws::Http::HeaderValueCollection GetHeaders() const override { + auto headers = GetRequestSpecificHeaders(); + + if (headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0)) { + headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_0)); + } + headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2024-03-20")); + return headers; + } + + protected: + virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); } +}; + +typedef Aws::AmazonStreamingWebServiceRequest StreamingTestNewServiceSDKTestingRequest; + +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingServiceClientModel.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingServiceClientModel.h new file mode 100644 index 000000000000..781e0a734aa3 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTestingServiceClientModel.h @@ -0,0 +1,98 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once + +/* Generic header includes */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +/* End of generic header includes */ + +/* Service model headers required in TestNewServiceSDKTestingClient header */ +#include +#include +#include +#include +#include +/* End of service model headers required in TestNewServiceSDKTestingClient header */ + +namespace Aws { +namespace Http { +class HttpClient; +class HttpClientFactory; +} // namespace Http + +namespace Utils { +template +class Outcome; + +namespace Event { +class EventEncoderStream; +} // namespace Event + +namespace Threading { +class Executor; +} // namespace Threading +} // namespace Utils + +namespace Auth { +class AWSCredentials; +class AWSCredentialsProvider; +} // namespace Auth + +namespace Client { +class RetryStrategy; +} // namespace Client + +namespace TestNewServiceSDKTesting { +using TestNewServiceSDKTestingClientConfiguration = Aws::Client::GenericClientConfiguration; +using TestNewServiceSDKTestingEndpointProviderBase = Aws::TestNewServiceSDKTesting::Endpoint::TestNewServiceSDKTestingEndpointProviderBase; +using TestNewServiceSDKTestingEndpointProvider = Aws::TestNewServiceSDKTesting::Endpoint::TestNewServiceSDKTestingEndpointProvider; + +namespace Model { +/* Service model forward declarations required in TestNewServiceSDKTestingClient header */ +class GetFooRequest; +class GetFoosRequest; +class PublishFoosRequest; +class PublishEvents; +/* End of service model forward declarations required in TestNewServiceSDKTestingClient header */ + +/* Service model Outcome class definitions */ +typedef Aws::Utils::Outcome GetFooOutcome; +typedef Aws::Utils::Outcome GetFoosOutcome; +typedef Aws::Utils::Outcome PublishFoosOutcome; +/* End of service model Outcome class definitions */ + +/* Service model Outcome callable definitions */ +typedef std::future GetFooOutcomeCallable; +typedef std::future GetFoosOutcomeCallable; +typedef std::future PublishFoosOutcomeCallable; +/* End of service model Outcome callable definitions */ +} // namespace Model + +class TestNewServiceSDKTestingClient; + +/* Service model async handlers definitions */ +typedef std::function&)> + GetFooResponseReceivedHandler; +typedef std::function&)> + GetFoosResponseReceivedHandler; +typedef std::function PublishFoosStreamReadyHandler; +typedef std::function&)> + PublishFoosResponseReceivedHandler; +/* End of service model async handlers definitions */ +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTesting_EXPORTS.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTesting_EXPORTS.h new file mode 100644 index 000000000000..cc0e8a9c9412 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/TestNewServiceSDKTesting_EXPORTS.h @@ -0,0 +1,32 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once + +#ifdef _MSC_VER +// disable windows complaining about max template size. +#pragma warning(disable : 4503) +#endif // _MSC_VER + +#if defined(USE_WINDOWS_DLL_SEMANTICS) || defined(_WIN32) +#ifdef _MSC_VER +#pragma warning(disable : 4251) +#endif // _MSC_VER + +#ifdef USE_IMPORT_EXPORT +#ifdef AWS_TESTNEWSERVICESDKTESTING_EXPORTS +#define AWS_TESTNEWSERVICESDKTESTING_API __declspec(dllexport) +#else +#define AWS_TESTNEWSERVICESDKTESTING_API __declspec(dllimport) +#endif /* AWS_TESTNEWSERVICESDKTESTING_EXPORTS */ +#define AWS_TESTNEWSERVICESDKTESTING_EXTERN +#else +#define AWS_TESTNEWSERVICESDKTESTING_API +#define AWS_TESTNEWSERVICESDKTESTING_EXTERN extern +#endif // USE_IMPORT_EXPORT +#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32) +#define AWS_TESTNEWSERVICESDKTESTING_API +#define AWS_TESTNEWSERVICESDKTESTING_EXTERN extern +#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32) diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/FooSummary.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/FooSummary.h new file mode 100644 index 000000000000..fd8b27248a4e --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/FooSummary.h @@ -0,0 +1,87 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include + +#include + +namespace Aws { +namespace Utils { +namespace Json { +class JsonValue; +class JsonView; +} // namespace Json +} // namespace Utils +namespace TestNewServiceSDKTesting { +namespace Model { + +class FooSummary { + public: + AWS_TESTNEWSERVICESDKTESTING_API FooSummary() = default; + AWS_TESTNEWSERVICESDKTESTING_API FooSummary(Aws::Utils::Json::JsonView jsonValue); + AWS_TESTNEWSERVICESDKTESTING_API FooSummary& operator=(Aws::Utils::Json::JsonView jsonValue); + AWS_TESTNEWSERVICESDKTESTING_API Aws::Utils::Json::JsonValue Jsonize() const; + + ///@{ + + inline const Aws::String& GetFooId() const { return m_fooId; } + inline bool FooIdHasBeenSet() const { return m_fooIdHasBeenSet; } + template + void SetFooId(FooIdT&& value) { + m_fooIdHasBeenSet = true; + m_fooId = std::forward(value); + } + template + FooSummary& WithFooId(FooIdT&& value) { + SetFooId(std::forward(value)); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetName() const { return m_name; } + inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } + template + void SetName(NameT&& value) { + m_nameHasBeenSet = true; + m_name = std::forward(value); + } + template + FooSummary& WithName(NameT&& value) { + SetName(std::forward(value)); + return *this; + } + ///@} + + ///@{ + + inline int GetCount() const { return m_count; } + inline bool CountHasBeenSet() const { return m_countHasBeenSet; } + inline void SetCount(int value) { + m_countHasBeenSet = true; + m_count = value; + } + inline FooSummary& WithCount(int value) { + SetCount(value); + return *this; + } + ///@} + private: + Aws::String m_fooId; + + Aws::String m_name; + + int m_count{0}; + bool m_fooIdHasBeenSet = false; + bool m_nameHasBeenSet = false; + bool m_countHasBeenSet = false; +}; + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFooRequest.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFooRequest.h new file mode 100644 index 000000000000..33b97d52f524 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFooRequest.h @@ -0,0 +1,55 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include + +#include + +namespace Aws { +namespace TestNewServiceSDKTesting { +namespace Model { + +/** + */ +class GetFooRequest : public TestNewServiceSDKTestingRequest { + public: + AWS_TESTNEWSERVICESDKTESTING_API GetFooRequest() = 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 "GetFoo"; } + + AWS_TESTNEWSERVICESDKTESTING_API Aws::String SerializePayload() const override; + + AWS_TESTNEWSERVICESDKTESTING_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + ///@{ + + inline const Aws::String& GetFooId() const { return m_fooId; } + inline bool FooIdHasBeenSet() const { return m_fooIdHasBeenSet; } + template + void SetFooId(FooIdT&& value) { + m_fooIdHasBeenSet = true; + m_fooId = std::forward(value); + } + template + GetFooRequest& WithFooId(FooIdT&& value) { + SetFooId(std::forward(value)); + return *this; + } + ///@} + private: + Aws::String m_fooId; + bool m_fooIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFooResult.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFooResult.h new file mode 100644 index 000000000000..7e9026550127 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFooResult.h @@ -0,0 +1,84 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include + +#include + +namespace Aws { +template +class AmazonWebServiceResult; + +namespace Utils { +namespace Json { +class JsonValue; +} // namespace Json +} // namespace Utils +namespace TestNewServiceSDKTesting { +namespace Model { +class GetFooResult { + public: + AWS_TESTNEWSERVICESDKTESTING_API GetFooResult() = default; + AWS_TESTNEWSERVICESDKTESTING_API GetFooResult(const Aws::AmazonWebServiceResult& result); + AWS_TESTNEWSERVICESDKTESTING_API GetFooResult& operator=(const Aws::AmazonWebServiceResult& result); + + ///@{ + + inline const Aws::String& GetName() const { return m_name; } + template + void SetName(NameT&& value) { + m_nameHasBeenSet = true; + m_name = std::forward(value); + } + template + GetFooResult& WithName(NameT&& value) { + SetName(std::forward(value)); + return *this; + } + ///@} + + ///@{ + + inline int GetCount() const { return m_count; } + inline void SetCount(int value) { + m_countHasBeenSet = true; + m_count = value; + } + inline GetFooResult& WithCount(int value) { + SetCount(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 + GetFooResult& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + private: + Aws::String m_name; + + int m_count{0}; + + Aws::String m_requestId; + bool m_nameHasBeenSet = false; + bool m_countHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFoosRequest.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFoosRequest.h new file mode 100644 index 000000000000..ab07d8b18289 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFoosRequest.h @@ -0,0 +1,91 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include + +#include + +namespace Aws { +namespace TestNewServiceSDKTesting { +namespace Model { + +/** + */ +class GetFoosRequest : public TestNewServiceSDKTestingRequest { + public: + AWS_TESTNEWSERVICESDKTESTING_API GetFoosRequest() = 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 "GetFoos"; } + + AWS_TESTNEWSERVICESDKTESTING_API Aws::String SerializePayload() const override; + + AWS_TESTNEWSERVICESDKTESTING_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + ///@{ + + inline const Aws::String& GetNextToken() const { return m_nextToken; } + inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; } + template + void SetNextToken(NextTokenT&& value) { + m_nextTokenHasBeenSet = true; + m_nextToken = std::forward(value); + } + template + GetFoosRequest& WithNextToken(NextTokenT&& value) { + SetNextToken(std::forward(value)); + return *this; + } + ///@} + + ///@{ + + inline int GetMaxResults() const { return m_maxResults; } + inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; } + inline void SetMaxResults(int value) { + m_maxResultsHasBeenSet = true; + m_maxResults = value; + } + inline GetFoosRequest& WithMaxResults(int value) { + SetMaxResults(value); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetDebug() const { return m_debug; } + inline bool DebugHasBeenSet() const { return m_debugHasBeenSet; } + template + void SetDebug(DebugT&& value) { + m_debugHasBeenSet = true; + m_debug = std::forward(value); + } + template + GetFoosRequest& WithDebug(DebugT&& value) { + SetDebug(std::forward(value)); + return *this; + } + ///@} + private: + Aws::String m_nextToken; + + int m_maxResults{0}; + + Aws::String m_debug; + bool m_nextTokenHasBeenSet = false; + bool m_maxResultsHasBeenSet = false; + bool m_debugHasBeenSet = false; +}; + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFoosResult.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFoosResult.h new file mode 100644 index 000000000000..f3ba62cc6779 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/GetFoosResult.h @@ -0,0 +1,112 @@ +/** + * 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 TestNewServiceSDKTesting { +namespace Model { +class GetFoosResult { + public: + AWS_TESTNEWSERVICESDKTESTING_API GetFoosResult() = default; + AWS_TESTNEWSERVICESDKTESTING_API GetFoosResult(const Aws::AmazonWebServiceResult& result); + AWS_TESTNEWSERVICESDKTESTING_API GetFoosResult& operator=(const Aws::AmazonWebServiceResult& result); + + ///@{ + + inline const Aws::Vector& GetFoos() const { return m_foos; } + template > + void SetFoos(FoosT&& value) { + m_foosHasBeenSet = true; + m_foos = std::forward(value); + } + template > + GetFoosResult& WithFoos(FoosT&& value) { + SetFoos(std::forward(value)); + return *this; + } + template + GetFoosResult& AddFoos(FoosT&& value) { + m_foosHasBeenSet = true; + m_foos.emplace_back(std::forward(value)); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetNextToken() const { return m_nextToken; } + template + void SetNextToken(NextTokenT&& value) { + m_nextTokenHasBeenSet = true; + m_nextToken = std::forward(value); + } + template + GetFoosResult& WithNextToken(NextTokenT&& value) { + SetNextToken(std::forward(value)); + return *this; + } + ///@} + + ///@{ + + inline const Aws::String& GetFilter() const { return m_filter; } + template + void SetFilter(FilterT&& value) { + m_filterHasBeenSet = true; + m_filter = std::forward(value); + } + template + GetFoosResult& WithFilter(FilterT&& value) { + SetFilter(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 + GetFoosResult& WithRequestId(RequestIdT&& value) { + SetRequestId(std::forward(value)); + return *this; + } + ///@} + private: + Aws::Vector m_foos; + + Aws::String m_nextToken; + + Aws::String m_filter; + + Aws::String m_requestId; + bool m_foosHasBeenSet = false; + bool m_nextTokenHasBeenSet = false; + bool m_filterHasBeenSet = false; + bool m_requestIdHasBeenSet = false; +}; + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/LeaveEvent.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/LeaveEvent.h new file mode 100644 index 000000000000..1a89137e6e34 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/LeaveEvent.h @@ -0,0 +1,29 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include + +namespace Aws { +namespace Utils { +namespace Json { +class JsonValue; +class JsonView; +} // namespace Json +} // namespace Utils +namespace TestNewServiceSDKTesting { +namespace Model { + +class LeaveEvent { + public: + AWS_TESTNEWSERVICESDKTESTING_API LeaveEvent() = default; + AWS_TESTNEWSERVICESDKTESTING_API LeaveEvent(Aws::Utils::Json::JsonView jsonValue); + AWS_TESTNEWSERVICESDKTESTING_API LeaveEvent& operator=(Aws::Utils::Json::JsonView jsonValue); + AWS_TESTNEWSERVICESDKTESTING_API Aws::Utils::Json::JsonValue Jsonize() const; +}; + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/Message.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/Message.h new file mode 100644 index 000000000000..56529c0f0e1f --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/Message.h @@ -0,0 +1,51 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include + +#include + +namespace Aws { +namespace Utils { +namespace Json { +class JsonValue; +class JsonView; +} // namespace Json +} // namespace Utils +namespace TestNewServiceSDKTesting { +namespace Model { + +class Message { + public: + AWS_TESTNEWSERVICESDKTESTING_API Message() = default; + AWS_TESTNEWSERVICESDKTESTING_API Message(Aws::Utils::Json::JsonView jsonValue); + AWS_TESTNEWSERVICESDKTESTING_API Message& operator=(Aws::Utils::Json::JsonView jsonValue); + AWS_TESTNEWSERVICESDKTESTING_API Aws::Utils::Json::JsonValue Jsonize() const; + + ///@{ + + inline const Aws::String& GetMessage() const { return m_message; } + inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } + template + void SetMessage(MessageT&& value) { + m_messageHasBeenSet = true; + m_message = std::forward(value); + } + template + Message& WithMessage(MessageT&& value) { + SetMessage(std::forward(value)); + return *this; + } + ///@} + private: + Aws::String m_message; + bool m_messageHasBeenSet = false; +}; + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/NoSuchResource.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/NoSuchResource.h new file mode 100644 index 000000000000..55ce4210406b --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/NoSuchResource.h @@ -0,0 +1,51 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include + +#include + +namespace Aws { +namespace Utils { +namespace Json { +class JsonValue; +class JsonView; +} // namespace Json +} // namespace Utils +namespace TestNewServiceSDKTesting { +namespace Model { + +class NoSuchResource { + public: + AWS_TESTNEWSERVICESDKTESTING_API NoSuchResource() = default; + AWS_TESTNEWSERVICESDKTESTING_API NoSuchResource(Aws::Utils::Json::JsonView jsonValue); + AWS_TESTNEWSERVICESDKTESTING_API NoSuchResource& operator=(Aws::Utils::Json::JsonView jsonValue); + AWS_TESTNEWSERVICESDKTESTING_API Aws::Utils::Json::JsonValue Jsonize() const; + + ///@{ + + inline const Aws::String& GetResourceType() const { return m_resourceType; } + inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } + template + void SetResourceType(ResourceTypeT&& value) { + m_resourceTypeHasBeenSet = true; + m_resourceType = std::forward(value); + } + template + NoSuchResource& WithResourceType(ResourceTypeT&& value) { + SetResourceType(std::forward(value)); + return *this; + } + ///@} + private: + Aws::String m_resourceType; + bool m_resourceTypeHasBeenSet = false; +}; + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishEvents.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishEvents.h new file mode 100644 index 000000000000..79645634b2b2 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishEvents.h @@ -0,0 +1,41 @@ +/** + * 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 TestNewServiceSDKTesting { +namespace Model { + +class AWS_TESTNEWSERVICESDKTESTING_API PublishEvents : public Aws::Utils::Event::EventEncoderStream { + public: + PublishEvents& WriteMessage(const Message& value) { + Aws::Utils::Event::Message msg; + msg.InsertEventHeader(":message-type", Aws::String("event")); + msg.InsertEventHeader(":event-type", Aws::String("message")); + msg.InsertEventHeader(":content-type", Aws::String("text/plain")); + msg.WriteEventPayload(value.GetMessage()); + WriteEvent(msg); + return *this; + } + PublishEvents& WriteLeaveEvent(const LeaveEvent& value) { + Aws::Utils::Event::Message msg; + msg.InsertEventHeader(":message-type", Aws::String("event")); + msg.InsertEventHeader(":event-type", Aws::String("leave")); + AWS_UNREFERENCED_PARAM(value); + WriteEvent(msg); + return *this; + } +}; + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishFoosRequest.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishFoosRequest.h new file mode 100644 index 000000000000..84ba8d748d2c --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishFoosRequest.h @@ -0,0 +1,77 @@ +/** + * 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 TestNewServiceSDKTesting { +namespace Model { + +/** + */ +class PublishFoosRequest : public TestNewServiceSDKTestingRequest { + public: + AWS_TESTNEWSERVICESDKTESTING_API PublishFoosRequest() = 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 "PublishFoos"; } + + inline virtual bool IsEventStreamRequest() const override { return true; } + // SerializePayload will not be invoked. + // This request is sent by encoding its data in event-streams which is sent as IOStream via GetBody() + AWS_TESTNEWSERVICESDKTESTING_API Aws::String SerializePayload() const override { return {}; } + AWS_TESTNEWSERVICESDKTESTING_API std::shared_ptr GetBody() const override; + AWS_TESTNEWSERVICESDKTESTING_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + + ///@{ + + inline const Aws::String& GetRoom() const { return m_room; } + inline bool RoomHasBeenSet() const { return m_roomHasBeenSet; } + template + void SetRoom(RoomT&& value) { + m_roomHasBeenSet = true; + m_room = std::forward(value); + } + template + PublishFoosRequest& WithRoom(RoomT&& value) { + SetRoom(std::forward(value)); + return *this; + } + ///@} + + ///@{ + + AWS_TESTNEWSERVICESDKTESTING_API std::shared_ptr GetMessages() const { return m_messages; } + AWS_TESTNEWSERVICESDKTESTING_API void SetMessages(const std::shared_ptr& value) { + m_messagesHasBeenSet = true; + m_messages = value; + } + AWS_TESTNEWSERVICESDKTESTING_API PublishFoosRequest& WithMessages(const std::shared_ptr& value) { + SetMessages(value); + return *this; + } + + ///@} + private: + Aws::String m_room; + + std::shared_ptr m_messages; + bool m_roomHasBeenSet = false; + bool m_messagesHasBeenSet = false; +}; + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingClient.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingClient.cpp new file mode 100644 index 000000000000..906fb52cb5a5 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingClient.cpp @@ -0,0 +1,251 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Aws; +using namespace Aws::Auth; +using namespace Aws::Client; +using namespace Aws::TestNewServiceSDKTesting; +using namespace Aws::TestNewServiceSDKTesting::Model; +using namespace Aws::Http; +using namespace Aws::Utils::Json; +using namespace smithy::components::tracing; +using ResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; + +namespace Aws { +namespace TestNewServiceSDKTesting { +const char SERVICE_NAME[] = "testnewservicesdktesting"; +const char ALLOCATION_TAG[] = "TestNewServiceSDKTestingClient"; +} // namespace TestNewServiceSDKTesting +} // namespace Aws +const char* TestNewServiceSDKTestingClient::GetServiceName() { return SERVICE_NAME; } +const char* TestNewServiceSDKTestingClient::GetAllocationTag() { return ALLOCATION_TAG; } + +TestNewServiceSDKTestingClient::TestNewServiceSDKTestingClient( + const TestNewServiceSDKTesting::TestNewServiceSDKTestingClientConfiguration& clientConfiguration, + std::shared_ptr endpointProvider) + : BASECLASS(clientConfiguration, + Aws::MakeShared( + ALLOCATION_TAG, + Aws::MakeShared(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), + SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(endpointProvider ? std::move(endpointProvider) + : Aws::MakeShared(ALLOCATION_TAG)) { + init(m_clientConfiguration); +} + +TestNewServiceSDKTestingClient::TestNewServiceSDKTestingClient( + const AWSCredentials& credentials, std::shared_ptr endpointProvider, + const TestNewServiceSDKTesting::TestNewServiceSDKTestingClientConfiguration& clientConfiguration) + : BASECLASS(clientConfiguration, + Aws::MakeShared( + ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), SERVICE_NAME, + Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(endpointProvider ? std::move(endpointProvider) + : Aws::MakeShared(ALLOCATION_TAG)) { + init(m_clientConfiguration); +} + +TestNewServiceSDKTestingClient::TestNewServiceSDKTestingClient( + const std::shared_ptr& credentialsProvider, + std::shared_ptr endpointProvider, + const TestNewServiceSDKTesting::TestNewServiceSDKTestingClientConfiguration& clientConfiguration) + : BASECLASS(clientConfiguration, + Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, + Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(endpointProvider ? std::move(endpointProvider) + : Aws::MakeShared(ALLOCATION_TAG)) { + init(m_clientConfiguration); +} + +/* Legacy constructors due deprecation */ +TestNewServiceSDKTestingClient::TestNewServiceSDKTestingClient(const Client::ClientConfiguration& clientConfiguration) + : BASECLASS(clientConfiguration, + Aws::MakeShared( + ALLOCATION_TAG, + Aws::MakeShared(ALLOCATION_TAG, clientConfiguration.credentialProviderConfig), + SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { + init(m_clientConfiguration); +} + +TestNewServiceSDKTestingClient::TestNewServiceSDKTestingClient(const AWSCredentials& credentials, + const Client::ClientConfiguration& clientConfiguration) + : BASECLASS(clientConfiguration, + Aws::MakeShared( + ALLOCATION_TAG, Aws::MakeShared(ALLOCATION_TAG, credentials), SERVICE_NAME, + Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { + init(m_clientConfiguration); +} + +TestNewServiceSDKTestingClient::TestNewServiceSDKTestingClient(const std::shared_ptr& credentialsProvider, + const Client::ClientConfiguration& clientConfiguration) + : BASECLASS(clientConfiguration, + Aws::MakeShared(ALLOCATION_TAG, credentialsProvider, SERVICE_NAME, + Aws::Region::ComputeSignerRegion(clientConfiguration.region)), + Aws::MakeShared(ALLOCATION_TAG)), + m_clientConfiguration(clientConfiguration), + m_endpointProvider(Aws::MakeShared(ALLOCATION_TAG)) { + init(m_clientConfiguration); +} + +/* End of legacy constructors due deprecation */ +TestNewServiceSDKTestingClient::~TestNewServiceSDKTestingClient() { ShutdownSdkClient(this, -1); } + +std::shared_ptr& TestNewServiceSDKTestingClient::accessEndpointProvider() { + return m_endpointProvider; +} + +void TestNewServiceSDKTestingClient::init(const TestNewServiceSDKTesting::TestNewServiceSDKTestingClientConfiguration& config) { + AWSClient::SetServiceClientName("Test New Service SDK Testing"); + if (!m_clientConfiguration.executor) { + if (!m_clientConfiguration.configFactories.executorCreateFn()) { + AWS_LOGSTREAM_FATAL(ALLOCATION_TAG, "Failed to initialize client: config is missing Executor or executorCreateFn"); + m_isInitialized = false; + return; + } + m_clientConfiguration.executor = m_clientConfiguration.configFactories.executorCreateFn(); + } + AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); + m_endpointProvider->InitBuiltInParameters(config, "testnewservicesdktesting"); +} + +void TestNewServiceSDKTestingClient::OverrideEndpoint(const Aws::String& endpoint) { + AWS_CHECK_PTR(SERVICE_NAME, m_endpointProvider); + m_clientConfiguration.endpointOverride = endpoint; + m_endpointProvider->OverrideEndpoint(endpoint); +} + +GetFooOutcome TestNewServiceSDKTestingClient::GetFoo(const GetFooRequest& request) const { + AWS_OPERATION_GUARD(GetFoo); + AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetFoo, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); + AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetFoo, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(meter, GetFoo, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetFoo", + {{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( + [&]() -> GetFooOutcome { + 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, GetFoo, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, + endpointResolutionOutcome.GetError().GetMessage()); + return GetFooOutcome( + 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()}}); +} + +GetFoosOutcome TestNewServiceSDKTestingClient::GetFoos(const GetFoosRequest& request) const { + AWS_OPERATION_GUARD(GetFoos); + AWS_OPERATION_CHECK_PTR(m_endpointProvider, GetFoos, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE); + AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetFoos, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {}); + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + AWS_OPERATION_CHECK_PTR(meter, GetFoos, CoreErrors, CoreErrors::NOT_INITIALIZED); + auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetFoos", + {{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( + [&]() -> GetFoosOutcome { + 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, GetFoos, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, + endpointResolutionOutcome.GetError().GetMessage()); + return GetFoosOutcome( + 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()}}); +} + +void TestNewServiceSDKTestingClient::PublishFoosAsync(Model::PublishFoosRequest& request, + const PublishFoosStreamReadyHandler& streamReadyHandler, + const PublishFoosResponseReceivedHandler& handler, + const std::shared_ptr& handlerContext) const { + AWS_ASYNC_OPERATION_GUARD(PublishFoos); + if (!m_endpointProvider) { + handler(this, request, + PublishFoosOutcome(Aws::Client::AWSError( + TestNewServiceSDKTestingErrors::INTERNAL_FAILURE, "INTERNAL_FAILURE", "Endpoint provider is not initialized", false)), + handlerContext); + return; + } + auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {}); + 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()}}); + if (!endpointResolutionOutcome.IsSuccess()) { + handler(this, request, + PublishFoosOutcome(Aws::Client::AWSError(CoreErrors::ENDPOINT_RESOLUTION_FAILURE, "ENDPOINT_RESOLUTION_FAILURE", + endpointResolutionOutcome.GetError().GetMessage(), false)), + handlerContext); + return; + } + JsonOutcome outcome = + MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER); + + auto eventEncoderStream = Aws::MakeShared(ALLOCATION_TAG); + eventEncoderStream->SetSigner(GetSignerByName(Aws::Auth::EVENTSTREAM_SIGV4_SIGNER)); + auto requestCopy = Aws::MakeShared("PublishFoos", request); + requestCopy->SetMessages(eventEncoderStream); // this becomes the body of the request + request.SetMessages(eventEncoderStream); + + auto asyncTask = CreateBidirectionalEventStreamTask(this, endpointResolutionOutcome.GetResultWithOwnership(), + requestCopy, handler, handlerContext, eventEncoderStream); + auto sem = asyncTask.GetSemaphore(); + m_clientConfiguration.executor->Submit(std::move(asyncTask)); + sem->WaitOne(); + streamReadyHandler(*eventEncoderStream); +} diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingEndpointProvider.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingEndpointProvider.cpp new file mode 100644 index 000000000000..fce5d92feef2 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingEndpointProvider.cpp @@ -0,0 +1,12 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include + +namespace Aws { +namespace TestNewServiceSDKTesting { +namespace Endpoint {} // namespace Endpoint +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingEndpointRules.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingEndpointRules.cpp new file mode 100644 index 000000000000..f1e7bae1b8bf --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingEndpointRules.cpp @@ -0,0 +1,161 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +namespace Aws { +namespace TestNewServiceSDKTesting { +const size_t TestNewServiceSDKTestingEndpointRules::RulesBlobStrLen = 3796; +const size_t TestNewServiceSDKTestingEndpointRules::RulesBlobSize = 3797; + +using RulesBlobT = Aws::Array; +static constexpr RulesBlobT RulesBlob = { + {'{', '"', 'v', 'e', 'r', 's', 'i', 'o', 'n', '"', ':', '"', '1', '.', '0', '"', ',', '"', 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', + 's', '"', ':', '{', '"', 'R', 'e', 'g', 'i', 'o', 'n', '"', ':', '{', '"', 'b', 'u', 'i', 'l', 't', 'I', 'n', '"', ':', '"', 'A', 'W', + 'S', ':', ':', 'R', 'e', 'g', 'i', 'o', 'n', '"', ',', '"', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '"', ':', 'f', 'a', 'l', 's', 'e', + ',', '"', 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'a', 't', 'i', 'o', 'n', '"', ':', '"', 'T', 'h', 'e', ' ', 'A', 'W', 'S', ' ', 'r', + 'e', 'g', 'i', 'o', 'n', ' ', 'u', 's', 'e', 'd', ' ', 't', 'o', ' ', 'd', 'i', 's', 'p', 'a', 't', 'c', 'h', ' ', 't', 'h', 'e', ' ', + 'r', 'e', 'q', 'u', 'e', 's', 't', '.', '"', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 's', 't', 'r', 'i', 'n', 'g', '"', '}', ',', + '"', 'U', 's', 'e', 'D', 'u', 'a', 'l', 'S', 't', 'a', 'c', 'k', '"', ':', '{', '"', 'b', 'u', 'i', 'l', 't', 'I', 'n', '"', ':', '"', + 'A', 'W', 'S', ':', ':', 'U', 's', 'e', 'D', 'u', 'a', 'l', 'S', 't', 'a', 'c', 'k', '"', ',', '"', 'r', 'e', 'q', 'u', 'i', 'r', 'e', + 'd', '"', ':', 't', 'r', 'u', 'e', ',', '"', 'd', 'e', 'f', 'a', 'u', 'l', 't', '"', ':', 'f', 'a', 'l', 's', 'e', ',', '"', 'd', 'o', + 'c', 'u', 'm', 'e', 'n', 't', 'a', 't', 'i', 'o', 'n', '"', ':', '"', 'W', 'h', 'e', 'n', ' ', 't', 'r', 'u', 'e', ',', ' ', 'u', 's', + 'e', ' ', 't', 'h', 'e', ' ', 'd', 'u', 'a', 'l', '-', 's', 't', 'a', 'c', 'k', ' ', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', ' ', + 'I', 'f', ' ', 't', 'h', 'e', ' ', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'e', 'd', ' ', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', ' ', + 'd', 'o', 'e', 's', ' ', 'n', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', ' ', 'd', 'u', 'a', 'l', '-', 's', 't', 'a', 'c', 'k', + ',', ' ', 'd', 'i', 's', 'p', 'a', 't', 'c', 'h', 'i', 'n', 'g', ' ', 't', 'h', 'e', ' ', 'r', 'e', 'q', 'u', 'e', 's', 't', ' ', 'M', + 'A', 'Y', ' ', 'r', 'e', 't', 'u', 'r', 'n', ' ', 'a', 'n', ' ', 'e', 'r', 'r', 'o', 'r', '.', '"', ',', '"', 't', 'y', 'p', 'e', '"', + ':', '"', 'b', 'o', 'o', 'l', 'e', 'a', 'n', '"', '}', ',', '"', 'U', 's', 'e', 'F', 'I', 'P', 'S', '"', ':', '{', '"', 'b', 'u', 'i', + 'l', 't', 'I', 'n', '"', ':', '"', 'A', 'W', 'S', ':', ':', 'U', 's', 'e', 'F', 'I', 'P', 'S', '"', ',', '"', 'r', 'e', 'q', 'u', 'i', + 'r', 'e', 'd', '"', ':', 't', 'r', 'u', 'e', ',', '"', 'd', 'e', 'f', 'a', 'u', 'l', 't', '"', ':', 'f', 'a', 'l', 's', 'e', ',', '"', + 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'a', 't', 'i', 'o', 'n', '"', ':', '"', 'W', 'h', 'e', 'n', ' ', 't', 'r', 'u', 'e', ',', ' ', + 's', 'e', 'n', 'd', ' ', 't', 'h', 'i', 's', ' ', 'r', 'e', 'q', 'u', 'e', 's', 't', ' ', 't', 'o', ' ', 't', 'h', 'e', ' ', 'F', 'I', + 'P', 'S', '-', 'c', 'o', 'm', 'p', 'l', 'i', 'a', 'n', 't', ' ', 'r', 'e', 'g', 'i', 'o', 'n', 'a', 'l', ' ', 'e', 'n', 'd', 'p', 'o', + 'i', 'n', 't', '.', ' ', 'I', 'f', ' ', 't', 'h', 'e', ' ', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'e', 'd', ' ', 'e', 'n', 'd', 'p', + 'o', 'i', 'n', 't', ' ', 'd', 'o', 'e', 's', ' ', 'n', 'o', 't', ' ', 'h', 'a', 'v', 'e', ' ', 'a', ' ', 'F', 'I', 'P', 'S', ' ', 'c', + 'o', 'm', 'p', 'l', 'i', 'a', 'n', 't', ' ', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', ',', ' ', 'd', 'i', 's', 'p', 'a', 't', 'c', 'h', + 'i', 'n', 'g', ' ', 't', 'h', 'e', ' ', 'r', 'e', 'q', 'u', 'e', 's', 't', ' ', 'w', 'i', 'l', 'l', ' ', 'r', 'e', 't', 'u', 'r', 'n', + ' ', 'a', 'n', ' ', 'e', 'r', 'r', 'o', 'r', '.', '"', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 'b', 'o', 'o', 'l', 'e', 'a', 'n', + '"', '}', ',', '"', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', ':', '{', '"', 'b', 'u', 'i', 'l', 't', 'I', 'n', '"', ':', '"', 'S', + 'D', 'K', ':', ':', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', ',', '"', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '"', ':', 'f', 'a', + 'l', 's', 'e', ',', '"', 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 'a', 't', 'i', 'o', 'n', '"', ':', '"', 'O', 'v', 'e', 'r', 'r', 'i', + 'd', 'e', ' ', 't', 'h', 'e', ' ', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', ' ', 'u', 's', 'e', 'd', ' ', 't', 'o', ' ', 's', 'e', 'n', + 'd', ' ', 't', 'h', 'i', 's', ' ', 'r', 'e', 'q', 'u', 'e', 's', 't', '"', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 's', 't', 'r', + 'i', 'n', 'g', '"', '}', '}', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', + 's', '"', ':', '[', '{', '"', 'f', 'n', '"', ':', '"', 'i', 's', 'S', 'e', 't', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', + '"', 'r', 'e', 'f', '"', ':', '"', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', '}', ']', '}', ']', ',', '"', 'r', 'u', 'l', 'e', 's', + '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', '{', '"', 'f', 'n', '"', ':', '"', 'b', 'o', + 'o', 'l', 'e', 'a', 'n', 'E', 'q', 'u', 'a', 'l', 's', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'r', 'e', 'f', '"', + ':', '"', 'U', 's', 'e', 'F', 'I', 'P', 'S', '"', '}', ',', 't', 'r', 'u', 'e', ']', '}', ']', ',', '"', 'e', 'r', 'r', 'o', 'r', '"', + ':', '"', 'I', 'n', 'v', 'a', 'l', 'i', 'd', ' ', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', ':', ' ', 'F', 'I', + 'P', 'S', ' ', 'a', 'n', 'd', ' ', 'c', 'u', 's', 't', 'o', 'm', ' ', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', ' ', 'a', 'r', 'e', ' ', + 'n', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', '"', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 'e', 'r', 'r', 'o', + 'r', '"', '}', ',', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', ']', ',', '"', 'r', 'u', 'l', 'e', 's', + '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', '{', '"', 'f', 'n', '"', ':', '"', 'b', 'o', + 'o', 'l', 'e', 'a', 'n', 'E', 'q', 'u', 'a', 'l', 's', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'r', 'e', 'f', '"', + ':', '"', 'U', 's', 'e', 'D', 'u', 'a', 'l', 'S', 't', 'a', 'c', 'k', '"', '}', ',', 't', 'r', 'u', 'e', ']', '}', ']', ',', '"', 'e', + 'r', 'r', 'o', 'r', '"', ':', '"', 'I', 'n', 'v', 'a', 'l', 'i', 'd', ' ', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', + 'n', ':', ' ', 'D', 'u', 'a', 'l', 's', 't', 'a', 'c', 'k', ' ', 'a', 'n', 'd', ' ', 'c', 'u', 's', 't', 'o', 'm', ' ', 'e', 'n', 'd', + 'p', 'o', 'i', 'n', 't', ' ', 'a', 'r', 'e', ' ', 'n', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', '"', ',', '"', 't', + 'y', 'p', 'e', '"', ':', '"', 'e', 'r', 'r', 'o', 'r', '"', '}', ',', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', + ':', '[', ']', ',', '"', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', ':', '{', '"', 'u', 'r', 'l', '"', ':', '{', '"', 'r', 'e', 'f', + '"', ':', '"', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', '}', ',', '"', 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '"', ':', + '{', '}', ',', '"', 'h', 'e', 'a', 'd', 'e', 'r', 's', '"', ':', '{', '}', '}', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 'e', 'n', + 'd', 'p', 'o', 'i', 'n', 't', '"', '}', ']', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ']', ',', '"', + 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ',', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', + ':', '[', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', + '[', '{', '"', 'f', 'n', '"', ':', '"', 'i', 's', 'S', 'e', 't', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'r', 'e', + 'f', '"', ':', '"', 'R', 'e', 'g', 'i', 'o', 'n', '"', '}', ']', '}', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', + 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', '{', '"', 'f', 'n', '"', ':', '"', 'a', 'w', 's', '.', 'p', 'a', 'r', + 't', 'i', 't', 'i', 'o', 'n', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'r', 'e', 'f', '"', ':', '"', 'R', 'e', 'g', + 'i', 'o', 'n', '"', '}', ']', ',', '"', 'a', 's', 's', 'i', 'g', 'n', '"', ':', '"', 'P', 'a', 'r', 't', 'i', 't', 'i', 'o', 'n', 'R', + 'e', 's', 'u', 'l', 't', '"', '}', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', + 'o', 'n', 's', '"', ':', '[', '{', '"', 'f', 'n', '"', ':', '"', 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'E', 'q', 'u', 'a', 'l', 's', '"', + ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'r', 'e', 'f', '"', ':', '"', 'U', 's', 'e', 'F', 'I', 'P', 'S', '"', '}', ',', + 't', 'r', 'u', 'e', ']', '}', ',', '{', '"', 'f', 'n', '"', ':', '"', 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'E', 'q', 'u', 'a', 'l', 's', + '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'r', 'e', 'f', '"', ':', '"', 'U', 's', 'e', 'D', 'u', 'a', 'l', 'S', 't', + 'a', 'c', 'k', '"', '}', ',', 't', 'r', 'u', 'e', ']', '}', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', + 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', '{', '"', 'f', 'n', '"', ':', '"', 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'E', 'q', + 'u', 'a', 'l', 's', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', 't', 'r', 'u', 'e', ',', '{', '"', 'f', 'n', '"', ':', '"', 'g', + 'e', 't', 'A', 't', 't', 'r', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'r', 'e', 'f', '"', ':', '"', 'P', 'a', 'r', + 't', 'i', 't', 'i', 'o', 'n', 'R', 'e', 's', 'u', 'l', 't', '"', '}', ',', '"', 's', 'u', 'p', 'p', 'o', 'r', 't', 's', 'F', 'I', 'P', + 'S', '"', ']', '}', ']', '}', ',', '{', '"', 'f', 'n', '"', ':', '"', 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'E', 'q', 'u', 'a', 'l', 's', + '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', 't', 'r', 'u', 'e', ',', '{', '"', 'f', 'n', '"', ':', '"', 'g', 'e', 't', 'A', 't', + 't', 'r', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'r', 'e', 'f', '"', ':', '"', 'P', 'a', 'r', 't', 'i', 't', 'i', + 'o', 'n', 'R', 'e', 's', 'u', 'l', 't', '"', '}', ',', '"', 's', 'u', 'p', 'p', 'o', 'r', 't', 's', 'D', 'u', 'a', 'l', 'S', 't', 'a', + 'c', 'k', '"', ']', '}', ']', '}', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', + 'o', 'n', 's', '"', ':', '[', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', + 'n', 's', '"', ':', '[', ']', ',', '"', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', ':', '{', '"', 'u', 'r', 'l', '"', ':', '"', 'h', + 't', 't', 'p', 's', ':', '/', '/', 't', 'e', 's', 't', 'n', 'e', 'w', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', 'd', 'k', 't', 'e', 's', + 't', 'i', 'n', 'g', '-', 'f', 'i', 'p', 's', '.', '{', 'R', 'e', 'g', 'i', 'o', 'n', '}', '.', '{', 'P', 'a', 'r', 't', 'i', 't', 'i', + 'o', 'n', 'R', 'e', 's', 'u', 'l', 't', '#', 'd', 'u', 'a', 'l', 'S', 't', 'a', 'c', 'k', 'D', 'n', 's', 'S', 'u', 'f', 'f', 'i', 'x', + '}', '"', ',', '"', 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '"', ':', '{', '}', ',', '"', 'h', 'e', 'a', 'd', 'e', 'r', 's', + '"', ':', '{', '}', '}', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', '}', ']', ',', '"', + 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ']', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', + '"', '}', ',', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', ']', ',', '"', 'e', 'r', 'r', 'o', 'r', '"', + ':', '"', 'F', 'I', 'P', 'S', ' ', 'a', 'n', 'd', ' ', 'D', 'u', 'a', 'l', 'S', 't', 'a', 'c', 'k', ' ', 'a', 'r', 'e', ' ', 'e', 'n', + 'a', 'b', 'l', 'e', 'd', ',', ' ', 'b', 'u', 't', ' ', 't', 'h', 'i', 's', ' ', 'p', 'a', 'r', 't', 'i', 't', 'i', 'o', 'n', ' ', 'd', + 'o', 'e', 's', ' ', 'n', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', ' ', 'o', 'n', 'e', ' ', 'o', 'r', ' ', 'b', 'o', 't', 'h', + '"', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 'e', 'r', 'r', 'o', 'r', '"', '}', ']', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', + 't', 'r', 'e', 'e', '"', '}', ',', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', '{', '"', 'f', 'n', '"', + ':', '"', 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'E', 'q', 'u', 'a', 'l', 's', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', + 'r', 'e', 'f', '"', ':', '"', 'U', 's', 'e', 'F', 'I', 'P', 'S', '"', '}', ',', 't', 'r', 'u', 'e', ']', '}', ']', ',', '"', 'r', 'u', + 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', '{', '"', 'f', 'n', '"', ':', + '"', 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'E', 'q', 'u', 'a', 'l', 's', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'f', + 'n', '"', ':', '"', 'g', 'e', 't', 'A', 't', 't', 'r', '"', ',', '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'r', 'e', 'f', '"', + ':', '"', 'P', 'a', 'r', 't', 'i', 't', 'i', 'o', 'n', 'R', 'e', 's', 'u', 'l', 't', '"', '}', ',', '"', 's', 'u', 'p', 'p', 'o', 'r', + 't', 's', 'F', 'I', 'P', 'S', '"', ']', '}', ',', 't', 'r', 'u', 'e', ']', '}', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', + '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', + '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', ']', ',', '"', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', ':', + '{', '"', 'u', 'r', 'l', '"', ':', '"', 'h', 't', 't', 'p', 's', ':', '/', '/', 't', 'e', 's', 't', 'n', 'e', 'w', 's', 'e', 'r', 'v', + 'i', 'c', 'e', 's', 'd', 'k', 't', 'e', 's', 't', 'i', 'n', 'g', '-', 'f', 'i', 'p', 's', '.', '{', 'R', 'e', 'g', 'i', 'o', 'n', '}', + '.', '{', 'P', 'a', 'r', 't', 'i', 't', 'i', 'o', 'n', 'R', 'e', 's', 'u', 'l', 't', '#', 'd', 'n', 's', 'S', 'u', 'f', 'f', 'i', 'x', + '}', '"', ',', '"', 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '"', ':', '{', '}', ',', '"', 'h', 'e', 'a', 'd', 'e', 'r', 's', + '"', ':', '{', '}', '}', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', '}', ']', ',', '"', + 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ']', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', + '"', '}', ',', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', ']', ',', '"', 'e', 'r', 'r', 'o', 'r', '"', + ':', '"', 'F', 'I', 'P', 'S', ' ', 'i', 's', ' ', 'e', 'n', 'a', 'b', 'l', 'e', 'd', ' ', 'b', 'u', 't', ' ', 't', 'h', 'i', 's', ' ', + 'p', 'a', 'r', 't', 'i', 't', 'i', 'o', 'n', ' ', 'd', 'o', 'e', 's', ' ', 'n', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', ' ', + 'F', 'I', 'P', 'S', '"', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 'e', 'r', 'r', 'o', 'r', '"', '}', ']', ',', '"', 't', 'y', 'p', + 'e', '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ',', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', '{', + '"', 'f', 'n', '"', ':', '"', 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'E', 'q', 'u', 'a', 'l', 's', '"', ',', '"', 'a', 'r', 'g', 'v', '"', + ':', '[', '{', '"', 'r', 'e', 'f', '"', ':', '"', 'U', 's', 'e', 'D', 'u', 'a', 'l', 'S', 't', 'a', 'c', 'k', '"', '}', ',', 't', 'r', + 'u', 'e', ']', '}', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', + '"', ':', '[', '{', '"', 'f', 'n', '"', ':', '"', 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'E', 'q', 'u', 'a', 'l', 's', '"', ',', '"', 'a', + 'r', 'g', 'v', '"', ':', '[', 't', 'r', 'u', 'e', ',', '{', '"', 'f', 'n', '"', ':', '"', 'g', 'e', 't', 'A', 't', 't', 'r', '"', ',', + '"', 'a', 'r', 'g', 'v', '"', ':', '[', '{', '"', 'r', 'e', 'f', '"', ':', '"', 'P', 'a', 'r', 't', 'i', 't', 'i', 'o', 'n', 'R', 'e', + 's', 'u', 'l', 't', '"', '}', ',', '"', 's', 'u', 'p', 'p', 'o', 'r', 't', 's', 'D', 'u', 'a', 'l', 'S', 't', 'a', 'c', 'k', '"', ']', + '}', ']', '}', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', + ':', '[', ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', + '[', ']', ',', '"', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', ':', '{', '"', 'u', 'r', 'l', '"', ':', '"', 'h', 't', 't', 'p', 's', + ':', '/', '/', 't', 'e', 's', 't', 'n', 'e', 'w', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', 'd', 'k', 't', 'e', 's', 't', 'i', 'n', 'g', + '.', '{', 'R', 'e', 'g', 'i', 'o', 'n', '}', '.', '{', 'P', 'a', 'r', 't', 'i', 't', 'i', 'o', 'n', 'R', 'e', 's', 'u', 'l', 't', '#', + 'd', 'u', 'a', 'l', 'S', 't', 'a', 'c', 'k', 'D', 'n', 's', 'S', 'u', 'f', 'f', 'i', 'x', '}', '"', ',', '"', 'p', 'r', 'o', 'p', 'e', + 'r', 't', 'i', 'e', 's', '"', ':', '{', '}', ',', '"', 'h', 'e', 'a', 'd', 'e', 'r', 's', '"', ':', '{', '}', '}', ',', '"', 't', 'y', + 'p', 'e', '"', ':', '"', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', '}', ']', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', + 'e', 'e', '"', '}', ']', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ',', '{', '"', 'c', 'o', 'n', 'd', + 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', ']', ',', '"', 'e', 'r', 'r', 'o', 'r', '"', ':', '"', 'D', 'u', 'a', 'l', 'S', 't', 'a', + 'c', 'k', ' ', 'i', 's', ' ', 'e', 'n', 'a', 'b', 'l', 'e', 'd', ' ', 'b', 'u', 't', ' ', 't', 'h', 'i', 's', ' ', 'p', 'a', 'r', 't', + 'i', 't', 'i', 'o', 'n', ' ', 'd', 'o', 'e', 's', ' ', 'n', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', ' ', 'D', 'u', 'a', 'l', + 'S', 't', 'a', 'c', 'k', '"', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 'e', 'r', 'r', 'o', 'r', '"', '}', ']', ',', '"', 't', 'y', + 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ',', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', + ']', ',', '"', 'r', 'u', 'l', 'e', 's', '"', ':', '[', '{', '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', ']', + ',', '"', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '"', ':', '{', '"', 'u', 'r', 'l', '"', ':', '"', 'h', 't', 't', 'p', 's', ':', '/', + '/', 't', 'e', 's', 't', 'n', 'e', 'w', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', 'd', 'k', 't', 'e', 's', 't', 'i', 'n', 'g', '.', '{', + 'R', 'e', 'g', 'i', 'o', 'n', '}', '.', '{', 'P', 'a', 'r', 't', 'i', 't', 'i', 'o', 'n', 'R', 'e', 's', 'u', 'l', 't', '#', 'd', 'n', + 's', 'S', 'u', 'f', 'f', 'i', 'x', '}', '"', ',', '"', 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '"', ':', '{', '}', ',', '"', + 'h', 'e', 'a', 'd', 'e', 'r', 's', '"', ':', '{', '}', '}', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 'e', 'n', 'd', 'p', 'o', 'i', + 'n', 't', '"', '}', ']', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ']', ',', '"', 't', 'y', 'p', 'e', + '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ']', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ',', '{', + '"', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', 's', '"', ':', '[', ']', ',', '"', 'e', 'r', 'r', 'o', 'r', '"', ':', '"', 'I', 'n', + 'v', 'a', 'l', 'i', 'd', ' ', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', ':', ' ', 'M', 'i', 's', 's', 'i', 'n', + 'g', ' ', 'R', 'e', 'g', 'i', 'o', 'n', '"', ',', '"', 't', 'y', 'p', 'e', '"', ':', '"', 'e', 'r', 'r', 'o', 'r', '"', '}', ']', ',', + '"', 't', 'y', 'p', 'e', '"', ':', '"', 't', 'r', 'e', 'e', '"', '}', ']', '}', '\0'}}; + +const char* TestNewServiceSDKTestingEndpointRules::GetRulesBlob() { return RulesBlob.data(); } + +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingErrorMarshaller.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingErrorMarshaller.cpp new file mode 100644 index 000000000000..9126e9b8da26 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingErrorMarshaller.cpp @@ -0,0 +1,20 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::Client; +using namespace Aws::TestNewServiceSDKTesting; + +AWSError TestNewServiceSDKTestingErrorMarshaller::FindErrorByName(const char* errorName) const { + AWSError error = TestNewServiceSDKTestingErrorMapper::GetErrorForName(errorName); + if (error.GetErrorType() != CoreErrors::UNKNOWN) { + return error; + } + + return AWSErrorMarshaller::FindErrorByName(errorName); +} \ No newline at end of file diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingErrors.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingErrors.cpp new file mode 100644 index 000000000000..877b12186c81 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingErrors.cpp @@ -0,0 +1,39 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include + +using namespace Aws::Client; +using namespace Aws::Utils; +using namespace Aws::TestNewServiceSDKTesting; +using namespace Aws::TestNewServiceSDKTesting::Model; + +namespace Aws { +namespace TestNewServiceSDKTesting { +template <> +AWS_TESTNEWSERVICESDKTESTING_API NoSuchResource TestNewServiceSDKTestingError::GetModeledError() { + assert(this->GetErrorType() == TestNewServiceSDKTestingErrors::NO_SUCH_RESOURCE); + return NoSuchResource(this->GetJsonPayload().View()); +} + +namespace TestNewServiceSDKTestingErrorMapper { + +static const int NO_SUCH_RESOURCE_HASH = HashingUtils::HashString("NoSuchResource"); + +AWSError GetErrorForName(const char* errorName) { + int hashCode = HashingUtils::HashString(errorName); + + if (hashCode == NO_SUCH_RESOURCE_HASH) { + return AWSError(static_cast(TestNewServiceSDKTestingErrors::NO_SUCH_RESOURCE), RetryableType::NOT_RETRYABLE); + } + return AWSError(CoreErrors::UNKNOWN, false); +} + +} // namespace TestNewServiceSDKTestingErrorMapper +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingRequest.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingRequest.cpp new file mode 100644 index 000000000000..fad8fd44ed66 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingRequest.cpp @@ -0,0 +1,10 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include + +namespace Aws { +namespace TestNewServiceSDKTesting {} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/FooSummary.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/FooSummary.cpp new file mode 100644 index 000000000000..993d0482c402 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/FooSummary.cpp @@ -0,0 +1,56 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +#include + +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +namespace Aws { +namespace TestNewServiceSDKTesting { +namespace Model { + +FooSummary::FooSummary(JsonView jsonValue) { *this = jsonValue; } + +FooSummary& FooSummary::operator=(JsonView jsonValue) { + if (jsonValue.ValueExists("fooId")) { + m_fooId = jsonValue.GetString("fooId"); + m_fooIdHasBeenSet = true; + } + if (jsonValue.ValueExists("name")) { + m_name = jsonValue.GetString("name"); + m_nameHasBeenSet = true; + } + if (jsonValue.ValueExists("count")) { + m_count = jsonValue.GetInteger("count"); + m_countHasBeenSet = true; + } + return *this; +} + +JsonValue FooSummary::Jsonize() const { + JsonValue payload; + + if (m_fooIdHasBeenSet) { + payload.WithString("fooId", m_fooId); + } + + if (m_nameHasBeenSet) { + payload.WithString("name", m_name); + } + + if (m_countHasBeenSet) { + payload.WithInteger("count", m_count); + } + + return payload; +} + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFooRequest.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFooRequest.cpp new file mode 100644 index 000000000000..b72069d71167 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFooRequest.cpp @@ -0,0 +1,29 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +#include + +using namespace Aws::TestNewServiceSDKTesting::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +Aws::String GetFooRequest::SerializePayload() const { + JsonValue payload; + + if (m_fooIdHasBeenSet) { + payload.WithString("fooId", m_fooId); + } + + return payload.View().WriteReadable(); +} + +Aws::Http::HeaderValueCollection GetFooRequest::GetRequestSpecificHeaders() const { + Aws::Http::HeaderValueCollection headers; + headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "TestNewServiceSDKTesting.GetFoo")); + return headers; +} diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFooResult.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFooResult.cpp new file mode 100644 index 000000000000..a71d228fc990 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFooResult.cpp @@ -0,0 +1,41 @@ +/** + * 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::TestNewServiceSDKTesting::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; +using namespace Aws; + +GetFooResult::GetFooResult(const Aws::AmazonWebServiceResult& result) { *this = result; } + +GetFooResult& GetFooResult::operator=(const Aws::AmazonWebServiceResult& result) { + JsonView jsonValue = result.GetPayload().View(); + if (jsonValue.ValueExists("name")) { + m_name = jsonValue.GetString("name"); + m_nameHasBeenSet = true; + } + if (jsonValue.ValueExists("count")) { + m_count = jsonValue.GetInteger("count"); + m_countHasBeenSet = 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/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFoosRequest.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFoosRequest.cpp new file mode 100644 index 000000000000..b4869c461afe --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFoosRequest.cpp @@ -0,0 +1,37 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +#include + +using namespace Aws::TestNewServiceSDKTesting::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +Aws::String GetFoosRequest::SerializePayload() const { + JsonValue payload; + + if (m_nextTokenHasBeenSet) { + payload.WithString("nextToken", m_nextToken); + } + + if (m_maxResultsHasBeenSet) { + payload.WithInteger("maxResults", m_maxResults); + } + + if (m_debugHasBeenSet) { + payload.WithString("debug", m_debug); + } + + return payload.View().WriteReadable(); +} + +Aws::Http::HeaderValueCollection GetFoosRequest::GetRequestSpecificHeaders() const { + Aws::Http::HeaderValueCollection headers; + headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "TestNewServiceSDKTesting.GetFoos")); + return headers; +} diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFoosResult.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFoosResult.cpp new file mode 100644 index 000000000000..3870aa858078 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/GetFoosResult.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 +#include +#include + +#include + +using namespace Aws::TestNewServiceSDKTesting::Model; +using namespace Aws::Utils::Json; +using namespace Aws::Utils; +using namespace Aws; + +GetFoosResult::GetFoosResult(const Aws::AmazonWebServiceResult& result) { *this = result; } + +GetFoosResult& GetFoosResult::operator=(const Aws::AmazonWebServiceResult& result) { + JsonView jsonValue = result.GetPayload().View(); + if (jsonValue.ValueExists("foos")) { + Aws::Utils::Array foosJsonList = jsonValue.GetArray("foos"); + for (unsigned foosIndex = 0; foosIndex < foosJsonList.GetLength(); ++foosIndex) { + m_foos.push_back(foosJsonList[foosIndex].AsObject()); + } + m_foosHasBeenSet = true; + } + if (jsonValue.ValueExists("nextToken")) { + m_nextToken = jsonValue.GetString("nextToken"); + m_nextTokenHasBeenSet = true; + } + if (jsonValue.ValueExists("filter")) { + m_filter = jsonValue.GetString("filter"); + m_filterHasBeenSet = 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/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/LeaveEvent.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/LeaveEvent.cpp new file mode 100644 index 000000000000..aebc1a38d35e --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/LeaveEvent.cpp @@ -0,0 +1,33 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +#include + +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +namespace Aws { +namespace TestNewServiceSDKTesting { +namespace Model { + +LeaveEvent::LeaveEvent(JsonView jsonValue) { *this = jsonValue; } + +LeaveEvent& LeaveEvent::operator=(JsonView jsonValue) { + AWS_UNREFERENCED_PARAM(jsonValue); + return *this; +} + +JsonValue LeaveEvent::Jsonize() const { + JsonValue payload; + + return payload; +} + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/Message.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/Message.cpp new file mode 100644 index 000000000000..9eb51d493719 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/Message.cpp @@ -0,0 +1,40 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +#include + +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +namespace Aws { +namespace TestNewServiceSDKTesting { +namespace Model { + +Message::Message(JsonView jsonValue) { *this = jsonValue; } + +Message& Message::operator=(JsonView jsonValue) { + if (jsonValue.ValueExists("message")) { + m_message = jsonValue.GetString("message"); + m_messageHasBeenSet = true; + } + return *this; +} + +JsonValue Message::Jsonize() const { + JsonValue payload; + + if (m_messageHasBeenSet) { + payload.WithString("message", m_message); + } + + return payload; +} + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/NoSuchResource.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/NoSuchResource.cpp new file mode 100644 index 000000000000..b74c7c55f9cc --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/NoSuchResource.cpp @@ -0,0 +1,40 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +#include + +using namespace Aws::Utils::Json; +using namespace Aws::Utils; + +namespace Aws { +namespace TestNewServiceSDKTesting { +namespace Model { + +NoSuchResource::NoSuchResource(JsonView jsonValue) { *this = jsonValue; } + +NoSuchResource& NoSuchResource::operator=(JsonView jsonValue) { + if (jsonValue.ValueExists("resourceType")) { + m_resourceType = jsonValue.GetString("resourceType"); + m_resourceTypeHasBeenSet = true; + } + return *this; +} + +JsonValue NoSuchResource::Jsonize() const { + JsonValue payload; + + if (m_resourceTypeHasBeenSet) { + payload.WithString("resourceType", m_resourceType); + } + + return payload; +} + +} // namespace Model +} // namespace TestNewServiceSDKTesting +} // namespace Aws diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/PublishFoosRequest.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/PublishFoosRequest.cpp new file mode 100644 index 000000000000..1c2cc2f879b7 --- /dev/null +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/model/PublishFoosRequest.cpp @@ -0,0 +1,23 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +#include + +using namespace Aws::TestNewServiceSDKTesting::Model; +using namespace Aws::Utils::Stream; +using namespace Aws::Utils; +using namespace Aws; + +std::shared_ptr PublishFoosRequest::GetBody() const { return m_messages; } + +Aws::Http::HeaderValueCollection PublishFoosRequest::GetRequestSpecificHeaders() const { + Aws::Http::HeaderValueCollection headers; + headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "TestNewServiceSDKTesting.PublishFoos")); + headers.emplace(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_EVENTSTREAM_CONTENT_TYPE); + return headers; +} diff --git a/generated/tests/test-new-service-sdk-testing-gen-tests/CMakeLists.txt b/generated/tests/test-new-service-sdk-testing-gen-tests/CMakeLists.txt new file mode 100644 index 000000000000..4b9c5ff105ce --- /dev/null +++ b/generated/tests/test-new-service-sdk-testing-gen-tests/CMakeLists.txt @@ -0,0 +1,42 @@ +add_project(test-new-service-sdk-testing-gen-tests + "Tests for the AWS TEST-NEW-SERVICE-SDK-TESTING C++ SDK" + testing-resources + aws-cpp-sdk-test-new-service-sdk-testing + aws-cpp-sdk-core) + +file(GLOB AWS_TEST-NEW-SERVICE-SDK-TESTING_GENERATED_TEST_SRC + "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" +) + +if(MSVC AND BUILD_SHARED_LIBS) + add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1) +endif() + +if (CMAKE_CROSSCOMPILING) + set(AUTORUN_UNIT_TESTS OFF) +endif() + +if (AUTORUN_UNIT_TESTS) + enable_testing() +endif() + +if(PLATFORM_ANDROID AND BUILD_SHARED_LIBS) + add_library(${PROJECT_NAME} "${AWS_TEST-NEW-SERVICE-SDK-TESTING_GENERATED_TEST_SRC}") +else() + add_executable(${PROJECT_NAME} "${AWS_TEST-NEW-SERVICE-SDK-TESTING_GENERATED_TEST_SRC}") +endif() + +set_compiler_flags(${PROJECT_NAME}) +set_compiler_warnings(${PROJECT_NAME}) + +target_link_libraries(${PROJECT_NAME} ${PROJECT_LIBS}) + +if (AUTORUN_UNIT_TESTS) + ADD_CUSTOM_COMMAND( TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E env LD_LIBRARY_PATH=${AWS_AUTORUN_LD_LIBRARY_PATH}:$ENV{LD_LIBRARY_PATH} $ + ARGS "--gtest_brief=1") +endif() + +if(NOT CMAKE_CROSSCOMPILING) + SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) +endif() \ No newline at end of file diff --git a/generated/tests/test-new-service-sdk-testing-gen-tests/RunTests.cpp b/generated/tests/test-new-service-sdk-testing-gen-tests/RunTests.cpp new file mode 100644 index 000000000000..f2f10a7c7892 --- /dev/null +++ b/generated/tests/test-new-service-sdk-testing-gen-tests/RunTests.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 + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + + AWS_BEGIN_MEMORY_TEST_EX(options, 1024, 128); + Aws::Testing::InitPlatformTest(options); + Aws::Testing::ParseArgs(argc, argv); + + Aws::InitAPI(options); + ::testing::InitGoogleTest(&argc, argv); + int exitCode = RUN_ALL_TESTS(); + Aws::ShutdownAPI(options); + + AWS_END_MEMORY_TEST_EX; + Aws::Testing::ShutdownPlatformTest(options); + return exitCode; +} diff --git a/generated/tests/test-new-service-sdk-testing-gen-tests/TestNewServiceSDKTestingEndpointProviderTests.cpp b/generated/tests/test-new-service-sdk-testing-gen-tests/TestNewServiceSDKTestingEndpointProviderTests.cpp new file mode 100644 index 000000000000..3ba42184b714 --- /dev/null +++ b/generated/tests/test-new-service-sdk-testing-gen-tests/TestNewServiceSDKTestingEndpointProviderTests.cpp @@ -0,0 +1,404 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +#include + + +static const char* ALLOCATION_TAG = "AWSTestNewServiceSDKTestingEndpointProviderTests"; +using TestNewServiceSDKTestingEndpointProvider = Aws::TestNewServiceSDKTesting::Endpoint::TestNewServiceSDKTestingEndpointProvider; +using EndpointParameters = Aws::Vector; +using ResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome; + +using EpParam = Aws::Endpoint::EndpointParameter; +using EpProp = Aws::Endpoint::EndpointParameter; // just a container to store test expectations +using ExpEpProps = Aws::UnorderedMap>>; +using ExpEpAuthScheme = Aws::Vector; +using ExpEpHeaders = Aws::UnorderedMap>; + +struct TestNewServiceSDKTestingEndpointProviderEndpointTestCase +{ + using OperationParamsFromTest = EndpointParameters; + + struct Expect + { + struct Endpoint + { + Aws::String url; + ExpEpAuthScheme authScheme; + ExpEpProps properties; + ExpEpHeaders headers; + } endpoint; + Aws::String error; + }; + struct OperationInput + { + Aws::String operationName; + OperationParamsFromTest operationParams; + OperationParamsFromTest builtinParams; + OperationParamsFromTest clientParams; + }; + + Aws::String documentation; + // Specification tells us it is Client Initialization parameters + // At the same time, specification tells us to test EndpointProvider not the client itself + // Hence params here will be set as a client params (just like a dedicated field above). + Aws::Vector params; + Aws::Vector tags; + Expect expect; + // Aws::Vector operationInput; +}; + +class TestNewServiceSDKTestingEndpointProviderTests : public ::testing::TestWithParam +{ +public: + static const size_t TEST_CASES_SZ; +protected: + static Aws::Vector getTestCase(); + static Aws::UniquePtrSafeDeleted> TEST_CASES; + static void SetUpTestSuite() + { + TEST_CASES = Aws::MakeUniqueSafeDeleted>(ALLOCATION_TAG, getTestCase()); + ASSERT_TRUE(TEST_CASES) << "Failed to allocate TEST_CASES table"; + assert(TEST_CASES->size() == TEST_CASES_SZ); + } + + static void TearDownTestSuite() + { + TEST_CASES.reset(); + } +}; + +Aws::UniquePtrSafeDeleted> TestNewServiceSDKTestingEndpointProviderTests::TEST_CASES; +const size_t TestNewServiceSDKTestingEndpointProviderTests::TEST_CASES_SZ = 21; + +Aws::Vector TestNewServiceSDKTestingEndpointProviderTests::getTestCase() { + + Aws::Vector test_cases = { + /*TEST CASE 0*/ + {"For region us-east-1 with FIPS enabled and DualStack enabled", // documentation + {EpParam("UseFIPS", true), EpParam("Region", "us-east-1"), EpParam("UseDualStack", true)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting-fips.us-east-1.api.aws", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 1*/ + {"For region us-east-1 with FIPS enabled and DualStack disabled", // documentation + {EpParam("UseFIPS", true), EpParam("Region", "us-east-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting-fips.us-east-1.amazonaws.com", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 2*/ + {"For region us-east-1 with FIPS disabled and DualStack enabled", // documentation + {EpParam("UseFIPS", false), EpParam("Region", "us-east-1"), EpParam("UseDualStack", true)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting.us-east-1.api.aws", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 3*/ + {"For region us-east-1 with FIPS disabled and DualStack disabled", // documentation + {EpParam("UseFIPS", false), EpParam("Region", "us-east-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting.us-east-1.amazonaws.com", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 4*/ + {"For region cn-north-1 with FIPS enabled and DualStack enabled", // documentation + {EpParam("UseFIPS", true), EpParam("Region", "cn-north-1"), EpParam("UseDualStack", true)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting-fips.cn-north-1.api.amazonwebservices.com.cn", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 5*/ + {"For region cn-north-1 with FIPS enabled and DualStack disabled", // documentation + {EpParam("UseFIPS", true), EpParam("Region", "cn-north-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting-fips.cn-north-1.amazonaws.com.cn", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 6*/ + {"For region cn-north-1 with FIPS disabled and DualStack enabled", // documentation + {EpParam("UseFIPS", false), EpParam("Region", "cn-north-1"), EpParam("UseDualStack", true)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting.cn-north-1.api.amazonwebservices.com.cn", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 7*/ + {"For region cn-north-1 with FIPS disabled and DualStack disabled", // documentation + {EpParam("UseFIPS", false), EpParam("Region", "cn-north-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting.cn-north-1.amazonaws.com.cn", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 8*/ + {"For region us-gov-east-1 with FIPS enabled and DualStack enabled", // documentation + {EpParam("UseFIPS", true), EpParam("Region", "us-gov-east-1"), EpParam("UseDualStack", true)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting-fips.us-gov-east-1.api.aws", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 9*/ + {"For region us-gov-east-1 with FIPS enabled and DualStack disabled", // documentation + {EpParam("UseFIPS", true), EpParam("Region", "us-gov-east-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting-fips.us-gov-east-1.amazonaws.com", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 10*/ + {"For region us-gov-east-1 with FIPS disabled and DualStack enabled", // documentation + {EpParam("UseFIPS", false), EpParam("Region", "us-gov-east-1"), EpParam("UseDualStack", true)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting.us-gov-east-1.api.aws", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 11*/ + {"For region us-gov-east-1 with FIPS disabled and DualStack disabled", // documentation + {EpParam("UseFIPS", false), EpParam("Region", "us-gov-east-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting.us-gov-east-1.amazonaws.com", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 12*/ + {"For region us-iso-east-1 with FIPS enabled and DualStack disabled", // documentation + {EpParam("UseFIPS", true), EpParam("Region", "us-iso-east-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting-fips.us-iso-east-1.c2s.ic.gov", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 13*/ + {"For region us-iso-east-1 with FIPS disabled and DualStack disabled", // documentation + {EpParam("UseFIPS", false), EpParam("Region", "us-iso-east-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting.us-iso-east-1.c2s.ic.gov", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 14*/ + {"For region us-isob-east-1 with FIPS enabled and DualStack disabled", // documentation + {EpParam("UseFIPS", true), EpParam("Region", "us-isob-east-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting-fips.us-isob-east-1.sc2s.sgov.gov", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 15*/ + {"For region us-isob-east-1 with FIPS disabled and DualStack disabled", // documentation + {EpParam("UseFIPS", false), EpParam("Region", "us-isob-east-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://testnewservicesdktesting.us-isob-east-1.sc2s.sgov.gov", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 16*/ + {"For custom endpoint with region set and fips disabled and dualstack disabled", // documentation + {EpParam("UseFIPS", false), EpParam("Endpoint", "https://example.com"), EpParam("Region", "us-east-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://example.com", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 17*/ + {"For custom endpoint with region not set and fips disabled and dualstack disabled", // documentation + {EpParam("UseFIPS", false), EpParam("Endpoint", "https://example.com"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*epUrl*/"https://example.com", + {/*authScheme*/}, + {/*properties*/}, + {/*headers*/}}, {/*No error*/}} // expect + }, + /*TEST CASE 18*/ + {"For custom endpoint with fips enabled and dualstack disabled", // documentation + {EpParam("UseFIPS", true), EpParam("Endpoint", "https://example.com"), EpParam("Region", "us-east-1"), EpParam("UseDualStack", false)}, // params + {}, // tags + {{/*No endpoint expected*/}, /*error*/"Invalid Configuration: FIPS and custom endpoint are not supported"} // expect + }, + /*TEST CASE 19*/ + {"For custom endpoint with fips disabled and dualstack enabled", // documentation + {EpParam("UseFIPS", false), EpParam("Endpoint", "https://example.com"), EpParam("Region", "us-east-1"), EpParam("UseDualStack", true)}, // params + {}, // tags + {{/*No endpoint expected*/}, /*error*/"Invalid Configuration: Dualstack and custom endpoint are not supported"} // expect + }, + /*TEST CASE 20*/ + {"Missing region", // documentation + {}, // params + {}, // tags + {{/*No endpoint expected*/}, /*error*/"Invalid Configuration: Missing Region"} // expect + } + }; + return test_cases; +} + +Aws::String RulesToSdkSignerName(const Aws::String& rulesSignerName) +{ + Aws::String sdkSigner = "NullSigner"; + if (rulesSignerName == "sigv4") { + sdkSigner = "SignatureV4"; + } else if (rulesSignerName == "sigv4a") { + sdkSigner = "AsymmetricSignatureV4"; + } else if (rulesSignerName == "none") { + sdkSigner = "NullSigner"; + } else if (rulesSignerName == "bearer") { + sdkSigner = "Bearer"; + } else if (rulesSignerName == "s3Express") { + sdkSigner = "S3ExpressSigner"; + } else { + sdkSigner = rulesSignerName; + } + + return sdkSigner; +} + +void ValidateOutcome(const ResolveEndpointOutcome& outcome, const TestNewServiceSDKTestingEndpointProviderEndpointTestCase::Expect& expect) +{ + if(!expect.error.empty()) + { + ASSERT_FALSE(outcome.IsSuccess()) << "Expected failure with message:\n" << expect.error; + ASSERT_EQ(outcome.GetError().GetMessage(), expect.error); + } + else + { + AWS_ASSERT_SUCCESS(outcome); + ASSERT_EQ(outcome.GetResult().GetURL(), expect.endpoint.url); + const auto expAuthSchemesIt = expect.endpoint.properties.find("authSchemes"); + if (expAuthSchemesIt != expect.endpoint.properties.end()) + { + // in the list of AuthSchemes, select the one with a highest priority + const Aws::Vector priotityList = {"s3Express", "sigv4a", "sigv4", "bearer", "none", ""}; + const auto expectedAuthSchemePropsIt = std::find_first_of(expAuthSchemesIt->second.begin(), expAuthSchemesIt->second.end(), + priotityList.begin(), priotityList.end(), [](const Aws::Vector& props, const Aws::String& expName) + { + const auto& propNameIt = std::find_if(props.begin(), props.end(), [](const EpProp& prop) + { + return prop.GetName() == "name"; + }); + assert(propNameIt != props.end()); + return propNameIt->GetStrValueNoCheck() == expName; + }); + assert(expectedAuthSchemePropsIt != expAuthSchemesIt->second.end()); + + const auto& endpointResultAttrs = outcome.GetResult().GetAttributes(); + ASSERT_TRUE(endpointResultAttrs) << "Expected non-empty EndpointAttributes (authSchemes)"; + for (const auto& expProperty : *expectedAuthSchemePropsIt) + { + if (expProperty.GetName() == "name") { + ASSERT_TRUE(!endpointResultAttrs->authScheme.GetName().empty()); + ASSERT_EQ(RulesToSdkSignerName(expProperty.GetStrValueNoCheck()), endpointResultAttrs->authScheme.GetName()); + } else if (expProperty.GetName() == "signingName") { + ASSERT_TRUE(endpointResultAttrs->authScheme.GetSigningName()); + ASSERT_EQ(expProperty.GetStrValueNoCheck(), endpointResultAttrs->authScheme.GetSigningName().value()); + } else if (expProperty.GetName() == "signingRegion") { + ASSERT_TRUE(endpointResultAttrs->authScheme.GetSigningRegion()); + ASSERT_EQ(expProperty.GetStrValueNoCheck(), endpointResultAttrs->authScheme.GetSigningRegion().value()); + } else if (expProperty.GetName() == "signingRegionSet") { + ASSERT_TRUE(endpointResultAttrs->authScheme.GetSigningRegionSet()); + ASSERT_EQ(expProperty.GetStrValueNoCheck(), endpointResultAttrs->authScheme.GetSigningRegionSet().value()); + } else if (expProperty.GetName() == "disableDoubleEncoding") { + ASSERT_TRUE(endpointResultAttrs->authScheme.GetDisableDoubleEncoding()); + ASSERT_EQ(expProperty.GetBoolValueNoCheck(), endpointResultAttrs->authScheme.GetDisableDoubleEncoding().value()); + } else { + FAIL() << "Unsupported Auth type property " << expProperty.GetName() << ". Need to update test."; + } + } + } + + EXPECT_EQ(expect.endpoint.headers.empty(), outcome.GetResult().GetHeaders().empty()); + for(const auto& expHeaderVec : expect.endpoint.headers) + { + const auto& retHeaderIt = outcome.GetResult().GetHeaders().find(expHeaderVec.first); + ASSERT_TRUE(retHeaderIt != outcome.GetResult().GetHeaders().end()); + + auto retHeaderVec = Aws::Utils::StringUtils::Split(retHeaderIt->second, ';'); + std::sort(retHeaderVec.begin(), retHeaderVec.end()); + + auto expHeaderVecSorted = expHeaderVec.second; + std::sort(expHeaderVecSorted.begin(), expHeaderVecSorted.end()); + + ASSERT_EQ(expHeaderVecSorted, retHeaderVec); + } + } +} + +TEST_P(TestNewServiceSDKTestingEndpointProviderTests, EndpointProviderTest) +{ + const size_t TEST_CASE_IDX = GetParam(); + ASSERT_LT(TEST_CASE_IDX, TEST_CASES->size()) << "Something is wrong with the test fixture itself."; + const TestNewServiceSDKTestingEndpointProviderEndpointTestCase& TEST_CASE = TEST_CASES->at(TEST_CASE_IDX); + SCOPED_TRACE(Aws::String("\nTEST CASE # ") + Aws::Utils::StringUtils::to_string(TEST_CASE_IDX) + ": " + TEST_CASE.documentation); + SCOPED_TRACE(Aws::String("\n--gtest_filter=EndpointTestsFromModel/TestNewServiceSDKTestingEndpointProviderTests.EndpointProviderTest/") + Aws::Utils::StringUtils::to_string(TEST_CASE_IDX)); + + std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG); + ASSERT_TRUE(endpointProvider) << "Failed to allocate/initialize TestNewServiceSDKTestingEndpointProvider"; + + EndpointParameters endpointParameters; + for(const auto& param : TEST_CASE.params) + { + endpointParameters.emplace(endpointParameters.end(), Aws::Endpoint::EndpointParameter(param)); + } + auto resolvedEndpointOutcome = endpointProvider->ResolveEndpoint(endpointParameters); + ValidateOutcome(resolvedEndpointOutcome, TEST_CASE.expect); + +#if 0 // temporarily disabled + for(const auto& operation : TEST_CASE.operationInput) + { + /* + * Most specific to least specific value locations: + staticContextParams + contextParam + clientContextParams + Built-In Bindings + Built-in binding default values + */ + const Aws::Vector> + operationInputParams = {std::cref(operation.builtinParams), std::cref(operation.clientParams), std::cref(operation.operationParams)}; + + for(const auto& paramSource : operationInputParams) + { + for(const auto& param : paramSource.get()) + { + endpointParameters.emplace(endpointParameters.end(), Aws::Endpoint::EndpointParameter(param)); + } + } + auto resolvedEndpointOutcomePerOperation = endpointProvider->ResolveEndpoint(endpointParameters); + ValidateOutcome(resolvedEndpointOutcomePerOperation, TEST_CASE.expect); + } +#endif +} + +INSTANTIATE_TEST_SUITE_P(EndpointTestsFromModel, + TestNewServiceSDKTestingEndpointProviderTests, + ::testing::Range((size_t) 0u, TestNewServiceSDKTestingEndpointProviderTests::TEST_CASES_SZ)); diff --git a/generated/tests/test-new-service-sdk-testing-gen-tests/TestNewServiceSDKTestingIncludeTests.cpp b/generated/tests/test-new-service-sdk-testing-gen-tests/TestNewServiceSDKTestingIncludeTests.cpp new file mode 100644 index 000000000000..d2c19fef54c2 --- /dev/null +++ b/generated/tests/test-new-service-sdk-testing-gen-tests/TestNewServiceSDKTestingIncludeTests.cpp @@ -0,0 +1,38 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using TestNewServiceSDKTestingIncludeTest = ::testing::Test; + +TEST_F(TestNewServiceSDKTestingIncludeTest, TestClientCompiles) +{ + Aws::Client::ClientConfigurationInitValues cfgInit; + cfgInit.shouldDisableIMDS = true; + Aws::Client::ClientConfiguration config(cfgInit); + AWS_UNREFERENCED_PARAM(config); + // auto pClient = Aws::MakeUnique("TestNewServiceSDKTestingIncludeTest", config); + // ASSERT_TRUE(pClient.get()); +} diff --git a/tools/code-generation/api-descriptions/test-new-service-sdk-testing-2024-03-20.normal.json b/tools/code-generation/api-descriptions/test-new-service-sdk-testing-2024-03-20.normal.json new file mode 100644 index 000000000000..e9d15f9a324d --- /dev/null +++ b/tools/code-generation/api-descriptions/test-new-service-sdk-testing-2024-03-20.normal.json @@ -0,0 +1,141 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2024-03-20", + "auth":["aws.auth#sigv4"], + "endpointPrefix":"testnewservicesdktesting", + "jsonVersion":"1.0", + "protocol":"json", + "protocols":["json"], + "serviceFullName":"Test New Service SDK Testing", + "serviceId":"Test New Service SDK Testing", + "signatureVersion":"v4", + "signingName":"testnewservicesdktesting", + "targetPrefix":"TestNewServiceSDKTesting", + "uid":"test-new-service-sdk-testing-2024-03-20" + }, + "operations":{ + "GetFoo":{ + "name":"GetFoo", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetFooInput"}, + "output":{"shape":"GetFooOutput"}, + "errors":[ + {"shape":"NoSuchResource"} + ], + "readonly":true + }, + "GetFoos":{ + "name":"GetFoos", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetFoosInput"}, + "output":{"shape":"GetFoosOutput"}, + "readonly":true + }, + "PublishFoos":{ + "name":"PublishFoos", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PublishFoosInput"}, + "readonly":true + } + }, + "shapes":{ + "FooIdString":{ + "type":"string", + "pattern":"[A-Za-z0-9 ]+" + }, + "FooList":{ + "type":"list", + "member":{"shape":"FooSummary"} + }, + "FooSummary":{ + "type":"structure", + "required":["fooId"], + "members":{ + "fooId":{"shape":"FooIdString"}, + "name":{"shape":"String"}, + "count":{"shape":"Integer"} + } + }, + "GetFooInput":{ + "type":"structure", + "required":["fooId"], + "members":{ + "fooId":{"shape":"FooIdString"} + } + }, + "GetFooOutput":{ + "type":"structure", + "required":["name"], + "members":{ + "name":{"shape":"String"}, + "count":{"shape":"Integer"} + } + }, + "GetFoosInput":{ + "type":"structure", + "members":{ + "nextToken":{"shape":"String"}, + "maxResults":{"shape":"Integer"}, + "debug":{"shape":"String"} + } + }, + "GetFoosOutput":{ + "type":"structure", + "members":{ + "foos":{"shape":"FooList"}, + "nextToken":{"shape":"String"}, + "filter":{"shape":"String"} + } + }, + "Integer":{ + "type":"integer", + "box":true + }, + "LeaveEvent":{ + "type":"structure", + "members":{}, + "event":true + }, + "Message":{ + "type":"structure", + "members":{ + "message":{"shape":"String"} + }, + "event":true + }, + "NoSuchResource":{ + "type":"structure", + "required":["resourceType"], + "members":{ + "resourceType":{"shape":"String"} + }, + "exception":true + }, + "PublishEvents":{ + "type":"structure", + "members":{ + "message":{"shape":"Message"}, + "leave":{"shape":"LeaveEvent"} + }, + "eventstream":true + }, + "PublishFoosInput":{ + "type":"structure", + "members":{ + "room":{"shape":"String"}, + "messages":{"shape":"PublishEvents"} + } + }, + "String":{"type":"string"} + } +} diff --git a/tools/code-generation/endpoints/test-new-service-sdk-testing-2024-03-20.endpoint-rule-set.json b/tools/code-generation/endpoints/test-new-service-sdk-testing-2024-03-20.endpoint-rule-set.json new file mode 100644 index 000000000000..af511c925494 --- /dev/null +++ b/tools/code-generation/endpoints/test-new-service-sdk-testing-2024-03-20.endpoint-rule-set.json @@ -0,0 +1,350 @@ +{ + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "string" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "string" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://testnewservicesdktesting-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://testnewservicesdktesting-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://testnewservicesdktesting.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://testnewservicesdktesting.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] +} \ No newline at end of file diff --git a/tools/code-generation/endpoints/test-new-service-sdk-testing-2024-03-20.endpoint-tests.json b/tools/code-generation/endpoints/test-new-service-sdk-testing-2024-03-20.endpoint-tests.json new file mode 100644 index 000000000000..d79dc0aaa33b --- /dev/null +++ b/tools/code-generation/endpoints/test-new-service-sdk-testing-2024-03-20.endpoint-tests.json @@ -0,0 +1,270 @@ +{ + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://testnewservicesdktesting.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" +} \ No newline at end of file From 74444680fccd72f9513242771a2e57a300b2b8ef Mon Sep 17 00:00:00 2001 From: aws-sdk-cpp-automation Date: Mon, 22 Dec 2025 10:23:44 -0500 Subject: [PATCH 3/6] init --- .../model/PublishEvents.h | 13 +++++++++ .../model/PublishFoosRequest.h | 16 ++++++++++- .../source/TestNewServiceSDKTestingClient.cpp | 1 + .../client/AWSClientEventStreamingAsyncTask.h | 8 ++++-- .../cpp/ModelClassMembersAndInlines.vm | 4 +++ .../velocity/cpp/RequestHeader.vm | 28 +++++++++++++++++++ .../cpp/ServiceClientSourceHeaders.vm | 2 +- .../velocity/cpp/json/EventStreamHeader.vm | 7 +++++ 8 files changed, 75 insertions(+), 4 deletions(-) diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishEvents.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishEvents.h index 79645634b2b2..49d84c934f1a 100644 --- a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishEvents.h +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishEvents.h @@ -5,10 +5,12 @@ #pragma once #include +#include #include #include #include +#include #include namespace Aws { @@ -34,6 +36,17 @@ class AWS_TESTNEWSERVICESDKTESTING_API PublishEvents : public Aws::Utils::Event: WriteEvent(msg); return *this; } + + std::function& GetInitialResponseCallbackEx() { + return m_initialResponseCallback; + } + void SetInitialResponseCallbackEx( + std::function callback) { + m_initialResponseCallback = std::move(callback); + } + + private: + std::function m_initialResponseCallback; }; } // namespace Model diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishFoosRequest.h b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishFoosRequest.h index 84ba8d748d2c..48390ebf38d2 100644 --- a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishFoosRequest.h +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/include/aws/test-new-service-sdk-testing/model/PublishFoosRequest.h @@ -4,6 +4,7 @@ */ #pragma once +#include #include #include #include @@ -20,7 +21,7 @@ namespace Model { */ class PublishFoosRequest : public TestNewServiceSDKTestingRequest { public: - AWS_TESTNEWSERVICESDKTESTING_API PublishFoosRequest() = default; + AWS_TESTNEWSERVICESDKTESTING_API PublishFoosRequest() : m_eventStreamDecoder(nullptr) {} // 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. @@ -35,6 +36,17 @@ class PublishFoosRequest : public TestNewServiceSDKTestingRequest { AWS_TESTNEWSERVICESDKTESTING_API std::shared_ptr GetBody() const override; AWS_TESTNEWSERVICESDKTESTING_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; + /** + * Underlying Event Stream Handler which is used to define the handlers to process the underlying event-stream + */ + inline std::shared_ptr GetEventStreamHandler() const { return m_messages; } + inline void SetEventStreamHandler(std::shared_ptr value) { m_messages = std::move(value); } + + /** + * Event Stream Decoder for processing incoming event stream messages + */ + inline Aws::Utils::Event::EventStreamDecoder& GetEventStreamDecoder() const { return m_eventStreamDecoder; } + ///@{ inline const Aws::String& GetRoom() const { return m_room; } @@ -68,6 +80,8 @@ class PublishFoosRequest : public TestNewServiceSDKTestingRequest { Aws::String m_room; std::shared_ptr m_messages; + mutable Aws::Utils::Event::EventStreamDecoder m_eventStreamDecoder{nullptr}; + bool m_roomHasBeenSet = false; bool m_messagesHasBeenSet = false; }; diff --git a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingClient.cpp b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingClient.cpp index 906fb52cb5a5..feea4a7ffa17 100644 --- a/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingClient.cpp +++ b/generated/src/aws-cpp-sdk-test-new-service-sdk-testing/source/TestNewServiceSDKTestingClient.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/src/aws-cpp-sdk-core/include/aws/core/client/AWSClientEventStreamingAsyncTask.h b/src/aws-cpp-sdk-core/include/aws/core/client/AWSClientEventStreamingAsyncTask.h index bcef3211914b..c918705cdbbf 100644 --- a/src/aws-cpp-sdk-core/include/aws/core/client/AWSClientEventStreamingAsyncTask.h +++ b/src/aws-cpp-sdk-core/include/aws/core/client/AWSClientEventStreamingAsyncTask.h @@ -61,9 +61,13 @@ class AWS_CORE_LOCAL BidirectionalEventStreamingTask final { AWS_CHECK_PTR(ClientT::GetAllocationTag(), request); AWS_CHECK_PTR(ClientT::GetAllocationTag(), response); - auto& initialResponseHandler = request->GetEventStreamHandler().GetInitialResponseCallbackEx(); + auto& initialResponseHandler = request->GetEventStreamHandler()->GetInitialResponseCallbackEx(); if (initialResponseHandler) { - initialResponseHandler({response->GetHeaders()}, Utils::Event::InitialResponseType::ON_RESPONSE); + Utils::Event::Message msg; + for (const auto& header : response->GetHeaders()) { + msg.InsertEventHeader(header.first, header.second); + } + initialResponseHandler(msg, Utils::Event::InitialResponseType::ON_RESPONSE); } }); } 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 ef1ac79f372d..afc2fbdabf8d 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 @@ -153,6 +153,10 @@ ${operation.name}Handler m_handler; Aws::Utils::Event::EventStreamDecoder m_decoder{Utils::Event::EventStreamDecoder(&m_handler)}; +#end +#if($operation.request.shape.hasEventStreamMembers()) + mutable Aws::Utils::Event::EventStreamDecoder m_eventStreamDecoder{nullptr}; + #end #end##if($shape.members.size() > 0) #foreach($member in $shape.members.entrySet()) diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/RequestHeader.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/RequestHeader.vm index 4516a24155af..f22742683b7b 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/RequestHeader.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/RequestHeader.vm @@ -13,6 +13,7 @@ #end #if($operation.request.shape.hasEventStreamMembers()) \#include +\#include #end #foreach($header in $typeInfo.headerIncludes) \#include $header @@ -46,7 +47,11 @@ namespace Model class ${typeInfo.className} : public ${typeInfo.baseClass} { public: +#if($operation.request.shape.hasEventStreamMembers()) + ${exportMacro} ${typeInfo.className}() : m_eventStreamDecoder(nullptr) {} +#else ${exportMacro} ${typeInfo.className}() = default; +#end // 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. @@ -140,6 +145,29 @@ namespace Model */ inline ${operation.request.shape.name}& WithEventStreamHandler(const ${operation.name}Handler& value) { SetEventStreamHandler(value); return *this; } +#end +#if($operation.request.shape.hasEventStreamMembers()) +#set($streamMemberName = "") +#set($streamMemberType = "") +#foreach($memberEntry in $operation.request.shape.members.entrySet()) +#if($memberEntry.value.shape.isEventStream()) +#set($streamMemberName = $memberEntry.key) +#set($streamMemberType = $memberEntry.value.shape.name) +#break +#end +#end +#set($streamMemberNameCap = $CppViewHelper.capitalizeFirstChar($streamMemberName)) + /** + * Underlying Event Stream Handler which is used to define the handlers to process the underlying event-stream + */ + inline std::shared_ptr<${streamMemberType}> GetEventStreamHandler() const { return m_${streamMemberName}; } + inline void SetEventStreamHandler(std::shared_ptr<${streamMemberType}> value) { m_${streamMemberName} = std::move(value); } + + /** + * Event Stream Decoder for processing incoming event stream messages + */ + inline Aws::Utils::Event::EventStreamDecoder& GetEventStreamDecoder() const { return m_eventStreamDecoder; } + #end #if($operation.requestCompressionRequired) #if($operation.requestCompressionRequiredGzip) diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ServiceClientSourceHeaders.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ServiceClientSourceHeaders.vm index fbaf190c7cff..6c0ab3b6b800 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ServiceClientSourceHeaders.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/ServiceClientSourceHeaders.vm @@ -8,10 +8,10 @@ #set($hasEventStreamRequest = true) #end #end -#if($hasEventStreamResult) #if($hasEventStreamRequest) \#include #end +#if($hasEventStreamResult) \#include #end #if($arnEndpointSupported || $metadata.hasEndpointDiscoveryTrait) diff --git a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/EventStreamHeader.vm b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/EventStreamHeader.vm index d21f5bd226c5..d50d17dadef4 100644 --- a/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/EventStreamHeader.vm +++ b/tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/json/EventStreamHeader.vm @@ -9,6 +9,8 @@ \#include $header #end \#include +\#include +\#include #foreach($entry in $shape.members.entrySet()) #if($entry.value.shape.isEvent()) #foreach($eventMemberEntry in $entry.value.shape.members.entrySet()) @@ -75,6 +77,11 @@ namespace Model #end #end + std::function& GetInitialResponseCallbackEx() { return m_initialResponseCallback; } + void SetInitialResponseCallbackEx(std::function callback) { m_initialResponseCallback = std::move(callback); } + + private: + std::function m_initialResponseCallback; }; } // namespace Model From 1cd8ee4e55b8561e5b43623e0b8de91553c9e62b Mon Sep 17 00:00:00 2001 From: kai lin Date: Mon, 22 Dec 2025 16:14:56 -0500 Subject: [PATCH 4/6] crt --- crt/aws-crt-cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crt/aws-crt-cpp b/crt/aws-crt-cpp index 8923e174f20c..11530e960420 160000 --- a/crt/aws-crt-cpp +++ b/crt/aws-crt-cpp @@ -1 +1 @@ -Subproject commit 8923e174f20c39c647f25abb3e16d1418558ec55 +Subproject commit 11530e960420c9ab119a63c865d494f00d812e5a From cde5023cafa89cac99952f5a0ff1207be237810c Mon Sep 17 00:00:00 2001 From: kai lin Date: Mon, 22 Dec 2025 16:17:03 -0500 Subject: [PATCH 5/6] crt --- crt/aws-crt-cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crt/aws-crt-cpp b/crt/aws-crt-cpp index 11530e960420..e9e4db739f61 160000 --- a/crt/aws-crt-cpp +++ b/crt/aws-crt-cpp @@ -1 +1 @@ -Subproject commit 11530e960420c9ab119a63c865d494f00d812e5a +Subproject commit e9e4db739f614286fdd7039437f22429745b053c From ebf30f979f0076aea26b66dfdd023ac329e56907 Mon Sep 17 00:00:00 2001 From: kai lin Date: Mon, 22 Dec 2025 16:17:15 -0500 Subject: [PATCH 6/6] crt --- crt/aws-crt-cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crt/aws-crt-cpp b/crt/aws-crt-cpp index e9e4db739f61..cef647c846be 160000 --- a/crt/aws-crt-cpp +++ b/crt/aws-crt-cpp @@ -1 +1 @@ -Subproject commit e9e4db739f614286fdd7039437f22429745b053c +Subproject commit cef647c846be603131fbd21ad389dee1bdd0414d