repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AwsCloudMapInstanceAttribute Object /// </summary> public class AwsCloudMapInstanceAttributeUnmarshaller : IUnmarshaller<AwsCloudMapInstanceAttribute, XmlUnmarshallerContext>, IUnmarshaller<AwsCloudMapInstanceAttribute, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AwsCloudMapInstanceAttribute IUnmarshaller<AwsCloudMapInstanceAttribute, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AwsCloudMapInstanceAttribute Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AwsCloudMapInstanceAttribute unmarshalledObject = new AwsCloudMapInstanceAttribute(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("key", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Key = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("value", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Value = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AwsCloudMapInstanceAttributeUnmarshaller _instance = new AwsCloudMapInstanceAttributeUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AwsCloudMapInstanceAttributeUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// AwsCloudMapServiceDiscovery Marshaller /// </summary> public class AwsCloudMapServiceDiscoveryMarshaller : IRequestMarshaller<AwsCloudMapServiceDiscovery, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(AwsCloudMapServiceDiscovery requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAttributes()) { context.Writer.WritePropertyName("attributes"); context.Writer.WriteArrayStart(); foreach(var requestObjectAttributesListValue in requestObject.Attributes) { context.Writer.WriteObjectStart(); var marshaller = AwsCloudMapInstanceAttributeMarshaller.Instance; marshaller.Marshall(requestObjectAttributesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetIpPreference()) { context.Writer.WritePropertyName("ipPreference"); context.Writer.Write(requestObject.IpPreference); } if(requestObject.IsSetNamespaceName()) { context.Writer.WritePropertyName("namespaceName"); context.Writer.Write(requestObject.NamespaceName); } if(requestObject.IsSetServiceName()) { context.Writer.WritePropertyName("serviceName"); context.Writer.Write(requestObject.ServiceName); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static AwsCloudMapServiceDiscoveryMarshaller Instance = new AwsCloudMapServiceDiscoveryMarshaller(); } }
90
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AwsCloudMapServiceDiscovery Object /// </summary> public class AwsCloudMapServiceDiscoveryUnmarshaller : IUnmarshaller<AwsCloudMapServiceDiscovery, XmlUnmarshallerContext>, IUnmarshaller<AwsCloudMapServiceDiscovery, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AwsCloudMapServiceDiscovery IUnmarshaller<AwsCloudMapServiceDiscovery, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AwsCloudMapServiceDiscovery Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AwsCloudMapServiceDiscovery unmarshalledObject = new AwsCloudMapServiceDiscovery(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("attributes", targetDepth)) { var unmarshaller = new ListUnmarshaller<AwsCloudMapInstanceAttribute, AwsCloudMapInstanceAttributeUnmarshaller>(AwsCloudMapInstanceAttributeUnmarshaller.Instance); unmarshalledObject.Attributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ipPreference", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.IpPreference = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("namespaceName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NamespaceName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("serviceName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ServiceName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AwsCloudMapServiceDiscoveryUnmarshaller _instance = new AwsCloudMapServiceDiscoveryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AwsCloudMapServiceDiscoveryUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// BackendDefaults Marshaller /// </summary> public class BackendDefaultsMarshaller : IRequestMarshaller<BackendDefaults, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BackendDefaults requestObject, JsonMarshallerContext context) { if(requestObject.IsSetClientPolicy()) { context.Writer.WritePropertyName("clientPolicy"); context.Writer.WriteObjectStart(); var marshaller = ClientPolicyMarshaller.Instance; marshaller.Marshall(requestObject.ClientPolicy, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BackendDefaultsMarshaller Instance = new BackendDefaultsMarshaller(); } }
67
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BackendDefaults Object /// </summary> public class BackendDefaultsUnmarshaller : IUnmarshaller<BackendDefaults, XmlUnmarshallerContext>, IUnmarshaller<BackendDefaults, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BackendDefaults IUnmarshaller<BackendDefaults, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BackendDefaults Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BackendDefaults unmarshalledObject = new BackendDefaults(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("clientPolicy", targetDepth)) { var unmarshaller = ClientPolicyUnmarshaller.Instance; unmarshalledObject.ClientPolicy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BackendDefaultsUnmarshaller _instance = new BackendDefaultsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BackendDefaultsUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Backend Marshaller /// </summary> public class BackendMarshaller : IRequestMarshaller<Backend, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(Backend requestObject, JsonMarshallerContext context) { if(requestObject.IsSetVirtualService()) { context.Writer.WritePropertyName("virtualService"); context.Writer.WriteObjectStart(); var marshaller = VirtualServiceBackendMarshaller.Instance; marshaller.Marshall(requestObject.VirtualService, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BackendMarshaller Instance = new BackendMarshaller(); } }
67
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Backend Object /// </summary> public class BackendUnmarshaller : IUnmarshaller<Backend, XmlUnmarshallerContext>, IUnmarshaller<Backend, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Backend IUnmarshaller<Backend, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Backend Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Backend unmarshalledObject = new Backend(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("virtualService", targetDepth)) { var unmarshaller = VirtualServiceBackendUnmarshaller.Instance; unmarshalledObject.VirtualService = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BackendUnmarshaller _instance = new BackendUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BackendUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BadRequestException Object /// </summary> public class BadRequestExceptionUnmarshaller : IErrorResponseUnmarshaller<BadRequestException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BadRequestException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public BadRequestException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); BadRequestException unmarshalledObject = new BadRequestException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static BadRequestExceptionUnmarshaller _instance = new BadRequestExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BadRequestExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// ClientPolicy Marshaller /// </summary> public class ClientPolicyMarshaller : IRequestMarshaller<ClientPolicy, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(ClientPolicy requestObject, JsonMarshallerContext context) { if(requestObject.IsSetTls()) { context.Writer.WritePropertyName("tls"); context.Writer.WriteObjectStart(); var marshaller = ClientPolicyTlsMarshaller.Instance; marshaller.Marshall(requestObject.Tls, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ClientPolicyMarshaller Instance = new ClientPolicyMarshaller(); } }
67
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// ClientPolicyTls Marshaller /// </summary> public class ClientPolicyTlsMarshaller : IRequestMarshaller<ClientPolicyTls, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(ClientPolicyTls requestObject, JsonMarshallerContext context) { if(requestObject.IsSetCertificate()) { context.Writer.WritePropertyName("certificate"); context.Writer.WriteObjectStart(); var marshaller = ClientTlsCertificateMarshaller.Instance; marshaller.Marshall(requestObject.Certificate, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetEnforce()) { context.Writer.WritePropertyName("enforce"); context.Writer.Write(requestObject.Enforce); } if(requestObject.IsSetPorts()) { context.Writer.WritePropertyName("ports"); context.Writer.WriteArrayStart(); foreach(var requestObjectPortsListValue in requestObject.Ports) { context.Writer.Write(requestObjectPortsListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetValidation()) { context.Writer.WritePropertyName("validation"); context.Writer.WriteObjectStart(); var marshaller = TlsValidationContextMarshaller.Instance; marshaller.Marshall(requestObject.Validation, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ClientPolicyTlsMarshaller Instance = new ClientPolicyTlsMarshaller(); } }
95
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ClientPolicyTls Object /// </summary> public class ClientPolicyTlsUnmarshaller : IUnmarshaller<ClientPolicyTls, XmlUnmarshallerContext>, IUnmarshaller<ClientPolicyTls, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ClientPolicyTls IUnmarshaller<ClientPolicyTls, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ClientPolicyTls Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ClientPolicyTls unmarshalledObject = new ClientPolicyTls(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("certificate", targetDepth)) { var unmarshaller = ClientTlsCertificateUnmarshaller.Instance; unmarshalledObject.Certificate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("enforce", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Enforce = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ports", targetDepth)) { var unmarshaller = new ListUnmarshaller<int, IntUnmarshaller>(IntUnmarshaller.Instance); unmarshalledObject.Ports = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("validation", targetDepth)) { var unmarshaller = TlsValidationContextUnmarshaller.Instance; unmarshalledObject.Validation = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ClientPolicyTlsUnmarshaller _instance = new ClientPolicyTlsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ClientPolicyTlsUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ClientPolicy Object /// </summary> public class ClientPolicyUnmarshaller : IUnmarshaller<ClientPolicy, XmlUnmarshallerContext>, IUnmarshaller<ClientPolicy, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ClientPolicy IUnmarshaller<ClientPolicy, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ClientPolicy Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ClientPolicy unmarshalledObject = new ClientPolicy(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("tls", targetDepth)) { var unmarshaller = ClientPolicyTlsUnmarshaller.Instance; unmarshalledObject.Tls = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ClientPolicyUnmarshaller _instance = new ClientPolicyUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ClientPolicyUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// ClientTlsCertificate Marshaller /// </summary> public class ClientTlsCertificateMarshaller : IRequestMarshaller<ClientTlsCertificate, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(ClientTlsCertificate requestObject, JsonMarshallerContext context) { if(requestObject.IsSetFile()) { context.Writer.WritePropertyName("file"); context.Writer.WriteObjectStart(); var marshaller = ListenerTlsFileCertificateMarshaller.Instance; marshaller.Marshall(requestObject.File, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetSds()) { context.Writer.WritePropertyName("sds"); context.Writer.WriteObjectStart(); var marshaller = ListenerTlsSdsCertificateMarshaller.Instance; marshaller.Marshall(requestObject.Sds, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ClientTlsCertificateMarshaller Instance = new ClientTlsCertificateMarshaller(); } }
78
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ClientTlsCertificate Object /// </summary> public class ClientTlsCertificateUnmarshaller : IUnmarshaller<ClientTlsCertificate, XmlUnmarshallerContext>, IUnmarshaller<ClientTlsCertificate, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ClientTlsCertificate IUnmarshaller<ClientTlsCertificate, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ClientTlsCertificate Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ClientTlsCertificate unmarshalledObject = new ClientTlsCertificate(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("file", targetDepth)) { var unmarshaller = ListenerTlsFileCertificateUnmarshaller.Instance; unmarshalledObject.File = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("sds", targetDepth)) { var unmarshaller = ListenerTlsSdsCertificateUnmarshaller.Instance; unmarshalledObject.Sds = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ClientTlsCertificateUnmarshaller _instance = new ClientTlsCertificateUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ClientTlsCertificateUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ConflictException Object /// </summary> public class ConflictExceptionUnmarshaller : IErrorResponseUnmarshaller<ConflictException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ConflictException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public ConflictException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ConflictException unmarshalledObject = new ConflictException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static ConflictExceptionUnmarshaller _instance = new ConflictExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ConflictExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// CreateGatewayRoute Request Marshaller /// </summary> public class CreateGatewayRouteRequestMarshaller : IMarshaller<IRequest, CreateGatewayRouteRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateGatewayRouteRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateGatewayRouteRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualGatewayName()) throw new AmazonAppMeshException("Request object does not have required field VirtualGatewayName set"); request.AddPathResource("{virtualGatewayName}", StringUtils.FromString(publicRequest.VirtualGatewayName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualGateway/{virtualGatewayName}/gatewayRoutes"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetGatewayRouteName()) { context.Writer.WritePropertyName("gatewayRouteName"); context.Writer.Write(publicRequest.GatewayRouteName); } if(publicRequest.IsSetSpec()) { context.Writer.WritePropertyName("spec"); context.Writer.WriteObjectStart(); var marshaller = GatewayRouteSpecMarshaller.Instance; marshaller.Marshall(publicRequest.Spec, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagRefMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } request.UseQueryString = true; return request; } private static CreateGatewayRouteRequestMarshaller _instance = new CreateGatewayRouteRequestMarshaller(); internal static CreateGatewayRouteRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateGatewayRouteRequestMarshaller Instance { get { return _instance; } } } }
149
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateGatewayRoute operation /// </summary> public class CreateGatewayRouteResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateGatewayRouteResponse response = new CreateGatewayRouteResponse(); var unmarshaller = GatewayRouteDataUnmarshaller.Instance; response.GatewayRoute = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateGatewayRouteResponseUnmarshaller _instance = new CreateGatewayRouteResponseUnmarshaller(); internal static CreateGatewayRouteResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateGatewayRouteResponseUnmarshaller Instance { get { return _instance; } } } }
129
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// CreateMesh Request Marshaller /// </summary> public class CreateMeshRequestMarshaller : IMarshaller<IRequest, CreateMeshRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateMeshRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateMeshRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "PUT"; request.ResourcePath = "/v20190125/meshes"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetMeshName()) { context.Writer.WritePropertyName("meshName"); context.Writer.Write(publicRequest.MeshName); } if(publicRequest.IsSetSpec()) { context.Writer.WritePropertyName("spec"); context.Writer.WriteObjectStart(); var marshaller = MeshSpecMarshaller.Instance; marshaller.Marshall(publicRequest.Spec, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagRefMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateMeshRequestMarshaller _instance = new CreateMeshRequestMarshaller(); internal static CreateMeshRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateMeshRequestMarshaller Instance { get { return _instance; } } } }
139
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateMesh operation /// </summary> public class CreateMeshResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateMeshResponse response = new CreateMeshResponse(); var unmarshaller = MeshDataUnmarshaller.Instance; response.Mesh = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateMeshResponseUnmarshaller _instance = new CreateMeshResponseUnmarshaller(); internal static CreateMeshResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateMeshResponseUnmarshaller Instance { get { return _instance; } } } }
129
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// CreateRoute Request Marshaller /// </summary> public class CreateRouteRequestMarshaller : IMarshaller<IRequest, CreateRouteRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateRouteRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateRouteRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualRouterName()) throw new AmazonAppMeshException("Request object does not have required field VirtualRouterName set"); request.AddPathResource("{virtualRouterName}", StringUtils.FromString(publicRequest.VirtualRouterName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetRouteName()) { context.Writer.WritePropertyName("routeName"); context.Writer.Write(publicRequest.RouteName); } if(publicRequest.IsSetSpec()) { context.Writer.WritePropertyName("spec"); context.Writer.WriteObjectStart(); var marshaller = RouteSpecMarshaller.Instance; marshaller.Marshall(publicRequest.Spec, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagRefMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } request.UseQueryString = true; return request; } private static CreateRouteRequestMarshaller _instance = new CreateRouteRequestMarshaller(); internal static CreateRouteRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateRouteRequestMarshaller Instance { get { return _instance; } } } }
149
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateRoute operation /// </summary> public class CreateRouteResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateRouteResponse response = new CreateRouteResponse(); var unmarshaller = RouteDataUnmarshaller.Instance; response.Route = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateRouteResponseUnmarshaller _instance = new CreateRouteResponseUnmarshaller(); internal static CreateRouteResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateRouteResponseUnmarshaller Instance { get { return _instance; } } } }
129
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// CreateVirtualGateway Request Marshaller /// </summary> public class CreateVirtualGatewayRequestMarshaller : IMarshaller<IRequest, CreateVirtualGatewayRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateVirtualGatewayRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateVirtualGatewayRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualGateways"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetSpec()) { context.Writer.WritePropertyName("spec"); context.Writer.WriteObjectStart(); var marshaller = VirtualGatewaySpecMarshaller.Instance; marshaller.Marshall(publicRequest.Spec, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagRefMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetVirtualGatewayName()) { context.Writer.WritePropertyName("virtualGatewayName"); context.Writer.Write(publicRequest.VirtualGatewayName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } request.UseQueryString = true; return request; } private static CreateVirtualGatewayRequestMarshaller _instance = new CreateVirtualGatewayRequestMarshaller(); internal static CreateVirtualGatewayRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateVirtualGatewayRequestMarshaller Instance { get { return _instance; } } } }
146
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateVirtualGateway operation /// </summary> public class CreateVirtualGatewayResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateVirtualGatewayResponse response = new CreateVirtualGatewayResponse(); var unmarshaller = VirtualGatewayDataUnmarshaller.Instance; response.VirtualGateway = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateVirtualGatewayResponseUnmarshaller _instance = new CreateVirtualGatewayResponseUnmarshaller(); internal static CreateVirtualGatewayResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateVirtualGatewayResponseUnmarshaller Instance { get { return _instance; } } } }
129
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// CreateVirtualNode Request Marshaller /// </summary> public class CreateVirtualNodeRequestMarshaller : IMarshaller<IRequest, CreateVirtualNodeRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateVirtualNodeRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateVirtualNodeRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualNodes"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetSpec()) { context.Writer.WritePropertyName("spec"); context.Writer.WriteObjectStart(); var marshaller = VirtualNodeSpecMarshaller.Instance; marshaller.Marshall(publicRequest.Spec, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagRefMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetVirtualNodeName()) { context.Writer.WritePropertyName("virtualNodeName"); context.Writer.Write(publicRequest.VirtualNodeName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } request.UseQueryString = true; return request; } private static CreateVirtualNodeRequestMarshaller _instance = new CreateVirtualNodeRequestMarshaller(); internal static CreateVirtualNodeRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateVirtualNodeRequestMarshaller Instance { get { return _instance; } } } }
146
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateVirtualNode operation /// </summary> public class CreateVirtualNodeResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateVirtualNodeResponse response = new CreateVirtualNodeResponse(); var unmarshaller = VirtualNodeDataUnmarshaller.Instance; response.VirtualNode = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateVirtualNodeResponseUnmarshaller _instance = new CreateVirtualNodeResponseUnmarshaller(); internal static CreateVirtualNodeResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateVirtualNodeResponseUnmarshaller Instance { get { return _instance; } } } }
129
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// CreateVirtualRouter Request Marshaller /// </summary> public class CreateVirtualRouterRequestMarshaller : IMarshaller<IRequest, CreateVirtualRouterRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateVirtualRouterRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateVirtualRouterRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualRouters"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetSpec()) { context.Writer.WritePropertyName("spec"); context.Writer.WriteObjectStart(); var marshaller = VirtualRouterSpecMarshaller.Instance; marshaller.Marshall(publicRequest.Spec, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagRefMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetVirtualRouterName()) { context.Writer.WritePropertyName("virtualRouterName"); context.Writer.Write(publicRequest.VirtualRouterName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } request.UseQueryString = true; return request; } private static CreateVirtualRouterRequestMarshaller _instance = new CreateVirtualRouterRequestMarshaller(); internal static CreateVirtualRouterRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateVirtualRouterRequestMarshaller Instance { get { return _instance; } } } }
146
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateVirtualRouter operation /// </summary> public class CreateVirtualRouterResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateVirtualRouterResponse response = new CreateVirtualRouterResponse(); var unmarshaller = VirtualRouterDataUnmarshaller.Instance; response.VirtualRouter = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateVirtualRouterResponseUnmarshaller _instance = new CreateVirtualRouterResponseUnmarshaller(); internal static CreateVirtualRouterResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateVirtualRouterResponseUnmarshaller Instance { get { return _instance; } } } }
129
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// CreateVirtualService Request Marshaller /// </summary> public class CreateVirtualServiceRequestMarshaller : IMarshaller<IRequest, CreateVirtualServiceRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateVirtualServiceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateVirtualServiceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "PUT"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualServices"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetClientToken()) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(publicRequest.ClientToken); } else if(!(publicRequest.IsSetClientToken())) { context.Writer.WritePropertyName("clientToken"); context.Writer.Write(Guid.NewGuid().ToString()); } if(publicRequest.IsSetSpec()) { context.Writer.WritePropertyName("spec"); context.Writer.WriteObjectStart(); var marshaller = VirtualServiceSpecMarshaller.Instance; marshaller.Marshall(publicRequest.Spec, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("tags"); context.Writer.WriteArrayStart(); foreach(var publicRequestTagsListValue in publicRequest.Tags) { context.Writer.WriteObjectStart(); var marshaller = TagRefMarshaller.Instance; marshaller.Marshall(publicRequestTagsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetVirtualServiceName()) { context.Writer.WritePropertyName("virtualServiceName"); context.Writer.Write(publicRequest.VirtualServiceName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } request.UseQueryString = true; return request; } private static CreateVirtualServiceRequestMarshaller _instance = new CreateVirtualServiceRequestMarshaller(); internal static CreateVirtualServiceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateVirtualServiceRequestMarshaller Instance { get { return _instance; } } } }
146
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateVirtualService operation /// </summary> public class CreateVirtualServiceResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateVirtualServiceResponse response = new CreateVirtualServiceResponse(); var unmarshaller = VirtualServiceDataUnmarshaller.Instance; response.VirtualService = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException")) { return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateVirtualServiceResponseUnmarshaller _instance = new CreateVirtualServiceResponseUnmarshaller(); internal static CreateVirtualServiceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateVirtualServiceResponseUnmarshaller Instance { get { return _instance; } } } }
129
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DeleteGatewayRoute Request Marshaller /// </summary> public class DeleteGatewayRouteRequestMarshaller : IMarshaller<IRequest, DeleteGatewayRouteRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteGatewayRouteRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteGatewayRouteRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetGatewayRouteName()) throw new AmazonAppMeshException("Request object does not have required field GatewayRouteName set"); request.AddPathResource("{gatewayRouteName}", StringUtils.FromString(publicRequest.GatewayRouteName)); if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualGatewayName()) throw new AmazonAppMeshException("Request object does not have required field VirtualGatewayName set"); request.AddPathResource("{virtualGatewayName}", StringUtils.FromString(publicRequest.VirtualGatewayName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualGateway/{virtualGatewayName}/gatewayRoutes/{gatewayRouteName}"; request.UseQueryString = true; return request; } private static DeleteGatewayRouteRequestMarshaller _instance = new DeleteGatewayRouteRequestMarshaller(); internal static DeleteGatewayRouteRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteGatewayRouteRequestMarshaller Instance { get { return _instance; } } } }
97
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteGatewayRoute operation /// </summary> public class DeleteGatewayRouteResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteGatewayRouteResponse response = new DeleteGatewayRouteResponse(); var unmarshaller = GatewayRouteDataUnmarshaller.Instance; response.GatewayRoute = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteGatewayRouteResponseUnmarshaller _instance = new DeleteGatewayRouteResponseUnmarshaller(); internal static DeleteGatewayRouteResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteGatewayRouteResponseUnmarshaller Instance { get { return _instance; } } } }
125
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DeleteMesh Request Marshaller /// </summary> public class DeleteMeshRequestMarshaller : IMarshaller<IRequest, DeleteMeshRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteMeshRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteMeshRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); request.ResourcePath = "/v20190125/meshes/{meshName}"; return request; } private static DeleteMeshRequestMarshaller _instance = new DeleteMeshRequestMarshaller(); internal static DeleteMeshRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteMeshRequestMarshaller Instance { get { return _instance; } } } }
87
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteMesh operation /// </summary> public class DeleteMeshResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteMeshResponse response = new DeleteMeshResponse(); var unmarshaller = MeshDataUnmarshaller.Instance; response.Mesh = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteMeshResponseUnmarshaller _instance = new DeleteMeshResponseUnmarshaller(); internal static DeleteMeshResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteMeshResponseUnmarshaller Instance { get { return _instance; } } } }
125
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DeleteRoute Request Marshaller /// </summary> public class DeleteRouteRequestMarshaller : IMarshaller<IRequest, DeleteRouteRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteRouteRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteRouteRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetRouteName()) throw new AmazonAppMeshException("Request object does not have required field RouteName set"); request.AddPathResource("{routeName}", StringUtils.FromString(publicRequest.RouteName)); if (!publicRequest.IsSetVirtualRouterName()) throw new AmazonAppMeshException("Request object does not have required field VirtualRouterName set"); request.AddPathResource("{virtualRouterName}", StringUtils.FromString(publicRequest.VirtualRouterName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}"; request.UseQueryString = true; return request; } private static DeleteRouteRequestMarshaller _instance = new DeleteRouteRequestMarshaller(); internal static DeleteRouteRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteRouteRequestMarshaller Instance { get { return _instance; } } } }
97
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteRoute operation /// </summary> public class DeleteRouteResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteRouteResponse response = new DeleteRouteResponse(); var unmarshaller = RouteDataUnmarshaller.Instance; response.Route = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteRouteResponseUnmarshaller _instance = new DeleteRouteResponseUnmarshaller(); internal static DeleteRouteResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteRouteResponseUnmarshaller Instance { get { return _instance; } } } }
125
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DeleteVirtualGateway Request Marshaller /// </summary> public class DeleteVirtualGatewayRequestMarshaller : IMarshaller<IRequest, DeleteVirtualGatewayRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteVirtualGatewayRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteVirtualGatewayRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualGatewayName()) throw new AmazonAppMeshException("Request object does not have required field VirtualGatewayName set"); request.AddPathResource("{virtualGatewayName}", StringUtils.FromString(publicRequest.VirtualGatewayName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualGateways/{virtualGatewayName}"; request.UseQueryString = true; return request; } private static DeleteVirtualGatewayRequestMarshaller _instance = new DeleteVirtualGatewayRequestMarshaller(); internal static DeleteVirtualGatewayRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteVirtualGatewayRequestMarshaller Instance { get { return _instance; } } } }
94
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteVirtualGateway operation /// </summary> public class DeleteVirtualGatewayResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteVirtualGatewayResponse response = new DeleteVirtualGatewayResponse(); var unmarshaller = VirtualGatewayDataUnmarshaller.Instance; response.VirtualGateway = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteVirtualGatewayResponseUnmarshaller _instance = new DeleteVirtualGatewayResponseUnmarshaller(); internal static DeleteVirtualGatewayResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteVirtualGatewayResponseUnmarshaller Instance { get { return _instance; } } } }
125
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DeleteVirtualNode Request Marshaller /// </summary> public class DeleteVirtualNodeRequestMarshaller : IMarshaller<IRequest, DeleteVirtualNodeRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteVirtualNodeRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteVirtualNodeRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualNodeName()) throw new AmazonAppMeshException("Request object does not have required field VirtualNodeName set"); request.AddPathResource("{virtualNodeName}", StringUtils.FromString(publicRequest.VirtualNodeName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualNodes/{virtualNodeName}"; request.UseQueryString = true; return request; } private static DeleteVirtualNodeRequestMarshaller _instance = new DeleteVirtualNodeRequestMarshaller(); internal static DeleteVirtualNodeRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteVirtualNodeRequestMarshaller Instance { get { return _instance; } } } }
94
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteVirtualNode operation /// </summary> public class DeleteVirtualNodeResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteVirtualNodeResponse response = new DeleteVirtualNodeResponse(); var unmarshaller = VirtualNodeDataUnmarshaller.Instance; response.VirtualNode = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteVirtualNodeResponseUnmarshaller _instance = new DeleteVirtualNodeResponseUnmarshaller(); internal static DeleteVirtualNodeResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteVirtualNodeResponseUnmarshaller Instance { get { return _instance; } } } }
125
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DeleteVirtualRouter Request Marshaller /// </summary> public class DeleteVirtualRouterRequestMarshaller : IMarshaller<IRequest, DeleteVirtualRouterRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteVirtualRouterRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteVirtualRouterRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualRouterName()) throw new AmazonAppMeshException("Request object does not have required field VirtualRouterName set"); request.AddPathResource("{virtualRouterName}", StringUtils.FromString(publicRequest.VirtualRouterName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualRouters/{virtualRouterName}"; request.UseQueryString = true; return request; } private static DeleteVirtualRouterRequestMarshaller _instance = new DeleteVirtualRouterRequestMarshaller(); internal static DeleteVirtualRouterRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteVirtualRouterRequestMarshaller Instance { get { return _instance; } } } }
94
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteVirtualRouter operation /// </summary> public class DeleteVirtualRouterResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteVirtualRouterResponse response = new DeleteVirtualRouterResponse(); var unmarshaller = VirtualRouterDataUnmarshaller.Instance; response.VirtualRouter = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteVirtualRouterResponseUnmarshaller _instance = new DeleteVirtualRouterResponseUnmarshaller(); internal static DeleteVirtualRouterResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteVirtualRouterResponseUnmarshaller Instance { get { return _instance; } } } }
125
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DeleteVirtualService Request Marshaller /// </summary> public class DeleteVirtualServiceRequestMarshaller : IMarshaller<IRequest, DeleteVirtualServiceRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteVirtualServiceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteVirtualServiceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "DELETE"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualServiceName()) throw new AmazonAppMeshException("Request object does not have required field VirtualServiceName set"); request.AddPathResource("{virtualServiceName}", StringUtils.FromString(publicRequest.VirtualServiceName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualServices/{virtualServiceName}"; request.UseQueryString = true; return request; } private static DeleteVirtualServiceRequestMarshaller _instance = new DeleteVirtualServiceRequestMarshaller(); internal static DeleteVirtualServiceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteVirtualServiceRequestMarshaller Instance { get { return _instance; } } } }
94
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteVirtualService operation /// </summary> public class DeleteVirtualServiceResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteVirtualServiceResponse response = new DeleteVirtualServiceResponse(); var unmarshaller = VirtualServiceDataUnmarshaller.Instance; response.VirtualService = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteVirtualServiceResponseUnmarshaller _instance = new DeleteVirtualServiceResponseUnmarshaller(); internal static DeleteVirtualServiceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteVirtualServiceResponseUnmarshaller Instance { get { return _instance; } } } }
125
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DescribeGatewayRoute Request Marshaller /// </summary> public class DescribeGatewayRouteRequestMarshaller : IMarshaller<IRequest, DescribeGatewayRouteRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeGatewayRouteRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeGatewayRouteRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "GET"; if (!publicRequest.IsSetGatewayRouteName()) throw new AmazonAppMeshException("Request object does not have required field GatewayRouteName set"); request.AddPathResource("{gatewayRouteName}", StringUtils.FromString(publicRequest.GatewayRouteName)); if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualGatewayName()) throw new AmazonAppMeshException("Request object does not have required field VirtualGatewayName set"); request.AddPathResource("{virtualGatewayName}", StringUtils.FromString(publicRequest.VirtualGatewayName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualGateway/{virtualGatewayName}/gatewayRoutes/{gatewayRouteName}"; request.UseQueryString = true; return request; } private static DescribeGatewayRouteRequestMarshaller _instance = new DescribeGatewayRouteRequestMarshaller(); internal static DescribeGatewayRouteRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeGatewayRouteRequestMarshaller Instance { get { return _instance; } } } }
97
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeGatewayRoute operation /// </summary> public class DescribeGatewayRouteResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeGatewayRouteResponse response = new DescribeGatewayRouteResponse(); var unmarshaller = GatewayRouteDataUnmarshaller.Instance; response.GatewayRoute = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeGatewayRouteResponseUnmarshaller _instance = new DescribeGatewayRouteResponseUnmarshaller(); internal static DescribeGatewayRouteResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeGatewayRouteResponseUnmarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DescribeMesh Request Marshaller /// </summary> public class DescribeMeshRequestMarshaller : IMarshaller<IRequest, DescribeMeshRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeMeshRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeMeshRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "GET"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}"; request.UseQueryString = true; return request; } private static DescribeMeshRequestMarshaller _instance = new DescribeMeshRequestMarshaller(); internal static DescribeMeshRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeMeshRequestMarshaller Instance { get { return _instance; } } } }
91
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeMesh operation /// </summary> public class DescribeMeshResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeMeshResponse response = new DescribeMeshResponse(); var unmarshaller = MeshDataUnmarshaller.Instance; response.Mesh = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeMeshResponseUnmarshaller _instance = new DescribeMeshResponseUnmarshaller(); internal static DescribeMeshResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeMeshResponseUnmarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DescribeRoute Request Marshaller /// </summary> public class DescribeRouteRequestMarshaller : IMarshaller<IRequest, DescribeRouteRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeRouteRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeRouteRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "GET"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetRouteName()) throw new AmazonAppMeshException("Request object does not have required field RouteName set"); request.AddPathResource("{routeName}", StringUtils.FromString(publicRequest.RouteName)); if (!publicRequest.IsSetVirtualRouterName()) throw new AmazonAppMeshException("Request object does not have required field VirtualRouterName set"); request.AddPathResource("{virtualRouterName}", StringUtils.FromString(publicRequest.VirtualRouterName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}"; request.UseQueryString = true; return request; } private static DescribeRouteRequestMarshaller _instance = new DescribeRouteRequestMarshaller(); internal static DescribeRouteRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeRouteRequestMarshaller Instance { get { return _instance; } } } }
97
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeRoute operation /// </summary> public class DescribeRouteResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeRouteResponse response = new DescribeRouteResponse(); var unmarshaller = RouteDataUnmarshaller.Instance; response.Route = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeRouteResponseUnmarshaller _instance = new DescribeRouteResponseUnmarshaller(); internal static DescribeRouteResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeRouteResponseUnmarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DescribeVirtualGateway Request Marshaller /// </summary> public class DescribeVirtualGatewayRequestMarshaller : IMarshaller<IRequest, DescribeVirtualGatewayRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeVirtualGatewayRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeVirtualGatewayRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "GET"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualGatewayName()) throw new AmazonAppMeshException("Request object does not have required field VirtualGatewayName set"); request.AddPathResource("{virtualGatewayName}", StringUtils.FromString(publicRequest.VirtualGatewayName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualGateways/{virtualGatewayName}"; request.UseQueryString = true; return request; } private static DescribeVirtualGatewayRequestMarshaller _instance = new DescribeVirtualGatewayRequestMarshaller(); internal static DescribeVirtualGatewayRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeVirtualGatewayRequestMarshaller Instance { get { return _instance; } } } }
94
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeVirtualGateway operation /// </summary> public class DescribeVirtualGatewayResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeVirtualGatewayResponse response = new DescribeVirtualGatewayResponse(); var unmarshaller = VirtualGatewayDataUnmarshaller.Instance; response.VirtualGateway = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeVirtualGatewayResponseUnmarshaller _instance = new DescribeVirtualGatewayResponseUnmarshaller(); internal static DescribeVirtualGatewayResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeVirtualGatewayResponseUnmarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DescribeVirtualNode Request Marshaller /// </summary> public class DescribeVirtualNodeRequestMarshaller : IMarshaller<IRequest, DescribeVirtualNodeRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeVirtualNodeRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeVirtualNodeRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "GET"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualNodeName()) throw new AmazonAppMeshException("Request object does not have required field VirtualNodeName set"); request.AddPathResource("{virtualNodeName}", StringUtils.FromString(publicRequest.VirtualNodeName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualNodes/{virtualNodeName}"; request.UseQueryString = true; return request; } private static DescribeVirtualNodeRequestMarshaller _instance = new DescribeVirtualNodeRequestMarshaller(); internal static DescribeVirtualNodeRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeVirtualNodeRequestMarshaller Instance { get { return _instance; } } } }
94
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeVirtualNode operation /// </summary> public class DescribeVirtualNodeResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeVirtualNodeResponse response = new DescribeVirtualNodeResponse(); var unmarshaller = VirtualNodeDataUnmarshaller.Instance; response.VirtualNode = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeVirtualNodeResponseUnmarshaller _instance = new DescribeVirtualNodeResponseUnmarshaller(); internal static DescribeVirtualNodeResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeVirtualNodeResponseUnmarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DescribeVirtualRouter Request Marshaller /// </summary> public class DescribeVirtualRouterRequestMarshaller : IMarshaller<IRequest, DescribeVirtualRouterRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeVirtualRouterRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeVirtualRouterRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "GET"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualRouterName()) throw new AmazonAppMeshException("Request object does not have required field VirtualRouterName set"); request.AddPathResource("{virtualRouterName}", StringUtils.FromString(publicRequest.VirtualRouterName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualRouters/{virtualRouterName}"; request.UseQueryString = true; return request; } private static DescribeVirtualRouterRequestMarshaller _instance = new DescribeVirtualRouterRequestMarshaller(); internal static DescribeVirtualRouterRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeVirtualRouterRequestMarshaller Instance { get { return _instance; } } } }
94
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeVirtualRouter operation /// </summary> public class DescribeVirtualRouterResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeVirtualRouterResponse response = new DescribeVirtualRouterResponse(); var unmarshaller = VirtualRouterDataUnmarshaller.Instance; response.VirtualRouter = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeVirtualRouterResponseUnmarshaller _instance = new DescribeVirtualRouterResponseUnmarshaller(); internal static DescribeVirtualRouterResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeVirtualRouterResponseUnmarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DescribeVirtualService Request Marshaller /// </summary> public class DescribeVirtualServiceRequestMarshaller : IMarshaller<IRequest, DescribeVirtualServiceRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DescribeVirtualServiceRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeVirtualServiceRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppMesh"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2019-01-25"; request.HttpMethod = "GET"; if (!publicRequest.IsSetMeshName()) throw new AmazonAppMeshException("Request object does not have required field MeshName set"); request.AddPathResource("{meshName}", StringUtils.FromString(publicRequest.MeshName)); if (!publicRequest.IsSetVirtualServiceName()) throw new AmazonAppMeshException("Request object does not have required field VirtualServiceName set"); request.AddPathResource("{virtualServiceName}", StringUtils.FromString(publicRequest.VirtualServiceName)); if (publicRequest.IsSetMeshOwner()) request.Parameters.Add("meshOwner", StringUtils.FromString(publicRequest.MeshOwner)); request.ResourcePath = "/v20190125/meshes/{meshName}/virtualServices/{virtualServiceName}"; request.UseQueryString = true; return request; } private static DescribeVirtualServiceRequestMarshaller _instance = new DescribeVirtualServiceRequestMarshaller(); internal static DescribeVirtualServiceRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeVirtualServiceRequestMarshaller Instance { get { return _instance; } } } }
94
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeVirtualService operation /// </summary> public class DescribeVirtualServiceResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeVirtualServiceResponse response = new DescribeVirtualServiceResponse(); var unmarshaller = VirtualServiceDataUnmarshaller.Instance; response.VirtualService = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException")) { return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppMeshException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DescribeVirtualServiceResponseUnmarshaller _instance = new DescribeVirtualServiceResponseUnmarshaller(); internal static DescribeVirtualServiceResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeVirtualServiceResponseUnmarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// DnsServiceDiscovery Marshaller /// </summary> public class DnsServiceDiscoveryMarshaller : IRequestMarshaller<DnsServiceDiscovery, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(DnsServiceDiscovery requestObject, JsonMarshallerContext context) { if(requestObject.IsSetHostname()) { context.Writer.WritePropertyName("hostname"); context.Writer.Write(requestObject.Hostname); } if(requestObject.IsSetIpPreference()) { context.Writer.WritePropertyName("ipPreference"); context.Writer.Write(requestObject.IpPreference); } if(requestObject.IsSetResponseType()) { context.Writer.WritePropertyName("responseType"); context.Writer.Write(requestObject.ResponseType); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static DnsServiceDiscoveryMarshaller Instance = new DnsServiceDiscoveryMarshaller(); } }
74
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DnsServiceDiscovery Object /// </summary> public class DnsServiceDiscoveryUnmarshaller : IUnmarshaller<DnsServiceDiscovery, XmlUnmarshallerContext>, IUnmarshaller<DnsServiceDiscovery, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> DnsServiceDiscovery IUnmarshaller<DnsServiceDiscovery, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DnsServiceDiscovery Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; DnsServiceDiscovery unmarshalledObject = new DnsServiceDiscovery(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("hostname", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Hostname = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ipPreference", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.IpPreference = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("responseType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResponseType = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DnsServiceDiscoveryUnmarshaller _instance = new DnsServiceDiscoveryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DnsServiceDiscoveryUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Duration Marshaller /// </summary> public class DurationMarshaller : IRequestMarshaller<Duration, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(Duration requestObject, JsonMarshallerContext context) { if(requestObject.IsSetUnit()) { context.Writer.WritePropertyName("unit"); context.Writer.Write(requestObject.Unit); } if(requestObject.IsSetValue()) { context.Writer.WritePropertyName("value"); context.Writer.Write(requestObject.Value); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static DurationMarshaller Instance = new DurationMarshaller(); } }
68
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Duration Object /// </summary> public class DurationUnmarshaller : IUnmarshaller<Duration, XmlUnmarshallerContext>, IUnmarshaller<Duration, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Duration IUnmarshaller<Duration, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Duration Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Duration unmarshalledObject = new Duration(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("unit", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Unit = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("value", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.Value = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DurationUnmarshaller _instance = new DurationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DurationUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// EgressFilter Marshaller /// </summary> public class EgressFilterMarshaller : IRequestMarshaller<EgressFilter, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(EgressFilter requestObject, JsonMarshallerContext context) { if(requestObject.IsSetType()) { context.Writer.WritePropertyName("type"); context.Writer.Write(requestObject.Type); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static EgressFilterMarshaller Instance = new EgressFilterMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for EgressFilter Object /// </summary> public class EgressFilterUnmarshaller : IUnmarshaller<EgressFilter, XmlUnmarshallerContext>, IUnmarshaller<EgressFilter, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> EgressFilter IUnmarshaller<EgressFilter, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public EgressFilter Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; EgressFilter unmarshalledObject = new EgressFilter(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static EgressFilterUnmarshaller _instance = new EgressFilterUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static EgressFilterUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// FileAccessLog Marshaller /// </summary> public class FileAccessLogMarshaller : IRequestMarshaller<FileAccessLog, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(FileAccessLog requestObject, JsonMarshallerContext context) { if(requestObject.IsSetFormat()) { context.Writer.WritePropertyName("format"); context.Writer.WriteObjectStart(); var marshaller = LoggingFormatMarshaller.Instance; marshaller.Marshall(requestObject.Format, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetPath()) { context.Writer.WritePropertyName("path"); context.Writer.Write(requestObject.Path); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static FileAccessLogMarshaller Instance = new FileAccessLogMarshaller(); } }
73
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FileAccessLog Object /// </summary> public class FileAccessLogUnmarshaller : IUnmarshaller<FileAccessLog, XmlUnmarshallerContext>, IUnmarshaller<FileAccessLog, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> FileAccessLog IUnmarshaller<FileAccessLog, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FileAccessLog Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; FileAccessLog unmarshalledObject = new FileAccessLog(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("format", targetDepth)) { var unmarshaller = LoggingFormatUnmarshaller.Instance; unmarshalledObject.Format = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("path", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Path = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static FileAccessLogUnmarshaller _instance = new FileAccessLogUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FileAccessLogUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ForbiddenException Object /// </summary> public class ForbiddenExceptionUnmarshaller : IErrorResponseUnmarshaller<ForbiddenException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ForbiddenException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public ForbiddenException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ForbiddenException unmarshalledObject = new ForbiddenException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static ForbiddenExceptionUnmarshaller _instance = new ForbiddenExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ForbiddenExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayRouteData Object /// </summary> public class GatewayRouteDataUnmarshaller : IUnmarshaller<GatewayRouteData, XmlUnmarshallerContext>, IUnmarshaller<GatewayRouteData, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayRouteData IUnmarshaller<GatewayRouteData, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewayRouteData Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayRouteData unmarshalledObject = new GatewayRouteData(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("gatewayRouteName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GatewayRouteName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("meshName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.MeshName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("metadata", targetDepth)) { var unmarshaller = ResourceMetadataUnmarshaller.Instance; unmarshalledObject.Metadata = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("spec", targetDepth)) { var unmarshaller = GatewayRouteSpecUnmarshaller.Instance; unmarshalledObject.Spec = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = GatewayRouteStatusUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("virtualGatewayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VirtualGatewayName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayRouteDataUnmarshaller _instance = new GatewayRouteDataUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayRouteDataUnmarshaller Instance { get { return _instance; } } } }
122
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GatewayRouteHostnameMatch Marshaller /// </summary> public class GatewayRouteHostnameMatchMarshaller : IRequestMarshaller<GatewayRouteHostnameMatch, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GatewayRouteHostnameMatch requestObject, JsonMarshallerContext context) { if(requestObject.IsSetExact()) { context.Writer.WritePropertyName("exact"); context.Writer.Write(requestObject.Exact); } if(requestObject.IsSetSuffix()) { context.Writer.WritePropertyName("suffix"); context.Writer.Write(requestObject.Suffix); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GatewayRouteHostnameMatchMarshaller Instance = new GatewayRouteHostnameMatchMarshaller(); } }
68
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayRouteHostnameMatch Object /// </summary> public class GatewayRouteHostnameMatchUnmarshaller : IUnmarshaller<GatewayRouteHostnameMatch, XmlUnmarshallerContext>, IUnmarshaller<GatewayRouteHostnameMatch, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayRouteHostnameMatch IUnmarshaller<GatewayRouteHostnameMatch, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewayRouteHostnameMatch Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayRouteHostnameMatch unmarshalledObject = new GatewayRouteHostnameMatch(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("exact", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Exact = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("suffix", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Suffix = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayRouteHostnameMatchUnmarshaller _instance = new GatewayRouteHostnameMatchUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayRouteHostnameMatchUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GatewayRouteHostnameRewrite Marshaller /// </summary> public class GatewayRouteHostnameRewriteMarshaller : IRequestMarshaller<GatewayRouteHostnameRewrite, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GatewayRouteHostnameRewrite requestObject, JsonMarshallerContext context) { if(requestObject.IsSetDefaultTargetHostname()) { context.Writer.WritePropertyName("defaultTargetHostname"); context.Writer.Write(requestObject.DefaultTargetHostname); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GatewayRouteHostnameRewriteMarshaller Instance = new GatewayRouteHostnameRewriteMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayRouteHostnameRewrite Object /// </summary> public class GatewayRouteHostnameRewriteUnmarshaller : IUnmarshaller<GatewayRouteHostnameRewrite, XmlUnmarshallerContext>, IUnmarshaller<GatewayRouteHostnameRewrite, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayRouteHostnameRewrite IUnmarshaller<GatewayRouteHostnameRewrite, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewayRouteHostnameRewrite Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayRouteHostnameRewrite unmarshalledObject = new GatewayRouteHostnameRewrite(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("defaultTargetHostname", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DefaultTargetHostname = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayRouteHostnameRewriteUnmarshaller _instance = new GatewayRouteHostnameRewriteUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayRouteHostnameRewriteUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayRouteRef Object /// </summary> public class GatewayRouteRefUnmarshaller : IUnmarshaller<GatewayRouteRef, XmlUnmarshallerContext>, IUnmarshaller<GatewayRouteRef, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayRouteRef IUnmarshaller<GatewayRouteRef, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewayRouteRef Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayRouteRef unmarshalledObject = new GatewayRouteRef(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("gatewayRouteName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GatewayRouteName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastUpdatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastUpdatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("meshName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.MeshName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("meshOwner", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.MeshOwner = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceOwner", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceOwner = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("version", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.Version = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("virtualGatewayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VirtualGatewayName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayRouteRefUnmarshaller _instance = new GatewayRouteRefUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayRouteRefUnmarshaller Instance { get { return _instance; } } } }
140
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GatewayRouteSpec Marshaller /// </summary> public class GatewayRouteSpecMarshaller : IRequestMarshaller<GatewayRouteSpec, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GatewayRouteSpec requestObject, JsonMarshallerContext context) { if(requestObject.IsSetGrpcRoute()) { context.Writer.WritePropertyName("grpcRoute"); context.Writer.WriteObjectStart(); var marshaller = GrpcGatewayRouteMarshaller.Instance; marshaller.Marshall(requestObject.GrpcRoute, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetHttp2Route()) { context.Writer.WritePropertyName("http2Route"); context.Writer.WriteObjectStart(); var marshaller = HttpGatewayRouteMarshaller.Instance; marshaller.Marshall(requestObject.Http2Route, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetHttpRoute()) { context.Writer.WritePropertyName("httpRoute"); context.Writer.WriteObjectStart(); var marshaller = HttpGatewayRouteMarshaller.Instance; marshaller.Marshall(requestObject.HttpRoute, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetPriority()) { context.Writer.WritePropertyName("priority"); context.Writer.Write(requestObject.Priority); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GatewayRouteSpecMarshaller Instance = new GatewayRouteSpecMarshaller(); } }
95
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayRouteSpec Object /// </summary> public class GatewayRouteSpecUnmarshaller : IUnmarshaller<GatewayRouteSpec, XmlUnmarshallerContext>, IUnmarshaller<GatewayRouteSpec, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayRouteSpec IUnmarshaller<GatewayRouteSpec, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewayRouteSpec Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayRouteSpec unmarshalledObject = new GatewayRouteSpec(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("grpcRoute", targetDepth)) { var unmarshaller = GrpcGatewayRouteUnmarshaller.Instance; unmarshalledObject.GrpcRoute = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("http2Route", targetDepth)) { var unmarshaller = HttpGatewayRouteUnmarshaller.Instance; unmarshalledObject.Http2Route = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("httpRoute", targetDepth)) { var unmarshaller = HttpGatewayRouteUnmarshaller.Instance; unmarshalledObject.HttpRoute = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("priority", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Priority = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayRouteSpecUnmarshaller _instance = new GatewayRouteSpecUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayRouteSpecUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayRouteStatus Object /// </summary> public class GatewayRouteStatusUnmarshaller : IUnmarshaller<GatewayRouteStatus, XmlUnmarshallerContext>, IUnmarshaller<GatewayRouteStatus, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayRouteStatus IUnmarshaller<GatewayRouteStatus, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewayRouteStatus Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayRouteStatus unmarshalledObject = new GatewayRouteStatus(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayRouteStatusUnmarshaller _instance = new GatewayRouteStatusUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayRouteStatusUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GatewayRouteTarget Marshaller /// </summary> public class GatewayRouteTargetMarshaller : IRequestMarshaller<GatewayRouteTarget, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GatewayRouteTarget requestObject, JsonMarshallerContext context) { if(requestObject.IsSetPort()) { context.Writer.WritePropertyName("port"); context.Writer.Write(requestObject.Port); } if(requestObject.IsSetVirtualService()) { context.Writer.WritePropertyName("virtualService"); context.Writer.WriteObjectStart(); var marshaller = GatewayRouteVirtualServiceMarshaller.Instance; marshaller.Marshall(requestObject.VirtualService, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GatewayRouteTargetMarshaller Instance = new GatewayRouteTargetMarshaller(); } }
73
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayRouteTarget Object /// </summary> public class GatewayRouteTargetUnmarshaller : IUnmarshaller<GatewayRouteTarget, XmlUnmarshallerContext>, IUnmarshaller<GatewayRouteTarget, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayRouteTarget IUnmarshaller<GatewayRouteTarget, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewayRouteTarget Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayRouteTarget unmarshalledObject = new GatewayRouteTarget(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("port", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Port = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("virtualService", targetDepth)) { var unmarshaller = GatewayRouteVirtualServiceUnmarshaller.Instance; unmarshalledObject.VirtualService = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayRouteTargetUnmarshaller _instance = new GatewayRouteTargetUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayRouteTargetUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GatewayRouteVirtualService Marshaller /// </summary> public class GatewayRouteVirtualServiceMarshaller : IRequestMarshaller<GatewayRouteVirtualService, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GatewayRouteVirtualService requestObject, JsonMarshallerContext context) { if(requestObject.IsSetVirtualServiceName()) { context.Writer.WritePropertyName("virtualServiceName"); context.Writer.Write(requestObject.VirtualServiceName); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GatewayRouteVirtualServiceMarshaller Instance = new GatewayRouteVirtualServiceMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GatewayRouteVirtualService Object /// </summary> public class GatewayRouteVirtualServiceUnmarshaller : IUnmarshaller<GatewayRouteVirtualService, XmlUnmarshallerContext>, IUnmarshaller<GatewayRouteVirtualService, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GatewayRouteVirtualService IUnmarshaller<GatewayRouteVirtualService, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GatewayRouteVirtualService Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GatewayRouteVirtualService unmarshalledObject = new GatewayRouteVirtualService(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("virtualServiceName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VirtualServiceName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GatewayRouteVirtualServiceUnmarshaller _instance = new GatewayRouteVirtualServiceUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GatewayRouteVirtualServiceUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcGatewayRouteAction Marshaller /// </summary> public class GrpcGatewayRouteActionMarshaller : IRequestMarshaller<GrpcGatewayRouteAction, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcGatewayRouteAction requestObject, JsonMarshallerContext context) { if(requestObject.IsSetRewrite()) { context.Writer.WritePropertyName("rewrite"); context.Writer.WriteObjectStart(); var marshaller = GrpcGatewayRouteRewriteMarshaller.Instance; marshaller.Marshall(requestObject.Rewrite, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetTarget()) { context.Writer.WritePropertyName("target"); context.Writer.WriteObjectStart(); var marshaller = GatewayRouteTargetMarshaller.Instance; marshaller.Marshall(requestObject.Target, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcGatewayRouteActionMarshaller Instance = new GrpcGatewayRouteActionMarshaller(); } }
78
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GrpcGatewayRouteAction Object /// </summary> public class GrpcGatewayRouteActionUnmarshaller : IUnmarshaller<GrpcGatewayRouteAction, XmlUnmarshallerContext>, IUnmarshaller<GrpcGatewayRouteAction, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GrpcGatewayRouteAction IUnmarshaller<GrpcGatewayRouteAction, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GrpcGatewayRouteAction Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GrpcGatewayRouteAction unmarshalledObject = new GrpcGatewayRouteAction(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("rewrite", targetDepth)) { var unmarshaller = GrpcGatewayRouteRewriteUnmarshaller.Instance; unmarshalledObject.Rewrite = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("target", targetDepth)) { var unmarshaller = GatewayRouteTargetUnmarshaller.Instance; unmarshalledObject.Target = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GrpcGatewayRouteActionUnmarshaller _instance = new GrpcGatewayRouteActionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GrpcGatewayRouteActionUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcGatewayRoute Marshaller /// </summary> public class GrpcGatewayRouteMarshaller : IRequestMarshaller<GrpcGatewayRoute, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcGatewayRoute requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAction()) { context.Writer.WritePropertyName("action"); context.Writer.WriteObjectStart(); var marshaller = GrpcGatewayRouteActionMarshaller.Instance; marshaller.Marshall(requestObject.Action, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetMatch()) { context.Writer.WritePropertyName("match"); context.Writer.WriteObjectStart(); var marshaller = GrpcGatewayRouteMatchMarshaller.Instance; marshaller.Marshall(requestObject.Match, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcGatewayRouteMarshaller Instance = new GrpcGatewayRouteMarshaller(); } }
78
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcGatewayRouteMatch Marshaller /// </summary> public class GrpcGatewayRouteMatchMarshaller : IRequestMarshaller<GrpcGatewayRouteMatch, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcGatewayRouteMatch requestObject, JsonMarshallerContext context) { if(requestObject.IsSetHostname()) { context.Writer.WritePropertyName("hostname"); context.Writer.WriteObjectStart(); var marshaller = GatewayRouteHostnameMatchMarshaller.Instance; marshaller.Marshall(requestObject.Hostname, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetMetadata()) { context.Writer.WritePropertyName("metadata"); context.Writer.WriteArrayStart(); foreach(var requestObjectMetadataListValue in requestObject.Metadata) { context.Writer.WriteObjectStart(); var marshaller = GrpcGatewayRouteMetadataMarshaller.Instance; marshaller.Marshall(requestObjectMetadataListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetPort()) { context.Writer.WritePropertyName("port"); context.Writer.Write(requestObject.Port); } if(requestObject.IsSetServiceName()) { context.Writer.WritePropertyName("serviceName"); context.Writer.Write(requestObject.ServiceName); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcGatewayRouteMatchMarshaller Instance = new GrpcGatewayRouteMatchMarshaller(); } }
95
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GrpcGatewayRouteMatch Object /// </summary> public class GrpcGatewayRouteMatchUnmarshaller : IUnmarshaller<GrpcGatewayRouteMatch, XmlUnmarshallerContext>, IUnmarshaller<GrpcGatewayRouteMatch, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GrpcGatewayRouteMatch IUnmarshaller<GrpcGatewayRouteMatch, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GrpcGatewayRouteMatch Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GrpcGatewayRouteMatch unmarshalledObject = new GrpcGatewayRouteMatch(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("hostname", targetDepth)) { var unmarshaller = GatewayRouteHostnameMatchUnmarshaller.Instance; unmarshalledObject.Hostname = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("metadata", targetDepth)) { var unmarshaller = new ListUnmarshaller<GrpcGatewayRouteMetadata, GrpcGatewayRouteMetadataUnmarshaller>(GrpcGatewayRouteMetadataUnmarshaller.Instance); unmarshalledObject.Metadata = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("port", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Port = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("serviceName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ServiceName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GrpcGatewayRouteMatchUnmarshaller _instance = new GrpcGatewayRouteMatchUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GrpcGatewayRouteMatchUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcGatewayRouteMetadata Marshaller /// </summary> public class GrpcGatewayRouteMetadataMarshaller : IRequestMarshaller<GrpcGatewayRouteMetadata, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcGatewayRouteMetadata requestObject, JsonMarshallerContext context) { if(requestObject.IsSetInvert()) { context.Writer.WritePropertyName("invert"); context.Writer.Write(requestObject.Invert); } if(requestObject.IsSetMatch()) { context.Writer.WritePropertyName("match"); context.Writer.WriteObjectStart(); var marshaller = GrpcMetadataMatchMethodMarshaller.Instance; marshaller.Marshall(requestObject.Match, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetName()) { context.Writer.WritePropertyName("name"); context.Writer.Write(requestObject.Name); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcGatewayRouteMetadataMarshaller Instance = new GrpcGatewayRouteMetadataMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GrpcGatewayRouteMetadata Object /// </summary> public class GrpcGatewayRouteMetadataUnmarshaller : IUnmarshaller<GrpcGatewayRouteMetadata, XmlUnmarshallerContext>, IUnmarshaller<GrpcGatewayRouteMetadata, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GrpcGatewayRouteMetadata IUnmarshaller<GrpcGatewayRouteMetadata, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GrpcGatewayRouteMetadata Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GrpcGatewayRouteMetadata unmarshalledObject = new GrpcGatewayRouteMetadata(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("invert", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Invert = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("match", targetDepth)) { var unmarshaller = GrpcMetadataMatchMethodUnmarshaller.Instance; unmarshalledObject.Match = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GrpcGatewayRouteMetadataUnmarshaller _instance = new GrpcGatewayRouteMetadataUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GrpcGatewayRouteMetadataUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcGatewayRouteRewrite Marshaller /// </summary> public class GrpcGatewayRouteRewriteMarshaller : IRequestMarshaller<GrpcGatewayRouteRewrite, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcGatewayRouteRewrite requestObject, JsonMarshallerContext context) { if(requestObject.IsSetHostname()) { context.Writer.WritePropertyName("hostname"); context.Writer.WriteObjectStart(); var marshaller = GatewayRouteHostnameRewriteMarshaller.Instance; marshaller.Marshall(requestObject.Hostname, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcGatewayRouteRewriteMarshaller Instance = new GrpcGatewayRouteRewriteMarshaller(); } }
67
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GrpcGatewayRouteRewrite Object /// </summary> public class GrpcGatewayRouteRewriteUnmarshaller : IUnmarshaller<GrpcGatewayRouteRewrite, XmlUnmarshallerContext>, IUnmarshaller<GrpcGatewayRouteRewrite, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GrpcGatewayRouteRewrite IUnmarshaller<GrpcGatewayRouteRewrite, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GrpcGatewayRouteRewrite Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GrpcGatewayRouteRewrite unmarshalledObject = new GrpcGatewayRouteRewrite(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("hostname", targetDepth)) { var unmarshaller = GatewayRouteHostnameRewriteUnmarshaller.Instance; unmarshalledObject.Hostname = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GrpcGatewayRouteRewriteUnmarshaller _instance = new GrpcGatewayRouteRewriteUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GrpcGatewayRouteRewriteUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GrpcGatewayRoute Object /// </summary> public class GrpcGatewayRouteUnmarshaller : IUnmarshaller<GrpcGatewayRoute, XmlUnmarshallerContext>, IUnmarshaller<GrpcGatewayRoute, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GrpcGatewayRoute IUnmarshaller<GrpcGatewayRoute, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GrpcGatewayRoute Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GrpcGatewayRoute unmarshalledObject = new GrpcGatewayRoute(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("action", targetDepth)) { var unmarshaller = GrpcGatewayRouteActionUnmarshaller.Instance; unmarshalledObject.Action = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("match", targetDepth)) { var unmarshaller = GrpcGatewayRouteMatchUnmarshaller.Instance; unmarshalledObject.Match = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GrpcGatewayRouteUnmarshaller _instance = new GrpcGatewayRouteUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GrpcGatewayRouteUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcMetadataMatchMethod Marshaller /// </summary> public class GrpcMetadataMatchMethodMarshaller : IRequestMarshaller<GrpcMetadataMatchMethod, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcMetadataMatchMethod requestObject, JsonMarshallerContext context) { if(requestObject.IsSetExact()) { context.Writer.WritePropertyName("exact"); context.Writer.Write(requestObject.Exact); } if(requestObject.IsSetPrefix()) { context.Writer.WritePropertyName("prefix"); context.Writer.Write(requestObject.Prefix); } if(requestObject.IsSetRange()) { context.Writer.WritePropertyName("range"); context.Writer.WriteObjectStart(); var marshaller = MatchRangeMarshaller.Instance; marshaller.Marshall(requestObject.Range, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetRegex()) { context.Writer.WritePropertyName("regex"); context.Writer.Write(requestObject.Regex); } if(requestObject.IsSetSuffix()) { context.Writer.WritePropertyName("suffix"); context.Writer.Write(requestObject.Suffix); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcMetadataMatchMethodMarshaller Instance = new GrpcMetadataMatchMethodMarshaller(); } }
91
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GrpcMetadataMatchMethod Object /// </summary> public class GrpcMetadataMatchMethodUnmarshaller : IUnmarshaller<GrpcMetadataMatchMethod, XmlUnmarshallerContext>, IUnmarshaller<GrpcMetadataMatchMethod, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GrpcMetadataMatchMethod IUnmarshaller<GrpcMetadataMatchMethod, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GrpcMetadataMatchMethod Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GrpcMetadataMatchMethod unmarshalledObject = new GrpcMetadataMatchMethod(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("exact", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Exact = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("prefix", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Prefix = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("range", targetDepth)) { var unmarshaller = MatchRangeUnmarshaller.Instance; unmarshalledObject.Range = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("regex", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Regex = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("suffix", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Suffix = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GrpcMetadataMatchMethodUnmarshaller _instance = new GrpcMetadataMatchMethodUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GrpcMetadataMatchMethodUnmarshaller Instance { get { return _instance; } } } }
116
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcRetryPolicy Marshaller /// </summary> public class GrpcRetryPolicyMarshaller : IRequestMarshaller<GrpcRetryPolicy, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcRetryPolicy requestObject, JsonMarshallerContext context) { if(requestObject.IsSetGrpcRetryEvents()) { context.Writer.WritePropertyName("grpcRetryEvents"); context.Writer.WriteArrayStart(); foreach(var requestObjectGrpcRetryEventsListValue in requestObject.GrpcRetryEvents) { context.Writer.Write(requestObjectGrpcRetryEventsListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetHttpRetryEvents()) { context.Writer.WritePropertyName("httpRetryEvents"); context.Writer.WriteArrayStart(); foreach(var requestObjectHttpRetryEventsListValue in requestObject.HttpRetryEvents) { context.Writer.Write(requestObjectHttpRetryEventsListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetMaxRetries()) { context.Writer.WritePropertyName("maxRetries"); context.Writer.Write(requestObject.MaxRetries); } if(requestObject.IsSetPerRetryTimeout()) { context.Writer.WritePropertyName("perRetryTimeout"); context.Writer.WriteObjectStart(); var marshaller = DurationMarshaller.Instance; marshaller.Marshall(requestObject.PerRetryTimeout, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetTcpRetryEvents()) { context.Writer.WritePropertyName("tcpRetryEvents"); context.Writer.WriteArrayStart(); foreach(var requestObjectTcpRetryEventsListValue in requestObject.TcpRetryEvents) { context.Writer.Write(requestObjectTcpRetryEventsListValue); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcRetryPolicyMarshaller Instance = new GrpcRetryPolicyMarshaller(); } }
106
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GrpcRetryPolicy Object /// </summary> public class GrpcRetryPolicyUnmarshaller : IUnmarshaller<GrpcRetryPolicy, XmlUnmarshallerContext>, IUnmarshaller<GrpcRetryPolicy, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GrpcRetryPolicy IUnmarshaller<GrpcRetryPolicy, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GrpcRetryPolicy Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GrpcRetryPolicy unmarshalledObject = new GrpcRetryPolicy(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("grpcRetryEvents", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.GrpcRetryEvents = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("httpRetryEvents", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.HttpRetryEvents = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("maxRetries", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.MaxRetries = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("perRetryTimeout", targetDepth)) { var unmarshaller = DurationUnmarshaller.Instance; unmarshalledObject.PerRetryTimeout = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tcpRetryEvents", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.TcpRetryEvents = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GrpcRetryPolicyUnmarshaller _instance = new GrpcRetryPolicyUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GrpcRetryPolicyUnmarshaller Instance { get { return _instance; } } } }
116
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcRouteAction Marshaller /// </summary> public class GrpcRouteActionMarshaller : IRequestMarshaller<GrpcRouteAction, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcRouteAction requestObject, JsonMarshallerContext context) { if(requestObject.IsSetWeightedTargets()) { context.Writer.WritePropertyName("weightedTargets"); context.Writer.WriteArrayStart(); foreach(var requestObjectWeightedTargetsListValue in requestObject.WeightedTargets) { context.Writer.WriteObjectStart(); var marshaller = WeightedTargetMarshaller.Instance; marshaller.Marshall(requestObjectWeightedTargetsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcRouteActionMarshaller Instance = new GrpcRouteActionMarshaller(); } }
72
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GrpcRouteAction Object /// </summary> public class GrpcRouteActionUnmarshaller : IUnmarshaller<GrpcRouteAction, XmlUnmarshallerContext>, IUnmarshaller<GrpcRouteAction, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GrpcRouteAction IUnmarshaller<GrpcRouteAction, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GrpcRouteAction Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GrpcRouteAction unmarshalledObject = new GrpcRouteAction(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("weightedTargets", targetDepth)) { var unmarshaller = new ListUnmarshaller<WeightedTarget, WeightedTargetUnmarshaller>(WeightedTargetUnmarshaller.Instance); unmarshalledObject.WeightedTargets = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GrpcRouteActionUnmarshaller _instance = new GrpcRouteActionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GrpcRouteActionUnmarshaller Instance { get { return _instance; } } } }
92
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcRoute Marshaller /// </summary> public class GrpcRouteMarshaller : IRequestMarshaller<GrpcRoute, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcRoute requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAction()) { context.Writer.WritePropertyName("action"); context.Writer.WriteObjectStart(); var marshaller = GrpcRouteActionMarshaller.Instance; marshaller.Marshall(requestObject.Action, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetMatch()) { context.Writer.WritePropertyName("match"); context.Writer.WriteObjectStart(); var marshaller = GrpcRouteMatchMarshaller.Instance; marshaller.Marshall(requestObject.Match, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetRetryPolicy()) { context.Writer.WritePropertyName("retryPolicy"); context.Writer.WriteObjectStart(); var marshaller = GrpcRetryPolicyMarshaller.Instance; marshaller.Marshall(requestObject.RetryPolicy, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetTimeout()) { context.Writer.WritePropertyName("timeout"); context.Writer.WriteObjectStart(); var marshaller = GrpcTimeoutMarshaller.Instance; marshaller.Marshall(requestObject.Timeout, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcRouteMarshaller Instance = new GrpcRouteMarshaller(); } }
100
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcRouteMatch Marshaller /// </summary> public class GrpcRouteMatchMarshaller : IRequestMarshaller<GrpcRouteMatch, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcRouteMatch requestObject, JsonMarshallerContext context) { if(requestObject.IsSetMetadata()) { context.Writer.WritePropertyName("metadata"); context.Writer.WriteArrayStart(); foreach(var requestObjectMetadataListValue in requestObject.Metadata) { context.Writer.WriteObjectStart(); var marshaller = GrpcRouteMetadataMarshaller.Instance; marshaller.Marshall(requestObjectMetadataListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetMethodName()) { context.Writer.WritePropertyName("methodName"); context.Writer.Write(requestObject.MethodName); } if(requestObject.IsSetPort()) { context.Writer.WritePropertyName("port"); context.Writer.Write(requestObject.Port); } if(requestObject.IsSetServiceName()) { context.Writer.WritePropertyName("serviceName"); context.Writer.Write(requestObject.ServiceName); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcRouteMatchMarshaller Instance = new GrpcRouteMatchMarshaller(); } }
90
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GrpcRouteMatch Object /// </summary> public class GrpcRouteMatchUnmarshaller : IUnmarshaller<GrpcRouteMatch, XmlUnmarshallerContext>, IUnmarshaller<GrpcRouteMatch, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> GrpcRouteMatch IUnmarshaller<GrpcRouteMatch, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GrpcRouteMatch Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; GrpcRouteMatch unmarshalledObject = new GrpcRouteMatch(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("metadata", targetDepth)) { var unmarshaller = new ListUnmarshaller<GrpcRouteMetadata, GrpcRouteMetadataUnmarshaller>(GrpcRouteMetadataUnmarshaller.Instance); unmarshalledObject.Metadata = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("methodName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.MethodName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("port", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Port = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("serviceName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ServiceName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static GrpcRouteMatchUnmarshaller _instance = new GrpcRouteMatchUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GrpcRouteMatchUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcRouteMetadata Marshaller /// </summary> public class GrpcRouteMetadataMarshaller : IRequestMarshaller<GrpcRouteMetadata, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcRouteMetadata requestObject, JsonMarshallerContext context) { if(requestObject.IsSetInvert()) { context.Writer.WritePropertyName("invert"); context.Writer.Write(requestObject.Invert); } if(requestObject.IsSetMatch()) { context.Writer.WritePropertyName("match"); context.Writer.WriteObjectStart(); var marshaller = GrpcRouteMetadataMatchMethodMarshaller.Instance; marshaller.Marshall(requestObject.Match, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetName()) { context.Writer.WritePropertyName("name"); context.Writer.Write(requestObject.Name); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcRouteMetadataMarshaller Instance = new GrpcRouteMetadataMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * 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 appmesh-2019-01-25.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.AppMesh.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppMesh.Model.Internal.MarshallTransformations { /// <summary> /// GrpcRouteMetadataMatchMethod Marshaller /// </summary> public class GrpcRouteMetadataMatchMethodMarshaller : IRequestMarshaller<GrpcRouteMetadataMatchMethod, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(GrpcRouteMetadataMatchMethod requestObject, JsonMarshallerContext context) { if(requestObject.IsSetExact()) { context.Writer.WritePropertyName("exact"); context.Writer.Write(requestObject.Exact); } if(requestObject.IsSetPrefix()) { context.Writer.WritePropertyName("prefix"); context.Writer.Write(requestObject.Prefix); } if(requestObject.IsSetRange()) { context.Writer.WritePropertyName("range"); context.Writer.WriteObjectStart(); var marshaller = MatchRangeMarshaller.Instance; marshaller.Marshall(requestObject.Range, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetRegex()) { context.Writer.WritePropertyName("regex"); context.Writer.Write(requestObject.Regex); } if(requestObject.IsSetSuffix()) { context.Writer.WritePropertyName("suffix"); context.Writer.Write(requestObject.Suffix); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static GrpcRouteMetadataMatchMethodMarshaller Instance = new GrpcRouteMetadataMatchMethodMarshaller(); } }
91