> ");
- #line 164 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 174 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(member.PropertyName));
#line default
#line hidden
this.Write("Received;\r\n");
- #line 165 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 175 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
}
@@ -421,7 +431,7 @@ protected override bool IsProcessing
#line default
#line hidden
- #line 168 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 178 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
}
@@ -431,7 +441,7 @@ protected override bool IsProcessing
this.Write("\r\n /// \r\n /// Construct an instance\r\n /// \r\n /// \r\n public ");
- #line 176 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 186 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.Structure.Name));
#line default
@@ -447,7 +457,7 @@ protected override bool IsProcessing
///
public ");
- #line 185 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 195 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.Structure.Name));
#line default
@@ -476,7 +486,7 @@ protected override bool IsProcessing
var _ =
");
- #line 207 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 217 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
if(isResponse)
@@ -485,7 +495,7 @@ protected override bool IsProcessing
#line hidden
this.Write(" RaiseEvent(InitialResponseReceived, ev) ||\r\n");
- #line 211 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 221 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
else if(isRequest)
@@ -494,7 +504,7 @@ protected override bool IsProcessing
#line hidden
this.Write(" RaiseEvent(InitialRequestReceived,ev) ||\r\n");
- #line 215 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 225 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
var eventMembers = this.Structure.Members.Where(m => m.ModelShape.IsEvent).ToArray();
@@ -506,14 +516,14 @@ protected override bool IsProcessing
#line hidden
this.Write(" RaiseEvent(");
- #line 221 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 231 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(eventMembers[0].PropertyName));
#line default
#line hidden
this.Write("Received,ev);\r\n");
- #line 222 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 232 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
}
else if (eventMembers.Length > 1)
@@ -526,14 +536,14 @@ protected override bool IsProcessing
#line hidden
this.Write(" RaiseEvent(");
- #line 229 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 239 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(eventMembers[i].PropertyName));
#line default
#line hidden
this.Write("Received,ev) ||\r\n");
- #line 230 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 240 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
}
@@ -542,14 +552,14 @@ protected override bool IsProcessing
#line hidden
this.Write(" RaiseEvent(");
- #line 233 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 243 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(eventMembers.Last().PropertyName));
#line default
#line hidden
this.Write("Received,ev);\r\n");
- #line 234 "C:\codebase\v4\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
+ #line 244 "C:\repos\aws-sdk-net-v4\generator\ServiceClientGeneratorLib\Generators\SourceFiles\EventStreamOutputGenerator.tt"
}
diff --git a/generator/ServiceClientGeneratorLib/Generators/SourceFiles/EventStreamOutputGenerator.tt b/generator/ServiceClientGeneratorLib/Generators/SourceFiles/EventStreamOutputGenerator.tt
index 2e6cdeaca767..ae39ae3bc83e 100644
--- a/generator/ServiceClientGeneratorLib/Generators/SourceFiles/EventStreamOutputGenerator.tt
+++ b/generator/ServiceClientGeneratorLib/Generators/SourceFiles/EventStreamOutputGenerator.tt
@@ -23,6 +23,8 @@
protocol = "Json";
else if(string.Equals(this.Config.ServiceModel.Protocol,"rest-xml",StringComparison.OrdinalIgnoreCase))
protocol = "Xml";
+ else if(string.Equals(this.Config.ServiceModel.Protocol,"smithy-rpc-v2-cbor",StringComparison.OrdinalIgnoreCase))
+ protocol = "Cbor";
else
{
throw new NotSupportedException("The given protocol is not supported or has not been implemented yet");
@@ -67,6 +69,10 @@
{"<#=member.PropertyName#>", payload => new <#=member.DetermineType()#>Unmarshaller().Unmarshall(context);},
<#
}
+ else if (protocol == "Cbor")
+ {
+ // TODO
+ }
else
{
throw new NotImplementedException("The given protocol is not supported");
@@ -104,6 +110,10 @@
{ "<#=member.PropertyName#>", payload => new <#=this.Config.ClassName#>EventStreamException(Encoding.UTF8.GetString(payload.Payload), new <#=member.ModelShape#>Unmarshaller().Unmarshall(EventStreamUtils.ConvertMessageTo<#=protocol#>Context(payload))) },
<#
}
+ else if (protocol == "Cbor")
+ {
+ // TODO
+ }
else
throw new NotImplementedException("The given protocol is not supported");
}
diff --git a/generator/ServiceClientGeneratorLib/Member.cs b/generator/ServiceClientGeneratorLib/Member.cs
index 977666aa79bb..78b80d72edbb 100644
--- a/generator/ServiceClientGeneratorLib/Member.cs
+++ b/generator/ServiceClientGeneratorLib/Member.cs
@@ -697,6 +697,11 @@ string GetTypeUnmarshallerName(JsonData extendedData, bool useNullable = true)
else if (this.model.Type == ServiceType.Query || this.model.Type == ServiceType.Rest_Xml)
return string.Format("XmlDictionaryUnmarshaller<{0}, {1}, {2}, {3}>",
keyType, valueType, keyTypeUnmarshaller, valueTypeUnmarshaller);
+ else if (this.model.Type == ServiceType.Cbor)
+ //TODO return string.Format("CborDictionaryUnmarshaller<{0}, {1}, {2}, {3}>",
+ // keyType, valueType, keyTypeUnmarshaller, valueTypeUnmarshaller);
+ return string.Format("JsonDictionaryUnmarshaller<{0}, {1}, {2}, {3}>",
+ keyType, valueType, keyTypeUnmarshaller, valueTypeUnmarshaller);
else
throw new Exception("Unknown protocol type");
case "list":
@@ -704,9 +709,13 @@ string GetTypeUnmarshallerName(JsonData extendedData, bool useNullable = true)
var listTypeUnmarshaller = GetTypeUnmarshallerName(memberShape[Member.MemberKey], useNullable);
if (this.model.Type == ServiceType.Json || this.model.Type == ServiceType.Rest_Json)
return string.Format("JsonListUnmarshaller<{0},{1}>",listType, listTypeUnmarshaller);
- if (this.model.Type == ServiceType.Rest_Xml || this.model.Type == ServiceType.Query)
+ else if (this.model.Type == ServiceType.Rest_Xml || this.model.Type == ServiceType.Query)
return string.Format("XmlListUnmarshaller<{0}, {1}>",
listType, listTypeUnmarshaller);
+ else if (this.model.Type == ServiceType.Cbor)
+ //TODO return string.Format("CborListUnmarshaller<{0}, {1}>",
+ //listType, listTypeUnmarshaller);
+ return string.Format("JsonListUnmarshaller<{0},{1}>",listType, listTypeUnmarshaller);
else
{
throw new Exception("Unknown protocol type");
@@ -803,6 +812,11 @@ public string DetermineTypeUnmarshallerInstantiate(JsonData extendedData, string
if (this.model.Type == ServiceType.Json || this.model.Type == ServiceType.Rest_Json)
return string.Format("new JsonDictionaryUnmarshaller<{0}, {1}, {2}, {3}>(StringUnmarshaller.Instance, {5})",
keyType, valueType, keyTypeUnmarshaller, valueTypeUnmarshaller, keyTypeUnmarshallerInstantiate, valueTypeUnmarshallerInstantiate);
+ else if (this.model.Type == ServiceType.Cbor)
+ //TODO return string.Format("new CborDictionaryUnmarshaller<{0}, {1}, {2}, {3}>(StringUnmarshaller.Instance, {5})",
+ // keyType, valueType, keyTypeUnmarshaller, valueTypeUnmarshaller, keyTypeUnmarshallerInstantiate, valueTypeUnmarshallerInstantiate);
+ return string.Format("new JsonDictionaryUnmarshaller<{0}, {1}, {2}, {3}>(StringUnmarshaller.Instance, {5})",
+ keyType, valueType, keyTypeUnmarshaller, valueTypeUnmarshaller, keyTypeUnmarshallerInstantiate, valueTypeUnmarshallerInstantiate);
else if (this.model.Type == ServiceType.Rest_Xml && !isFlat)
return string.Format("new XmlDictionaryUnmarshaller<{0}, {1}, {2}, {3}>(StringUnmarshaller.Instance, {5}, \"{6}\", \"{7}\")",
keyType, valueType, keyTypeUnmarshaller, valueTypeUnmarshaller, keyTypeUnmarshallerInstantiate, valueTypeUnmarshallerInstantiate, keyLocationName, valueLocationName);
@@ -817,6 +831,11 @@ public string DetermineTypeUnmarshallerInstantiate(JsonData extendedData, string
if (this.model.Type == ServiceType.Json || this.model.Type == ServiceType.Rest_Json)
return string.Format("new JsonListUnmarshaller<{0}, {1}>({2})",
listType, listTypeUnmarshaller, listTypeUnmarshallerInstantiate);
+ else if (this.model.Type == ServiceType.Cbor)
+ // TODO return string.Format("new CborListUnmarshaller<{0}, {1}>({2})",
+ // listType, listTypeUnmarshaller, listTypeUnmarshallerInstantiate);
+ return string.Format("new JsonListUnmarshaller<{0}, {1}>({2})",
+ listType, listTypeUnmarshaller, listTypeUnmarshallerInstantiate);
else if ((this.model.Type == ServiceType.Query || this.model.Type == ServiceType.Rest_Xml) && $"{listTypeUnmarshaller}.Instance" != listTypeUnmarshallerInstantiate)
return $"new {listTypeUnmarshaller}({listTypeUnmarshallerInstantiate})";
else
@@ -1194,6 +1213,8 @@ internal static TimestampFormat GetDefaultTimestampFormat(MarshallLocation marsh
return TimestampFormat.ISO8601;
case ServiceType.Rest_Xml:
return TimestampFormat.ISO8601;
+ case ServiceType.Cbor:
+ return TimestampFormat.UnixTimestamp;
default:
throw new InvalidOperationException(
diff --git a/generator/TestServiceModels/restjson-tests-client/rest-json-protocol-2019-12-16.normal.json b/generator/TestServiceModels/restjson-tests-client/rest-json-protocol-2019-12-16.normal.json
index 1b52f0baf5e1..229326a898d7 100644
--- a/generator/TestServiceModels/restjson-tests-client/rest-json-protocol-2019-12-16.normal.json
+++ b/generator/TestServiceModels/restjson-tests-client/rest-json-protocol-2019-12-16.normal.json
@@ -176,6 +176,17 @@
"documentation":"This example tests httpChecksumRequired trait
",
"httpChecksumRequired":true
},
+ "HttpEmptyPrefixHeaders":{
+ "name":"HttpEmptyPrefixHeaders",
+ "http":{
+ "method":"GET",
+ "requestUri":"/HttpEmptyPrefixHeaders",
+ "responseCode":200
+ },
+ "input":{"shape":"HttpEmptyPrefixHeadersInput"},
+ "output":{"shape":"HttpEmptyPrefixHeadersOutput"},
+ "documentation":"Clients that perform this test extract all headers from the response.
"
+ },
"HttpEnumPayload":{
"name":"HttpEnumPayload",
"http":{
@@ -1030,6 +1041,36 @@
"type":"timestamp",
"timestampFormat":"rfc822"
},
+ "HttpEmptyPrefixHeadersInput":{
+ "type":"structure",
+ "members":{
+ "prefixHeaders":{
+ "shape":"StringMap",
+ "location":"headers",
+ "locationName":""
+ },
+ "specificHeader":{
+ "shape":"String",
+ "location":"header",
+ "locationName":"hello"
+ }
+ }
+ },
+ "HttpEmptyPrefixHeadersOutput":{
+ "type":"structure",
+ "members":{
+ "prefixHeaders":{
+ "shape":"StringMap",
+ "location":"headers",
+ "locationName":""
+ },
+ "specificHeader":{
+ "shape":"String",
+ "location":"header",
+ "locationName":"hello"
+ }
+ }
+ },
"HttpPayloadTraitsInputOutput":{
"type":"structure",
"members":{
diff --git a/generator/TestServiceModels/restxml-tests-client/rest-xml-protocol-2019-12-16.normal.json b/generator/TestServiceModels/restxml-tests-client/rest-xml-protocol-2019-12-16.normal.json
index 57c47de1a677..5d91859fd83e 100644
--- a/generator/TestServiceModels/restxml-tests-client/rest-xml-protocol-2019-12-16.normal.json
+++ b/generator/TestServiceModels/restxml-tests-client/rest-xml-protocol-2019-12-16.normal.json
@@ -229,6 +229,21 @@
"documentation": "This operation has three possible return values:
A successful response in the form of GreetingWithErrorsOutput An InvalidGreeting error. A BadRequest error. Implementations must be able to successfully take a response and properly (de)serialize successful and error responses based on the the presence of the
",
"idempotent": true
},
+ "HttpEmptyPrefixHeaders": {
+ "name": "HttpEmptyPrefixHeaders",
+ "http": {
+ "method": "GET",
+ "requestUri": "/HttpEmptyPrefixHeaders",
+ "responseCode": 200
+ },
+ "input": {
+ "shape": "HttpEmptyPrefixHeadersInput"
+ },
+ "output": {
+ "shape": "HttpEmptyPrefixHeadersOutput"
+ },
+ "documentation": "Clients that perform this test extract all headers from the response.
"
+ },
"HttpEnumPayload": {
"name": "HttpEnumPayload",
"http": {
@@ -476,11 +491,11 @@
"responseCode": 200
},
"input": {
- "shape": "NestedXmlMapWithXmlNameInputOutput",
+ "shape": "NestedXmlMapWithXmlNameRequest",
"locationName": "NestedXmlMapWithXmlNameRequest"
},
"output": {
- "shape": "NestedXmlMapWithXmlNameInputOutput"
+ "shape": "NestedXmlMapWithXmlNameResponse"
},
"documentation": "Nested Xml Maps with key/values with @xmlName
"
},
@@ -1337,6 +1352,36 @@
"type": "timestamp",
"timestampFormat": "rfc822"
},
+ "HttpEmptyPrefixHeadersInput": {
+ "type": "structure",
+ "members": {
+ "prefixHeaders": {
+ "shape": "StringMap",
+ "location": "headers",
+ "locationName": ""
+ },
+ "specificHeader": {
+ "shape": "String",
+ "location": "header",
+ "locationName": "hello"
+ }
+ }
+ },
+ "HttpEmptyPrefixHeadersOutput": {
+ "type": "structure",
+ "members": {
+ "prefixHeaders": {
+ "shape": "StringMap",
+ "location": "headers",
+ "locationName": ""
+ },
+ "specificHeader": {
+ "shape": "String",
+ "location": "header",
+ "locationName": "hello"
+ }
+ }
+ },
"HttpPayloadTraitsInputOutput": {
"type": "structure",
"members": {
@@ -1786,14 +1831,6 @@
"locationName": "InnerValue"
}
},
- "NestedXmlMapWithXmlNameInputOutput": {
- "type": "structure",
- "members": {
- "nestedXmlMapWithXmlNameMap": {
- "shape": "NestedXmlMapWithXmlNameMap"
- }
- }
- },
"NestedXmlMapWithXmlNameMap": {
"type": "map",
"key": {
@@ -1804,6 +1841,22 @@
"shape": "NestedXmlMapWithXmlNameInnerMap"
}
},
+ "NestedXmlMapWithXmlNameRequest": {
+ "type": "structure",
+ "members": {
+ "nestedXmlMapWithXmlNameMap": {
+ "shape": "NestedXmlMapWithXmlNameMap"
+ }
+ }
+ },
+ "NestedXmlMapWithXmlNameResponse": {
+ "type": "structure",
+ "members": {
+ "nestedXmlMapWithXmlNameMap": {
+ "shape": "NestedXmlMapWithXmlNameMap"
+ }
+ }
+ },
"NestedXmlMapsRequest": {
"type": "structure",
"members": {
diff --git a/generator/TestServiceModels/restxmlwithnamespace-tests-client/rest-xml-protocol-namespace-2019-12-16.normal.json b/generator/TestServiceModels/restxmlwithnamespace-tests-client/rest-xml-protocol-namespace-2019-12-16.normal.json
index 65b7e98c25e4..c1f945c604c8 100644
--- a/generator/TestServiceModels/restxmlwithnamespace-tests-client/rest-xml-protocol-namespace-2019-12-16.normal.json
+++ b/generator/TestServiceModels/restxmlwithnamespace-tests-client/rest-xml-protocol-namespace-2019-12-16.normal.json
@@ -25,14 +25,14 @@
"responseCode": 200
},
"input": {
- "shape": "SimpleScalarPropertiesInputOutput",
+ "shape": "SimpleScalarPropertiesRequest",
"locationName": "SimpleScalarPropertiesRequest",
"xmlNamespace": {
"uri": "https://example.com"
}
},
"output": {
- "shape": "SimpleScalarPropertiesInputOutput"
+ "shape": "SimpleScalarPropertiesResponse"
},
"idempotent": true
}
@@ -68,7 +68,7 @@
}
}
},
- "SimpleScalarPropertiesInputOutput": {
+ "SimpleScalarPropertiesRequest": {
"type": "structure",
"members": {
"foo": {
@@ -102,10 +102,49 @@
},
"Nested": {
"shape": "NestedWithNamespace",
- "xmlNamespace": {
- "prefix": "xsi",
- "uri": "https://example.com"
- }
+ "xmlNamespace": "https://example.com"
+ },
+ "doubleValue": {
+ "shape": "Double",
+ "locationName": "DoubleDribble"
+ }
+ }
+ },
+ "SimpleScalarPropertiesResponse": {
+ "type": "structure",
+ "members": {
+ "foo": {
+ "shape": "String",
+ "location": "header",
+ "locationName": "X-Foo"
+ },
+ "stringValue": {
+ "shape": "String"
+ },
+ "trueBooleanValue": {
+ "shape": "Boolean"
+ },
+ "falseBooleanValue": {
+ "shape": "Boolean"
+ },
+ "byteValue": {
+ "shape": "Integer"
+ },
+ "shortValue": {
+ "shape": "Integer"
+ },
+ "integerValue": {
+ "shape": "Integer"
+ },
+ "longValue": {
+ "shape": "Long"
+ },
+ "floatValue": {
+ "shape": "Float"
+ },
+ "Nested": {
+ "shape": "NestedWithNamespace",
+ "xmlNamespace": "https://example.com"
},
"doubleValue": {
"shape": "Double",
diff --git a/generator/TestServiceModels/smithyrpcv2cbor-tests-client/metadata.json b/generator/TestServiceModels/smithyrpcv2cbor-tests-client/metadata.json
new file mode 100644
index 000000000000..a50503b0f2d7
--- /dev/null
+++ b/generator/TestServiceModels/smithyrpcv2cbor-tests-client/metadata.json
@@ -0,0 +1,5 @@
+{
+ "active": true,
+ "test-service": true,
+ "synopsis": "RpcV2Protocol test service"
+}
\ No newline at end of file
diff --git a/generator/TestServiceModels/smithyrpcv2cbor-tests-client/rpcv2protocol-2020-07-14.normal.json b/generator/TestServiceModels/smithyrpcv2cbor-tests-client/rpcv2protocol-2020-07-14.normal.json
new file mode 100644
index 000000000000..dff3518f7447
--- /dev/null
+++ b/generator/TestServiceModels/smithyrpcv2cbor-tests-client/rpcv2protocol-2020-07-14.normal.json
@@ -0,0 +1,390 @@
+{
+ "version":"2.0",
+ "metadata":{
+ "apiVersion":"2020-07-14",
+ "auth":["aws.auth#sigv4"],
+ "endpointPrefix":"rpcv2protocol",
+ "protocol":"smithy-rpc-v2-cbor",
+ "protocols":["smithy-rpc-v2-cbor"],
+ "serviceFullName":"RpcV2 Protocol Service",
+ "serviceId":"RpcV2Protocol",
+ "signatureVersion":"v4",
+ "signingName":"rpcv2protocol",
+ "targetPrefix":"RpcV2Protocol",
+ "uid":"rpcv2protocol-2020-07-14"
+ },
+ "operations":{
+ "EmptyInputOutput":{
+ "name":"EmptyInputOutput",
+ "http":{
+ "method":"POST",
+ "requestUri":"/"
+ },
+ "input":{"shape":"EmptyStructure"},
+ "output":{"shape":"EmptyStructure"}
+ },
+ "Float16":{
+ "name":"Float16",
+ "http":{
+ "method":"POST",
+ "requestUri":"/"
+ },
+ "output":{"shape":"Float16Output"}
+ },
+ "FractionalSeconds":{
+ "name":"FractionalSeconds",
+ "http":{
+ "method":"POST",
+ "requestUri":"/"
+ },
+ "output":{"shape":"FractionalSecondsOutput"}
+ },
+ "GreetingWithErrors":{
+ "name":"GreetingWithErrors",
+ "http":{
+ "method":"POST",
+ "requestUri":"/"
+ },
+ "output":{"shape":"GreetingWithErrorsOutput"},
+ "errors":[
+ {"shape":"ComplexError"},
+ {"shape":"InvalidGreeting"}
+ ],
+ "documentation":"This operation has three possible return values:
A successful response in the form of GreetingWithErrorsOutput An InvalidGreeting error. A ComplexError error. Implementations must be able to successfully take a response and properly deserialize successful and error responses.
",
+ "idempotent":true
+ },
+ "NoInputOutput":{
+ "name":"NoInputOutput",
+ "http":{
+ "method":"POST",
+ "requestUri":"/"
+ }
+ },
+ "OptionalInputOutput":{
+ "name":"OptionalInputOutput",
+ "http":{
+ "method":"POST",
+ "requestUri":"/"
+ },
+ "input":{"shape":"SimpleStructure"},
+ "output":{"shape":"SimpleStructure"}
+ },
+ "RecursiveShapes":{
+ "name":"RecursiveShapes",
+ "http":{
+ "method":"POST",
+ "requestUri":"/"
+ },
+ "input":{"shape":"RecursiveShapesInputOutput"},
+ "output":{"shape":"RecursiveShapesInputOutput"}
+ },
+ "RpcV2CborDenseMaps":{
+ "name":"RpcV2CborDenseMaps",
+ "http":{
+ "method":"POST",
+ "requestUri":"/"
+ },
+ "input":{"shape":"RpcV2CborDenseMapsInputOutput"},
+ "output":{"shape":"RpcV2CborDenseMapsInputOutput"},
+ "errors":[
+ {"shape":"ValidationException"}
+ ],
+ "documentation":"The example tests basic map serialization.
"
+ },
+ "RpcV2CborLists":{
+ "name":"RpcV2CborLists",
+ "http":{
+ "method":"POST",
+ "requestUri":"/"
+ },
+ "input":{"shape":"RpcV2CborListInputOutput"},
+ "output":{"shape":"RpcV2CborListInputOutput"},
+ "errors":[
+ {"shape":"ValidationException"}
+ ],
+ "documentation":"This test case serializes JSON lists for the following cases for both input and output:
Normal lists. Normal sets. Lists of lists. Lists of structures. ",
+ "idempotent":true
+ },
+ "SimpleScalarProperties":{
+ "name":"SimpleScalarProperties",
+ "http":{
+ "method":"POST",
+ "requestUri":"/"
+ },
+ "input":{"shape":"SimpleScalarStructure"},
+ "output":{"shape":"SimpleScalarStructure"}
+ }
+ },
+ "shapes":{
+ "Blob":{"type":"blob"},
+ "BlobList":{
+ "type":"list",
+ "member":{"shape":"Blob"}
+ },
+ "Boolean":{
+ "type":"boolean",
+ "box":true
+ },
+ "BooleanList":{
+ "type":"list",
+ "member":{"shape":"Boolean"}
+ },
+ "ComplexError":{
+ "type":"structure",
+ "members":{
+ "TopLevel":{"shape":"String"},
+ "Nested":{"shape":"ComplexNestedErrorData"}
+ },
+ "documentation":"This error is thrown when a request is invalid.
",
+ "exception":true
+ },
+ "ComplexNestedErrorData":{
+ "type":"structure",
+ "members":{
+ "Foo":{"shape":"String"}
+ }
+ },
+ "DateTime":{
+ "type":"timestamp",
+ "timestampFormat":"iso8601"
+ },
+ "DenseBooleanMap":{
+ "type":"map",
+ "key":{"shape":"String"},
+ "value":{"shape":"Boolean"}
+ },
+ "DenseNumberMap":{
+ "type":"map",
+ "key":{"shape":"String"},
+ "value":{"shape":"Integer"}
+ },
+ "DenseSetMap":{
+ "type":"map",
+ "key":{"shape":"String"},
+ "value":{"shape":"StringSet"}
+ },
+ "DenseStringMap":{
+ "type":"map",
+ "key":{"shape":"String"},
+ "value":{"shape":"String"}
+ },
+ "DenseStructMap":{
+ "type":"map",
+ "key":{"shape":"String"},
+ "value":{"shape":"GreetingStruct"}
+ },
+ "Double":{
+ "type":"double",
+ "box":true
+ },
+ "EmptyStructure":{
+ "type":"structure",
+ "members":{
+ }
+ },
+ "Float":{
+ "type":"float",
+ "box":true
+ },
+ "Float16Output":{
+ "type":"structure",
+ "members":{
+ "value":{"shape":"Double"}
+ }
+ },
+ "FooEnum":{
+ "type":"string",
+ "enum":[
+ "Foo",
+ "Baz",
+ "Bar",
+ "1",
+ "0"
+ ]
+ },
+ "FooEnumList":{
+ "type":"list",
+ "member":{"shape":"FooEnum"}
+ },
+ "FractionalSecondsOutput":{
+ "type":"structure",
+ "members":{
+ "datetime":{"shape":"DateTime"}
+ }
+ },
+ "GreetingStruct":{
+ "type":"structure",
+ "members":{
+ "hi":{"shape":"String"}
+ }
+ },
+ "GreetingWithErrorsOutput":{
+ "type":"structure",
+ "members":{
+ "greeting":{"shape":"String"}
+ }
+ },
+ "Integer":{
+ "type":"integer",
+ "box":true
+ },
+ "IntegerEnum":{
+ "type":"integer",
+ "box":true
+ },
+ "IntegerEnumList":{
+ "type":"list",
+ "member":{"shape":"IntegerEnum"}
+ },
+ "IntegerList":{
+ "type":"list",
+ "member":{"shape":"Integer"}
+ },
+ "InvalidGreeting":{
+ "type":"structure",
+ "members":{
+ "Message":{"shape":"String"}
+ },
+ "documentation":"This error is thrown when an invalid greeting value is provided.
",
+ "exception":true
+ },
+ "Long":{
+ "type":"long",
+ "box":true
+ },
+ "NestedStringList":{
+ "type":"list",
+ "member":{"shape":"StringList"},
+ "documentation":"A list of lists of strings.
"
+ },
+ "RecursiveShapesInputOutput":{
+ "type":"structure",
+ "members":{
+ "nested":{"shape":"RecursiveShapesInputOutputNested1"}
+ }
+ },
+ "RecursiveShapesInputOutputNested1":{
+ "type":"structure",
+ "members":{
+ "foo":{"shape":"String"},
+ "nested":{"shape":"RecursiveShapesInputOutputNested2"}
+ }
+ },
+ "RecursiveShapesInputOutputNested2":{
+ "type":"structure",
+ "members":{
+ "bar":{"shape":"String"},
+ "recursiveMember":{"shape":"RecursiveShapesInputOutputNested1"}
+ }
+ },
+ "RpcV2CborDenseMapsInputOutput":{
+ "type":"structure",
+ "members":{
+ "denseStructMap":{"shape":"DenseStructMap"},
+ "denseNumberMap":{"shape":"DenseNumberMap"},
+ "denseBooleanMap":{"shape":"DenseBooleanMap"},
+ "denseStringMap":{"shape":"DenseStringMap"},
+ "denseSetMap":{"shape":"DenseSetMap"}
+ }
+ },
+ "RpcV2CborListInputOutput":{
+ "type":"structure",
+ "members":{
+ "stringList":{"shape":"StringList"},
+ "stringSet":{"shape":"StringSet"},
+ "integerList":{"shape":"IntegerList"},
+ "booleanList":{"shape":"BooleanList"},
+ "timestampList":{"shape":"TimestampList"},
+ "enumList":{"shape":"FooEnumList"},
+ "intEnumList":{"shape":"IntegerEnumList"},
+ "nestedStringList":{"shape":"NestedStringList"},
+ "structureList":{"shape":"StructureList"},
+ "blobList":{"shape":"BlobList"}
+ }
+ },
+ "SimpleScalarStructure":{
+ "type":"structure",
+ "members":{
+ "trueBooleanValue":{"shape":"Boolean"},
+ "falseBooleanValue":{"shape":"Boolean"},
+ "byteValue":{"shape":"Integer"},
+ "doubleValue":{"shape":"Double"},
+ "floatValue":{"shape":"Float"},
+ "integerValue":{"shape":"Integer"},
+ "longValue":{"shape":"Long"},
+ "shortValue":{"shape":"Integer"},
+ "stringValue":{"shape":"String"},
+ "blobValue":{"shape":"Blob"}
+ }
+ },
+ "SimpleStructure":{
+ "type":"structure",
+ "members":{
+ "value":{"shape":"String"}
+ }
+ },
+ "String":{"type":"string"},
+ "StringList":{
+ "type":"list",
+ "member":{"shape":"String"}
+ },
+ "StringSet":{
+ "type":"list",
+ "member":{"shape":"String"}
+ },
+ "StructureList":{
+ "type":"list",
+ "member":{"shape":"StructureListMember"}
+ },
+ "StructureListMember":{
+ "type":"structure",
+ "members":{
+ "a":{"shape":"String"},
+ "b":{"shape":"String"}
+ }
+ },
+ "Timestamp":{"type":"timestamp"},
+ "TimestampList":{
+ "type":"list",
+ "member":{"shape":"Timestamp"}
+ },
+ "ValidationException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"A summary of the validation failure.
"
+ },
+ "fieldList":{
+ "shape":"ValidationExceptionFieldList",
+ "documentation":"A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
"
+ }
+ },
+ "documentation":"A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
",
+ "exception":true
+ },
+ "ValidationExceptionField":{
+ "type":"structure",
+ "required":[
+ "path",
+ "message"
+ ],
+ "members":{
+ "path":{
+ "shape":"String",
+ "documentation":"A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
"
+ },
+ "message":{
+ "shape":"String",
+ "documentation":"A detailed description of the validation failure.
"
+ }
+ },
+ "documentation":"Describes one specific validation failure for an input member.
"
+ },
+ "ValidationExceptionFieldList":{
+ "type":"list",
+ "member":{"shape":"ValidationExceptionField"}
+ }
+ }
+}
diff --git a/generator/TestServiceModels/smithyrpcv2cbor-tests-client/rpcv2protocol.customizations.json b/generator/TestServiceModels/smithyrpcv2cbor-tests-client/rpcv2protocol.customizations.json
new file mode 100644
index 000000000000..0dd56516f2b9
--- /dev/null
+++ b/generator/TestServiceModels/smithyrpcv2cbor-tests-client/rpcv2protocol.customizations.json
@@ -0,0 +1,14 @@
+{
+ "shapeModifiers": {
+ "FooEnum": {
+ "modify": [
+ {
+ "0": { "emitPropertyName": "Num_0" }
+ },
+ {
+ "1": { "emitPropertyName": "Num_1" }
+ }
+ ]
+ }
+ }
+}
diff --git a/sdk/AWSSDK.NetFramework.sln b/sdk/AWSSDK.NetFramework.sln
index a1a54c18f59e..f910a9519558 100644
--- a/sdk/AWSSDK.NetFramework.sln
+++ b/sdk/AWSSDK.NetFramework.sln
@@ -1718,6 +1718,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RestXMLTest", "RestXMLTest"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.RestXMLTest.NetFramework", "test/Services/RestXMLTest/AWSSDK.RestXMLTest.NetFramework.csproj", "{CAFD261C-BE37-4CA7-9AA0-285CDB55F710}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RpcV2Protocol", "RpcV2Protocol", "{8F67194B-AE07-4423-8EA2-47CFABD6FA9F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.RpcV2Protocol.NetFramework", "test/Services/RpcV2Protocol/AWSSDK.RpcV2Protocol.NetFramework.csproj", "{DA8AF270-82A5-4F67-B6D5-FF4B975CA843}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UseServiceIdTestserviceId", "UseServiceIdTestserviceId", "{527CCE19-B9C3-4CDA-ACD7-125A39265631}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.UseServiceIdTestserviceId.NetFramework", "test/Services/UseServiceIdTestserviceId/AWSSDK.UseServiceIdTestserviceId.NetFramework.csproj", "{21EF41CA-6BD3-4810-9970-7DB173E2A2A9}"
@@ -3466,6 +3470,10 @@ Global
{CAFD261C-BE37-4CA7-9AA0-285CDB55F710}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CAFD261C-BE37-4CA7-9AA0-285CDB55F710}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CAFD261C-BE37-4CA7-9AA0-285CDB55F710}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DA8AF270-82A5-4F67-B6D5-FF4B975CA843}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DA8AF270-82A5-4F67-B6D5-FF4B975CA843}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DA8AF270-82A5-4F67-B6D5-FF4B975CA843}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DA8AF270-82A5-4F67-B6D5-FF4B975CA843}.Release|Any CPU.Build.0 = Release|Any CPU
{21EF41CA-6BD3-4810-9970-7DB173E2A2A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{21EF41CA-6BD3-4810-9970-7DB173E2A2A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21EF41CA-6BD3-4810-9970-7DB173E2A2A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -4367,6 +4375,8 @@ Global
{562C6970-C310-4F9B-97FF-A999253350D7} = {7154877A-38C8-4432-B14F-4B9A5DA46303}
{3840562C-F910-48D4-8328-AD3BE254E4B4} = {939EC5C2-8345-43E2-8F97-72EEEBEEA0AB}
{CAFD261C-BE37-4CA7-9AA0-285CDB55F710} = {3840562C-F910-48D4-8328-AD3BE254E4B4}
+ {8F67194B-AE07-4423-8EA2-47CFABD6FA9F} = {939EC5C2-8345-43E2-8F97-72EEEBEEA0AB}
+ {DA8AF270-82A5-4F67-B6D5-FF4B975CA843} = {8F67194B-AE07-4423-8EA2-47CFABD6FA9F}
{527CCE19-B9C3-4CDA-ACD7-125A39265631} = {939EC5C2-8345-43E2-8F97-72EEEBEEA0AB}
{21EF41CA-6BD3-4810-9970-7DB173E2A2A9} = {527CCE19-B9C3-4CDA-ACD7-125A39265631}
{87D7508C-4786-48A6-8EF7-460153897415} = {12EC4E4B-7E2C-4B63-8EF9-7B959F82A89B}
diff --git a/sdk/AWSSDK.NetStandard.sln b/sdk/AWSSDK.NetStandard.sln
index cd0fee6aa35d..7bd4f4777b9d 100644
--- a/sdk/AWSSDK.NetStandard.sln
+++ b/sdk/AWSSDK.NetStandard.sln
@@ -1714,6 +1714,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RestXMLTest", "RestXMLTest"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.RestXMLTest.NetStandard", "test/Services/RestXMLTest/AWSSDK.RestXMLTest.NetStandard.csproj", "{4C1561E4-BB07-4848-A914-622A3600A314}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RpcV2Protocol", "RpcV2Protocol", "{CCEB9760-D30F-42F7-BF96-33CE65363879}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.RpcV2Protocol.NetStandard", "test/Services/RpcV2Protocol/AWSSDK.RpcV2Protocol.NetStandard.csproj", "{8B1A55DD-0567-45A1-ACFF-F1F511B436C9}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UseServiceIdTestserviceId", "UseServiceIdTestserviceId", "{D2C3BBC4-139C-74A6-7A6D-8EF91479A7B1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.UseServiceIdTestserviceId.NetStandard", "test/Services/UseServiceIdTestserviceId/AWSSDK.UseServiceIdTestserviceId.NetStandard.csproj", "{EBCA07C7-EFDC-4B6D-BDCB-78A5B65D224E}"
@@ -3458,6 +3462,10 @@ Global
{4C1561E4-BB07-4848-A914-622A3600A314}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C1561E4-BB07-4848-A914-622A3600A314}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C1561E4-BB07-4848-A914-622A3600A314}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8B1A55DD-0567-45A1-ACFF-F1F511B436C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8B1A55DD-0567-45A1-ACFF-F1F511B436C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8B1A55DD-0567-45A1-ACFF-F1F511B436C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8B1A55DD-0567-45A1-ACFF-F1F511B436C9}.Release|Any CPU.Build.0 = Release|Any CPU
{EBCA07C7-EFDC-4B6D-BDCB-78A5B65D224E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EBCA07C7-EFDC-4B6D-BDCB-78A5B65D224E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBCA07C7-EFDC-4B6D-BDCB-78A5B65D224E}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -4357,6 +4365,8 @@ Global
{83607637-1A7B-4E96-A569-919EE71467B5} = {647793C9-9D6B-4015-B2A8-CC23A21971BE}
{DAB1DE25-8227-ED20-53FC-3757627C61C3} = {939EC5C2-8345-43E2-8F97-72EEEBEEA0AB}
{4C1561E4-BB07-4848-A914-622A3600A314} = {DAB1DE25-8227-ED20-53FC-3757627C61C3}
+ {CCEB9760-D30F-42F7-BF96-33CE65363879} = {939EC5C2-8345-43E2-8F97-72EEEBEEA0AB}
+ {8B1A55DD-0567-45A1-ACFF-F1F511B436C9} = {CCEB9760-D30F-42F7-BF96-33CE65363879}
{D2C3BBC4-139C-74A6-7A6D-8EF91479A7B1} = {939EC5C2-8345-43E2-8F97-72EEEBEEA0AB}
{EBCA07C7-EFDC-4B6D-BDCB-78A5B65D224E} = {D2C3BBC4-139C-74A6-7A6D-8EF91479A7B1}
{7768CFF3-2FE7-43EB-8843-35F48ED3ED43} = {12EC4E4B-7E2C-4B63-8EF9-7B959F82A89B}
diff --git a/sdk/src/Core/Amazon.Util/AWSSDKUtils.cs b/sdk/src/Core/Amazon.Util/AWSSDKUtils.cs
index 826a3ca44047..136553f77a6f 100644
--- a/sdk/src/Core/Amazon.Util/AWSSDKUtils.cs
+++ b/sdk/src/Core/Amazon.Util/AWSSDKUtils.cs
@@ -72,6 +72,7 @@ public static partial class AWSSDKUtils
private const int DefaultMaxIdleTime = 50 * 1000; // 50 seconds
private const int MaxIsSetMethodsCacheSize = 50;
+ private const long TicksPerSecond = 10_000_000;
public static readonly DateTime EPOCH_START = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
@@ -600,7 +601,7 @@ public static string DetermineService(string url)
/// Converted DateTime structure
public static DateTime ConvertFromUnixEpochSeconds(int seconds)
{
- return new DateTime(seconds * 10000000L + EPOCH_START.Ticks, DateTimeKind.Utc);
+ return new DateTime(seconds * TicksPerSecond + EPOCH_START.Ticks, DateTimeKind.Utc);
}
///
@@ -610,7 +611,18 @@ public static DateTime ConvertFromUnixEpochSeconds(int seconds)
/// Converted DateTime structure
public static DateTime ConvertFromUnixLongEpochSeconds(long seconds)
{
- return new DateTime(seconds * 10000000L + EPOCH_START.Ticks, DateTimeKind.Utc);
+ return new DateTime(seconds * TicksPerSecond + EPOCH_START.Ticks, DateTimeKind.Utc);
+ }
+
+ ///
+ /// Utility method for converting Unix epoch seconds to DateTime structure.
+ ///
+ /// The number of seconds since January 1, 1970.
+ /// Converted DateTime structure
+ public static DateTime ConvertFromUnixDoubleEpochSeconds(double seconds)
+ {
+ var ticksSinceEpoch = (long)(seconds * TicksPerSecond);
+ return new DateTime(ticksSinceEpoch + EPOCH_START.Ticks, DateTimeKind.Utc);
}
///
diff --git a/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetFramework.csproj b/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetFramework.csproj
index bc103b18b1c4..70c59746bbd3 100644
--- a/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetFramework.csproj
+++ b/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetFramework.csproj
@@ -32,13 +32,14 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetFramework.sln b/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetFramework.sln
index 42c421a877ae..1d491e0dcf36 100644
--- a/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetFramework.sln
+++ b/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetFramework.sln
@@ -31,6 +31,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.JsonProtocol.NetFram
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.S3.NetFramework", "..\..\src\Services\S3\AWSSDK.S3.NetFramework.csproj", "{6C0E771C-5B37-4781-B251-4D7FC14B4A98}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AWSSDK.RpcV2Protocol.NetFramework", "..\Services\RpcV2Protocol\AWSSDK.RpcV2Protocol.NetFramework.csproj", "{693BD7C1-E732-E013-2D87-1763030BC50D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AWSSDK.Extensions.CborProtocol.NetFramework", "..\..\..\extensions\src\AWSSDK.Extensions.CborProtocol\AWSSDK.Extensions.CborProtocol.NetFramework.csproj", "{97F1A3EB-F3F8-CD33-75A4-DB6465F32512}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -93,6 +97,14 @@ Global
{6C0E771C-5B37-4781-B251-4D7FC14B4A98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C0E771C-5B37-4781-B251-4D7FC14B4A98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C0E771C-5B37-4781-B251-4D7FC14B4A98}.Release|Any CPU.Build.0 = Release|Any CPU
+ {693BD7C1-E732-E013-2D87-1763030BC50D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {693BD7C1-E732-E013-2D87-1763030BC50D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {693BD7C1-E732-E013-2D87-1763030BC50D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {693BD7C1-E732-E013-2D87-1763030BC50D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {97F1A3EB-F3F8-CD33-75A4-DB6465F32512}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {97F1A3EB-F3F8-CD33-75A4-DB6465F32512}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {97F1A3EB-F3F8-CD33-75A4-DB6465F32512}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {97F1A3EB-F3F8-CD33-75A4-DB6465F32512}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.csproj b/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.csproj
index e639058d534a..8c2f64fcfa9a 100644
--- a/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.csproj
+++ b/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.csproj
@@ -16,6 +16,7 @@
false
false
false
+ true
true
CS1591,CS1570,NU1701
@@ -39,6 +40,7 @@
+
diff --git a/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.sln b/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.sln
index 79f0a875cd7c..c5b7441b3461 100644
--- a/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.sln
+++ b/sdk/test/ProtocolTests/AWSSDK.ProtocolTests.NetStandard.sln
@@ -31,6 +31,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.CommonTest.NetStanda
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AWSSDK.UnitTestUtilities.Netstandard", "..\UnitTests\Custom\AWSSDK.UnitTestUtilities.Netstandard.csproj", "{A267E3F2-38CC-4659-B9C9-1BBB3058C88B}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AWSSDK.RpcV2Protocol.NetStandard", "..\Services\RpcV2Protocol\AWSSDK.RpcV2Protocol.NetStandard.csproj", "{5416C5A8-2446-0BD3-C670-B15344172326}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AWSSDK.Extensions.CborProtocol.NetStandard", "..\..\..\extensions\src\AWSSDK.Extensions.CborProtocol\AWSSDK.Extensions.CborProtocol.NetStandard.csproj", "{81474FD0-7BA6-F9DD-3C62-C8D954A57425}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -93,6 +97,14 @@ Global
{A267E3F2-38CC-4659-B9C9-1BBB3058C88B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A267E3F2-38CC-4659-B9C9-1BBB3058C88B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A267E3F2-38CC-4659-B9C9-1BBB3058C88B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5416C5A8-2446-0BD3-C670-B15344172326}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5416C5A8-2446-0BD3-C670-B15344172326}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5416C5A8-2446-0BD3-C670-B15344172326}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5416C5A8-2446-0BD3-C670-B15344172326}.Release|Any CPU.Build.0 = Release|Any CPU
+ {81474FD0-7BA6-F9DD-3C62-C8D954A57425}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {81474FD0-7BA6-F9DD-3C62-C8D954A57425}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {81474FD0-7BA6-F9DD-3C62-C8D954A57425}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {81474FD0-7BA6-F9DD-3C62-C8D954A57425}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/sdk/test/ProtocolTests/Custom/CborProtocolUtils.cs b/sdk/test/ProtocolTests/Custom/CborProtocolUtils.cs
new file mode 100644
index 000000000000..17adafebbadb
--- /dev/null
+++ b/sdk/test/ProtocolTests/Custom/CborProtocolUtils.cs
@@ -0,0 +1,181 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Formats.Cbor;
+using System.Linq;
+using Amazon.Runtime.Internal;
+using Amazon.Util;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace AWSSDK.ProtocolTests.Utils
+{
+ internal static class CborProtocolUtils
+ {
+ public static void AssertBody(IRequest actualRequest, string expectedBody)
+ {
+ var expectedCbor = Convert.FromBase64String(expectedBody);
+ var expectedObj = CborToNativeObject(expectedCbor);
+ var actualObj = CborToNativeObject(actualRequest.Content);
+
+ AssertObjectsEqual(expectedObj, actualObj);
+ }
+
+ private static object CborToNativeObject(byte[] cborBytes)
+ {
+ var reader = new CborReader(cborBytes);
+ return ReadCborValue(reader);
+ }
+
+ private static object ReadCborValue(CborReader reader)
+ {
+ switch (reader.PeekState())
+ {
+ case CborReaderState.StartMap:
+ var map = new Dictionary();
+ reader.ReadStartMap();
+ while (reader.PeekState() != CborReaderState.EndMap)
+ {
+ var key = ReadCborValue(reader).ToString();
+ var value = ReadCborValue(reader);
+ map[key] = value;
+ }
+ reader.ReadEndMap();
+ return map;
+
+ case CborReaderState.StartArray:
+ var list = new List();
+ reader.ReadStartArray();
+ while (reader.PeekState() != CborReaderState.EndArray)
+ {
+ list.Add(ReadCborValue(reader));
+ }
+ reader.ReadEndArray();
+ return list;
+
+ case CborReaderState.TextString:
+ return reader.ReadTextString();
+
+ case CborReaderState.ByteString:
+ return reader.ReadByteString();
+
+ case CborReaderState.UnsignedInteger:
+ return reader.ReadUInt64();
+
+ case CborReaderState.NegativeInteger:
+ return reader.ReadInt64();
+
+ case CborReaderState.Boolean:
+ return reader.ReadBoolean();
+
+ case CborReaderState.Null:
+ reader.ReadNull();
+ return null;
+
+ case CborReaderState.DoublePrecisionFloat:
+ return reader.ReadDouble();
+
+ case CborReaderState.SinglePrecisionFloat:
+ case CborReaderState.HalfPrecisionFloat:
+ return (double)reader.ReadSingle();
+
+ case CborReaderState.Tag:
+ var tag = reader.ReadTag();
+ if (tag == CborTag.UnixTimeSeconds)
+ {
+ var epochSeconds = Convert.ToDouble(ReadCborValue(reader));
+ return AWSSDKUtils.ConvertFromUnixDoubleEpochSeconds(epochSeconds);
+ }
+ throw new NotSupportedException($"Unsupported CBOR tag: {tag}");
+
+ default:
+ throw new NotSupportedException($"Unsupported CBOR state: {reader.PeekState()}");
+ }
+ }
+
+ private static void AssertObjectsEqual(object expected, object actual)
+ {
+ if (expected == null || actual == null)
+ {
+ Assert.AreEqual(expected, actual);
+ return;
+ }
+
+ var expectedType = expected.GetType();
+ var actualType = actual.GetType();
+
+ Assert.AreEqual(expectedType, actualType);
+
+ if (expectedType == typeof(byte[]))
+ {
+ var expectedBytes = (byte[])expected;
+ var actualBytes = (byte[])actual;
+ Assert.IsTrue(expectedBytes.SequenceEqual(actualBytes));
+ }
+ else if (expectedType == typeof(Dictionary))
+ {
+ var expectedDict = (Dictionary)expected;
+ var actualDict = (Dictionary)actual;
+
+ Assert.AreEqual(expectedDict.Count, actualDict.Count);
+
+ foreach (var key in expectedDict.Keys)
+ {
+ Assert.IsTrue(actualDict.ContainsKey(key));
+ AssertObjectsEqual(expectedDict[key], actualDict[key]);
+ }
+ }
+ else if (expectedType == typeof(List))
+ {
+ var expectedList = (List)expected;
+ var actualList = (List)actual;
+
+ Assert.AreEqual(expectedList.Count, actualList.Count);
+
+ for (int i = 0; i < expectedList.Count; i++)
+ {
+ AssertObjectsEqual(expectedList[i], actualList[i]);
+ }
+ }
+ else if (IsNumericType(expectedType))
+ {
+ // Normalize numeric types by converting both to double for comparison
+ var expectedDouble = Convert.ToDouble(expected);
+ var actualDouble = Convert.ToDouble(actual);
+ Assert.AreEqual(expectedDouble, actualDouble);
+ }
+ else
+ {
+ Assert.AreEqual(expected, actual);
+ }
+ }
+
+ private static bool IsNumericType(Type type)
+ {
+ return type == typeof(byte)
+ || type == typeof(sbyte)
+ || type == typeof(short)
+ || type == typeof(ushort)
+ || type == typeof(int)
+ || type == typeof(uint)
+ || type == typeof(long)
+ || type == typeof(ulong)
+ || type == typeof(float)
+ || type == typeof(double)
+ || type == typeof(decimal);
+ }
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/JSONRPC10/dotnet-protocol-test-codegen/GreetingWithErrors.cs b/sdk/test/ProtocolTests/Generated/JSONRPC10/dotnet-protocol-test-codegen/GreetingWithErrors.cs
index f693238adc74..65fc969249cc 100644
--- a/sdk/test/ProtocolTests/Generated/JSONRPC10/dotnet-protocol-test-codegen/GreetingWithErrors.cs
+++ b/sdk/test/ProtocolTests/Generated/JSONRPC10/dotnet-protocol-test-codegen/GreetingWithErrors.cs
@@ -63,6 +63,52 @@ public void AwsJson10InvalidGreetingErrorErrorResponse()
Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
}
+ ///
+ /// Parses a complex error with no message member
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("ErrorTest")]
+ [TestCategory("JsonRpc10")]
+ public void AwsJson10ComplexErrorErrorResponse()
+ {
+ // Arrange
+ var webResponseData = new WebResponseData();
+ webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400);
+ webResponseData.Headers["Content-Type"] = "application/x-amz-json-1.0";
+ byte[] bytes = Encoding.ASCII.GetBytes("{\n \"__type\": \"aws.protocoltests.json10#ComplexError\",\n \"TopLevel\": \"Top level\",\n \"Nested\": {\n \"Foo\": \"bar\"\n }\n}");
+ var stream = new MemoryStream(bytes);
+ var context = new JsonUnmarshallerContext(stream,true,webResponseData);
+ // Act
+ var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
+ // Assert
+ Assert.IsInstanceOfType(errorResponse, typeof(ComplexErrorException));
+ Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
+ }
+
+ ///
+ /// Parses a complex error with an empty body
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("ErrorTest")]
+ [TestCategory("JsonRpc10")]
+ public void AwsJson10EmptyComplexErrorErrorResponse()
+ {
+ // Arrange
+ var webResponseData = new WebResponseData();
+ webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400);
+ webResponseData.Headers["Content-Type"] = "application/x-amz-json-1.0";
+ byte[] bytes = Encoding.ASCII.GetBytes("{\n \"__type\": \"aws.protocoltests.json10#ComplexError\"\n}");
+ var stream = new MemoryStream(bytes);
+ var context = new JsonUnmarshallerContext(stream,true,webResponseData);
+ // Act
+ var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
+ // Assert
+ Assert.IsInstanceOfType(errorResponse, typeof(ComplexErrorException));
+ Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
+ }
+
///
/// Serializes the X-Amzn-ErrorType header. For an example service,
/// see Amazon EKS.
@@ -294,51 +340,5 @@ public void AwsJson10FooErrorWithDunderTypeUriAndNamespaceErrorResponse()
Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 500));
}
- ///
- /// Parses a complex error with no message member
- ///
- [TestMethod]
- [TestCategory("ProtocolTest")]
- [TestCategory("ErrorTest")]
- [TestCategory("JsonRpc10")]
- public void AwsJson10ComplexErrorErrorResponse()
- {
- // Arrange
- var webResponseData = new WebResponseData();
- webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400);
- webResponseData.Headers["Content-Type"] = "application/x-amz-json-1.0";
- byte[] bytes = Encoding.ASCII.GetBytes("{\n \"__type\": \"aws.protocoltests.json10#ComplexError\",\n \"TopLevel\": \"Top level\",\n \"Nested\": {\n \"Foo\": \"bar\"\n }\n}");
- var stream = new MemoryStream(bytes);
- var context = new JsonUnmarshallerContext(stream,true,webResponseData);
- // Act
- var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
- // Assert
- Assert.IsInstanceOfType(errorResponse, typeof(ComplexErrorException));
- Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
- }
-
- ///
- /// Parses a complex error with an empty body
- ///
- [TestMethod]
- [TestCategory("ProtocolTest")]
- [TestCategory("ErrorTest")]
- [TestCategory("JsonRpc10")]
- public void AwsJson10EmptyComplexErrorErrorResponse()
- {
- // Arrange
- var webResponseData = new WebResponseData();
- webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400);
- webResponseData.Headers["Content-Type"] = "application/x-amz-json-1.0";
- byte[] bytes = Encoding.ASCII.GetBytes("{\n \"__type\": \"aws.protocoltests.json10#ComplexError\"\n}");
- var stream = new MemoryStream(bytes);
- var context = new JsonUnmarshallerContext(stream,true,webResponseData);
- // Act
- var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
- // Assert
- Assert.IsInstanceOfType(errorResponse, typeof(ComplexErrorException));
- Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
- }
-
}
}
diff --git a/sdk/test/ProtocolTests/Generated/QueryProtocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs b/sdk/test/ProtocolTests/Generated/QueryProtocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs
index dfb7734ec51f..9feb405fbe34 100644
--- a/sdk/test/ProtocolTests/Generated/QueryProtocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs
+++ b/sdk/test/ProtocolTests/Generated/QueryProtocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs
@@ -92,47 +92,47 @@ public void QueryInvalidGreetingErrorErrorResponse()
Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
}
- ///
- /// Parses customized XML errors
- ///
[TestMethod]
[TestCategory("ProtocolTest")]
[TestCategory("ErrorTest")]
[TestCategory("AwsQuery")]
- public void QueryCustomizedErrorErrorResponse()
+ public void QueryComplexErrorErrorResponse()
{
// Arrange
var webResponseData = new WebResponseData();
- webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 402);
+ webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400);
webResponseData.Headers["Content-Type"] = "text/xml";
- byte[] bytes = Encoding.ASCII.GetBytes("\n \n Sender \n Customized
\n Hi \n \n foo-id \n \n");
+ byte[] bytes = Encoding.ASCII.GetBytes("\n \n Sender \n ComplexError
\n Top level \n \n bar \n \n \n foo-id \n \n");
var stream = new MemoryStream(bytes);
var context = new XmlUnmarshallerContext(stream,true,webResponseData);
// Act
- var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 402));
+ var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
// Assert
- Assert.IsInstanceOfType(errorResponse, typeof(CustomCodeErrorException));
- Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 402));
+ Assert.IsInstanceOfType(errorResponse, typeof(ComplexErrorException));
+ Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
}
+ ///
+ /// Parses customized XML errors
+ ///
[TestMethod]
[TestCategory("ProtocolTest")]
[TestCategory("ErrorTest")]
[TestCategory("AwsQuery")]
- public void QueryComplexErrorErrorResponse()
+ public void QueryCustomizedErrorErrorResponse()
{
// Arrange
var webResponseData = new WebResponseData();
- webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400);
+ webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 402);
webResponseData.Headers["Content-Type"] = "text/xml";
- byte[] bytes = Encoding.ASCII.GetBytes("\n \n Sender \n ComplexError
\n Top level \n \n bar \n \n \n foo-id \n \n");
+ byte[] bytes = Encoding.ASCII.GetBytes("\n \n Sender \n Customized
\n Hi \n \n foo-id \n \n");
var stream = new MemoryStream(bytes);
var context = new XmlUnmarshallerContext(stream,true,webResponseData);
// Act
- var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
+ var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 402));
// Assert
- Assert.IsInstanceOfType(errorResponse, typeof(ComplexErrorException));
- Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
+ Assert.IsInstanceOfType(errorResponse, typeof(CustomCodeErrorException));
+ Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 402));
}
}
diff --git a/sdk/test/ProtocolTests/Generated/RestJsonProtocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs b/sdk/test/ProtocolTests/Generated/RestJsonProtocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs
index bd49038c3cf2..37e5b176c286 100644
--- a/sdk/test/ProtocolTests/Generated/RestJsonProtocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs
+++ b/sdk/test/ProtocolTests/Generated/RestJsonProtocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs
@@ -105,6 +105,76 @@ public void RestJsonGreetingWithErrorsNoPayloadResponse()
Assert.AreEqual((HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 200), context.ResponseData.StatusCode);
}
+ ///
+ /// Parses simple JSON errors
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("ErrorTest")]
+ [TestCategory("RestJson")]
+ public void RestJsonInvalidGreetingErrorErrorResponse()
+ {
+ // Arrange
+ var webResponseData = new WebResponseData();
+ webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400);
+ webResponseData.Headers["Content-Type"] = "application/json";
+ webResponseData.Headers["X-Amzn-Errortype"] = "InvalidGreeting";
+ byte[] bytes = Encoding.ASCII.GetBytes("{\n \"Message\": \"Hi\"\n}");
+ var stream = new MemoryStream(bytes);
+ var context = new JsonUnmarshallerContext(stream,true,webResponseData);
+ // Act
+ var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
+ // Assert
+ Assert.IsInstanceOfType(errorResponse, typeof(InvalidGreetingException));
+ Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
+ }
+
+ ///
+ /// Serializes a complex error with no message member
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("ErrorTest")]
+ [TestCategory("RestJson")]
+ public void RestJsonComplexErrorWithNoMessageErrorResponse()
+ {
+ // Arrange
+ var webResponseData = new WebResponseData();
+ webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403);
+ webResponseData.Headers["Content-Type"] = "application/json";
+ webResponseData.Headers["X-Amzn-Errortype"] = "ComplexError";
+ webResponseData.Headers["X-Header"] = "Header";
+ byte[] bytes = Encoding.ASCII.GetBytes("{\n \"TopLevel\": \"Top level\",\n \"Nested\": {\n \"Fooooo\": \"bar\"\n }\n}");
+ var stream = new MemoryStream(bytes);
+ var context = new JsonUnmarshallerContext(stream,true,webResponseData);
+ // Act
+ var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403));
+ // Assert
+ Assert.IsInstanceOfType(errorResponse, typeof(ComplexErrorException));
+ Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403));
+ }
+
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("ErrorTest")]
+ [TestCategory("RestJson")]
+ public void RestJsonEmptyComplexErrorWithNoMessageErrorResponse()
+ {
+ // Arrange
+ var webResponseData = new WebResponseData();
+ webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403);
+ webResponseData.Headers["Content-Type"] = "application/json";
+ webResponseData.Headers["X-Amzn-Errortype"] = "ComplexError";
+ byte[] bytes = Encoding.ASCII.GetBytes("{}");
+ var stream = new MemoryStream(bytes);
+ var context = new JsonUnmarshallerContext(stream,true,webResponseData);
+ // Act
+ var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403));
+ // Assert
+ Assert.IsInstanceOfType(errorResponse, typeof(ComplexErrorException));
+ Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403));
+ }
+
///
/// Serializes the X-Amzn-ErrorType header. For an example service,
/// see Amazon EKS.
@@ -336,75 +406,5 @@ public void RestJsonFooErrorWithDunderTypeUriAndNamespaceErrorResponse()
Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 500));
}
- ///
- /// Serializes a complex error with no message member
- ///
- [TestMethod]
- [TestCategory("ProtocolTest")]
- [TestCategory("ErrorTest")]
- [TestCategory("RestJson")]
- public void RestJsonComplexErrorWithNoMessageErrorResponse()
- {
- // Arrange
- var webResponseData = new WebResponseData();
- webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403);
- webResponseData.Headers["Content-Type"] = "application/json";
- webResponseData.Headers["X-Amzn-Errortype"] = "ComplexError";
- webResponseData.Headers["X-Header"] = "Header";
- byte[] bytes = Encoding.ASCII.GetBytes("{\n \"TopLevel\": \"Top level\",\n \"Nested\": {\n \"Fooooo\": \"bar\"\n }\n}");
- var stream = new MemoryStream(bytes);
- var context = new JsonUnmarshallerContext(stream,true,webResponseData);
- // Act
- var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403));
- // Assert
- Assert.IsInstanceOfType(errorResponse, typeof(ComplexErrorException));
- Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403));
- }
-
- [TestMethod]
- [TestCategory("ProtocolTest")]
- [TestCategory("ErrorTest")]
- [TestCategory("RestJson")]
- public void RestJsonEmptyComplexErrorWithNoMessageErrorResponse()
- {
- // Arrange
- var webResponseData = new WebResponseData();
- webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403);
- webResponseData.Headers["Content-Type"] = "application/json";
- webResponseData.Headers["X-Amzn-Errortype"] = "ComplexError";
- byte[] bytes = Encoding.ASCII.GetBytes("{}");
- var stream = new MemoryStream(bytes);
- var context = new JsonUnmarshallerContext(stream,true,webResponseData);
- // Act
- var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403));
- // Assert
- Assert.IsInstanceOfType(errorResponse, typeof(ComplexErrorException));
- Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 403));
- }
-
- ///
- /// Parses simple JSON errors
- ///
- [TestMethod]
- [TestCategory("ProtocolTest")]
- [TestCategory("ErrorTest")]
- [TestCategory("RestJson")]
- public void RestJsonInvalidGreetingErrorErrorResponse()
- {
- // Arrange
- var webResponseData = new WebResponseData();
- webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400);
- webResponseData.Headers["Content-Type"] = "application/json";
- webResponseData.Headers["X-Amzn-Errortype"] = "InvalidGreeting";
- byte[] bytes = Encoding.ASCII.GetBytes("{\n \"Message\": \"Hi\"\n}");
- var stream = new MemoryStream(bytes);
- var context = new JsonUnmarshallerContext(stream,true,webResponseData);
- // Act
- var errorResponse = new GreetingWithErrorsResponseUnmarshaller().UnmarshallException(context, null, (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
- // Assert
- Assert.IsInstanceOfType(errorResponse, typeof(InvalidGreetingException));
- Assert.AreEqual(errorResponse.StatusCode,(HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 400));
- }
-
}
}
diff --git a/sdk/test/ProtocolTests/Generated/RestJsonProtocol/dotnet-protocol-test-codegen/HttpEmptyPrefixHeaders.cs b/sdk/test/ProtocolTests/Generated/RestJsonProtocol/dotnet-protocol-test-codegen/HttpEmptyPrefixHeaders.cs
new file mode 100644
index 000000000000..0f924322c1f7
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RestJsonProtocol/dotnet-protocol-test-codegen/HttpEmptyPrefixHeaders.cs
@@ -0,0 +1,119 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RestJsonProtocol;
+using Amazon.RestJsonProtocol.Model;
+using Amazon.RestJsonProtocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RestJson
+{
+ [TestClass]
+ public class HttpEmptyPrefixHeaders
+ {
+ ///
+ /// Serializes all request headers, using specific when present
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RestJson")]
+ public void RestJsonHttpEmptyPrefixHeadersRequestClientRequest()
+ {
+ // Arrange
+ var request = new HttpEmptyPrefixHeadersRequest
+ {
+ PrefixHeaders = new Dictionary()
+ {
+
+ { "x-foo", "Foo" },
+ { "hello", "Hello" },
+ },
+ SpecificHeader = "There",
+ };
+ var config = new AmazonRestJsonProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new HttpEmptyPrefixHeadersRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ Assert.AreEqual("GET", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/HttpEmptyPrefixHeaders", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("There".Replace(" ",""), marshalledRequest.Headers["hello"].Replace(" ",""));
+ Assert.AreEqual("Foo".Replace(" ",""), marshalledRequest.Headers["x-foo"].Replace(" ",""));
+ }
+
+ ///
+ /// Deserializes all response headers with the same for prefix and
+ /// specific
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("ResponseTest")]
+ [TestCategory("RestJson")]
+ public void RestJsonHttpEmptyPrefixHeadersResponseClientResponse()
+ {
+ // Arrange
+ var webResponseData = new WebResponseData();
+ webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 200);
+ webResponseData.Headers["hello"] = "There";
+ webResponseData.Headers["x-foo"] = "Foo";
+ byte[] bytes = Encoding.ASCII.GetBytes("");
+ var stream = new MemoryStream(bytes);
+ var context = new JsonUnmarshallerContext(stream,true,webResponseData);
+
+ // Act
+ var unmarshalledResponse = new HttpEmptyPrefixHeadersResponseUnmarshaller().Unmarshall(context);
+ var expectedResponse = new HttpEmptyPrefixHeadersResponse
+ {
+ PrefixHeaders = new Dictionary()
+ {
+
+ { "x-foo", "Foo" },
+ { "hello", "There" },
+ },
+ SpecificHeader = "There",
+ };
+
+ // Assert
+ var actualResponse = (HttpEmptyPrefixHeadersResponse)unmarshalledResponse;
+ Comparer.CompareObjects(expectedResponse,actualResponse);
+ Assert.AreEqual((HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 200), context.ResponseData.StatusCode);
+ }
+
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RestXmlProtocol/dotnet-protocol-test-codegen/HttpEmptyPrefixHeaders.cs b/sdk/test/ProtocolTests/Generated/RestXmlProtocol/dotnet-protocol-test-codegen/HttpEmptyPrefixHeaders.cs
new file mode 100644
index 000000000000..139b4e6a1199
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RestXmlProtocol/dotnet-protocol-test-codegen/HttpEmptyPrefixHeaders.cs
@@ -0,0 +1,119 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RestXmlProtocol;
+using Amazon.RestXmlProtocol.Model;
+using Amazon.RestXmlProtocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Xml;
+using System.Xml.Linq;
+
+namespace AWSSDK.ProtocolTests.RestXml
+{
+ [TestClass]
+ public class HttpEmptyPrefixHeaders
+ {
+ ///
+ /// Serializes all request headers, using specific when present
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RestXml")]
+ public void HttpEmptyPrefixHeadersRequestClientRequest()
+ {
+ // Arrange
+ var request = new HttpEmptyPrefixHeadersRequest
+ {
+ PrefixHeaders = new Dictionary()
+ {
+
+ { "x-foo", "Foo" },
+ { "hello", "Hello" },
+ },
+ SpecificHeader = "There",
+ };
+ var config = new AmazonRestXmlProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new HttpEmptyPrefixHeadersRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ Assert.AreEqual("GET", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/HttpEmptyPrefixHeaders", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("There".Replace(" ",""), marshalledRequest.Headers["hello"].Replace(" ",""));
+ Assert.AreEqual("Foo".Replace(" ",""), marshalledRequest.Headers["x-foo"].Replace(" ",""));
+ }
+
+ ///
+ /// Deserializes all response headers with the same for prefix and
+ /// specific
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("ResponseTest")]
+ [TestCategory("RestXml")]
+ public void HttpEmptyPrefixHeadersResponseClientResponse()
+ {
+ // Arrange
+ var webResponseData = new WebResponseData();
+ webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 200);
+ webResponseData.Headers["hello"] = "There";
+ webResponseData.Headers["x-foo"] = "Foo";
+ byte[] bytes = Encoding.ASCII.GetBytes("");
+ var stream = new MemoryStream(bytes);
+ var context = new XmlUnmarshallerContext(stream,true,webResponseData);
+
+ // Act
+ var unmarshalledResponse = new HttpEmptyPrefixHeadersResponseUnmarshaller().Unmarshall(context);
+ var expectedResponse = new HttpEmptyPrefixHeadersResponse
+ {
+ PrefixHeaders = new Dictionary()
+ {
+
+ { "x-foo", "Foo" },
+ { "hello", "There" },
+ },
+ SpecificHeader = "There",
+ };
+
+ // Assert
+ var actualResponse = (HttpEmptyPrefixHeadersResponse)unmarshalledResponse;
+ Comparer.CompareObjects(expectedResponse,actualResponse);
+ Assert.AreEqual((HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 200), context.ResponseData.StatusCode);
+ }
+
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RestXmlProtocol/dotnet-protocol-test-codegen/NestedXmlMapWithXmlName.cs b/sdk/test/ProtocolTests/Generated/RestXmlProtocol/dotnet-protocol-test-codegen/NestedXmlMapWithXmlName.cs
index 013ded20f33f..2aa242f59da3 100644
--- a/sdk/test/ProtocolTests/Generated/RestXmlProtocol/dotnet-protocol-test-codegen/NestedXmlMapWithXmlName.cs
+++ b/sdk/test/ProtocolTests/Generated/RestXmlProtocol/dotnet-protocol-test-codegen/NestedXmlMapWithXmlName.cs
@@ -80,7 +80,7 @@ public void NestedXmlMapWithXmlNameSerializesRequest()
var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
// Assert
- var expectedBody = " \n \n \n foo \n \n \n bar \n Baz \n \n \n fizz \n Buzz \n \n \n \n \n qux \n \n \n foobar \n Bar \n \n \n fizzbuzz \n Buzz \n \n \n \n \n \n";
+ var expectedBody = " \n \n \n foo \n \n \n bar \n Baz \n \n \n fizz \n Buzz \n \n \n \n \n qux \n \n \n foobar \n Bar \n \n \n fizzbuzz \n Buzz \n \n \n \n \n \n";
XmlTestUtils.AssertBody(marshalledRequest,expectedBody);
Assert.AreEqual("POST", marshalledRequest.HttpMethod);
Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
@@ -102,7 +102,7 @@ public void NestedXmlMapWithXmlNameDeserializesResponse()
var webResponseData = new WebResponseData();
webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 200);
webResponseData.Headers["Content-Type"] = "application/xml";
- byte[] bytes = Encoding.ASCII.GetBytes(" \n \n \n foo \n \n \n bar \n Baz \n \n \n fizz \n Buzz \n \n \n \n \n qux \n \n \n foobar \n Bar \n \n \n fizzbuzz \n Buzz \n \n \n \n \n \n");
+ byte[] bytes = Encoding.ASCII.GetBytes(" \n \n \n foo \n \n \n bar \n Baz \n \n \n fizz \n Buzz \n \n \n \n \n qux \n \n \n foobar \n Bar \n \n \n fizzbuzz \n Buzz \n \n \n \n \n \n");
var stream = new MemoryStream(bytes);
var context = new XmlUnmarshallerContext(stream,true,webResponseData);
diff --git a/sdk/test/ProtocolTests/Generated/RestXmlProtocolNamespace/dotnet-protocol-test-codegen/SimpleScalarProperties.cs b/sdk/test/ProtocolTests/Generated/RestXmlProtocolNamespace/dotnet-protocol-test-codegen/SimpleScalarProperties.cs
index 4fe52022cd9a..d0467b79d4dc 100644
--- a/sdk/test/ProtocolTests/Generated/RestXmlProtocolNamespace/dotnet-protocol-test-codegen/SimpleScalarProperties.cs
+++ b/sdk/test/ProtocolTests/Generated/RestXmlProtocolNamespace/dotnet-protocol-test-codegen/SimpleScalarProperties.cs
@@ -77,7 +77,7 @@ public void XmlNamespaceSimpleScalarPropertiesRequest()
var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
// Assert
- var expectedBody = "\n string \n true \n false \n 1 \n 2 \n 3 \n 4 \n 5.5 \n 6.5 \n \n \n";
+ var expectedBody = "\n string \n true \n false \n 1 \n 2 \n 3 \n 4 \n 5.5 \n 6.5 \n \n \n";
XmlTestUtils.AssertBody(marshalledRequest,expectedBody);
Assert.AreEqual("PUT", marshalledRequest.HttpMethod);
Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
@@ -100,7 +100,7 @@ public void XmlNamespaceSimpleScalarPropertiesResponse()
webResponseData.StatusCode = (HttpStatusCode)Enum.ToObject(typeof(HttpStatusCode), 200);
webResponseData.Headers["Content-Type"] = "application/xml";
webResponseData.Headers["X-Foo"] = "Foo";
- byte[] bytes = Encoding.ASCII.GetBytes("\n string \n true \n false \n 1 \n 2 \n 3 \n 4 \n 5.5 \n 6.5 \n \n \n");
+ byte[] bytes = Encoding.ASCII.GetBytes("\n string \n true \n false \n 1 \n 2 \n 3 \n 4 \n 5.5 \n 6.5 \n \n \n");
var stream = new MemoryStream(bytes);
var context = new XmlUnmarshallerContext(stream,true,webResponseData);
diff --git a/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/EmptyInputOutput.cs b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/EmptyInputOutput.cs
new file mode 100644
index 000000000000..fb65b91d29a1
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/EmptyInputOutput.cs
@@ -0,0 +1,76 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.Extensions.CborProtocol.Internal;
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RpcV2Protocol;
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RpcV2Protocol
+{
+ [TestClass]
+ public class EmptyInputOutput
+ {
+ ///
+ /// When Input structure is empty we write CBOR equivalent of {}
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void empty_inputRequest()
+ {
+ // Arrange
+ var request = new EmptyInputOutputRequest
+ {
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new EmptyInputOutputRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "v/8=";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/EmptyInputOutput", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ Assert.IsFalse(marshalledRequest.Headers.ContainsKey("X-Amz-Target"));
+ }
+
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/Float16.cs b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/Float16.cs
new file mode 100644
index 000000000000..85124ce89eb5
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/Float16.cs
@@ -0,0 +1,42 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.Extensions.CborProtocol.Internal;
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RpcV2Protocol;
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RpcV2Protocol
+{
+ [TestClass]
+ public class Float16
+ {
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/FractionalSeconds.cs b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/FractionalSeconds.cs
new file mode 100644
index 000000000000..df0021d72222
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/FractionalSeconds.cs
@@ -0,0 +1,42 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.Extensions.CborProtocol.Internal;
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RpcV2Protocol;
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RpcV2Protocol
+{
+ [TestClass]
+ public class FractionalSeconds
+ {
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs
new file mode 100644
index 000000000000..e16ec0e3edf3
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/GreetingWithErrors.cs
@@ -0,0 +1,42 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.Extensions.CborProtocol.Internal;
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RpcV2Protocol;
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RpcV2Protocol
+{
+ [TestClass]
+ public class GreetingWithErrors
+ {
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/NoInputOutput.cs b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/NoInputOutput.cs
new file mode 100644
index 000000000000..b36343f1b1a8
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/NoInputOutput.cs
@@ -0,0 +1,74 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.Extensions.CborProtocol.Internal;
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RpcV2Protocol;
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RpcV2Protocol
+{
+ [TestClass]
+ public class NoInputOutput
+ {
+ ///
+ /// Body is empty and no Content-Type header if no input
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void no_inputRequest()
+ {
+ // Arrange
+ var request = new NoInputOutputRequest
+ {
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new NoInputOutputRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/NoInputOutput", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ Assert.IsFalse(marshalledRequest.Headers.ContainsKey("Content-Type"));
+ Assert.IsFalse(marshalledRequest.Headers.ContainsKey("X-Amz-Target"));
+ }
+
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/OptionalInputOutput.cs b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/OptionalInputOutput.cs
new file mode 100644
index 000000000000..56941bb3e364
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/OptionalInputOutput.cs
@@ -0,0 +1,76 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.Extensions.CborProtocol.Internal;
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RpcV2Protocol;
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RpcV2Protocol
+{
+ [TestClass]
+ public class OptionalInputOutput
+ {
+ ///
+ /// When input is empty we write CBOR equivalent of {}
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void optional_inputRequest()
+ {
+ // Arrange
+ var request = new OptionalInputOutputRequest
+ {
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new OptionalInputOutputRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "v/8=";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/OptionalInputOutput", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ Assert.IsFalse(marshalledRequest.Headers.ContainsKey("X-Amz-Target"));
+ }
+
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/RecursiveShapes.cs b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/RecursiveShapes.cs
new file mode 100644
index 000000000000..2be21f74609f
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/RecursiveShapes.cs
@@ -0,0 +1,91 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.Extensions.CborProtocol.Internal;
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RpcV2Protocol;
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RpcV2Protocol
+{
+ [TestClass]
+ public class RecursiveShapes
+ {
+ ///
+ /// Serializes recursive structures
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborRecursiveShapesRequest()
+ {
+ // Arrange
+ var request = new RecursiveShapesRequest
+ {
+ Nested = new RecursiveShapesInputOutputNested1
+ {
+ Foo = "Foo1",
+ Nested = new RecursiveShapesInputOutputNested2
+ {
+ Bar = "Bar1",
+ RecursiveMember = new RecursiveShapesInputOutputNested1
+ {
+ Foo = "Foo2",
+ Nested = new RecursiveShapesInputOutputNested2
+ {
+ Bar = "Bar2",
+ },
+ },
+ },
+ },
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new RecursiveShapesRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "v2ZuZXN0ZWS/Y2Zvb2RGb28xZm5lc3RlZL9jYmFyZEJhcjFvcmVjdXJzaXZlTWVtYmVyv2Nmb29kRm9vMmZuZXN0ZWS/Y2JhcmRCYXIy//////8=";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/RecursiveShapes", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/RpcV2CborDenseMaps.cs b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/RpcV2CborDenseMaps.cs
new file mode 100644
index 000000000000..3e85089f949a
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/RpcV2CborDenseMaps.cs
@@ -0,0 +1,176 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.Extensions.CborProtocol.Internal;
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RpcV2Protocol;
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RpcV2Protocol
+{
+ [TestClass]
+ public class RpcV2CborDenseMaps
+ {
+ ///
+ /// Serializes maps
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborMapsRequest()
+ {
+ // Arrange
+ var request = new RpcV2CborDenseMapsRequest
+ {
+ DenseStructMap = new Dictionary()
+ {
+
+ { "foo", new GreetingStruct
+ {
+ Hi = "there",
+ } },
+ { "baz", new GreetingStruct
+ {
+ Hi = "bye",
+ } },
+ },
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new RpcV2CborDenseMapsRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "oW5kZW5zZVN0cnVjdE1hcKJjZm9voWJoaWV0aGVyZWNiYXqhYmhpY2J5ZQ==";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/RpcV2CborDenseMaps", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ ///
+ /// Ensure that 0 and false are sent over the wire in all maps and
+ /// lists
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborSerializesZeroValuesInMapsRequest()
+ {
+ // Arrange
+ var request = new RpcV2CborDenseMapsRequest
+ {
+ DenseNumberMap = new Dictionary()
+ {
+
+ { "x", 0 },
+ },
+ DenseBooleanMap = new Dictionary()
+ {
+
+ { "x", false },
+ },
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new RpcV2CborDenseMapsRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "om5kZW5zZU51bWJlck1hcKFheABvZGVuc2VCb29sZWFuTWFwoWF49A==";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/RpcV2CborDenseMaps", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ ///
+ /// A request that contains a dense map of sets.
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborSerializesDenseSetMapRequest()
+ {
+ // Arrange
+ var request = new RpcV2CborDenseMapsRequest
+ {
+ DenseSetMap = new Dictionary>()
+ {
+
+ { "x", new List()
+ {
+ } },
+ { "y", new List()
+ {
+ "a",
+ "b",
+ } },
+ },
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new RpcV2CborDenseMapsRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "oWtkZW5zZVNldE1hcKJheIBheYJhYWFi";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/RpcV2CborDenseMaps", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/RpcV2CborLists.cs b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/RpcV2CborLists.cs
new file mode 100644
index 000000000000..8f846f0f6925
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/RpcV2CborLists.cs
@@ -0,0 +1,213 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.Extensions.CborProtocol.Internal;
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RpcV2Protocol;
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RpcV2Protocol
+{
+ [TestClass]
+ public class RpcV2CborLists
+ {
+ ///
+ /// Serializes RpcV2 Cbor lists
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborListsRequest()
+ {
+ // Arrange
+ var request = new RpcV2CborListsRequest
+ {
+ StringList = new List()
+ {
+ "foo",
+ "bar",
+ },
+ StringSet = new List()
+ {
+ "foo",
+ "bar",
+ },
+ IntegerList = new List()
+ {
+ 1,
+ 2,
+ },
+ BooleanList = new List()
+ {
+ true,
+ false,
+ },
+ TimestampList = new List()
+ {
+ ProtocolTestConstants.epoch.AddSeconds(1398796238),
+ ProtocolTestConstants.epoch.AddSeconds(1398796238),
+ },
+ EnumList = new List()
+ {
+ "Foo",
+ "0",
+ },
+ IntEnumList = new List()
+ {
+ 1,
+ 2,
+ },
+ NestedStringList = new List>()
+ {
+ new List()
+ {
+ "foo",
+ "bar",
+ },
+ new List()
+ {
+ "baz",
+ "qux",
+ },
+ },
+ StructureList = new List()
+ {
+ new StructureListMember
+ {
+ A = "1",
+ B = "2",
+ },
+ new StructureListMember
+ {
+ A = "3",
+ B = "4",
+ },
+ },
+ BlobList = new List()
+ {
+ new MemoryStream(Encoding.UTF8.GetBytes("foo")),
+ new MemoryStream(Encoding.UTF8.GetBytes("bar")),
+ },
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new RpcV2CborListsRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "v2pzdHJpbmdMaXN0gmNmb29jYmFyaXN0cmluZ1NldIJjZm9vY2JhcmtpbnRlZ2VyTGlzdIIBAmtib29sZWFuTGlzdIL19G10aW1lc3RhbXBMaXN0gsH7QdTX+/OAAADB+0HU1/vzgAAAaGVudW1MaXN0gmNGb29hMGtpbnRFbnVtTGlzdIIBAnBuZXN0ZWRTdHJpbmdMaXN0goJjZm9vY2JhcoJjYmF6Y3F1eG1zdHJ1Y3R1cmVMaXN0gqJhYWExYWJhMqJhYWEzYWJhNGhibG9iTGlzdIJDZm9vQ2Jhcv8=";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/RpcV2CborLists", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ ///
+ /// Serializes empty JSON lists
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborListsEmptyRequest()
+ {
+ // Arrange
+ var request = new RpcV2CborListsRequest
+ {
+ StringList = new List()
+ {
+ },
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new RpcV2CborListsRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "v2pzdHJpbmdMaXN0n///";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/RpcV2CborLists", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ ///
+ /// Serializes empty JSON definite length lists
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborListsEmptyUsingDefiniteLengthRequest()
+ {
+ // Arrange
+ var request = new RpcV2CborListsRequest
+ {
+ StringList = new List()
+ {
+ },
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new RpcV2CborListsRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "oWpzdHJpbmdMaXN0gA==";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/RpcV2CborLists", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ }
+}
diff --git a/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/SimpleScalarProperties.cs b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/SimpleScalarProperties.cs
new file mode 100644
index 000000000000..ba0b1e2f14ae
--- /dev/null
+++ b/sdk/test/ProtocolTests/Generated/RpcV2Protocol/dotnet-protocol-test-codegen/SimpleScalarProperties.cs
@@ -0,0 +1,224 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated.
+ */
+using AWSSDK.Extensions.CborProtocol.Internal;
+using AWSSDK.ProtocolTests;
+using AWSSDK.ProtocolTests.Utils;
+using AWSSDK_DotNet.UnitTests.TestTools;
+using Amazon.RpcV2Protocol;
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace AWSSDK.ProtocolTests.RpcV2Protocol
+{
+ [TestClass]
+ public class SimpleScalarProperties
+ {
+ ///
+ /// Serializes simple scalar properties
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborSimpleScalarPropertiesRequest()
+ {
+ // Arrange
+ var request = new SimpleScalarPropertiesRequest
+ {
+ ByteValue = 5,
+ DoubleValue = 1.889,
+ FalseBooleanValue = false,
+ FloatValue = 7.625F,
+ IntegerValue = 256,
+ LongValue = 9873,
+ ShortValue = 9898,
+ StringValue = "simple",
+ TrueBooleanValue = true,
+ BlobValue = new MemoryStream(Encoding.UTF8.GetBytes("foo")),
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new SimpleScalarPropertiesRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/SimpleScalarProperties", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ ///
+ /// RpcV2 Cbor should not serialize null structure values
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborClientDoesntSerializeNullStructureValuesRequest()
+ {
+ // Arrange
+ var request = new SimpleScalarPropertiesRequest
+ {
+ StringValue = null,
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new SimpleScalarPropertiesRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "v/8=";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/SimpleScalarProperties", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ ///
+ /// Supports handling NaN float values.
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborSupportsNaNFloatInputsRequest()
+ {
+ // Arrange
+ var request = new SimpleScalarPropertiesRequest
+ {
+ DoubleValue = double.NaN,
+ FloatValue = float.NaN,
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new SimpleScalarPropertiesRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "v2tkb3VibGVWYWx1Zft/+AAAAAAAAGpmbG9hdFZhbHVl+n/AAAD/";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/SimpleScalarProperties", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ ///
+ /// Supports handling Infinity float values.
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborSupportsInfinityFloatInputsRequest()
+ {
+ // Arrange
+ var request = new SimpleScalarPropertiesRequest
+ {
+ DoubleValue = double.PositiveInfinity,
+ FloatValue = float.PositiveInfinity,
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new SimpleScalarPropertiesRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "v2tkb3VibGVWYWx1Zft/8AAAAAAAAGpmbG9hdFZhbHVl+n+AAAD/";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/SimpleScalarProperties", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ ///
+ /// Supports handling Infinity float values.
+ ///
+ [TestMethod]
+ [TestCategory("ProtocolTest")]
+ [TestCategory("RequestTest")]
+ [TestCategory("RpcV2Protocol")]
+ public void RpcV2CborSupportsNegativeInfinityFloatInputsRequest()
+ {
+ // Arrange
+ var request = new SimpleScalarPropertiesRequest
+ {
+ DoubleValue = double.NegativeInfinity,
+ FloatValue = float.NegativeInfinity,
+ };
+ var config = new AmazonRpcV2ProtocolConfig
+ {
+ ServiceURL = "https://test.com/"
+ };
+
+ var marshaller = new SimpleScalarPropertiesRequestMarshaller();
+ // Act
+ var marshalledRequest = ProtocolTestUtils.RunMockRequest(request,marshaller,config);
+
+ // Assert
+ var expectedBody = "v2tkb3VibGVWYWx1Zfv/8AAAAAAAAGpmbG9hdFZhbHVl+v+AAAD/";
+ CborProtocolUtils.AssertBody(marshalledRequest, expectedBody);
+ Assert.AreEqual("POST", marshalledRequest.HttpMethod);
+ Uri actualUri = AmazonServiceClient.ComposeUrl(marshalledRequest);
+ Assert.AreEqual("/service/RpcV2Protocol/operation/SimpleScalarProperties", ProtocolTestUtils.GetEncodedResourcePathFromOriginalString(actualUri));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Accept"].Replace(" ",""));
+ Assert.AreEqual("application/cbor".Replace(" ",""), marshalledRequest.Headers["Content-Type"].Replace(" ",""));
+ Assert.AreEqual("rpc-v2-cbor".Replace(" ",""), marshalledRequest.Headers["smithy-protocol"].Replace(" ",""));
+ }
+
+ }
+}
diff --git a/sdk/test/Services/RestJsonProtocol/Generated/Model/HttpEmptyPrefixHeadersRequest.cs b/sdk/test/Services/RestJsonProtocol/Generated/Model/HttpEmptyPrefixHeadersRequest.cs
new file mode 100644
index 000000000000..6c2b9ae4cbed
--- /dev/null
+++ b/sdk/test/Services/RestJsonProtocol/Generated/Model/HttpEmptyPrefixHeadersRequest.cs
@@ -0,0 +1,77 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rest-json-protocol-2019-12-16.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RestJsonProtocol.Model
+{
+ ///
+ /// Container for the parameters to the HttpEmptyPrefixHeaders operation.
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ public partial class HttpEmptyPrefixHeadersRequest : AmazonRestJsonProtocolRequest
+ {
+ private Dictionary _prefixHeaders = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+ private string _specificHeader;
+
+ ///
+ /// Gets and sets the property PrefixHeaders.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary PrefixHeaders
+ {
+ get { return this._prefixHeaders; }
+ set { this._prefixHeaders = value; }
+ }
+
+ // Check to see if PrefixHeaders property is set
+ internal bool IsSetPrefixHeaders()
+ {
+ return this._prefixHeaders != null && (this._prefixHeaders.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property SpecificHeader.
+ ///
+ public string SpecificHeader
+ {
+ get { return this._specificHeader; }
+ set { this._specificHeader = value; }
+ }
+
+ // Check to see if SpecificHeader property is set
+ internal bool IsSetSpecificHeader()
+ {
+ return this._specificHeader != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RestJsonProtocol/Generated/Model/HttpEmptyPrefixHeadersResponse.cs b/sdk/test/Services/RestJsonProtocol/Generated/Model/HttpEmptyPrefixHeadersResponse.cs
new file mode 100644
index 000000000000..1b34637998ad
--- /dev/null
+++ b/sdk/test/Services/RestJsonProtocol/Generated/Model/HttpEmptyPrefixHeadersResponse.cs
@@ -0,0 +1,76 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rest-json-protocol-2019-12-16.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RestJsonProtocol.Model
+{
+ ///
+ /// This is the response object from the HttpEmptyPrefixHeaders operation.
+ ///
+ public partial class HttpEmptyPrefixHeadersResponse : AmazonWebServiceResponse
+ {
+ private Dictionary _prefixHeaders = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+ private string _specificHeader;
+
+ ///
+ /// Gets and sets the property PrefixHeaders.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary PrefixHeaders
+ {
+ get { return this._prefixHeaders; }
+ set { this._prefixHeaders = value; }
+ }
+
+ // Check to see if PrefixHeaders property is set
+ internal bool IsSetPrefixHeaders()
+ {
+ return this._prefixHeaders != null && (this._prefixHeaders.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property SpecificHeader.
+ ///
+ public string SpecificHeader
+ {
+ get { return this._specificHeader; }
+ set { this._specificHeader = value; }
+ }
+
+ // Check to see if SpecificHeader property is set
+ internal bool IsSetSpecificHeader()
+ {
+ return this._specificHeader != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RestJsonProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersRequestMarshaller.cs b/sdk/test/Services/RestJsonProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersRequestMarshaller.cs
new file mode 100644
index 000000000000..26e68987865b
--- /dev/null
+++ b/sdk/test/Services/RestJsonProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersRequestMarshaller.cs
@@ -0,0 +1,102 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rest-json-protocol-2019-12-16.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RestJsonProtocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using System.Buffers;
+#if !NETFRAMEWORK
+using ThirdParty.RuntimeBackports;
+#endif
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RestJsonProtocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// HttpEmptyPrefixHeaders Request Marshaller
+ ///
+ public class HttpEmptyPrefixHeadersRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((HttpEmptyPrefixHeadersRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(HttpEmptyPrefixHeadersRequest publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RestJsonProtocol");
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-12-16";
+ request.HttpMethod = "GET";
+
+ request.ResourcePath = "/HttpEmptyPrefixHeaders";
+
+ if (publicRequest.IsSetPrefixHeaders())
+ {
+ //Map of headers with prefix "".
+ foreach (var kvpPrefixHeaders in publicRequest.PrefixHeaders)
+ {
+ request.Headers[$"{kvpPrefixHeaders.Key}"] = kvpPrefixHeaders.Value;
+ }
+ }
+
+ if (publicRequest.IsSetSpecificHeader())
+ {
+ request.Headers["hello"] = publicRequest.SpecificHeader;
+ }
+
+ return request;
+ }
+ private static HttpEmptyPrefixHeadersRequestMarshaller _instance = new HttpEmptyPrefixHeadersRequestMarshaller();
+
+ internal static HttpEmptyPrefixHeadersRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static HttpEmptyPrefixHeadersRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RestJsonProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersResponseUnmarshaller.cs b/sdk/test/Services/RestJsonProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersResponseUnmarshaller.cs
new file mode 100644
index 000000000000..bcda3134a3d0
--- /dev/null
+++ b/sdk/test/Services/RestJsonProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersResponseUnmarshaller.cs
@@ -0,0 +1,118 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rest-json-protocol-2019-12-16.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RestJsonProtocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RestJsonProtocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for HttpEmptyPrefixHeaders operation
+ ///
+ public class HttpEmptyPrefixHeadersResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ HttpEmptyPrefixHeadersResponse response = new HttpEmptyPrefixHeadersResponse();
+ //Map of headers with prefix "".
+ var headersForPrefixHeaders = new Dictionary();
+ foreach (var namePrefixHeaders in context.ResponseData.GetHeaderNames())
+ {
+ var keyToUse = namePrefixHeaders;
+ if("".Length > 0 && keyToUse.StartsWith("")) {
+ keyToUse = keyToUse.Substring("".Length);
+ }
+
+ if (context.ResponseData.IsHeaderPresent($"{keyToUse}"))
+ {
+ headersForPrefixHeaders.Add(
+ keyToUse,
+ context.ResponseData.GetHeaderValue($"{keyToUse}")
+ );
+ }
+ }
+ if(headersForPrefixHeaders.Count > 0)
+ response.PrefixHeaders = headersForPrefixHeaders;
+ if (context.ResponseData.IsHeaderPresent("hello"))
+ response.SpecificHeader = context.ResponseData.GetHeaderValue("hello");
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ }
+ return new AmazonRestJsonProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static HttpEmptyPrefixHeadersResponseUnmarshaller _instance = new HttpEmptyPrefixHeadersResponseUnmarshaller();
+
+ internal static HttpEmptyPrefixHeadersResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static HttpEmptyPrefixHeadersResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RestJsonProtocol/Generated/_bcl/AmazonRestJsonProtocolClient.cs b/sdk/test/Services/RestJsonProtocol/Generated/_bcl/AmazonRestJsonProtocolClient.cs
index a45a8373a503..f4e5945c0740 100644
--- a/sdk/test/Services/RestJsonProtocol/Generated/_bcl/AmazonRestJsonProtocolClient.cs
+++ b/sdk/test/Services/RestJsonProtocol/Generated/_bcl/AmazonRestJsonProtocolClient.cs
@@ -908,6 +908,47 @@ public virtual HttpChecksumRequiredResponse HttpChecksumRequired(HttpChecksumReq
#endregion
+ #region HttpEmptyPrefixHeaders
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestJsonProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ public virtual HttpEmptyPrefixHeadersResponse HttpEmptyPrefixHeaders(HttpEmptyPrefixHeadersRequest request)
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = HttpEmptyPrefixHeadersRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = HttpEmptyPrefixHeadersResponseUnmarshaller.Instance;
+
+ return Invoke(request, options);
+ }
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestJsonProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ public virtual Task HttpEmptyPrefixHeadersAsync(HttpEmptyPrefixHeadersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = HttpEmptyPrefixHeadersRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = HttpEmptyPrefixHeadersResponseUnmarshaller.Instance;
+
+ return InvokeAsync(request, options, cancellationToken);
+ }
+
+ #endregion
+
#region HttpEnumPayload
diff --git a/sdk/test/Services/RestJsonProtocol/Generated/_bcl/IAmazonRestJsonProtocol.cs b/sdk/test/Services/RestJsonProtocol/Generated/_bcl/IAmazonRestJsonProtocol.cs
index 82b1f6dbad8c..119a3a8d2096 100644
--- a/sdk/test/Services/RestJsonProtocol/Generated/_bcl/IAmazonRestJsonProtocol.cs
+++ b/sdk/test/Services/RestJsonProtocol/Generated/_bcl/IAmazonRestJsonProtocol.cs
@@ -511,6 +511,34 @@ public partial interface IAmazonRestJsonProtocol : IAmazonService, IDisposable
#endregion
+ #region HttpEmptyPrefixHeaders
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestJsonProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ HttpEmptyPrefixHeadersResponse HttpEmptyPrefixHeaders(HttpEmptyPrefixHeadersRequest request);
+
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestJsonProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ Task HttpEmptyPrefixHeadersAsync(HttpEmptyPrefixHeadersRequest request, CancellationToken cancellationToken = default(CancellationToken));
+
+ #endregion
+
#region HttpEnumPayload
diff --git a/sdk/test/Services/RestJsonProtocol/Generated/_netstandard/AmazonRestJsonProtocolClient.cs b/sdk/test/Services/RestJsonProtocol/Generated/_netstandard/AmazonRestJsonProtocolClient.cs
index 7ef5599fe090..3faf4f13b4ab 100644
--- a/sdk/test/Services/RestJsonProtocol/Generated/_netstandard/AmazonRestJsonProtocolClient.cs
+++ b/sdk/test/Services/RestJsonProtocol/Generated/_netstandard/AmazonRestJsonProtocolClient.cs
@@ -764,6 +764,39 @@ internal virtual HttpChecksumRequiredResponse HttpChecksumRequired(HttpChecksumR
}
#endregion
+ #region HttpEmptyPrefixHeaders
+
+ internal virtual HttpEmptyPrefixHeadersResponse HttpEmptyPrefixHeaders(HttpEmptyPrefixHeadersRequest request)
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = HttpEmptyPrefixHeadersRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = HttpEmptyPrefixHeadersResponseUnmarshaller.Instance;
+
+ return Invoke(request, options);
+ }
+
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestJsonProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ public virtual Task HttpEmptyPrefixHeadersAsync(HttpEmptyPrefixHeadersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = HttpEmptyPrefixHeadersRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = HttpEmptyPrefixHeadersResponseUnmarshaller.Instance;
+
+ return InvokeAsync(request, options, cancellationToken);
+ }
+ #endregion
+
#region HttpEnumPayload
internal virtual HttpEnumPayloadResponse HttpEnumPayload(HttpEnumPayloadRequest request)
diff --git a/sdk/test/Services/RestJsonProtocol/Generated/_netstandard/IAmazonRestJsonProtocol.cs b/sdk/test/Services/RestJsonProtocol/Generated/_netstandard/IAmazonRestJsonProtocol.cs
index 6eb4ecb68632..91546b6fa68c 100644
--- a/sdk/test/Services/RestJsonProtocol/Generated/_netstandard/IAmazonRestJsonProtocol.cs
+++ b/sdk/test/Services/RestJsonProtocol/Generated/_netstandard/IAmazonRestJsonProtocol.cs
@@ -333,6 +333,24 @@ public partial interface IAmazonRestJsonProtocol : IAmazonService, IDisposable
#endregion
+ #region HttpEmptyPrefixHeaders
+
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestJsonProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ Task HttpEmptyPrefixHeadersAsync(HttpEmptyPrefixHeadersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
+
+ #endregion
+
#region HttpEnumPayload
diff --git a/sdk/test/Services/RestXmlProtocol/Generated/Model/HttpEmptyPrefixHeadersRequest.cs b/sdk/test/Services/RestXmlProtocol/Generated/Model/HttpEmptyPrefixHeadersRequest.cs
new file mode 100644
index 000000000000..4cec2b5432e8
--- /dev/null
+++ b/sdk/test/Services/RestXmlProtocol/Generated/Model/HttpEmptyPrefixHeadersRequest.cs
@@ -0,0 +1,77 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rest-xml-protocol-2019-12-16.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RestXmlProtocol.Model
+{
+ ///
+ /// Container for the parameters to the HttpEmptyPrefixHeaders operation.
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ public partial class HttpEmptyPrefixHeadersRequest : AmazonRestXmlProtocolRequest
+ {
+ private Dictionary _prefixHeaders = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+ private string _specificHeader;
+
+ ///
+ /// Gets and sets the property PrefixHeaders.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary PrefixHeaders
+ {
+ get { return this._prefixHeaders; }
+ set { this._prefixHeaders = value; }
+ }
+
+ // Check to see if PrefixHeaders property is set
+ internal bool IsSetPrefixHeaders()
+ {
+ return this._prefixHeaders != null && (this._prefixHeaders.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property SpecificHeader.
+ ///
+ public string SpecificHeader
+ {
+ get { return this._specificHeader; }
+ set { this._specificHeader = value; }
+ }
+
+ // Check to see if SpecificHeader property is set
+ internal bool IsSetSpecificHeader()
+ {
+ return this._specificHeader != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RestXmlProtocol/Generated/Model/HttpEmptyPrefixHeadersResponse.cs b/sdk/test/Services/RestXmlProtocol/Generated/Model/HttpEmptyPrefixHeadersResponse.cs
new file mode 100644
index 000000000000..f9296151fc11
--- /dev/null
+++ b/sdk/test/Services/RestXmlProtocol/Generated/Model/HttpEmptyPrefixHeadersResponse.cs
@@ -0,0 +1,76 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rest-xml-protocol-2019-12-16.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RestXmlProtocol.Model
+{
+ ///
+ /// This is the response object from the HttpEmptyPrefixHeaders operation.
+ ///
+ public partial class HttpEmptyPrefixHeadersResponse : AmazonWebServiceResponse
+ {
+ private Dictionary _prefixHeaders = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+ private string _specificHeader;
+
+ ///
+ /// Gets and sets the property PrefixHeaders.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary PrefixHeaders
+ {
+ get { return this._prefixHeaders; }
+ set { this._prefixHeaders = value; }
+ }
+
+ // Check to see if PrefixHeaders property is set
+ internal bool IsSetPrefixHeaders()
+ {
+ return this._prefixHeaders != null && (this._prefixHeaders.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property SpecificHeader.
+ ///
+ public string SpecificHeader
+ {
+ get { return this._specificHeader; }
+ set { this._specificHeader = value; }
+ }
+
+ // Check to see if SpecificHeader property is set
+ internal bool IsSetSpecificHeader()
+ {
+ return this._specificHeader != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RestXmlProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersRequestMarshaller.cs b/sdk/test/Services/RestXmlProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersRequestMarshaller.cs
new file mode 100644
index 000000000000..3051ed7e5655
--- /dev/null
+++ b/sdk/test/Services/RestXmlProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersRequestMarshaller.cs
@@ -0,0 +1,100 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rest-xml-protocol-2019-12-16.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RestXmlProtocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Xml;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RestXmlProtocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// HttpEmptyPrefixHeaders Request Marshaller
+ ///
+ public partial class HttpEmptyPrefixHeadersRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((HttpEmptyPrefixHeadersRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(HttpEmptyPrefixHeadersRequest publicRequest)
+ {
+ var request = new DefaultRequest(publicRequest, "Amazon.RestXmlProtocol");
+ request.HttpMethod = "GET";
+
+ if (publicRequest.IsSetPrefixHeaders())
+ {
+ //Map of headers with prefix "".
+ foreach (var kvpPrefixHeaders in publicRequest.PrefixHeaders)
+ {
+ request.Headers[$"{kvpPrefixHeaders.Key}"] = kvpPrefixHeaders.Value;
+ }
+ }
+
+ if (publicRequest.IsSetSpecificHeader())
+ {
+ request.Headers["hello"] = publicRequest.SpecificHeader;
+ }
+ request.ResourcePath = "/HttpEmptyPrefixHeaders";
+
+
+ PostMarshallCustomization(request, publicRequest);
+ return request;
+ }
+ private static HttpEmptyPrefixHeadersRequestMarshaller _instance = new HttpEmptyPrefixHeadersRequestMarshaller();
+
+ internal static HttpEmptyPrefixHeadersRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static HttpEmptyPrefixHeadersRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ partial void PostMarshallCustomization(DefaultRequest defaultRequest, HttpEmptyPrefixHeadersRequest publicRequest);
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RestXmlProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersResponseUnmarshaller.cs b/sdk/test/Services/RestXmlProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersResponseUnmarshaller.cs
new file mode 100644
index 000000000000..7a20e191b3c6
--- /dev/null
+++ b/sdk/test/Services/RestXmlProtocol/Generated/Model/Internal/MarshallTransformations/HttpEmptyPrefixHeadersResponseUnmarshaller.cs
@@ -0,0 +1,116 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rest-xml-protocol-2019-12-16.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RestXmlProtocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RestXmlProtocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for HttpEmptyPrefixHeaders operation
+ ///
+ public class HttpEmptyPrefixHeadersResponseUnmarshaller : XmlResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
+ {
+ HttpEmptyPrefixHeadersResponse response = new HttpEmptyPrefixHeadersResponse();
+ //Map of headers with prefix "".
+ var headersForPrefixHeaders = new Dictionary();
+ foreach (var namePrefixHeaders in context.ResponseData.GetHeaderNames())
+ {
+ var keyToUse = namePrefixHeaders;
+ if("".Length > 0 && keyToUse.StartsWith("")) {
+ keyToUse = keyToUse.Substring("".Length);
+ }
+
+ if (context.ResponseData.IsHeaderPresent($"{keyToUse}"))
+ {
+ headersForPrefixHeaders.Add(
+ keyToUse,
+ context.ResponseData.GetHeaderValue($"{keyToUse}")
+ );
+ }
+ }
+ if(headersForPrefixHeaders.Count > 0)
+ response.PrefixHeaders = headersForPrefixHeaders;
+ if (context.ResponseData.IsHeaderPresent("hello"))
+ response.SpecificHeader = context.ResponseData.GetHeaderValue("hello");
+
+ return response;
+ }
+
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ ErrorResponse errorResponse = XmlErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
+ {
+ }
+ return new AmazonRestXmlProtocolException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
+ }
+
+ private static HttpEmptyPrefixHeadersResponseUnmarshaller _instance = new HttpEmptyPrefixHeadersResponseUnmarshaller();
+
+ internal static HttpEmptyPrefixHeadersResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static HttpEmptyPrefixHeadersResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RestXmlProtocol/Generated/Model/Internal/MarshallTransformations/NestedXmlMapWithXmlNameRequestMarshaller.cs b/sdk/test/Services/RestXmlProtocol/Generated/Model/Internal/MarshallTransformations/NestedXmlMapWithXmlNameRequestMarshaller.cs
index 4cd9421728d2..1be64ef722fc 100644
--- a/sdk/test/Services/RestXmlProtocol/Generated/Model/Internal/MarshallTransformations/NestedXmlMapWithXmlNameRequestMarshaller.cs
+++ b/sdk/test/Services/RestXmlProtocol/Generated/Model/Internal/MarshallTransformations/NestedXmlMapWithXmlNameRequestMarshaller.cs
@@ -62,7 +62,7 @@ public IRequest Marshall(NestedXmlMapWithXmlNameRequest publicRequest)
var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture);
using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize }))
{
- xmlWriter.WriteStartElement("NestedXmlMapWithXmlNameInputOutput", "");
+ xmlWriter.WriteStartElement("NestedXmlMapWithXmlNameRequest", "");
if(publicRequest.IsSetNestedXmlMapWithXmlNameMap())
{
xmlWriter.WriteStartElement("nestedXmlMapWithXmlNameMap");
diff --git a/sdk/test/Services/RestXmlProtocol/Generated/_bcl/AmazonRestXmlProtocolClient.cs b/sdk/test/Services/RestXmlProtocol/Generated/_bcl/AmazonRestXmlProtocolClient.cs
index e2d0dd339ca4..1c0d449c41e3 100644
--- a/sdk/test/Services/RestXmlProtocol/Generated/_bcl/AmazonRestXmlProtocolClient.cs
+++ b/sdk/test/Services/RestXmlProtocol/Generated/_bcl/AmazonRestXmlProtocolClient.cs
@@ -900,6 +900,47 @@ public virtual GreetingWithErrorsResponse GreetingWithErrors(GreetingWithErrorsR
#endregion
+ #region HttpEmptyPrefixHeaders
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestXmlProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ public virtual HttpEmptyPrefixHeadersResponse HttpEmptyPrefixHeaders(HttpEmptyPrefixHeadersRequest request)
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = HttpEmptyPrefixHeadersRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = HttpEmptyPrefixHeadersResponseUnmarshaller.Instance;
+
+ return Invoke(request, options);
+ }
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestXmlProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ public virtual Task HttpEmptyPrefixHeadersAsync(HttpEmptyPrefixHeadersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = HttpEmptyPrefixHeadersRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = HttpEmptyPrefixHeadersResponseUnmarshaller.Instance;
+
+ return InvokeAsync(request, options, cancellationToken);
+ }
+
+ #endregion
+
#region HttpEnumPayload
diff --git a/sdk/test/Services/RestXmlProtocol/Generated/_bcl/IAmazonRestXmlProtocol.cs b/sdk/test/Services/RestXmlProtocol/Generated/_bcl/IAmazonRestXmlProtocol.cs
index febc2a62239d..43c70e266914 100644
--- a/sdk/test/Services/RestXmlProtocol/Generated/_bcl/IAmazonRestXmlProtocol.cs
+++ b/sdk/test/Services/RestXmlProtocol/Generated/_bcl/IAmazonRestXmlProtocol.cs
@@ -503,6 +503,34 @@ public partial interface IAmazonRestXmlProtocol : IAmazonService, IDisposable
#endregion
+ #region HttpEmptyPrefixHeaders
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestXmlProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ HttpEmptyPrefixHeadersResponse HttpEmptyPrefixHeaders(HttpEmptyPrefixHeadersRequest request);
+
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestXmlProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ Task HttpEmptyPrefixHeadersAsync(HttpEmptyPrefixHeadersRequest request, CancellationToken cancellationToken = default(CancellationToken));
+
+ #endregion
+
#region HttpEnumPayload
diff --git a/sdk/test/Services/RestXmlProtocol/Generated/_netstandard/AmazonRestXmlProtocolClient.cs b/sdk/test/Services/RestXmlProtocol/Generated/_netstandard/AmazonRestXmlProtocolClient.cs
index edd194294cb3..e10afb9a1168 100644
--- a/sdk/test/Services/RestXmlProtocol/Generated/_netstandard/AmazonRestXmlProtocolClient.cs
+++ b/sdk/test/Services/RestXmlProtocol/Generated/_netstandard/AmazonRestXmlProtocolClient.cs
@@ -760,6 +760,39 @@ internal virtual GreetingWithErrorsResponse GreetingWithErrors(GreetingWithError
}
#endregion
+ #region HttpEmptyPrefixHeaders
+
+ internal virtual HttpEmptyPrefixHeadersResponse HttpEmptyPrefixHeaders(HttpEmptyPrefixHeadersRequest request)
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = HttpEmptyPrefixHeadersRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = HttpEmptyPrefixHeadersResponseUnmarshaller.Instance;
+
+ return Invoke(request, options);
+ }
+
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestXmlProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ public virtual Task HttpEmptyPrefixHeadersAsync(HttpEmptyPrefixHeadersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = HttpEmptyPrefixHeadersRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = HttpEmptyPrefixHeadersResponseUnmarshaller.Instance;
+
+ return InvokeAsync(request, options, cancellationToken);
+ }
+ #endregion
+
#region HttpEnumPayload
internal virtual HttpEnumPayloadResponse HttpEnumPayload(HttpEnumPayloadRequest request)
diff --git a/sdk/test/Services/RestXmlProtocol/Generated/_netstandard/IAmazonRestXmlProtocol.cs b/sdk/test/Services/RestXmlProtocol/Generated/_netstandard/IAmazonRestXmlProtocol.cs
index c790244b826d..7f5ee564c13a 100644
--- a/sdk/test/Services/RestXmlProtocol/Generated/_netstandard/IAmazonRestXmlProtocol.cs
+++ b/sdk/test/Services/RestXmlProtocol/Generated/_netstandard/IAmazonRestXmlProtocol.cs
@@ -329,6 +329,24 @@ public partial interface IAmazonRestXmlProtocol : IAmazonService, IDisposable
#endregion
+ #region HttpEmptyPrefixHeaders
+
+
+
+ ///
+ /// Clients that perform this test extract all headers from the response.
+ ///
+ /// Container for the necessary parameters to execute the HttpEmptyPrefixHeaders service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the HttpEmptyPrefixHeaders service method, as returned by RestXmlProtocol.
+ /// REST API Reference for HttpEmptyPrefixHeaders Operation
+ Task HttpEmptyPrefixHeadersAsync(HttpEmptyPrefixHeadersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
+
+ #endregion
+
#region HttpEnumPayload
diff --git a/sdk/test/Services/RestXmlProtocolNamespace/Generated/Model/Internal/MarshallTransformations/SimpleScalarPropertiesRequestMarshaller.cs b/sdk/test/Services/RestXmlProtocolNamespace/Generated/Model/Internal/MarshallTransformations/SimpleScalarPropertiesRequestMarshaller.cs
index 05fc038c3949..e93108d5bb52 100644
--- a/sdk/test/Services/RestXmlProtocolNamespace/Generated/Model/Internal/MarshallTransformations/SimpleScalarPropertiesRequestMarshaller.cs
+++ b/sdk/test/Services/RestXmlProtocolNamespace/Generated/Model/Internal/MarshallTransformations/SimpleScalarPropertiesRequestMarshaller.cs
@@ -67,7 +67,7 @@ public IRequest Marshall(SimpleScalarPropertiesRequest publicRequest)
var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture);
using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize }))
{
- xmlWriter.WriteStartElement("SimpleScalarPropertiesInputOutput", "https://example.com");
+ xmlWriter.WriteStartElement("SimpleScalarPropertiesRequest", "https://example.com");
if(publicRequest.IsSetByteValue())
xmlWriter.WriteElementString("byteValue", StringUtils.FromInt(publicRequest.ByteValue.Value));
diff --git a/sdk/test/Services/RpcV2Protocol/AWSSDK.RpcV2Protocol.NetFramework.csproj b/sdk/test/Services/RpcV2Protocol/AWSSDK.RpcV2Protocol.NetFramework.csproj
new file mode 100644
index 000000000000..fc36c36e61f1
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/AWSSDK.RpcV2Protocol.NetFramework.csproj
@@ -0,0 +1,85 @@
+
+
+ true
+ net472
+ $(DefineConstants);BCL;AWS_ASYNC_API;CODE_ANALYSIS
+ portable
+ true
+ AWSSDK.RpcV2Protocol
+ AWSSDK.RpcV2Protocol
+
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ true
+ true
+
+ CA1822
+
+
+
+ 11.0
+
+
+ 9.0
+
+
+ ../../../AWSDotNetSDK.ruleset
+
+
+ ../../../AWSDotNetSDKForBuild.ruleset
+
+
+
+
+
+ ../../../awssdk.dll.snk
+
+
+
+
+ $(AWSKeyFile)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+
+
+ all
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/AWSSDK.RpcV2Protocol.NetStandard.csproj b/sdk/test/Services/RpcV2Protocol/AWSSDK.RpcV2Protocol.NetStandard.csproj
new file mode 100644
index 000000000000..f350417fa94b
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/AWSSDK.RpcV2Protocol.NetStandard.csproj
@@ -0,0 +1,95 @@
+
+
+ true
+ netstandard2.0;netcoreapp3.1;net8.0
+ $(DefineConstants);NETSTANDARD;AWS_ASYNC_API
+ $(DefineConstants);NETSTANDARD20;AWS_ASYNC_ENUMERABLES_API
+ $(DefineConstants);AWS_ASYNC_ENUMERABLES_API
+ $(DefineConstants);AWS_ASYNC_ENUMERABLES_API
+ portable
+ true
+ AWSSDK.RpcV2Protocol
+ AWSSDK.RpcV2Protocol
+
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ true
+ true
+
+ true
+ CA1822
+
+
+
+ 8.0
+
+
+ true
+
+
+
+ 11.0
+
+
+ 9.0
+
+
+ ../../../AWSDotNetSDK.ruleset
+
+
+ ../../../AWSDotNetSDKForBuild.ruleset
+
+
+
+
+
+ ../../../awssdk.dll.snk
+
+
+
+
+ $(AWSKeyFile)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+
+
+ all
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/AmazonRpcV2ProtocolConfig.cs b/sdk/test/Services/RpcV2Protocol/Generated/AmazonRpcV2ProtocolConfig.cs
new file mode 100644
index 000000000000..bb4b7d227835
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/AmazonRpcV2ProtocolConfig.cs
@@ -0,0 +1,106 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+
+using System;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Util.Internal;
+using Amazon.Runtime.Internal.Auth;
+using Amazon.Runtime.Endpoints;
+using Amazon.RpcV2Protocol.Internal;
+
+namespace Amazon.RpcV2Protocol
+{
+ ///
+ /// Configuration for accessing Amazon RpcV2Protocol service
+ ///
+ public partial class AmazonRpcV2ProtocolConfig : ClientConfig
+ {
+ private static readonly string UserAgentString =
+ InternalSDKUtils.BuildUserAgentString("RpcV2Protocol", "4.0");
+
+
+ private string _userAgent = UserAgentString;
+ ///
+ /// The ServiceId, which is the unique identifier for a service.
+ ///
+ public static new string ServiceId
+ {
+ get
+ {
+ return "RpcV2Protocol";
+ }
+ }
+ ///
+ /// Default constructor
+ ///
+ public AmazonRpcV2ProtocolConfig()
+ : base(new Amazon.Runtime.Internal.DefaultConfigurationProvider(AmazonRpcV2ProtocolDefaultConfiguration.GetAllConfigurations()))
+ {
+ base.ServiceId = "RpcV2Protocol";
+ this.AuthenticationServiceName = "rpcv2protocol";
+ }
+
+ ///
+ /// The constant used to lookup in the region hash the endpoint.
+ ///
+ public override string RegionEndpointServiceName
+ {
+ get
+ {
+ return "rpcv2protocol";
+ }
+ }
+
+ ///
+ /// Gets the ServiceVersion property.
+ ///
+ public override string ServiceVersion
+ {
+ get
+ {
+ return "2020-07-14";
+ }
+ }
+
+ ///
+ /// Gets the value of UserAgent property.
+ ///
+ public override string UserAgent
+ {
+ get
+ {
+ return _userAgent;
+ }
+ }
+
+ ///
+ /// Returns the endpoint that will be used for a particular request.
+ ///
+ /// A Container class for parameters used for endpoint resolution.
+ /// The resolved endpoint for the given request.
+ public override Endpoint DetermineServiceOperationEndpoint(ServiceOperationEndpointParameters parameters)
+ {
+ // If the current service doesn't have an endpoint rule set (which is the case for configs
+ // that are used for testing), we'll return a placeholder endpoint so that unit tests pass.
+ return new Endpoint(this.ServiceURL ?? "https://example.com");
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/AmazonRpcV2ProtocolDefaultConfiguration.cs b/sdk/test/Services/RpcV2Protocol/Generated/AmazonRpcV2ProtocolDefaultConfiguration.cs
new file mode 100644
index 000000000000..1f57c0e5d96e
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/AmazonRpcV2ProtocolDefaultConfiguration.cs
@@ -0,0 +1,126 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+
+using Amazon.Runtime;
+
+namespace Amazon.RpcV2Protocol
+{
+ ///
+ /// Configuration for accessing Amazon RpcV2Protocol service
+ ///
+ public static class AmazonRpcV2ProtocolDefaultConfiguration
+ {
+ ///
+ /// Collection of all s supported by
+ /// RpcV2Protocol
+ ///
+ public static ReadOnlyCollection GetAllConfigurations()
+ {
+ return new ReadOnlyCollection(new List
+ {
+ Standard,
+ InRegion,
+ CrossRegion,
+ Mobile,
+ Auto
+ });
+ }
+
+ ///
+ /// The STANDARD mode provides the latest recommended default values that should be safe to run in most scenarios
Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK
+ ///
+ public static IDefaultConfiguration Standard {get;} = new DefaultConfiguration
+ {
+ Name = DefaultConfigurationMode.Standard,
+ RetryMode = RequestRetryMode.Standard,
+ S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
+ // 0:00:03.1
+ ConnectTimeout = TimeSpan.FromMilliseconds(3100L),
+ // 0:00:03.1
+ TlsNegotiationTimeout = TimeSpan.FromMilliseconds(3100L),
+ TimeToFirstByteTimeout = null,
+ HttpRequestTimeout = null
+ };
+ ///
+ /// The IN_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services from within the same AWS region
Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK
+ ///
+ public static IDefaultConfiguration InRegion {get;} = new DefaultConfiguration
+ {
+ Name = DefaultConfigurationMode.InRegion,
+ RetryMode = RequestRetryMode.Standard,
+ S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
+ // 0:00:01.1
+ ConnectTimeout = TimeSpan.FromMilliseconds(1100L),
+ // 0:00:01.1
+ TlsNegotiationTimeout = TimeSpan.FromMilliseconds(1100L),
+ TimeToFirstByteTimeout = null,
+ HttpRequestTimeout = null
+ };
+ ///
+ /// The CROSS_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services in a different region
Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK
+ ///
+ public static IDefaultConfiguration CrossRegion {get;} = new DefaultConfiguration
+ {
+ Name = DefaultConfigurationMode.CrossRegion,
+ RetryMode = RequestRetryMode.Standard,
+ S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
+ // 0:00:03.1
+ ConnectTimeout = TimeSpan.FromMilliseconds(3100L),
+ // 0:00:03.1
+ TlsNegotiationTimeout = TimeSpan.FromMilliseconds(3100L),
+ TimeToFirstByteTimeout = null,
+ HttpRequestTimeout = null
+ };
+ ///
+ /// The MOBILE mode builds on the standard mode and includes optimization tailored for mobile applications
Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK
+ ///
+ public static IDefaultConfiguration Mobile {get;} = new DefaultConfiguration
+ {
+ Name = DefaultConfigurationMode.Mobile,
+ RetryMode = RequestRetryMode.Standard,
+ S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
+ // 0:00:30
+ ConnectTimeout = TimeSpan.FromMilliseconds(30000L),
+ // 0:00:30
+ TlsNegotiationTimeout = TimeSpan.FromMilliseconds(30000L),
+ TimeToFirstByteTimeout = null,
+ HttpRequestTimeout = null
+ };
+ ///
+ /// The AUTO mode is an experimental mode that builds on the standard mode. The SDK will attempt to discover the execution environment to determine the appropriate settings automatically.
Note that the auto detection is heuristics-based and does not guarantee 100% accuracy. STANDARD mode will be used if the execution environment cannot be determined. The auto detection might query EC2 Instance Metadata service , which might introduce latency. Therefore we recommend choosing an explicit defaults_mode instead if startup latency is critical to your application
+ ///
+ public static IDefaultConfiguration Auto {get;} = new DefaultConfiguration
+ {
+ Name = DefaultConfigurationMode.Auto,
+ RetryMode = RequestRetryMode.Standard,
+ S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Regional,
+ // 0:00:01.1
+ ConnectTimeout = TimeSpan.FromMilliseconds(1100L),
+ // 0:00:01.1
+ TlsNegotiationTimeout = TimeSpan.FromMilliseconds(1100L),
+ TimeToFirstByteTimeout = null,
+ HttpRequestTimeout = null
+ };
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/AmazonRpcV2ProtocolException.cs b/sdk/test/Services/RpcV2Protocol/Generated/AmazonRpcV2ProtocolException.cs
new file mode 100644
index 000000000000..e9ed7cc25fac
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/AmazonRpcV2ProtocolException.cs
@@ -0,0 +1,105 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Text;
+
+using Amazon.Runtime;
+
+namespace Amazon.RpcV2Protocol
+{
+ ///
+ /// Common exception for the RpcV2Protocol service.
+ ///
+#if !NETSTANDARD
+ [Serializable]
+#endif
+ public partial class AmazonRpcV2ProtocolException : AmazonServiceException
+ {
+ ///
+ /// Construct instance of AmazonRpcV2ProtocolException
+ ///
+ ///
+ public AmazonRpcV2ProtocolException(string message)
+ : base(message)
+ {
+ }
+
+ ///
+ /// Construct instance of AmazonRpcV2ProtocolException
+ ///
+ ///
+ ///
+ public AmazonRpcV2ProtocolException(string message, Exception innerException)
+ : base(message, innerException)
+ {
+ }
+
+ ///
+ /// Construct instance of AmazonRpcV2ProtocolException
+ ///
+ ///
+ public AmazonRpcV2ProtocolException(Exception innerException)
+ : base(innerException.Message, innerException)
+ {
+ }
+
+ ///
+ /// Construct instance of AmazonRpcV2ProtocolException
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public AmazonRpcV2ProtocolException(string message, Amazon.Runtime.ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
+ : base(message, errorType, errorCode, requestId, statusCode)
+ {
+ }
+
+ ///
+ /// Construct instance of AmazonRpcV2ProtocolException
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public AmazonRpcV2ProtocolException(string message, Exception innerException, Amazon.Runtime.ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
+ : base(message, innerException, errorType, errorCode, requestId, statusCode)
+ {
+ }
+
+#if !NETSTANDARD
+ ///
+ /// Constructs a new instance of the AmazonRpcV2ProtocolException class with serialized data.
+ ///
+ /// The that holds the serialized object data about the exception being thrown.
+ /// The that contains contextual information about the source or destination.
+ /// The parameter is null.
+ /// The class name is null or is zero (0).
+ protected AmazonRpcV2ProtocolException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+ : base(info, context)
+ {
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Internal/AmazonRpcV2ProtocolAuthResolver.cs b/sdk/test/Services/RpcV2Protocol/Generated/Internal/AmazonRpcV2ProtocolAuthResolver.cs
new file mode 100644
index 000000000000..b2f5717bdf96
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Internal/AmazonRpcV2ProtocolAuthResolver.cs
@@ -0,0 +1,79 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+
+using Amazon.Runtime;
+using Amazon.Runtime.Credentials.Internal;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Auth;
+using Amazon.Runtime.Identity;
+using System.Collections.Generic;
+
+namespace Amazon.RpcV2Protocol.Internal
+{
+ ///
+ public class AmazonRpcV2ProtocolAuthSchemeParameters : IAuthSchemeParameters
+ {
+ ///
+ public string Operation { get; set; }
+
+ ///
+ /// Region is included as the service supports SigV4.
+ ///
+ public string Region { get; set; }
+ }
+
+ ///
+ /// Handler responsible for converting the request context into the parameters expected by the auth scheme resolver.
+ ///
+ public class AmazonRpcV2ProtocolAuthSchemeHandler : BaseAuthResolverHandler
+ {
+ ///
+ /// Modeled auth scheme resolver for RpcV2Protocol.
+ ///
+ public AmazonRpcV2ProtocolAuthSchemeResolver AuthSchemeResolver { get; } = new();
+
+ ///
+ protected override List ResolveAuthOptions(IExecutionContext executionContext)
+ {
+ var requestContext = executionContext.RequestContext;
+ var mappedParameters = new AmazonRpcV2ProtocolAuthSchemeParameters
+ {
+ Operation = requestContext.Request.RequestName,
+ Region = requestContext.ClientConfig.RegionEndpoint?.SystemName,
+ };
+
+ return AuthSchemeResolver.ResolveAuthScheme(mappedParameters);
+ }
+ }
+
+ ///
+ public class AmazonRpcV2ProtocolAuthSchemeResolver : IAuthSchemeResolver
+ {
+ ///
+ public List ResolveAuthScheme(AmazonRpcV2ProtocolAuthSchemeParameters authParameters)
+ {
+ switch (authParameters.Operation)
+ {
+ default:
+ // Default for the service, applies to all remaining operations.
+ return AuthSchemeOption.DEFAULT_SIGV4;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Internal/AmazonRpcV2ProtocolMetadata.cs b/sdk/test/Services/RpcV2Protocol/Generated/Internal/AmazonRpcV2ProtocolMetadata.cs
new file mode 100644
index 000000000000..82f2c06019ac
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Internal/AmazonRpcV2ProtocolMetadata.cs
@@ -0,0 +1,55 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+
+
+using Amazon.Runtime.Internal;
+
+
+namespace Amazon.RpcV2Protocol.Internal
+{
+ ///
+ /// Service metadata for Amazon RpcV2Protocol service
+ ///
+ public partial class AmazonRpcV2ProtocolMetadata : IServiceMetadata
+ {
+ ///
+ /// Gets the value of the Service Id.
+ ///
+ public string ServiceId
+ {
+ get
+ {
+ return "RpcV2Protocol";
+ }
+ }
+
+ ///
+ /// Gets the dictionary that gives mapping of renamed operations
+ ///
+ public System.Collections.Generic.IDictionary OperationNameMapping
+ {
+ get
+ {
+ return new System.Collections.Generic.Dictionary(0)
+ {
+ };
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/AmazonRpcV2ProtocolRequest.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/AmazonRpcV2ProtocolRequest.cs
new file mode 100644
index 000000000000..cdb2655d075c
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/AmazonRpcV2ProtocolRequest.cs
@@ -0,0 +1,30 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+
+using Amazon.Runtime;
+
+namespace Amazon.RpcV2Protocol
+{
+ ///
+ /// Base class for RpcV2Protocol operation requests.
+ ///
+ public partial class AmazonRpcV2ProtocolRequest : AmazonWebServiceRequest
+ {
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/ComplexErrorException.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/ComplexErrorException.cs
new file mode 100644
index 000000000000..b29cd132d075
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/ComplexErrorException.cs
@@ -0,0 +1,156 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This error is thrown when a request is invalid.
+ ///
+ #if !NETSTANDARD
+ [Serializable]
+ #endif
+ public partial class ComplexErrorException : AmazonRpcV2ProtocolException
+ {
+ private ComplexNestedErrorData _nested;
+ private string _topLevel;
+
+ ///
+ /// Constructs a new ComplexErrorException with the specified error
+ /// message.
+ ///
+ ///
+ /// Describes the error encountered.
+ ///
+ public ComplexErrorException(string message)
+ : base(message) {}
+
+ ///
+ /// Construct instance of ComplexErrorException
+ ///
+ ///
+ ///
+ public ComplexErrorException(string message, Exception innerException)
+ : base(message, innerException) {}
+
+ ///
+ /// Construct instance of ComplexErrorException
+ ///
+ ///
+ public ComplexErrorException(Exception innerException)
+ : base(innerException) {}
+
+ ///
+ /// Construct instance of ComplexErrorException
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ComplexErrorException(string message, Exception innerException, Amazon.Runtime.ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
+ : base(message, innerException, errorType, errorCode, requestId, statusCode) {}
+
+ ///
+ /// Construct instance of ComplexErrorException
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ComplexErrorException(string message, Amazon.Runtime.ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
+ : base(message, errorType, errorCode, requestId, statusCode) {}
+
+
+#if !NETSTANDARD
+ ///
+ /// Constructs a new instance of the ComplexErrorException class with serialized data.
+ ///
+ /// The that holds the serialized object data about the exception being thrown.
+ /// The that contains contextual information about the source or destination.
+ /// The parameter is null.
+ /// The class name is null or is zero (0).
+ protected ComplexErrorException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+ : base(info, context)
+ {
+ this.Nested = (ComplexNestedErrorData)info.GetValue("Nested", typeof(ComplexNestedErrorData));
+ this.TopLevel = (string)info.GetValue("TopLevel", typeof(string));
+ }
+
+ ///
+ /// Sets the with information about the exception.
+ ///
+ /// The that holds the serialized object data about the exception being thrown.
+ /// The that contains contextual information about the source or destination.
+ /// The parameter is a null reference (Nothing in Visual Basic).
+ [System.Security.SecurityCritical]
+ // These FxCop rules are giving false-positives for this method
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
+ public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+ {
+ base.GetObjectData(info, context);
+ info.AddValue("Nested", this.Nested);
+ info.AddValue("TopLevel", this.TopLevel);
+ }
+#endif
+
+ ///
+ /// Gets and sets the property Nested.
+ ///
+ public ComplexNestedErrorData Nested
+ {
+ get { return this._nested; }
+ set { this._nested = value; }
+ }
+
+ // Check to see if Nested property is set
+ internal bool IsSetNested()
+ {
+ return this._nested != null;
+ }
+
+ ///
+ /// Gets and sets the property TopLevel.
+ ///
+ public string TopLevel
+ {
+ get { return this._topLevel; }
+ set { this._topLevel = value; }
+ }
+
+ // Check to see if TopLevel property is set
+ internal bool IsSetTopLevel()
+ {
+ return this._topLevel != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/ComplexNestedErrorData.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/ComplexNestedErrorData.cs
new file mode 100644
index 000000000000..7cc460a0bebb
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/ComplexNestedErrorData.cs
@@ -0,0 +1,55 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ ///
+ ///
+ public partial class ComplexNestedErrorData
+ {
+ private string _foo;
+
+ ///
+ /// Gets and sets the property Foo.
+ ///
+ public string Foo
+ {
+ get { return this._foo; }
+ set { this._foo = value; }
+ }
+
+ // Check to see if Foo property is set
+ internal bool IsSetFoo()
+ {
+ return this._foo != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/EmptyInputOutputRequest.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/EmptyInputOutputRequest.cs
new file mode 100644
index 000000000000..9d67cc073320
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/EmptyInputOutputRequest.cs
@@ -0,0 +1,40 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// Container for the parameters to the EmptyInputOutput operation.
+ ///
+ ///
+ public partial class EmptyInputOutputRequest : AmazonRpcV2ProtocolRequest
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/EmptyInputOutputResponse.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/EmptyInputOutputResponse.cs
new file mode 100644
index 000000000000..04cc72c02dd1
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/EmptyInputOutputResponse.cs
@@ -0,0 +1,39 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This is the response object from the EmptyInputOutput operation.
+ ///
+ public partial class EmptyInputOutputResponse : AmazonWebServiceResponse
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/extensions/src/AWSSDK.Extensions.CborProtocol/Internal/CborMarshallerContext.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Float16Request.cs
similarity index 60%
rename from extensions/src/AWSSDK.Extensions.CborProtocol/Internal/CborMarshallerContext.cs
rename to sdk/test/Services/RpcV2Protocol/Generated/Model/Float16Request.cs
index 687e153f0be8..0143c2ac7482 100644
--- a/extensions/src/AWSSDK.Extensions.CborProtocol/Internal/CborMarshallerContext.cs
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Float16Request.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -12,26 +12,29 @@
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-using Amazon.Runtime;
-using Amazon.Runtime.Internal;
-using Amazon.Runtime.Internal.Transform;
-using Amazon.Runtime.Internal.Util;
-using Amazon.Util;
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
using System;
using System.Collections.Generic;
-using System.Formats.Cbor;
+using System.Xml.Serialization;
+using System.Text;
using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
-namespace AWSSDK.Extensions.CborProtocol.Internal
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
{
- public class CborMarshallerContext : MarshallerContext
+ ///
+ /// Container for the parameters to the Float16 operation.
+ ///
+ ///
+ public partial class Float16Request : AmazonRpcV2ProtocolRequest
{
- public CborWriter Writer { get; private set; }
- public CborMarshallerContext(IRequest request, CborWriter writer)
- : base(request)
- {
- Writer = writer;
- }
}
-}
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Float16Response.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Float16Response.cs
new file mode 100644
index 000000000000..176bfe2bfd5e
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Float16Response.cs
@@ -0,0 +1,55 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This is the response object from the Float16 operation.
+ ///
+ public partial class Float16Response : AmazonWebServiceResponse
+ {
+ private double? _value;
+
+ ///
+ /// Gets and sets the property Value.
+ ///
+ public double? Value
+ {
+ get { return this._value; }
+ set { this._value = value; }
+ }
+
+ // Check to see if Value property is set
+ internal bool IsSetValue()
+ {
+ return this._value.HasValue;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/FractionalSecondsRequest.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/FractionalSecondsRequest.cs
new file mode 100644
index 000000000000..b4e83885848a
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/FractionalSecondsRequest.cs
@@ -0,0 +1,40 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// Container for the parameters to the FractionalSeconds operation.
+ ///
+ ///
+ public partial class FractionalSecondsRequest : AmazonRpcV2ProtocolRequest
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/FractionalSecondsResponse.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/FractionalSecondsResponse.cs
new file mode 100644
index 000000000000..2488851f8524
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/FractionalSecondsResponse.cs
@@ -0,0 +1,55 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This is the response object from the FractionalSeconds operation.
+ ///
+ public partial class FractionalSecondsResponse : AmazonWebServiceResponse
+ {
+ private DateTime? _datetime;
+
+ ///
+ /// Gets and sets the property Datetime.
+ ///
+ public DateTime? Datetime
+ {
+ get { return this._datetime; }
+ set { this._datetime = value; }
+ }
+
+ // Check to see if Datetime property is set
+ internal bool IsSetDatetime()
+ {
+ return this._datetime.HasValue;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/GreetingStruct.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/GreetingStruct.cs
new file mode 100644
index 000000000000..33a30cc6bca6
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/GreetingStruct.cs
@@ -0,0 +1,55 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ ///
+ ///
+ public partial class GreetingStruct
+ {
+ private string _hi;
+
+ ///
+ /// Gets and sets the property Hi.
+ ///
+ public string Hi
+ {
+ get { return this._hi; }
+ set { this._hi = value; }
+ }
+
+ // Check to see if Hi property is set
+ internal bool IsSetHi()
+ {
+ return this._hi != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/GreetingWithErrorsRequest.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/GreetingWithErrorsRequest.cs
new file mode 100644
index 000000000000..85f13eacfc7f
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/GreetingWithErrorsRequest.cs
@@ -0,0 +1,47 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// Container for the parameters to the GreetingWithErrors operation.
+ /// This operation has three possible return values:
+ ///
+ /// A successful response in the form of GreetingWithErrorsOutput An
+ /// InvalidGreeting error. A ComplexError error.
+ ///
+ /// Implementations must be able to successfully take a response and properly deserialize
+ /// successful and error responses.
+ ///
+ ///
+ public partial class GreetingWithErrorsRequest : AmazonRpcV2ProtocolRequest
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/GreetingWithErrorsResponse.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/GreetingWithErrorsResponse.cs
new file mode 100644
index 000000000000..2402cb68e1c7
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/GreetingWithErrorsResponse.cs
@@ -0,0 +1,55 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This is the response object from the GreetingWithErrors operation.
+ ///
+ public partial class GreetingWithErrorsResponse : AmazonWebServiceResponse
+ {
+ private string _greeting;
+
+ ///
+ /// Gets and sets the property Greeting.
+ ///
+ public string Greeting
+ {
+ get { return this._greeting; }
+ set { this._greeting = value; }
+ }
+
+ // Check to see if Greeting property is set
+ internal bool IsSetGreeting()
+ {
+ return this._greeting != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ComplexErrorExceptionUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ComplexErrorExceptionUnmarshaller.cs
new file mode 100644
index 000000000000..86d191ba3886
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ComplexErrorExceptionUnmarshaller.cs
@@ -0,0 +1,106 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for ComplexErrorException Object
+ ///
+ public class ComplexErrorExceptionUnmarshaller : IJsonErrorResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ ///
+ public ComplexErrorException Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
+ {
+ return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse(), ref reader);
+ }
+
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ComplexErrorException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse, ref StreamingUtf8JsonReader reader)
+ {
+ if (context.Stream.Length > 0)
+ {
+ context.Read(ref reader);
+ }
+
+ ComplexErrorException unmarshalledObject = new ComplexErrorException(errorResponse.Message, errorResponse.InnerException,
+ errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+
+ int targetDepth = context.CurrentDepth;
+ if (context.Stream.Length > 0)
+ {
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("Nested", targetDepth))
+ {
+ var unmarshaller = ComplexNestedErrorDataUnmarshaller.Instance;
+ unmarshalledObject.Nested = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("TopLevel", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ unmarshalledObject.TopLevel = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+ }
+
+ return unmarshalledObject;
+ }
+
+ private static ComplexErrorExceptionUnmarshaller _instance = new ComplexErrorExceptionUnmarshaller();
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static ComplexErrorExceptionUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ComplexNestedErrorDataUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ComplexNestedErrorDataUnmarshaller.cs
new file mode 100644
index 000000000000..cf5a5ee72773
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ComplexNestedErrorDataUnmarshaller.cs
@@ -0,0 +1,83 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for ComplexNestedErrorData Object
+ ///
+ public class ComplexNestedErrorDataUnmarshaller : IJsonUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ /// The unmarshalled object
+ public ComplexNestedErrorData Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
+ {
+ ComplexNestedErrorData unmarshalledObject = new ComplexNestedErrorData();
+ if (context.IsEmptyResponse)
+ return null;
+ context.Read(ref reader);
+ if (context.CurrentTokenType == JsonTokenType.Null)
+ return null;
+
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("Foo", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ unmarshalledObject.Foo = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+ return unmarshalledObject;
+ }
+
+
+ private static ComplexNestedErrorDataUnmarshaller _instance = new ComplexNestedErrorDataUnmarshaller();
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static ComplexNestedErrorDataUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/EmptyInputOutputRequestMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/EmptyInputOutputRequestMarshaller.cs
new file mode 100644
index 000000000000..8a5f1f7c7a00
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/EmptyInputOutputRequestMarshaller.cs
@@ -0,0 +1,101 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// EmptyInputOutput Request Marshaller
+ ///
+ public class EmptyInputOutputRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((EmptyInputOutputRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(EmptyInputOutputRequest publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RpcV2Protocol");
+ request.Headers["smithy-protocol"] = "rpc-v2-cbor";
+ request.ResourcePath = "service/RpcV2Protocol/operation/EmptyInputOutput";
+ request.Headers["Content-Type"] = "application/cbor";
+ request.Headers["Accept"] = "application/cbor";
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-07-14";
+ request.HttpMethod = "POST";
+
+ var writer = CborWriterPool.Rent();
+ try
+ {
+ writer.WriteStartMap(null);
+ var context = new CborMarshallerContext(request, writer);
+ writer.WriteEndMap();
+ request.Content = writer.Encode();
+ }
+ finally
+ {
+ CborWriterPool.Return(writer);
+ }
+
+ return request;
+ }
+ private static EmptyInputOutputRequestMarshaller _instance = new EmptyInputOutputRequestMarshaller();
+
+ internal static EmptyInputOutputRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static EmptyInputOutputRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/EmptyInputOutputResponseUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/EmptyInputOutputResponseUnmarshaller.cs
new file mode 100644
index 000000000000..ee481fa2a4ff
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/EmptyInputOutputResponseUnmarshaller.cs
@@ -0,0 +1,97 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for EmptyInputOutput operation
+ ///
+ public class EmptyInputOutputResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ EmptyInputOutputResponse response = new EmptyInputOutputResponse();
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ }
+ return new AmazonRpcV2ProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static EmptyInputOutputResponseUnmarshaller _instance = new EmptyInputOutputResponseUnmarshaller();
+
+ internal static EmptyInputOutputResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static EmptyInputOutputResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/Float16RequestMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/Float16RequestMarshaller.cs
new file mode 100644
index 000000000000..db339cab4aba
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/Float16RequestMarshaller.cs
@@ -0,0 +1,87 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Float16 Request Marshaller
+ ///
+ public class Float16RequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((Float16Request)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(Float16Request publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RpcV2Protocol");
+ request.Headers["smithy-protocol"] = "rpc-v2-cbor";
+ request.ResourcePath = "service/RpcV2Protocol/operation/Float16";
+ request.Headers["Accept"] = "application/cbor";
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-07-14";
+ request.HttpMethod = "POST";
+
+ return request;
+ }
+ private static Float16RequestMarshaller _instance = new Float16RequestMarshaller();
+
+ internal static Float16RequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static Float16RequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/Float16ResponseUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/Float16ResponseUnmarshaller.cs
new file mode 100644
index 000000000000..928cbb079204
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/Float16ResponseUnmarshaller.cs
@@ -0,0 +1,109 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for Float16 operation
+ ///
+ public class Float16ResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ Float16Response response = new Float16Response();
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ context.Read(ref reader);
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("value", targetDepth))
+ {
+ var unmarshaller = NullableDoubleUnmarshaller.Instance;
+ response.Value = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ }
+ return new AmazonRpcV2ProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static Float16ResponseUnmarshaller _instance = new Float16ResponseUnmarshaller();
+
+ internal static Float16ResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static Float16ResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/FractionalSecondsRequestMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/FractionalSecondsRequestMarshaller.cs
new file mode 100644
index 000000000000..af9ade90a2c3
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/FractionalSecondsRequestMarshaller.cs
@@ -0,0 +1,87 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// FractionalSeconds Request Marshaller
+ ///
+ public class FractionalSecondsRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((FractionalSecondsRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(FractionalSecondsRequest publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RpcV2Protocol");
+ request.Headers["smithy-protocol"] = "rpc-v2-cbor";
+ request.ResourcePath = "service/RpcV2Protocol/operation/FractionalSeconds";
+ request.Headers["Accept"] = "application/cbor";
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-07-14";
+ request.HttpMethod = "POST";
+
+ return request;
+ }
+ private static FractionalSecondsRequestMarshaller _instance = new FractionalSecondsRequestMarshaller();
+
+ internal static FractionalSecondsRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static FractionalSecondsRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/FractionalSecondsResponseUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/FractionalSecondsResponseUnmarshaller.cs
new file mode 100644
index 000000000000..eb17ac83b2be
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/FractionalSecondsResponseUnmarshaller.cs
@@ -0,0 +1,109 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for FractionalSeconds operation
+ ///
+ public class FractionalSecondsResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ FractionalSecondsResponse response = new FractionalSecondsResponse();
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ context.Read(ref reader);
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("datetime", targetDepth))
+ {
+ var unmarshaller = NullableDateTimeUnmarshaller.Instance;
+ response.Datetime = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ }
+ return new AmazonRpcV2ProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static FractionalSecondsResponseUnmarshaller _instance = new FractionalSecondsResponseUnmarshaller();
+
+ internal static FractionalSecondsResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static FractionalSecondsResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingStructMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingStructMarshaller.cs
new file mode 100644
index 000000000000..fcb648f337f7
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingStructMarshaller.cs
@@ -0,0 +1,66 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// GreetingStruct Marshaller
+ ///
+ public class GreetingStructMarshaller : IRequestMarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ ///
+ public void Marshall(GreetingStruct requestObject, CborMarshallerContext context)
+ {
+ if (requestObject == null)
+ return;
+
+ if (requestObject.IsSetHi())
+ {
+ context.Writer.WriteTextString("hi");
+ context.Writer.WriteTextString(requestObject.Hi);
+ }
+ }
+
+ ///
+ /// Singleton Marshaller.
+ ///
+ public readonly static GreetingStructMarshaller Instance = new GreetingStructMarshaller();
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingStructUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingStructUnmarshaller.cs
new file mode 100644
index 000000000000..1447dae8dcc1
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingStructUnmarshaller.cs
@@ -0,0 +1,83 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for GreetingStruct Object
+ ///
+ public class GreetingStructUnmarshaller : IJsonUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ /// The unmarshalled object
+ public GreetingStruct Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
+ {
+ GreetingStruct unmarshalledObject = new GreetingStruct();
+ if (context.IsEmptyResponse)
+ return null;
+ context.Read(ref reader);
+ if (context.CurrentTokenType == JsonTokenType.Null)
+ return null;
+
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("hi", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ unmarshalledObject.Hi = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+ return unmarshalledObject;
+ }
+
+
+ private static GreetingStructUnmarshaller _instance = new GreetingStructUnmarshaller();
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static GreetingStructUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingWithErrorsRequestMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingWithErrorsRequestMarshaller.cs
new file mode 100644
index 000000000000..9b7ea66b494e
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingWithErrorsRequestMarshaller.cs
@@ -0,0 +1,87 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// GreetingWithErrors Request Marshaller
+ ///
+ public class GreetingWithErrorsRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((GreetingWithErrorsRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(GreetingWithErrorsRequest publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RpcV2Protocol");
+ request.Headers["smithy-protocol"] = "rpc-v2-cbor";
+ request.ResourcePath = "service/RpcV2Protocol/operation/GreetingWithErrors";
+ request.Headers["Accept"] = "application/cbor";
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-07-14";
+ request.HttpMethod = "POST";
+
+ return request;
+ }
+ private static GreetingWithErrorsRequestMarshaller _instance = new GreetingWithErrorsRequestMarshaller();
+
+ internal static GreetingWithErrorsRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static GreetingWithErrorsRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingWithErrorsResponseUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingWithErrorsResponseUnmarshaller.cs
new file mode 100644
index 000000000000..0964754cf148
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/GreetingWithErrorsResponseUnmarshaller.cs
@@ -0,0 +1,117 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for GreetingWithErrors operation
+ ///
+ public class GreetingWithErrorsResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ GreetingWithErrorsResponse response = new GreetingWithErrorsResponse();
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ context.Read(ref reader);
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("greeting", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ response.Greeting = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ if (errorResponse.Code != null && errorResponse.Code.Equals("ComplexError"))
+ {
+ return ComplexErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
+ }
+ if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidGreeting"))
+ {
+ return InvalidGreetingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
+ }
+ }
+ return new AmazonRpcV2ProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static GreetingWithErrorsResponseUnmarshaller _instance = new GreetingWithErrorsResponseUnmarshaller();
+
+ internal static GreetingWithErrorsResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static GreetingWithErrorsResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/InvalidGreetingExceptionUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/InvalidGreetingExceptionUnmarshaller.cs
new file mode 100644
index 000000000000..92ee3b6a64c2
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/InvalidGreetingExceptionUnmarshaller.cs
@@ -0,0 +1,94 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for InvalidGreetingException Object
+ ///
+ public class InvalidGreetingExceptionUnmarshaller : IJsonErrorResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ ///
+ public InvalidGreetingException Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
+ {
+ return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse(), ref reader);
+ }
+
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public InvalidGreetingException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse, ref StreamingUtf8JsonReader reader)
+ {
+ if (context.Stream.Length > 0)
+ {
+ context.Read(ref reader);
+ }
+
+ InvalidGreetingException unmarshalledObject = new InvalidGreetingException(errorResponse.Message, errorResponse.InnerException,
+ errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+
+ int targetDepth = context.CurrentDepth;
+ if (context.Stream.Length > 0)
+ {
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ }
+ }
+
+ return unmarshalledObject;
+ }
+
+ private static InvalidGreetingExceptionUnmarshaller _instance = new InvalidGreetingExceptionUnmarshaller();
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static InvalidGreetingExceptionUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/NoInputOutputRequestMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/NoInputOutputRequestMarshaller.cs
new file mode 100644
index 000000000000..9602247d6dce
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/NoInputOutputRequestMarshaller.cs
@@ -0,0 +1,87 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// NoInputOutput Request Marshaller
+ ///
+ public class NoInputOutputRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((NoInputOutputRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(NoInputOutputRequest publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RpcV2Protocol");
+ request.Headers["smithy-protocol"] = "rpc-v2-cbor";
+ request.ResourcePath = "service/RpcV2Protocol/operation/NoInputOutput";
+ request.Headers["Accept"] = "application/cbor";
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-07-14";
+ request.HttpMethod = "POST";
+
+ return request;
+ }
+ private static NoInputOutputRequestMarshaller _instance = new NoInputOutputRequestMarshaller();
+
+ internal static NoInputOutputRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static NoInputOutputRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/NoInputOutputResponseUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/NoInputOutputResponseUnmarshaller.cs
new file mode 100644
index 000000000000..24f84ce9aba8
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/NoInputOutputResponseUnmarshaller.cs
@@ -0,0 +1,97 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for NoInputOutput operation
+ ///
+ public class NoInputOutputResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ NoInputOutputResponse response = new NoInputOutputResponse();
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ }
+ return new AmazonRpcV2ProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static NoInputOutputResponseUnmarshaller _instance = new NoInputOutputResponseUnmarshaller();
+
+ internal static NoInputOutputResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static NoInputOutputResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/OptionalInputOutputRequestMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/OptionalInputOutputRequestMarshaller.cs
new file mode 100644
index 000000000000..2a84b36b5254
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/OptionalInputOutputRequestMarshaller.cs
@@ -0,0 +1,106 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// OptionalInputOutput Request Marshaller
+ ///
+ public class OptionalInputOutputRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((OptionalInputOutputRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(OptionalInputOutputRequest publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RpcV2Protocol");
+ request.Headers["smithy-protocol"] = "rpc-v2-cbor";
+ request.ResourcePath = "service/RpcV2Protocol/operation/OptionalInputOutput";
+ request.Headers["Content-Type"] = "application/cbor";
+ request.Headers["Accept"] = "application/cbor";
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-07-14";
+ request.HttpMethod = "POST";
+
+ var writer = CborWriterPool.Rent();
+ try
+ {
+ writer.WriteStartMap(null);
+ var context = new CborMarshallerContext(request, writer);
+ if (publicRequest.IsSetValue())
+ {
+ context.Writer.WriteTextString("value");
+ context.Writer.WriteTextString(publicRequest.Value);
+ }
+ writer.WriteEndMap();
+ request.Content = writer.Encode();
+ }
+ finally
+ {
+ CborWriterPool.Return(writer);
+ }
+
+ return request;
+ }
+ private static OptionalInputOutputRequestMarshaller _instance = new OptionalInputOutputRequestMarshaller();
+
+ internal static OptionalInputOutputRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static OptionalInputOutputRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/OptionalInputOutputResponseUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/OptionalInputOutputResponseUnmarshaller.cs
new file mode 100644
index 000000000000..69b46227788d
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/OptionalInputOutputResponseUnmarshaller.cs
@@ -0,0 +1,109 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for OptionalInputOutput operation
+ ///
+ public class OptionalInputOutputResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ OptionalInputOutputResponse response = new OptionalInputOutputResponse();
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ context.Read(ref reader);
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("value", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ response.Value = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ }
+ return new AmazonRpcV2ProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static OptionalInputOutputResponseUnmarshaller _instance = new OptionalInputOutputResponseUnmarshaller();
+
+ internal static OptionalInputOutputResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static OptionalInputOutputResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested1Marshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested1Marshaller.cs
new file mode 100644
index 000000000000..5ed077bda870
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested1Marshaller.cs
@@ -0,0 +1,76 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// RecursiveShapesInputOutputNested1 Marshaller
+ ///
+ public class RecursiveShapesInputOutputNested1Marshaller : IRequestMarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ ///
+ public void Marshall(RecursiveShapesInputOutputNested1 requestObject, CborMarshallerContext context)
+ {
+ if (requestObject == null)
+ return;
+
+ if (requestObject.IsSetFoo())
+ {
+ context.Writer.WriteTextString("foo");
+ context.Writer.WriteTextString(requestObject.Foo);
+ }
+ if (requestObject.IsSetNested())
+ {
+ context.Writer.WriteTextString("nested");
+ context.Writer.WriteStartMap(null);
+
+ var marshaller = RecursiveShapesInputOutputNested2Marshaller.Instance;
+ marshaller.Marshall(requestObject.Nested, context);
+
+ context.Writer.WriteEndMap();
+ }
+ }
+
+ ///
+ /// Singleton Marshaller.
+ ///
+ public readonly static RecursiveShapesInputOutputNested1Marshaller Instance = new RecursiveShapesInputOutputNested1Marshaller();
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested1Unmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested1Unmarshaller.cs
new file mode 100644
index 000000000000..ba04c5fa2474
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested1Unmarshaller.cs
@@ -0,0 +1,89 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for RecursiveShapesInputOutputNested1 Object
+ ///
+ public class RecursiveShapesInputOutputNested1Unmarshaller : IJsonUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ /// The unmarshalled object
+ public RecursiveShapesInputOutputNested1 Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
+ {
+ RecursiveShapesInputOutputNested1 unmarshalledObject = new RecursiveShapesInputOutputNested1();
+ if (context.IsEmptyResponse)
+ return null;
+ context.Read(ref reader);
+ if (context.CurrentTokenType == JsonTokenType.Null)
+ return null;
+
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("foo", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ unmarshalledObject.Foo = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("nested", targetDepth))
+ {
+ var unmarshaller = RecursiveShapesInputOutputNested2Unmarshaller.Instance;
+ unmarshalledObject.Nested = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+ return unmarshalledObject;
+ }
+
+
+ private static RecursiveShapesInputOutputNested1Unmarshaller _instance = new RecursiveShapesInputOutputNested1Unmarshaller();
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static RecursiveShapesInputOutputNested1Unmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested2Marshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested2Marshaller.cs
new file mode 100644
index 000000000000..e61abb11eb8c
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested2Marshaller.cs
@@ -0,0 +1,76 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// RecursiveShapesInputOutputNested2 Marshaller
+ ///
+ public class RecursiveShapesInputOutputNested2Marshaller : IRequestMarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ ///
+ public void Marshall(RecursiveShapesInputOutputNested2 requestObject, CborMarshallerContext context)
+ {
+ if (requestObject == null)
+ return;
+
+ if (requestObject.IsSetBar())
+ {
+ context.Writer.WriteTextString("bar");
+ context.Writer.WriteTextString(requestObject.Bar);
+ }
+ if (requestObject.IsSetRecursiveMember())
+ {
+ context.Writer.WriteTextString("recursiveMember");
+ context.Writer.WriteStartMap(null);
+
+ var marshaller = RecursiveShapesInputOutputNested1Marshaller.Instance;
+ marshaller.Marshall(requestObject.RecursiveMember, context);
+
+ context.Writer.WriteEndMap();
+ }
+ }
+
+ ///
+ /// Singleton Marshaller.
+ ///
+ public readonly static RecursiveShapesInputOutputNested2Marshaller Instance = new RecursiveShapesInputOutputNested2Marshaller();
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested2Unmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested2Unmarshaller.cs
new file mode 100644
index 000000000000..b91fc5920457
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesInputOutputNested2Unmarshaller.cs
@@ -0,0 +1,89 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for RecursiveShapesInputOutputNested2 Object
+ ///
+ public class RecursiveShapesInputOutputNested2Unmarshaller : IJsonUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ /// The unmarshalled object
+ public RecursiveShapesInputOutputNested2 Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
+ {
+ RecursiveShapesInputOutputNested2 unmarshalledObject = new RecursiveShapesInputOutputNested2();
+ if (context.IsEmptyResponse)
+ return null;
+ context.Read(ref reader);
+ if (context.CurrentTokenType == JsonTokenType.Null)
+ return null;
+
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("bar", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ unmarshalledObject.Bar = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("recursiveMember", targetDepth))
+ {
+ var unmarshaller = RecursiveShapesInputOutputNested1Unmarshaller.Instance;
+ unmarshalledObject.RecursiveMember = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+ return unmarshalledObject;
+ }
+
+
+ private static RecursiveShapesInputOutputNested2Unmarshaller _instance = new RecursiveShapesInputOutputNested2Unmarshaller();
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static RecursiveShapesInputOutputNested2Unmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesRequestMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesRequestMarshaller.cs
new file mode 100644
index 000000000000..5928d1b5e8d1
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesRequestMarshaller.cs
@@ -0,0 +1,111 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// RecursiveShapes Request Marshaller
+ ///
+ public class RecursiveShapesRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((RecursiveShapesRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(RecursiveShapesRequest publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RpcV2Protocol");
+ request.Headers["smithy-protocol"] = "rpc-v2-cbor";
+ request.ResourcePath = "service/RpcV2Protocol/operation/RecursiveShapes";
+ request.Headers["Content-Type"] = "application/cbor";
+ request.Headers["Accept"] = "application/cbor";
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-07-14";
+ request.HttpMethod = "POST";
+
+ var writer = CborWriterPool.Rent();
+ try
+ {
+ writer.WriteStartMap(null);
+ var context = new CborMarshallerContext(request, writer);
+ if (publicRequest.IsSetNested())
+ {
+ context.Writer.WriteTextString("nested");
+ context.Writer.WriteStartMap(null);
+
+ var marshaller = RecursiveShapesInputOutputNested1Marshaller.Instance;
+ marshaller.Marshall(publicRequest.Nested, context);
+
+ context.Writer.WriteEndMap();
+ }
+ writer.WriteEndMap();
+ request.Content = writer.Encode();
+ }
+ finally
+ {
+ CborWriterPool.Return(writer);
+ }
+
+ return request;
+ }
+ private static RecursiveShapesRequestMarshaller _instance = new RecursiveShapesRequestMarshaller();
+
+ internal static RecursiveShapesRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static RecursiveShapesRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesResponseUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesResponseUnmarshaller.cs
new file mode 100644
index 000000000000..79a6cbedd6e5
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RecursiveShapesResponseUnmarshaller.cs
@@ -0,0 +1,109 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for RecursiveShapes operation
+ ///
+ public class RecursiveShapesResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ RecursiveShapesResponse response = new RecursiveShapesResponse();
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ context.Read(ref reader);
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("nested", targetDepth))
+ {
+ var unmarshaller = RecursiveShapesInputOutputNested1Unmarshaller.Instance;
+ response.Nested = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ }
+ return new AmazonRpcV2ProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static RecursiveShapesResponseUnmarshaller _instance = new RecursiveShapesResponseUnmarshaller();
+
+ internal static RecursiveShapesResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static RecursiveShapesResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborDenseMapsRequestMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborDenseMapsRequestMarshaller.cs
new file mode 100644
index 000000000000..26002017ca16
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborDenseMapsRequestMarshaller.cs
@@ -0,0 +1,176 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// RpcV2CborDenseMaps Request Marshaller
+ ///
+ public class RpcV2CborDenseMapsRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((RpcV2CborDenseMapsRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(RpcV2CborDenseMapsRequest publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RpcV2Protocol");
+ request.Headers["smithy-protocol"] = "rpc-v2-cbor";
+ request.ResourcePath = "service/RpcV2Protocol/operation/RpcV2CborDenseMaps";
+ request.Headers["Content-Type"] = "application/cbor";
+ request.Headers["Accept"] = "application/cbor";
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-07-14";
+ request.HttpMethod = "POST";
+
+ var writer = CborWriterPool.Rent();
+ try
+ {
+ writer.WriteStartMap(null);
+ var context = new CborMarshallerContext(request, writer);
+ if (publicRequest.IsSetDenseBooleanMap())
+ {
+ context.Writer.WriteTextString("denseBooleanMap");
+ context.Writer.WriteStartMap(null);
+ foreach (var publicRequestDenseBooleanMapKvp in publicRequest.DenseBooleanMap)
+ {
+ context.Writer.WriteTextString(publicRequestDenseBooleanMapKvp.Key);
+ var publicRequestDenseBooleanMapValue = publicRequestDenseBooleanMapKvp.Value;
+
+ context.Writer.WriteBoolean(publicRequestDenseBooleanMapValue);
+ }
+ context.Writer.WriteEndMap();
+ }
+ if (publicRequest.IsSetDenseNumberMap())
+ {
+ context.Writer.WriteTextString("denseNumberMap");
+ context.Writer.WriteStartMap(null);
+ foreach (var publicRequestDenseNumberMapKvp in publicRequest.DenseNumberMap)
+ {
+ context.Writer.WriteTextString(publicRequestDenseNumberMapKvp.Key);
+ var publicRequestDenseNumberMapValue = publicRequestDenseNumberMapKvp.Value;
+
+ context.Writer.WriteInt32(publicRequestDenseNumberMapValue);
+ }
+ context.Writer.WriteEndMap();
+ }
+ if (publicRequest.IsSetDenseSetMap())
+ {
+ context.Writer.WriteTextString("denseSetMap");
+ context.Writer.WriteStartMap(null);
+ foreach (var publicRequestDenseSetMapKvp in publicRequest.DenseSetMap)
+ {
+ context.Writer.WriteTextString(publicRequestDenseSetMapKvp.Key);
+ var publicRequestDenseSetMapValue = publicRequestDenseSetMapKvp.Value;
+
+ context.Writer.WriteStartArray(publicRequestDenseSetMapValue.Count);
+ foreach(var publicRequestDenseSetMapValueListValue in publicRequestDenseSetMapValue)
+ {
+ context.Writer.WriteTextString(publicRequestDenseSetMapValueListValue);
+ }
+ context.Writer.WriteEndArray();
+ }
+ context.Writer.WriteEndMap();
+ }
+ if (publicRequest.IsSetDenseStringMap())
+ {
+ context.Writer.WriteTextString("denseStringMap");
+ context.Writer.WriteStartMap(null);
+ foreach (var publicRequestDenseStringMapKvp in publicRequest.DenseStringMap)
+ {
+ context.Writer.WriteTextString(publicRequestDenseStringMapKvp.Key);
+ var publicRequestDenseStringMapValue = publicRequestDenseStringMapKvp.Value;
+
+ context.Writer.WriteTextString(publicRequestDenseStringMapValue);
+ }
+ context.Writer.WriteEndMap();
+ }
+ if (publicRequest.IsSetDenseStructMap())
+ {
+ context.Writer.WriteTextString("denseStructMap");
+ context.Writer.WriteStartMap(null);
+ foreach (var publicRequestDenseStructMapKvp in publicRequest.DenseStructMap)
+ {
+ context.Writer.WriteTextString(publicRequestDenseStructMapKvp.Key);
+ var publicRequestDenseStructMapValue = publicRequestDenseStructMapKvp.Value;
+
+ context.Writer.WriteStartMap(null);
+
+ var marshaller = GreetingStructMarshaller.Instance;
+ marshaller.Marshall(publicRequestDenseStructMapValue, context);
+
+ context.Writer.WriteEndMap();
+ }
+ context.Writer.WriteEndMap();
+ }
+ writer.WriteEndMap();
+ request.Content = writer.Encode();
+ }
+ finally
+ {
+ CborWriterPool.Return(writer);
+ }
+
+ return request;
+ }
+ private static RpcV2CborDenseMapsRequestMarshaller _instance = new RpcV2CborDenseMapsRequestMarshaller();
+
+ internal static RpcV2CborDenseMapsRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static RpcV2CborDenseMapsRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborDenseMapsResponseUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborDenseMapsResponseUnmarshaller.cs
new file mode 100644
index 000000000000..965374ddd039
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborDenseMapsResponseUnmarshaller.cs
@@ -0,0 +1,137 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for RpcV2CborDenseMaps operation
+ ///
+ public class RpcV2CborDenseMapsResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ RpcV2CborDenseMapsResponse response = new RpcV2CborDenseMapsResponse();
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ context.Read(ref reader);
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("denseBooleanMap", targetDepth))
+ {
+ var unmarshaller = new JsonDictionaryUnmarshaller(StringUnmarshaller.Instance, BoolUnmarshaller.Instance);
+ response.DenseBooleanMap = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("denseNumberMap", targetDepth))
+ {
+ var unmarshaller = new JsonDictionaryUnmarshaller(StringUnmarshaller.Instance, IntUnmarshaller.Instance);
+ response.DenseNumberMap = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("denseSetMap", targetDepth))
+ {
+ var unmarshaller = new JsonDictionaryUnmarshaller, StringUnmarshaller, JsonListUnmarshaller>(StringUnmarshaller.Instance, new JsonListUnmarshaller(StringUnmarshaller.Instance));
+ response.DenseSetMap = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("denseStringMap", targetDepth))
+ {
+ var unmarshaller = new JsonDictionaryUnmarshaller(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
+ response.DenseStringMap = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("denseStructMap", targetDepth))
+ {
+ var unmarshaller = new JsonDictionaryUnmarshaller(StringUnmarshaller.Instance, GreetingStructUnmarshaller.Instance);
+ response.DenseStructMap = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
+ {
+ return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
+ }
+ }
+ return new AmazonRpcV2ProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static RpcV2CborDenseMapsResponseUnmarshaller _instance = new RpcV2CborDenseMapsResponseUnmarshaller();
+
+ internal static RpcV2CborDenseMapsResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static RpcV2CborDenseMapsResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborListsRequestMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborListsRequestMarshaller.cs
new file mode 100644
index 000000000000..5793f75f60dc
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborListsRequestMarshaller.cs
@@ -0,0 +1,211 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// RpcV2CborLists Request Marshaller
+ ///
+ public class RpcV2CborListsRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((RpcV2CborListsRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(RpcV2CborListsRequest publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RpcV2Protocol");
+ request.Headers["smithy-protocol"] = "rpc-v2-cbor";
+ request.ResourcePath = "service/RpcV2Protocol/operation/RpcV2CborLists";
+ request.Headers["Content-Type"] = "application/cbor";
+ request.Headers["Accept"] = "application/cbor";
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-07-14";
+ request.HttpMethod = "POST";
+
+ var writer = CborWriterPool.Rent();
+ try
+ {
+ writer.WriteStartMap(null);
+ var context = new CborMarshallerContext(request, writer);
+ if (publicRequest.IsSetBlobList())
+ {
+ context.Writer.WriteTextString("blobList");
+ context.Writer.WriteStartArray(publicRequest.BlobList.Count);
+ foreach(var publicRequestBlobListListValue in publicRequest.BlobList)
+ {
+ context.Writer.WriteByteString(publicRequestBlobListListValue.ToArray());
+ }
+ context.Writer.WriteEndArray();
+ }
+ if (publicRequest.IsSetBooleanList())
+ {
+ context.Writer.WriteTextString("booleanList");
+ context.Writer.WriteStartArray(publicRequest.BooleanList.Count);
+ foreach(var publicRequestBooleanListListValue in publicRequest.BooleanList)
+ {
+ context.Writer.WriteBoolean(publicRequestBooleanListListValue);
+ }
+ context.Writer.WriteEndArray();
+ }
+ if (publicRequest.IsSetEnumList())
+ {
+ context.Writer.WriteTextString("enumList");
+ context.Writer.WriteStartArray(publicRequest.EnumList.Count);
+ foreach(var publicRequestEnumListListValue in publicRequest.EnumList)
+ {
+ context.Writer.WriteTextString(publicRequestEnumListListValue);
+ }
+ context.Writer.WriteEndArray();
+ }
+ if (publicRequest.IsSetIntegerList())
+ {
+ context.Writer.WriteTextString("integerList");
+ context.Writer.WriteStartArray(publicRequest.IntegerList.Count);
+ foreach(var publicRequestIntegerListListValue in publicRequest.IntegerList)
+ {
+ context.Writer.WriteInt32(publicRequestIntegerListListValue);
+ }
+ context.Writer.WriteEndArray();
+ }
+ if (publicRequest.IsSetIntEnumList())
+ {
+ context.Writer.WriteTextString("intEnumList");
+ context.Writer.WriteStartArray(publicRequest.IntEnumList.Count);
+ foreach(var publicRequestIntEnumListListValue in publicRequest.IntEnumList)
+ {
+ context.Writer.WriteInt32(publicRequestIntEnumListListValue);
+ }
+ context.Writer.WriteEndArray();
+ }
+ if (publicRequest.IsSetNestedStringList())
+ {
+ context.Writer.WriteTextString("nestedStringList");
+ context.Writer.WriteStartArray(publicRequest.NestedStringList.Count);
+ foreach(var publicRequestNestedStringListListValue in publicRequest.NestedStringList)
+ {
+ context.Writer.WriteStartArray(publicRequestNestedStringListListValue.Count);
+ foreach(var publicRequestNestedStringListListValueListValue in publicRequestNestedStringListListValue)
+ {
+ context.Writer.WriteTextString(publicRequestNestedStringListListValueListValue);
+ }
+ context.Writer.WriteEndArray();
+ }
+ context.Writer.WriteEndArray();
+ }
+ if (publicRequest.IsSetStringList())
+ {
+ context.Writer.WriteTextString("stringList");
+ context.Writer.WriteStartArray(publicRequest.StringList.Count);
+ foreach(var publicRequestStringListListValue in publicRequest.StringList)
+ {
+ context.Writer.WriteTextString(publicRequestStringListListValue);
+ }
+ context.Writer.WriteEndArray();
+ }
+ if (publicRequest.IsSetStringSet())
+ {
+ context.Writer.WriteTextString("stringSet");
+ context.Writer.WriteStartArray(publicRequest.StringSet.Count);
+ foreach(var publicRequestStringSetListValue in publicRequest.StringSet)
+ {
+ context.Writer.WriteTextString(publicRequestStringSetListValue);
+ }
+ context.Writer.WriteEndArray();
+ }
+ if (publicRequest.IsSetStructureList())
+ {
+ context.Writer.WriteTextString("structureList");
+ context.Writer.WriteStartArray(publicRequest.StructureList.Count);
+ foreach(var publicRequestStructureListListValue in publicRequest.StructureList)
+ {
+ context.Writer.WriteStartMap(null);
+
+ var marshaller = StructureListMemberMarshaller.Instance;
+ marshaller.Marshall(publicRequestStructureListListValue, context);
+
+ context.Writer.WriteEndMap();
+ }
+ context.Writer.WriteEndArray();
+ }
+ if (publicRequest.IsSetTimestampList())
+ {
+ context.Writer.WriteTextString("timestampList");
+ context.Writer.WriteStartArray(publicRequest.TimestampList.Count);
+ foreach(var publicRequestTimestampListListValue in publicRequest.TimestampList)
+ {
+ context.Writer.WriteDateTime(publicRequestTimestampListListValue);
+ }
+ context.Writer.WriteEndArray();
+ }
+ writer.WriteEndMap();
+ request.Content = writer.Encode();
+ }
+ finally
+ {
+ CborWriterPool.Return(writer);
+ }
+
+ return request;
+ }
+ private static RpcV2CborListsRequestMarshaller _instance = new RpcV2CborListsRequestMarshaller();
+
+ internal static RpcV2CborListsRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static RpcV2CborListsRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborListsResponseUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborListsResponseUnmarshaller.cs
new file mode 100644
index 000000000000..a95364474e39
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/RpcV2CborListsResponseUnmarshaller.cs
@@ -0,0 +1,167 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for RpcV2CborLists operation
+ ///
+ public class RpcV2CborListsResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ RpcV2CborListsResponse response = new RpcV2CborListsResponse();
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ context.Read(ref reader);
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("blobList", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller(MemoryStreamUnmarshaller.Instance);
+ response.BlobList = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("booleanList", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller(BoolUnmarshaller.Instance);
+ response.BooleanList = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("enumList", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller(StringUnmarshaller.Instance);
+ response.EnumList = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("integerList", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller(IntUnmarshaller.Instance);
+ response.IntegerList = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("intEnumList", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller(IntUnmarshaller.Instance);
+ response.IntEnumList = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("nestedStringList", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller, JsonListUnmarshaller>(new JsonListUnmarshaller(StringUnmarshaller.Instance));
+ response.NestedStringList = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("stringList", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller(StringUnmarshaller.Instance);
+ response.StringList = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("stringSet", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller(StringUnmarshaller.Instance);
+ response.StringSet = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("structureList", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller(StructureListMemberUnmarshaller.Instance);
+ response.StructureList = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("timestampList", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller(DateTimeUnmarshaller.Instance);
+ response.TimestampList = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
+ {
+ return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
+ }
+ }
+ return new AmazonRpcV2ProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static RpcV2CborListsResponseUnmarshaller _instance = new RpcV2CborListsResponseUnmarshaller();
+
+ internal static RpcV2CborListsResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static RpcV2CborListsResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/SimpleScalarPropertiesRequestMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/SimpleScalarPropertiesRequestMarshaller.cs
new file mode 100644
index 000000000000..151df715794c
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/SimpleScalarPropertiesRequestMarshaller.cs
@@ -0,0 +1,151 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// SimpleScalarProperties Request Marshaller
+ ///
+ public class SimpleScalarPropertiesRequestMarshaller : IMarshaller , IMarshaller
+ {
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(AmazonWebServiceRequest input)
+ {
+ return this.Marshall((SimpleScalarPropertiesRequest)input);
+ }
+
+ ///
+ /// Marshaller the request object to the HTTP request.
+ ///
+ ///
+ ///
+ public IRequest Marshall(SimpleScalarPropertiesRequest publicRequest)
+ {
+ IRequest request = new DefaultRequest(publicRequest, "Amazon.RpcV2Protocol");
+ request.Headers["smithy-protocol"] = "rpc-v2-cbor";
+ request.ResourcePath = "service/RpcV2Protocol/operation/SimpleScalarProperties";
+ request.Headers["Content-Type"] = "application/cbor";
+ request.Headers["Accept"] = "application/cbor";
+ request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-07-14";
+ request.HttpMethod = "POST";
+
+ var writer = CborWriterPool.Rent();
+ try
+ {
+ writer.WriteStartMap(null);
+ var context = new CborMarshallerContext(request, writer);
+ if (publicRequest.IsSetBlobValue())
+ {
+ context.Writer.WriteTextString("blobValue");
+ context.Writer.WriteByteString(publicRequest.BlobValue.ToArray());
+ }
+ if (publicRequest.IsSetByteValue())
+ {
+ context.Writer.WriteTextString("byteValue");
+ context.Writer.WriteInt32(publicRequest.ByteValue.Value);
+ }
+ if (publicRequest.IsSetDoubleValue())
+ {
+ context.Writer.WriteTextString("doubleValue");
+ context.Writer.WriteOptimizedNumber(publicRequest.DoubleValue.Value);
+ }
+ if (publicRequest.IsSetFalseBooleanValue())
+ {
+ context.Writer.WriteTextString("falseBooleanValue");
+ context.Writer.WriteBoolean(publicRequest.FalseBooleanValue.Value);
+ }
+ if (publicRequest.IsSetFloatValue())
+ {
+ context.Writer.WriteTextString("floatValue");
+ context.Writer.WriteOptimizedNumber(publicRequest.FloatValue.Value);
+ }
+ if (publicRequest.IsSetIntegerValue())
+ {
+ context.Writer.WriteTextString("integerValue");
+ context.Writer.WriteInt32(publicRequest.IntegerValue.Value);
+ }
+ if (publicRequest.IsSetLongValue())
+ {
+ context.Writer.WriteTextString("longValue");
+ context.Writer.WriteInt64(publicRequest.LongValue.Value);
+ }
+ if (publicRequest.IsSetShortValue())
+ {
+ context.Writer.WriteTextString("shortValue");
+ context.Writer.WriteInt32(publicRequest.ShortValue.Value);
+ }
+ if (publicRequest.IsSetStringValue())
+ {
+ context.Writer.WriteTextString("stringValue");
+ context.Writer.WriteTextString(publicRequest.StringValue);
+ }
+ if (publicRequest.IsSetTrueBooleanValue())
+ {
+ context.Writer.WriteTextString("trueBooleanValue");
+ context.Writer.WriteBoolean(publicRequest.TrueBooleanValue.Value);
+ }
+ writer.WriteEndMap();
+ request.Content = writer.Encode();
+ }
+ finally
+ {
+ CborWriterPool.Return(writer);
+ }
+
+ return request;
+ }
+ private static SimpleScalarPropertiesRequestMarshaller _instance = new SimpleScalarPropertiesRequestMarshaller();
+
+ internal static SimpleScalarPropertiesRequestMarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static SimpleScalarPropertiesRequestMarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/SimpleScalarPropertiesResponseUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/SimpleScalarPropertiesResponseUnmarshaller.cs
new file mode 100644
index 000000000000..1900aba3cd3a
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/SimpleScalarPropertiesResponseUnmarshaller.cs
@@ -0,0 +1,163 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for SimpleScalarProperties operation
+ ///
+ public class SimpleScalarPropertiesResponseUnmarshaller : JsonResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
+ {
+ SimpleScalarPropertiesResponse response = new SimpleScalarPropertiesResponse();
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ context.Read(ref reader);
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("blobValue", targetDepth))
+ {
+ var unmarshaller = MemoryStreamUnmarshaller.Instance;
+ response.BlobValue = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("byteValue", targetDepth))
+ {
+ var unmarshaller = NullableIntUnmarshaller.Instance;
+ response.ByteValue = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("doubleValue", targetDepth))
+ {
+ var unmarshaller = NullableDoubleUnmarshaller.Instance;
+ response.DoubleValue = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("falseBooleanValue", targetDepth))
+ {
+ var unmarshaller = NullableBoolUnmarshaller.Instance;
+ response.FalseBooleanValue = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("floatValue", targetDepth))
+ {
+ var unmarshaller = NullableFloatUnmarshaller.Instance;
+ response.FloatValue = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("integerValue", targetDepth))
+ {
+ var unmarshaller = NullableIntUnmarshaller.Instance;
+ response.IntegerValue = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("longValue", targetDepth))
+ {
+ var unmarshaller = NullableLongUnmarshaller.Instance;
+ response.LongValue = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("shortValue", targetDepth))
+ {
+ var unmarshaller = NullableIntUnmarshaller.Instance;
+ response.ShortValue = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("stringValue", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ response.StringValue = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("trueBooleanValue", targetDepth))
+ {
+ var unmarshaller = NullableBoolUnmarshaller.Instance;
+ response.TrueBooleanValue = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+
+ return response;
+ }
+
+ ///
+ /// Unmarshaller error response to exception.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
+ {
+ StreamingUtf8JsonReader reader = new StreamingUtf8JsonReader(context.Stream);
+ var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context, ref reader);
+ errorResponse.InnerException = innerException;
+ errorResponse.StatusCode = statusCode;
+
+ var responseBodyBytes = context.GetResponseBodyBytes();
+
+ using (var streamCopy = new MemoryStream(responseBodyBytes))
+ using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, context.ResponseData))
+ {
+ StreamingUtf8JsonReader readerCopy = new StreamingUtf8JsonReader(streamCopy);
+ }
+ return new AmazonRpcV2ProtocolException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+ }
+
+ private static SimpleScalarPropertiesResponseUnmarshaller _instance = new SimpleScalarPropertiesResponseUnmarshaller();
+
+ internal static SimpleScalarPropertiesResponseUnmarshaller GetInstance()
+ {
+ return _instance;
+ }
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static SimpleScalarPropertiesResponseUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/StructureListMemberMarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/StructureListMemberMarshaller.cs
new file mode 100644
index 000000000000..5f471b45a57a
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/StructureListMemberMarshaller.cs
@@ -0,0 +1,71 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using AWSSDK.Extensions.CborProtocol;
+using AWSSDK.Extensions.CborProtocol.Internal;
+
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// StructureListMember Marshaller
+ ///
+ public class StructureListMemberMarshaller : IRequestMarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ ///
+ public void Marshall(StructureListMember requestObject, CborMarshallerContext context)
+ {
+ if (requestObject == null)
+ return;
+
+ if (requestObject.IsSetA())
+ {
+ context.Writer.WriteTextString("a");
+ context.Writer.WriteTextString(requestObject.A);
+ }
+ if (requestObject.IsSetB())
+ {
+ context.Writer.WriteTextString("b");
+ context.Writer.WriteTextString(requestObject.B);
+ }
+ }
+
+ ///
+ /// Singleton Marshaller.
+ ///
+ public readonly static StructureListMemberMarshaller Instance = new StructureListMemberMarshaller();
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/StructureListMemberUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/StructureListMemberUnmarshaller.cs
new file mode 100644
index 000000000000..36e95dca90ce
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/StructureListMemberUnmarshaller.cs
@@ -0,0 +1,89 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for StructureListMember Object
+ ///
+ public class StructureListMemberUnmarshaller : IJsonUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ /// The unmarshalled object
+ public StructureListMember Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
+ {
+ StructureListMember unmarshalledObject = new StructureListMember();
+ if (context.IsEmptyResponse)
+ return null;
+ context.Read(ref reader);
+ if (context.CurrentTokenType == JsonTokenType.Null)
+ return null;
+
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("a", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ unmarshalledObject.A = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("b", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ unmarshalledObject.B = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+ return unmarshalledObject;
+ }
+
+
+ private static StructureListMemberUnmarshaller _instance = new StructureListMemberUnmarshaller();
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static StructureListMemberUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ValidationExceptionFieldUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ValidationExceptionFieldUnmarshaller.cs
new file mode 100644
index 000000000000..ff2aa9d62dca
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ValidationExceptionFieldUnmarshaller.cs
@@ -0,0 +1,89 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for ValidationExceptionField Object
+ ///
+ public class ValidationExceptionFieldUnmarshaller : IJsonUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ /// The unmarshalled object
+ public ValidationExceptionField Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
+ {
+ ValidationExceptionField unmarshalledObject = new ValidationExceptionField();
+ if (context.IsEmptyResponse)
+ return null;
+ context.Read(ref reader);
+ if (context.CurrentTokenType == JsonTokenType.Null)
+ return null;
+
+ int targetDepth = context.CurrentDepth;
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("message", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ unmarshalledObject.Message = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ if (context.TestExpression("path", targetDepth))
+ {
+ var unmarshaller = StringUnmarshaller.Instance;
+ unmarshalledObject.Path = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+ return unmarshalledObject;
+ }
+
+
+ private static ValidationExceptionFieldUnmarshaller _instance = new ValidationExceptionFieldUnmarshaller();
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static ValidationExceptionFieldUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ValidationExceptionUnmarshaller.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ValidationExceptionUnmarshaller.cs
new file mode 100644
index 000000000000..a141dc387956
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/Internal/MarshallTransformations/ValidationExceptionUnmarshaller.cs
@@ -0,0 +1,100 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Xml.Serialization;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Internal.Util;
+using System.Text.Json;
+using Amazon.Util;
+#pragma warning disable CS0612,CS0618
+namespace Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations
+{
+ ///
+ /// Response Unmarshaller for ValidationException Object
+ ///
+ public class ValidationExceptionUnmarshaller : IJsonErrorResponseUnmarshaller
+ {
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ ///
+ public ValidationException Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
+ {
+ return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse(), ref reader);
+ }
+
+ ///
+ /// Unmarshaller the response from the service to the response class.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ValidationException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse, ref StreamingUtf8JsonReader reader)
+ {
+ if (context.Stream.Length > 0)
+ {
+ context.Read(ref reader);
+ }
+
+ ValidationException unmarshalledObject = new ValidationException(errorResponse.Message, errorResponse.InnerException,
+ errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
+
+ int targetDepth = context.CurrentDepth;
+ if (context.Stream.Length > 0)
+ {
+ while (context.ReadAtDepth(targetDepth, ref reader))
+ {
+ if (context.TestExpression("fieldList", targetDepth))
+ {
+ var unmarshaller = new JsonListUnmarshaller(ValidationExceptionFieldUnmarshaller.Instance);
+ unmarshalledObject.FieldList = unmarshaller.Unmarshall(context, ref reader);
+ continue;
+ }
+ }
+ }
+
+ return unmarshalledObject;
+ }
+
+ private static ValidationExceptionUnmarshaller _instance = new ValidationExceptionUnmarshaller();
+
+ ///
+ /// Gets the singleton.
+ ///
+ public static ValidationExceptionUnmarshaller Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/InvalidGreetingException.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/InvalidGreetingException.cs
new file mode 100644
index 000000000000..eea13051e16a
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/InvalidGreetingException.cs
@@ -0,0 +1,120 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This error is thrown when an invalid greeting value is provided.
+ ///
+ #if !NETSTANDARD
+ [Serializable]
+ #endif
+ public partial class InvalidGreetingException : AmazonRpcV2ProtocolException
+ {
+
+ ///
+ /// Constructs a new InvalidGreetingException with the specified error
+ /// message.
+ ///
+ ///
+ /// Describes the error encountered.
+ ///
+ public InvalidGreetingException(string message)
+ : base(message) {}
+
+ ///
+ /// Construct instance of InvalidGreetingException
+ ///
+ ///
+ ///
+ public InvalidGreetingException(string message, Exception innerException)
+ : base(message, innerException) {}
+
+ ///
+ /// Construct instance of InvalidGreetingException
+ ///
+ ///
+ public InvalidGreetingException(Exception innerException)
+ : base(innerException) {}
+
+ ///
+ /// Construct instance of InvalidGreetingException
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public InvalidGreetingException(string message, Exception innerException, Amazon.Runtime.ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
+ : base(message, innerException, errorType, errorCode, requestId, statusCode) {}
+
+ ///
+ /// Construct instance of InvalidGreetingException
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public InvalidGreetingException(string message, Amazon.Runtime.ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
+ : base(message, errorType, errorCode, requestId, statusCode) {}
+
+
+#if !NETSTANDARD
+ ///
+ /// Constructs a new instance of the InvalidGreetingException class with serialized data.
+ ///
+ /// The that holds the serialized object data about the exception being thrown.
+ /// The that contains contextual information about the source or destination.
+ /// The parameter is null.
+ /// The class name is null or is zero (0).
+ protected InvalidGreetingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+ : base(info, context)
+ {
+ }
+
+ ///
+ /// Sets the with information about the exception.
+ ///
+ /// The that holds the serialized object data about the exception being thrown.
+ /// The that contains contextual information about the source or destination.
+ /// The parameter is a null reference (Nothing in Visual Basic).
+ [System.Security.SecurityCritical]
+ // These FxCop rules are giving false-positives for this method
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
+ public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+ {
+ base.GetObjectData(info, context);
+ }
+#endif
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/NoInputOutputRequest.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/NoInputOutputRequest.cs
new file mode 100644
index 000000000000..94dd75e83f95
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/NoInputOutputRequest.cs
@@ -0,0 +1,40 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// Container for the parameters to the NoInputOutput operation.
+ ///
+ ///
+ public partial class NoInputOutputRequest : AmazonRpcV2ProtocolRequest
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/NoInputOutputResponse.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/NoInputOutputResponse.cs
new file mode 100644
index 000000000000..39745511210d
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/NoInputOutputResponse.cs
@@ -0,0 +1,39 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This is the response object from the NoInputOutput operation.
+ ///
+ public partial class NoInputOutputResponse : AmazonWebServiceResponse
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/OptionalInputOutputRequest.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/OptionalInputOutputRequest.cs
new file mode 100644
index 000000000000..22079c63e239
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/OptionalInputOutputRequest.cs
@@ -0,0 +1,56 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// Container for the parameters to the OptionalInputOutput operation.
+ ///
+ ///
+ public partial class OptionalInputOutputRequest : AmazonRpcV2ProtocolRequest
+ {
+ private string _value;
+
+ ///
+ /// Gets and sets the property Value.
+ ///
+ public string Value
+ {
+ get { return this._value; }
+ set { this._value = value; }
+ }
+
+ // Check to see if Value property is set
+ internal bool IsSetValue()
+ {
+ return this._value != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/OptionalInputOutputResponse.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/OptionalInputOutputResponse.cs
new file mode 100644
index 000000000000..9450d9126879
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/OptionalInputOutputResponse.cs
@@ -0,0 +1,55 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This is the response object from the OptionalInputOutput operation.
+ ///
+ public partial class OptionalInputOutputResponse : AmazonWebServiceResponse
+ {
+ private string _value;
+
+ ///
+ /// Gets and sets the property Value.
+ ///
+ public string Value
+ {
+ get { return this._value; }
+ set { this._value = value; }
+ }
+
+ // Check to see if Value property is set
+ internal bool IsSetValue()
+ {
+ return this._value != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesInputOutputNested1.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesInputOutputNested1.cs
new file mode 100644
index 000000000000..09cfa5a231c2
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesInputOutputNested1.cs
@@ -0,0 +1,71 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ ///
+ ///
+ public partial class RecursiveShapesInputOutputNested1
+ {
+ private string _foo;
+ private RecursiveShapesInputOutputNested2 _nested;
+
+ ///
+ /// Gets and sets the property Foo.
+ ///
+ public string Foo
+ {
+ get { return this._foo; }
+ set { this._foo = value; }
+ }
+
+ // Check to see if Foo property is set
+ internal bool IsSetFoo()
+ {
+ return this._foo != null;
+ }
+
+ ///
+ /// Gets and sets the property Nested.
+ ///
+ public RecursiveShapesInputOutputNested2 Nested
+ {
+ get { return this._nested; }
+ set { this._nested = value; }
+ }
+
+ // Check to see if Nested property is set
+ internal bool IsSetNested()
+ {
+ return this._nested != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesInputOutputNested2.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesInputOutputNested2.cs
new file mode 100644
index 000000000000..96fa524b6c2b
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesInputOutputNested2.cs
@@ -0,0 +1,71 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ ///
+ ///
+ public partial class RecursiveShapesInputOutputNested2
+ {
+ private string _bar;
+ private RecursiveShapesInputOutputNested1 _recursiveMember;
+
+ ///
+ /// Gets and sets the property Bar.
+ ///
+ public string Bar
+ {
+ get { return this._bar; }
+ set { this._bar = value; }
+ }
+
+ // Check to see if Bar property is set
+ internal bool IsSetBar()
+ {
+ return this._bar != null;
+ }
+
+ ///
+ /// Gets and sets the property RecursiveMember.
+ ///
+ public RecursiveShapesInputOutputNested1 RecursiveMember
+ {
+ get { return this._recursiveMember; }
+ set { this._recursiveMember = value; }
+ }
+
+ // Check to see if RecursiveMember property is set
+ internal bool IsSetRecursiveMember()
+ {
+ return this._recursiveMember != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesRequest.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesRequest.cs
new file mode 100644
index 000000000000..96918fa95cef
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesRequest.cs
@@ -0,0 +1,56 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// Container for the parameters to the RecursiveShapes operation.
+ ///
+ ///
+ public partial class RecursiveShapesRequest : AmazonRpcV2ProtocolRequest
+ {
+ private RecursiveShapesInputOutputNested1 _nested;
+
+ ///
+ /// Gets and sets the property Nested.
+ ///
+ public RecursiveShapesInputOutputNested1 Nested
+ {
+ get { return this._nested; }
+ set { this._nested = value; }
+ }
+
+ // Check to see if Nested property is set
+ internal bool IsSetNested()
+ {
+ return this._nested != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesResponse.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesResponse.cs
new file mode 100644
index 000000000000..e1274eba1798
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/RecursiveShapesResponse.cs
@@ -0,0 +1,55 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This is the response object from the RecursiveShapes operation.
+ ///
+ public partial class RecursiveShapesResponse : AmazonWebServiceResponse
+ {
+ private RecursiveShapesInputOutputNested1 _nested;
+
+ ///
+ /// Gets and sets the property Nested.
+ ///
+ public RecursiveShapesInputOutputNested1 Nested
+ {
+ get { return this._nested; }
+ set { this._nested = value; }
+ }
+
+ // Check to see if Nested property is set
+ internal bool IsSetNested()
+ {
+ return this._nested != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborDenseMapsRequest.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborDenseMapsRequest.cs
new file mode 100644
index 000000000000..1fe75a0e964f
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborDenseMapsRequest.cs
@@ -0,0 +1,145 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// Container for the parameters to the RpcV2CborDenseMaps operation.
+ /// The example tests basic map serialization.
+ ///
+ public partial class RpcV2CborDenseMapsRequest : AmazonRpcV2ProtocolRequest
+ {
+ private Dictionary _denseBooleanMap = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+ private Dictionary _denseNumberMap = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+ private Dictionary> _denseSetMap = AWSConfigs.InitializeCollections ? new Dictionary>() : null;
+ private Dictionary _denseStringMap = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+ private Dictionary _denseStructMap = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+
+ ///
+ /// Gets and sets the property DenseBooleanMap.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary DenseBooleanMap
+ {
+ get { return this._denseBooleanMap; }
+ set { this._denseBooleanMap = value; }
+ }
+
+ // Check to see if DenseBooleanMap property is set
+ internal bool IsSetDenseBooleanMap()
+ {
+ return this._denseBooleanMap != null && (this._denseBooleanMap.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property DenseNumberMap.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary DenseNumberMap
+ {
+ get { return this._denseNumberMap; }
+ set { this._denseNumberMap = value; }
+ }
+
+ // Check to see if DenseNumberMap property is set
+ internal bool IsSetDenseNumberMap()
+ {
+ return this._denseNumberMap != null && (this._denseNumberMap.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property DenseSetMap.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary> DenseSetMap
+ {
+ get { return this._denseSetMap; }
+ set { this._denseSetMap = value; }
+ }
+
+ // Check to see if DenseSetMap property is set
+ internal bool IsSetDenseSetMap()
+ {
+ return this._denseSetMap != null && (this._denseSetMap.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property DenseStringMap.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary DenseStringMap
+ {
+ get { return this._denseStringMap; }
+ set { this._denseStringMap = value; }
+ }
+
+ // Check to see if DenseStringMap property is set
+ internal bool IsSetDenseStringMap()
+ {
+ return this._denseStringMap != null && (this._denseStringMap.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property DenseStructMap.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary DenseStructMap
+ {
+ get { return this._denseStructMap; }
+ set { this._denseStructMap = value; }
+ }
+
+ // Check to see if DenseStructMap property is set
+ internal bool IsSetDenseStructMap()
+ {
+ return this._denseStructMap != null && (this._denseStructMap.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborDenseMapsResponse.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborDenseMapsResponse.cs
new file mode 100644
index 000000000000..0cadff0d6044
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborDenseMapsResponse.cs
@@ -0,0 +1,144 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This is the response object from the RpcV2CborDenseMaps operation.
+ ///
+ public partial class RpcV2CborDenseMapsResponse : AmazonWebServiceResponse
+ {
+ private Dictionary _denseBooleanMap = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+ private Dictionary _denseNumberMap = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+ private Dictionary> _denseSetMap = AWSConfigs.InitializeCollections ? new Dictionary>() : null;
+ private Dictionary _denseStringMap = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+ private Dictionary _denseStructMap = AWSConfigs.InitializeCollections ? new Dictionary() : null;
+
+ ///
+ /// Gets and sets the property DenseBooleanMap.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary DenseBooleanMap
+ {
+ get { return this._denseBooleanMap; }
+ set { this._denseBooleanMap = value; }
+ }
+
+ // Check to see if DenseBooleanMap property is set
+ internal bool IsSetDenseBooleanMap()
+ {
+ return this._denseBooleanMap != null && (this._denseBooleanMap.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property DenseNumberMap.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary DenseNumberMap
+ {
+ get { return this._denseNumberMap; }
+ set { this._denseNumberMap = value; }
+ }
+
+ // Check to see if DenseNumberMap property is set
+ internal bool IsSetDenseNumberMap()
+ {
+ return this._denseNumberMap != null && (this._denseNumberMap.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property DenseSetMap.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary> DenseSetMap
+ {
+ get { return this._denseSetMap; }
+ set { this._denseSetMap = value; }
+ }
+
+ // Check to see if DenseSetMap property is set
+ internal bool IsSetDenseSetMap()
+ {
+ return this._denseSetMap != null && (this._denseSetMap.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property DenseStringMap.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary DenseStringMap
+ {
+ get { return this._denseStringMap; }
+ set { this._denseStringMap = value; }
+ }
+
+ // Check to see if DenseStringMap property is set
+ internal bool IsSetDenseStringMap()
+ {
+ return this._denseStringMap != null && (this._denseStringMap.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property DenseStructMap.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public Dictionary DenseStructMap
+ {
+ get { return this._denseStructMap; }
+ set { this._denseStructMap = value; }
+ }
+
+ // Check to see if DenseStructMap property is set
+ internal bool IsSetDenseStructMap()
+ {
+ return this._denseStructMap != null && (this._denseStructMap.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborListsRequest.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborListsRequest.cs
new file mode 100644
index 000000000000..d8d82c90d560
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborListsRequest.cs
@@ -0,0 +1,253 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// Container for the parameters to the RpcV2CborLists operation.
+ /// This test case serializes JSON lists for the following cases for both input and output:
+ ///
+ /// Normal lists. Normal sets. Lists of lists. Lists
+ /// of structures.
+ ///
+ public partial class RpcV2CborListsRequest : AmazonRpcV2ProtocolRequest
+ {
+ private List _blobList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _booleanList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _enumList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _integerList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _intEnumList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List> _nestedStringList = AWSConfigs.InitializeCollections ? new List>() : null;
+ private List _stringList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _stringSet = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _structureList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _timestampList = AWSConfigs.InitializeCollections ? new List() : null;
+
+ ///
+ /// Gets and sets the property BlobList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List BlobList
+ {
+ get { return this._blobList; }
+ set { this._blobList = value; }
+ }
+
+ // Check to see if BlobList property is set
+ internal bool IsSetBlobList()
+ {
+ return this._blobList != null && (this._blobList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property BooleanList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List BooleanList
+ {
+ get { return this._booleanList; }
+ set { this._booleanList = value; }
+ }
+
+ // Check to see if BooleanList property is set
+ internal bool IsSetBooleanList()
+ {
+ return this._booleanList != null && (this._booleanList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property EnumList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List EnumList
+ {
+ get { return this._enumList; }
+ set { this._enumList = value; }
+ }
+
+ // Check to see if EnumList property is set
+ internal bool IsSetEnumList()
+ {
+ return this._enumList != null && (this._enumList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property IntegerList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List IntegerList
+ {
+ get { return this._integerList; }
+ set { this._integerList = value; }
+ }
+
+ // Check to see if IntegerList property is set
+ internal bool IsSetIntegerList()
+ {
+ return this._integerList != null && (this._integerList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property IntEnumList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List IntEnumList
+ {
+ get { return this._intEnumList; }
+ set { this._intEnumList = value; }
+ }
+
+ // Check to see if IntEnumList property is set
+ internal bool IsSetIntEnumList()
+ {
+ return this._intEnumList != null && (this._intEnumList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property NestedStringList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List> NestedStringList
+ {
+ get { return this._nestedStringList; }
+ set { this._nestedStringList = value; }
+ }
+
+ // Check to see if NestedStringList property is set
+ internal bool IsSetNestedStringList()
+ {
+ return this._nestedStringList != null && (this._nestedStringList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property StringList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List StringList
+ {
+ get { return this._stringList; }
+ set { this._stringList = value; }
+ }
+
+ // Check to see if StringList property is set
+ internal bool IsSetStringList()
+ {
+ return this._stringList != null && (this._stringList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property StringSet.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List StringSet
+ {
+ get { return this._stringSet; }
+ set { this._stringSet = value; }
+ }
+
+ // Check to see if StringSet property is set
+ internal bool IsSetStringSet()
+ {
+ return this._stringSet != null && (this._stringSet.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property StructureList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List StructureList
+ {
+ get { return this._structureList; }
+ set { this._structureList = value; }
+ }
+
+ // Check to see if StructureList property is set
+ internal bool IsSetStructureList()
+ {
+ return this._structureList != null && (this._structureList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property TimestampList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List TimestampList
+ {
+ get { return this._timestampList; }
+ set { this._timestampList = value; }
+ }
+
+ // Check to see if TimestampList property is set
+ internal bool IsSetTimestampList()
+ {
+ return this._timestampList != null && (this._timestampList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborListsResponse.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborListsResponse.cs
new file mode 100644
index 000000000000..74da1973447e
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/RpcV2CborListsResponse.cs
@@ -0,0 +1,249 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This is the response object from the RpcV2CborLists operation.
+ ///
+ public partial class RpcV2CborListsResponse : AmazonWebServiceResponse
+ {
+ private List _blobList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _booleanList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _enumList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _integerList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _intEnumList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List> _nestedStringList = AWSConfigs.InitializeCollections ? new List>() : null;
+ private List _stringList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _stringSet = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _structureList = AWSConfigs.InitializeCollections ? new List() : null;
+ private List _timestampList = AWSConfigs.InitializeCollections ? new List() : null;
+
+ ///
+ /// Gets and sets the property BlobList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List BlobList
+ {
+ get { return this._blobList; }
+ set { this._blobList = value; }
+ }
+
+ // Check to see if BlobList property is set
+ internal bool IsSetBlobList()
+ {
+ return this._blobList != null && (this._blobList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property BooleanList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List BooleanList
+ {
+ get { return this._booleanList; }
+ set { this._booleanList = value; }
+ }
+
+ // Check to see if BooleanList property is set
+ internal bool IsSetBooleanList()
+ {
+ return this._booleanList != null && (this._booleanList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property EnumList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List EnumList
+ {
+ get { return this._enumList; }
+ set { this._enumList = value; }
+ }
+
+ // Check to see if EnumList property is set
+ internal bool IsSetEnumList()
+ {
+ return this._enumList != null && (this._enumList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property IntegerList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List IntegerList
+ {
+ get { return this._integerList; }
+ set { this._integerList = value; }
+ }
+
+ // Check to see if IntegerList property is set
+ internal bool IsSetIntegerList()
+ {
+ return this._integerList != null && (this._integerList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property IntEnumList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List IntEnumList
+ {
+ get { return this._intEnumList; }
+ set { this._intEnumList = value; }
+ }
+
+ // Check to see if IntEnumList property is set
+ internal bool IsSetIntEnumList()
+ {
+ return this._intEnumList != null && (this._intEnumList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property NestedStringList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List> NestedStringList
+ {
+ get { return this._nestedStringList; }
+ set { this._nestedStringList = value; }
+ }
+
+ // Check to see if NestedStringList property is set
+ internal bool IsSetNestedStringList()
+ {
+ return this._nestedStringList != null && (this._nestedStringList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property StringList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List StringList
+ {
+ get { return this._stringList; }
+ set { this._stringList = value; }
+ }
+
+ // Check to see if StringList property is set
+ internal bool IsSetStringList()
+ {
+ return this._stringList != null && (this._stringList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property StringSet.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List StringSet
+ {
+ get { return this._stringSet; }
+ set { this._stringSet = value; }
+ }
+
+ // Check to see if StringSet property is set
+ internal bool IsSetStringSet()
+ {
+ return this._stringSet != null && (this._stringSet.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property StructureList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List StructureList
+ {
+ get { return this._structureList; }
+ set { this._structureList = value; }
+ }
+
+ // Check to see if StructureList property is set
+ internal bool IsSetStructureList()
+ {
+ return this._structureList != null && (this._structureList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ ///
+ /// Gets and sets the property TimestampList.
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List TimestampList
+ {
+ get { return this._timestampList; }
+ set { this._timestampList = value; }
+ }
+
+ // Check to see if TimestampList property is set
+ internal bool IsSetTimestampList()
+ {
+ return this._timestampList != null && (this._timestampList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/SimpleScalarPropertiesRequest.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/SimpleScalarPropertiesRequest.cs
new file mode 100644
index 000000000000..c5ce3f1c5d2a
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/SimpleScalarPropertiesRequest.cs
@@ -0,0 +1,200 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// Container for the parameters to the SimpleScalarProperties operation.
+ ///
+ ///
+ public partial class SimpleScalarPropertiesRequest : AmazonRpcV2ProtocolRequest
+ {
+ private MemoryStream _blobValue;
+ private int? _byteValue;
+ private double? _doubleValue;
+ private bool? _falseBooleanValue;
+ private float? _floatValue;
+ private int? _integerValue;
+ private long? _longValue;
+ private int? _shortValue;
+ private string _stringValue;
+ private bool? _trueBooleanValue;
+
+ ///
+ /// Gets and sets the property BlobValue.
+ ///
+ public MemoryStream BlobValue
+ {
+ get { return this._blobValue; }
+ set { this._blobValue = value; }
+ }
+
+ // Check to see if BlobValue property is set
+ internal bool IsSetBlobValue()
+ {
+ return this._blobValue != null;
+ }
+
+ ///
+ /// Gets and sets the property ByteValue.
+ ///
+ public int? ByteValue
+ {
+ get { return this._byteValue; }
+ set { this._byteValue = value; }
+ }
+
+ // Check to see if ByteValue property is set
+ internal bool IsSetByteValue()
+ {
+ return this._byteValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property DoubleValue.
+ ///
+ public double? DoubleValue
+ {
+ get { return this._doubleValue; }
+ set { this._doubleValue = value; }
+ }
+
+ // Check to see if DoubleValue property is set
+ internal bool IsSetDoubleValue()
+ {
+ return this._doubleValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property FalseBooleanValue.
+ ///
+ public bool? FalseBooleanValue
+ {
+ get { return this._falseBooleanValue; }
+ set { this._falseBooleanValue = value; }
+ }
+
+ // Check to see if FalseBooleanValue property is set
+ internal bool IsSetFalseBooleanValue()
+ {
+ return this._falseBooleanValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property FloatValue.
+ ///
+ public float? FloatValue
+ {
+ get { return this._floatValue; }
+ set { this._floatValue = value; }
+ }
+
+ // Check to see if FloatValue property is set
+ internal bool IsSetFloatValue()
+ {
+ return this._floatValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property IntegerValue.
+ ///
+ public int? IntegerValue
+ {
+ get { return this._integerValue; }
+ set { this._integerValue = value; }
+ }
+
+ // Check to see if IntegerValue property is set
+ internal bool IsSetIntegerValue()
+ {
+ return this._integerValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property LongValue.
+ ///
+ public long? LongValue
+ {
+ get { return this._longValue; }
+ set { this._longValue = value; }
+ }
+
+ // Check to see if LongValue property is set
+ internal bool IsSetLongValue()
+ {
+ return this._longValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property ShortValue.
+ ///
+ public int? ShortValue
+ {
+ get { return this._shortValue; }
+ set { this._shortValue = value; }
+ }
+
+ // Check to see if ShortValue property is set
+ internal bool IsSetShortValue()
+ {
+ return this._shortValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property StringValue.
+ ///
+ public string StringValue
+ {
+ get { return this._stringValue; }
+ set { this._stringValue = value; }
+ }
+
+ // Check to see if StringValue property is set
+ internal bool IsSetStringValue()
+ {
+ return this._stringValue != null;
+ }
+
+ ///
+ /// Gets and sets the property TrueBooleanValue.
+ ///
+ public bool? TrueBooleanValue
+ {
+ get { return this._trueBooleanValue; }
+ set { this._trueBooleanValue = value; }
+ }
+
+ // Check to see if TrueBooleanValue property is set
+ internal bool IsSetTrueBooleanValue()
+ {
+ return this._trueBooleanValue.HasValue;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/SimpleScalarPropertiesResponse.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/SimpleScalarPropertiesResponse.cs
new file mode 100644
index 000000000000..cf8318781ff5
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/SimpleScalarPropertiesResponse.cs
@@ -0,0 +1,199 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// This is the response object from the SimpleScalarProperties operation.
+ ///
+ public partial class SimpleScalarPropertiesResponse : AmazonWebServiceResponse
+ {
+ private MemoryStream _blobValue;
+ private int? _byteValue;
+ private double? _doubleValue;
+ private bool? _falseBooleanValue;
+ private float? _floatValue;
+ private int? _integerValue;
+ private long? _longValue;
+ private int? _shortValue;
+ private string _stringValue;
+ private bool? _trueBooleanValue;
+
+ ///
+ /// Gets and sets the property BlobValue.
+ ///
+ public MemoryStream BlobValue
+ {
+ get { return this._blobValue; }
+ set { this._blobValue = value; }
+ }
+
+ // Check to see if BlobValue property is set
+ internal bool IsSetBlobValue()
+ {
+ return this._blobValue != null;
+ }
+
+ ///
+ /// Gets and sets the property ByteValue.
+ ///
+ public int? ByteValue
+ {
+ get { return this._byteValue; }
+ set { this._byteValue = value; }
+ }
+
+ // Check to see if ByteValue property is set
+ internal bool IsSetByteValue()
+ {
+ return this._byteValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property DoubleValue.
+ ///
+ public double? DoubleValue
+ {
+ get { return this._doubleValue; }
+ set { this._doubleValue = value; }
+ }
+
+ // Check to see if DoubleValue property is set
+ internal bool IsSetDoubleValue()
+ {
+ return this._doubleValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property FalseBooleanValue.
+ ///
+ public bool? FalseBooleanValue
+ {
+ get { return this._falseBooleanValue; }
+ set { this._falseBooleanValue = value; }
+ }
+
+ // Check to see if FalseBooleanValue property is set
+ internal bool IsSetFalseBooleanValue()
+ {
+ return this._falseBooleanValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property FloatValue.
+ ///
+ public float? FloatValue
+ {
+ get { return this._floatValue; }
+ set { this._floatValue = value; }
+ }
+
+ // Check to see if FloatValue property is set
+ internal bool IsSetFloatValue()
+ {
+ return this._floatValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property IntegerValue.
+ ///
+ public int? IntegerValue
+ {
+ get { return this._integerValue; }
+ set { this._integerValue = value; }
+ }
+
+ // Check to see if IntegerValue property is set
+ internal bool IsSetIntegerValue()
+ {
+ return this._integerValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property LongValue.
+ ///
+ public long? LongValue
+ {
+ get { return this._longValue; }
+ set { this._longValue = value; }
+ }
+
+ // Check to see if LongValue property is set
+ internal bool IsSetLongValue()
+ {
+ return this._longValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property ShortValue.
+ ///
+ public int? ShortValue
+ {
+ get { return this._shortValue; }
+ set { this._shortValue = value; }
+ }
+
+ // Check to see if ShortValue property is set
+ internal bool IsSetShortValue()
+ {
+ return this._shortValue.HasValue;
+ }
+
+ ///
+ /// Gets and sets the property StringValue.
+ ///
+ public string StringValue
+ {
+ get { return this._stringValue; }
+ set { this._stringValue = value; }
+ }
+
+ // Check to see if StringValue property is set
+ internal bool IsSetStringValue()
+ {
+ return this._stringValue != null;
+ }
+
+ ///
+ /// Gets and sets the property TrueBooleanValue.
+ ///
+ public bool? TrueBooleanValue
+ {
+ get { return this._trueBooleanValue; }
+ set { this._trueBooleanValue = value; }
+ }
+
+ // Check to see if TrueBooleanValue property is set
+ internal bool IsSetTrueBooleanValue()
+ {
+ return this._trueBooleanValue.HasValue;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/StructureListMember.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/StructureListMember.cs
new file mode 100644
index 000000000000..79fda28636f0
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/StructureListMember.cs
@@ -0,0 +1,71 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ ///
+ ///
+ public partial class StructureListMember
+ {
+ private string _a;
+ private string _b;
+
+ ///
+ /// Gets and sets the property A.
+ ///
+ public string A
+ {
+ get { return this._a; }
+ set { this._a = value; }
+ }
+
+ // Check to see if A property is set
+ internal bool IsSetA()
+ {
+ return this._a != null;
+ }
+
+ ///
+ /// Gets and sets the property B.
+ ///
+ public string B
+ {
+ get { return this._b; }
+ set { this._b = value; }
+ }
+
+ // Check to see if B property is set
+ internal bool IsSetB()
+ {
+ return this._b != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/ValidationException.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/ValidationException.cs
new file mode 100644
index 000000000000..21cfba209a17
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/ValidationException.cs
@@ -0,0 +1,148 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// A standard error for input validation failures. This should be thrown by services
+ /// when a member of the input structure falls outside of the modeled or documented constraints.
+ ///
+ #if !NETSTANDARD
+ [Serializable]
+ #endif
+ public partial class ValidationException : AmazonRpcV2ProtocolException
+ {
+ private List _fieldList = AWSConfigs.InitializeCollections ? new List() : null;
+
+ ///
+ /// Constructs a new ValidationException with the specified error
+ /// message.
+ ///
+ ///
+ /// Describes the error encountered.
+ ///
+ public ValidationException(string message)
+ : base(message) {}
+
+ ///
+ /// Construct instance of ValidationException
+ ///
+ ///
+ ///
+ public ValidationException(string message, Exception innerException)
+ : base(message, innerException) {}
+
+ ///
+ /// Construct instance of ValidationException
+ ///
+ ///
+ public ValidationException(Exception innerException)
+ : base(innerException) {}
+
+ ///
+ /// Construct instance of ValidationException
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ValidationException(string message, Exception innerException, Amazon.Runtime.ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
+ : base(message, innerException, errorType, errorCode, requestId, statusCode) {}
+
+ ///
+ /// Construct instance of ValidationException
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ValidationException(string message, Amazon.Runtime.ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
+ : base(message, errorType, errorCode, requestId, statusCode) {}
+
+
+#if !NETSTANDARD
+ ///
+ /// Constructs a new instance of the ValidationException class with serialized data.
+ ///
+ /// The that holds the serialized object data about the exception being thrown.
+ /// The that contains contextual information about the source or destination.
+ /// The parameter is null.
+ /// The class name is null or is zero (0).
+ protected ValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+ : base(info, context)
+ {
+ this.FieldList = (List)info.GetValue("FieldList", typeof(List));
+ }
+
+ ///
+ /// Sets the with information about the exception.
+ ///
+ /// The that holds the serialized object data about the exception being thrown.
+ /// The that contains contextual information about the source or destination.
+ /// The parameter is a null reference (Nothing in Visual Basic).
+ [System.Security.SecurityCritical]
+ // These FxCop rules are giving false-positives for this method
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
+ public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
+ {
+ base.GetObjectData(info, context);
+ info.AddValue("FieldList", this.FieldList);
+ }
+#endif
+
+ ///
+ /// Gets and sets the property FieldList.
+ ///
+ /// A list of specific failures encountered while validating the input. A member can appear
+ /// in this list more than once if it failed to satisfy multiple constraints.
+ ///
+ ///
+ /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
+ /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
+ /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
+ /// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
+ ///
+ public List FieldList
+ {
+ get { return this._fieldList; }
+ set { this._fieldList = value; }
+ }
+
+ // Check to see if FieldList property is set
+ internal bool IsSetFieldList()
+ {
+ return this._fieldList != null && (this._fieldList.Count > 0 || !AWSConfigs.InitializeCollections);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/Model/ValidationExceptionField.cs b/sdk/test/Services/RpcV2Protocol/Generated/Model/ValidationExceptionField.cs
new file mode 100644
index 000000000000..dc67b6df55aa
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/Model/ValidationExceptionField.cs
@@ -0,0 +1,80 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+using System;
+using System.Collections.Generic;
+using System.Xml.Serialization;
+using System.Text;
+using System.IO;
+using System.Net;
+
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+
+#pragma warning disable CS0612,CS0618,CS1570
+namespace Amazon.RpcV2Protocol.Model
+{
+ ///
+ /// Describes one specific validation failure for an input member.
+ ///
+ public partial class ValidationExceptionField
+ {
+ private string _message;
+ private string _path;
+
+ ///
+ /// Gets and sets the property Message.
+ ///
+ /// A detailed description of the validation failure.
+ ///
+ ///
+ [AWSProperty(Required=true)]
+ public string Message
+ {
+ get { return this._message; }
+ set { this._message = value; }
+ }
+
+ // Check to see if Message property is set
+ internal bool IsSetMessage()
+ {
+ return this._message != null;
+ }
+
+ ///
+ /// Gets and sets the property Path.
+ ///
+ /// A JSONPointer expression to the structure member whose value failed to satisfy the
+ /// modeled constraints.
+ ///
+ ///
+ [AWSProperty(Required=true)]
+ public string Path
+ {
+ get { return this._path; }
+ set { this._path = value; }
+ }
+
+ // Check to see if Path property is set
+ internal bool IsSetPath()
+ {
+ return this._path != null;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/ServiceEnumerations.cs b/sdk/test/Services/RpcV2Protocol/Generated/ServiceEnumerations.cs
new file mode 100644
index 000000000000..2ded78c06778
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/ServiceEnumerations.cs
@@ -0,0 +1,88 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+
+using System;
+
+using Amazon.Runtime;
+
+namespace Amazon.RpcV2Protocol
+{
+
+ ///
+ /// Constants used for properties of type FooEnum.
+ ///
+ public class FooEnum : ConstantClass
+ {
+
+ ///
+ /// Constant Bar for FooEnum
+ ///
+ public static readonly FooEnum Bar = new FooEnum("Bar");
+ ///
+ /// Constant Baz for FooEnum
+ ///
+ public static readonly FooEnum Baz = new FooEnum("Baz");
+ ///
+ /// Constant Foo for FooEnum
+ ///
+ public static readonly FooEnum Foo = new FooEnum("Foo");
+ ///
+ /// Constant Num_0 for FooEnum
+ ///
+ public static readonly FooEnum Num_0 = new FooEnum("0");
+ ///
+ /// Constant Num_1 for FooEnum
+ ///
+ public static readonly FooEnum Num_1 = new FooEnum("1");
+
+ ///
+ /// This constant constructor does not need to be called if the constant
+ /// you are attempting to use is already defined as a static instance of
+ /// this class.
+ /// This constructor should be used to construct constants that are not
+ /// defined as statics, for instance if attempting to use a feature that is
+ /// newer than the current version of the SDK.
+ ///
+ public FooEnum(string value)
+ : base(value)
+ {
+ }
+
+ ///
+ /// Finds the constant for the unique value.
+ ///
+ /// The unique value for the constant
+ /// The constant for the unique value
+ public static FooEnum FindValue(string value)
+ {
+ return FindValue(value);
+ }
+
+ ///
+ /// Utility method to convert strings to the constant class.
+ ///
+ /// The string value to convert to the constant class.
+ ///
+ public static implicit operator FooEnum(string value)
+ {
+ return FindValue(value);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/sdk/test/Services/RpcV2Protocol/Generated/_bcl/AmazonRpcV2ProtocolClient.cs b/sdk/test/Services/RpcV2Protocol/Generated/_bcl/AmazonRpcV2ProtocolClient.cs
new file mode 100644
index 000000000000..a4a429ea224a
--- /dev/null
+++ b/sdk/test/Services/RpcV2Protocol/Generated/_bcl/AmazonRpcV2ProtocolClient.cs
@@ -0,0 +1,703 @@
+/*
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://aws.amazon.com/apache2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/*
+ * Do not modify this file. This file is generated from the rpcv2protocol-2020-07-14.normal.json service model.
+ */
+
+
+using System;
+using System.Runtime.ExceptionServices;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using System.Net;
+
+using Amazon.RpcV2Protocol.Model;
+using Amazon.RpcV2Protocol.Model.Internal.MarshallTransformations;
+using Amazon.RpcV2Protocol.Internal;
+using Amazon.Runtime;
+using Amazon.Runtime.Internal;
+using Amazon.Runtime.Internal.Auth;
+using Amazon.Runtime.Internal.Transform;
+using Amazon.Runtime.Endpoints;
+
+#pragma warning disable CS1570
+namespace Amazon.RpcV2Protocol
+{
+ ///
+ /// Implementation for accessing RpcV2Protocol
+ ///
+ ///
+ ///
+ public partial class AmazonRpcV2ProtocolClient : AmazonServiceClient, IAmazonRpcV2Protocol
+ {
+ private static IServiceMetadata serviceMetadata = new AmazonRpcV2ProtocolMetadata();
+ #region Constructors
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with the credentials loaded from the application's
+ /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
+ ///
+ /// Example App.config with credentials set.
+ ///
+ /// <?xml version="1.0" encoding="utf-8" ?>
+ /// <configuration>
+ /// <appSettings>
+ /// <add key="AWSProfileName" value="AWS Default"/>
+ /// </appSettings>
+ /// </configuration>
+ ///
+ ///
+ ///
+ public AmazonRpcV2ProtocolClient()
+ : base(new AmazonRpcV2ProtocolConfig()) { }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with the credentials loaded from the application's
+ /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
+ ///
+ /// Example App.config with credentials set.
+ ///
+ /// <?xml version="1.0" encoding="utf-8" ?>
+ /// <configuration>
+ /// <appSettings>
+ /// <add key="AWSProfileName" value="AWS Default"/>
+ /// </appSettings>
+ /// </configuration>
+ ///
+ ///
+ ///
+ /// The region to connect.
+ public AmazonRpcV2ProtocolClient(RegionEndpoint region)
+ : base(new AmazonRpcV2ProtocolConfig{RegionEndpoint = region}) { }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with the credentials loaded from the application's
+ /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
+ ///
+ /// Example App.config with credentials set.
+ ///
+ /// <?xml version="1.0" encoding="utf-8" ?>
+ /// <configuration>
+ /// <appSettings>
+ /// <add key="AWSProfileName" value="AWS Default"/>
+ /// </appSettings>
+ /// </configuration>
+ ///
+ ///
+ ///
+ /// The AmazonRpcV2ProtocolClient Configuration Object
+ public AmazonRpcV2ProtocolClient(AmazonRpcV2ProtocolConfig config)
+ : base(config) { }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with AWS Credentials
+ ///
+ /// AWS Credentials
+ public AmazonRpcV2ProtocolClient(AWSCredentials credentials)
+ : this(credentials, new AmazonRpcV2ProtocolConfig())
+ {
+ }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with AWS Credentials
+ ///
+ /// AWS Credentials
+ /// The region to connect.
+ public AmazonRpcV2ProtocolClient(AWSCredentials credentials, RegionEndpoint region)
+ : this(credentials, new AmazonRpcV2ProtocolConfig{RegionEndpoint = region})
+ {
+ }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with AWS Credentials and an
+ /// AmazonRpcV2ProtocolClient Configuration object.
+ ///
+ /// AWS Credentials
+ /// The AmazonRpcV2ProtocolClient Configuration Object
+ public AmazonRpcV2ProtocolClient(AWSCredentials credentials, AmazonRpcV2ProtocolConfig clientConfig)
+ : base(credentials, clientConfig)
+ {
+ }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with AWS Access Key ID and AWS Secret Key
+ ///
+ /// AWS Access Key ID
+ /// AWS Secret Access Key
+ public AmazonRpcV2ProtocolClient(string awsAccessKeyId, string awsSecretAccessKey)
+ : this(awsAccessKeyId, awsSecretAccessKey, new AmazonRpcV2ProtocolConfig())
+ {
+ }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with AWS Access Key ID and AWS Secret Key
+ ///
+ /// AWS Access Key ID
+ /// AWS Secret Access Key
+ /// The region to connect.
+ public AmazonRpcV2ProtocolClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
+ : this(awsAccessKeyId, awsSecretAccessKey, new AmazonRpcV2ProtocolConfig() {RegionEndpoint=region})
+ {
+ }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with AWS Access Key ID, AWS Secret Key and an
+ /// AmazonRpcV2ProtocolClient Configuration object.
+ ///
+ /// AWS Access Key ID
+ /// AWS Secret Access Key
+ /// The AmazonRpcV2ProtocolClient Configuration Object
+ public AmazonRpcV2ProtocolClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonRpcV2ProtocolConfig clientConfig)
+ : base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
+ {
+ }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with AWS Access Key ID and AWS Secret Key
+ ///
+ /// AWS Access Key ID
+ /// AWS Secret Access Key
+ /// AWS Session Token
+ public AmazonRpcV2ProtocolClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
+ : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonRpcV2ProtocolConfig())
+ {
+ }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with AWS Access Key ID and AWS Secret Key
+ ///
+ /// AWS Access Key ID
+ /// AWS Secret Access Key
+ /// AWS Session Token
+ /// The region to connect.
+ public AmazonRpcV2ProtocolClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
+ : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonRpcV2ProtocolConfig{RegionEndpoint = region})
+ {
+ }
+
+ ///
+ /// Constructs AmazonRpcV2ProtocolClient with AWS Access Key ID, AWS Secret Key and an
+ /// AmazonRpcV2ProtocolClient Configuration object.
+ ///
+ /// AWS Access Key ID
+ /// AWS Secret Access Key
+ /// AWS Session Token
+ /// The AmazonRpcV2ProtocolClient Configuration Object
+ public AmazonRpcV2ProtocolClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonRpcV2ProtocolConfig clientConfig)
+ : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
+ {
+ }
+
+ #endregion
+
+ #region Overrides
+
+ ///
+ /// Customize the pipeline
+ ///
+ ///
+ protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
+ {
+ pipeline.AddHandlerAfter(new AmazonRpcV2ProtocolAuthSchemeHandler());
+ }
+
+ ///
+ /// Capture metadata for the service.
+ ///
+ protected override IServiceMetadata ServiceMetadata
+ {
+ get
+ {
+ return serviceMetadata;
+ }
+ }
+
+ #endregion
+
+ #region Dispose
+
+ ///
+ /// Disposes the service client.
+ ///
+ protected override void Dispose(bool disposing)
+ {
+ base.Dispose(disposing);
+ }
+
+ #endregion
+
+
+ #region EmptyInputOutput
+
+
+ ///
+ ///
+ ///
+ /// Container for the necessary parameters to execute the EmptyInputOutput service method.
+ ///
+ /// The response from the EmptyInputOutput service method, as returned by RpcV2Protocol.
+ /// REST API Reference for EmptyInputOutput Operation
+ public virtual EmptyInputOutputResponse EmptyInputOutput(EmptyInputOutputRequest request)
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = EmptyInputOutputRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = EmptyInputOutputResponseUnmarshaller.Instance;
+
+ return Invoke(request, options);
+ }
+
+
+ ///
+ ///
+ ///
+ /// Container for the necessary parameters to execute the EmptyInputOutput service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the EmptyInputOutput service method, as returned by RpcV2Protocol.
+ /// REST API Reference for EmptyInputOutput Operation
+ public virtual Task EmptyInputOutputAsync(EmptyInputOutputRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = EmptyInputOutputRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = EmptyInputOutputResponseUnmarshaller.Instance;
+
+ return InvokeAsync(request, options, cancellationToken);
+ }
+
+ #endregion
+
+ #region Float16
+
+
+ ///
+ ///
+ ///
+ /// Container for the necessary parameters to execute the Float16 service method.
+ ///
+ /// The response from the Float16 service method, as returned by RpcV2Protocol.
+ /// REST API Reference for Float16 Operation
+ public virtual Float16Response Float16(Float16Request request)
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = Float16RequestMarshaller.Instance;
+ options.ResponseUnmarshaller = Float16ResponseUnmarshaller.Instance;
+
+ return Invoke(request, options);
+ }
+
+
+ ///
+ ///
+ ///
+ /// Container for the necessary parameters to execute the Float16 service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the Float16 service method, as returned by RpcV2Protocol.
+ /// REST API Reference for Float16 Operation
+ public virtual Task Float16Async(Float16Request request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = Float16RequestMarshaller.Instance;
+ options.ResponseUnmarshaller = Float16ResponseUnmarshaller.Instance;
+
+ return InvokeAsync(request, options, cancellationToken);
+ }
+
+ #endregion
+
+ #region FractionalSeconds
+
+
+ ///
+ ///
+ ///
+ /// Container for the necessary parameters to execute the FractionalSeconds service method.
+ ///
+ /// The response from the FractionalSeconds service method, as returned by RpcV2Protocol.
+ /// REST API Reference for FractionalSeconds Operation
+ public virtual FractionalSecondsResponse FractionalSeconds(FractionalSecondsRequest request)
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = FractionalSecondsRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = FractionalSecondsResponseUnmarshaller.Instance;
+
+ return Invoke(request, options);
+ }
+
+
+ ///
+ ///
+ ///
+ /// Container for the necessary parameters to execute the FractionalSeconds service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the FractionalSeconds service method, as returned by RpcV2Protocol.
+ /// REST API Reference for FractionalSeconds Operation
+ public virtual Task FractionalSecondsAsync(FractionalSecondsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = FractionalSecondsRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = FractionalSecondsResponseUnmarshaller.Instance;
+
+ return InvokeAsync(request, options, cancellationToken);
+ }
+
+ #endregion
+
+ #region GreetingWithErrors
+
+
+ ///
+ /// This operation has three possible return values:
+ ///
+ /// A successful response in the form of GreetingWithErrorsOutput An
+ /// InvalidGreeting error. A ComplexError error.
+ ///
+ /// Implementations must be able to successfully take a response and properly deserialize
+ /// successful and error responses.
+ ///
+ ///
+ /// Container for the necessary parameters to execute the GreetingWithErrors service method.
+ ///
+ /// The response from the GreetingWithErrors service method, as returned by RpcV2Protocol.
+ ///
+ /// This error is thrown when a request is invalid.
+ ///
+ ///
+ /// This error is thrown when an invalid greeting value is provided.
+ ///
+ /// REST API Reference for GreetingWithErrors Operation
+ public virtual GreetingWithErrorsResponse GreetingWithErrors(GreetingWithErrorsRequest request)
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = GreetingWithErrorsRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = GreetingWithErrorsResponseUnmarshaller.Instance;
+
+ return Invoke(request, options);
+ }
+
+
+ ///
+ /// This operation has three possible return values:
+ ///
+ /// A successful response in the form of GreetingWithErrorsOutput An
+ /// InvalidGreeting error. A ComplexError error.
+ ///
+ /// Implementations must be able to successfully take a response and properly deserialize
+ /// successful and error responses.
+ ///
+ ///
+ /// Container for the necessary parameters to execute the GreetingWithErrors service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the GreetingWithErrors service method, as returned by RpcV2Protocol.
+ ///
+ /// This error is thrown when a request is invalid.
+ ///
+ ///
+ /// This error is thrown when an invalid greeting value is provided.
+ ///
+ /// REST API Reference for GreetingWithErrors Operation
+ public virtual Task GreetingWithErrorsAsync(GreetingWithErrorsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = GreetingWithErrorsRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = GreetingWithErrorsResponseUnmarshaller.Instance;
+
+ return InvokeAsync(request, options, cancellationToken);
+ }
+
+ #endregion
+
+ #region NoInputOutput
+
+
+ ///
+ ///
+ ///
+ /// Container for the necessary parameters to execute the NoInputOutput service method.
+ ///
+ /// The response from the NoInputOutput service method, as returned by RpcV2Protocol.
+ /// REST API Reference for NoInputOutput Operation
+ public virtual NoInputOutputResponse NoInputOutput(NoInputOutputRequest request)
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = NoInputOutputRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = NoInputOutputResponseUnmarshaller.Instance;
+
+ return Invoke(request, options);
+ }
+
+
+ ///
+ ///
+ ///
+ /// Container for the necessary parameters to execute the NoInputOutput service method.
+ ///
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ ///
+ /// The response from the NoInputOutput service method, as returned by RpcV2Protocol.
+ /// REST API Reference for NoInputOutput Operation
+ public virtual Task NoInputOutputAsync(NoInputOutputRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var options = new InvokeOptions();
+ options.RequestMarshaller = NoInputOutputRequestMarshaller.Instance;
+ options.ResponseUnmarshaller = NoInputOutputResponseUnmarshaller.Instance;
+
+ return InvokeAsync