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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// DeleteOriginRequestPolicy Request Marshaller /// </summary> public class DeleteOriginRequestPolicyRequestMarshaller : IMarshaller<IRequest, DeleteOriginRequestPolicyRequest> , 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((DeleteOriginRequestPolicyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteOriginRequestPolicyRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "DELETE"; if (publicRequest.IsSetIfMatch()) { request.Headers["If-Match"] = publicRequest.IfMatch; } if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/origin-request-policy/{Id}"; return request; } private static DeleteOriginRequestPolicyRequestMarshaller _instance = new DeleteOriginRequestPolicyRequestMarshaller(); internal static DeleteOriginRequestPolicyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteOriginRequestPolicyRequestMarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteOriginRequestPolicy operation /// </summary> public class DeleteOriginRequestPolicyResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteOriginRequestPolicyResponse response = new DeleteOriginRequestPolicyResponse(); 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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalDelete")) { return IllegalDeleteExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidIfMatchVersion")) { return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchOriginRequestPolicy")) { return NoSuchOriginRequestPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OriginRequestPolicyInUse")) { return OriginRequestPolicyInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("PreconditionFailed")) { return PreconditionFailedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeleteOriginRequestPolicyResponseUnmarshaller _instance = new DeleteOriginRequestPolicyResponseUnmarshaller(); internal static DeleteOriginRequestPolicyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteOriginRequestPolicyResponseUnmarshaller Instance { get { return _instance; } } } }
118
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// DeletePublicKey Request Marshaller /// </summary> public class DeletePublicKeyRequestMarshaller : IMarshaller<IRequest, DeletePublicKeyRequest> , 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((DeletePublicKeyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeletePublicKeyRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "DELETE"; if (publicRequest.IsSetIfMatch()) { request.Headers["If-Match"] = publicRequest.IfMatch; } if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/public-key/{Id}"; return request; } private static DeletePublicKeyRequestMarshaller _instance = new DeletePublicKeyRequestMarshaller(); internal static DeletePublicKeyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeletePublicKeyRequestMarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeletePublicKey operation /// </summary> public class DeletePublicKeyResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeletePublicKeyResponse response = new DeletePublicKeyResponse(); 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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidIfMatchVersion")) { return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchPublicKey")) { return NoSuchPublicKeyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("PreconditionFailed")) { return PreconditionFailedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("PublicKeyInUse")) { return PublicKeyInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeletePublicKeyResponseUnmarshaller _instance = new DeletePublicKeyResponseUnmarshaller(); internal static DeletePublicKeyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeletePublicKeyResponseUnmarshaller Instance { get { return _instance; } } } }
114
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// DeleteRealtimeLogConfig Request Marshaller /// </summary> public class DeleteRealtimeLogConfigRequestMarshaller : IMarshaller<IRequest, DeleteRealtimeLogConfigRequest> , 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((DeleteRealtimeLogConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteRealtimeLogConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "POST"; request.ResourcePath = "/2020-05-31/delete-realtime-log-config/"; var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture); using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) { xmlWriter.WriteStartElement("DeleteRealtimeLogConfigRequest", "http://cloudfront.amazonaws.com/doc/2020-05-31/"); if(publicRequest.IsSetARN()) xmlWriter.WriteElementString("ARN", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ARN)); if(publicRequest.IsSetName()) xmlWriter.WriteElementString("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.Name)); xmlWriter.WriteEndElement(); } try { string content = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(content); request.Headers["Content-Type"] = "application/xml"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-05-31"; } catch (EncoderFallbackException e) { throw new AmazonServiceException("Unable to marshall request to XML", e); } return request; } private static DeleteRealtimeLogConfigRequestMarshaller _instance = new DeleteRealtimeLogConfigRequestMarshaller(); internal static DeleteRealtimeLogConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteRealtimeLogConfigRequestMarshaller Instance { get { return _instance; } } } }
107
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteRealtimeLogConfig operation /// </summary> public class DeleteRealtimeLogConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteRealtimeLogConfigResponse response = new DeleteRealtimeLogConfigResponse(); 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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArgument")) { return InvalidArgumentExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchRealtimeLogConfig")) { return NoSuchRealtimeLogConfigExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RealtimeLogConfigInUse")) { return RealtimeLogConfigInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeleteRealtimeLogConfigResponseUnmarshaller _instance = new DeleteRealtimeLogConfigResponseUnmarshaller(); internal static DeleteRealtimeLogConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteRealtimeLogConfigResponseUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// DeleteResponseHeadersPolicy Request Marshaller /// </summary> public class DeleteResponseHeadersPolicyRequestMarshaller : IMarshaller<IRequest, DeleteResponseHeadersPolicyRequest> , 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((DeleteResponseHeadersPolicyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteResponseHeadersPolicyRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "DELETE"; if (publicRequest.IsSetIfMatch()) { request.Headers["If-Match"] = publicRequest.IfMatch; } if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/response-headers-policy/{Id}"; return request; } private static DeleteResponseHeadersPolicyRequestMarshaller _instance = new DeleteResponseHeadersPolicyRequestMarshaller(); internal static DeleteResponseHeadersPolicyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteResponseHeadersPolicyRequestMarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteResponseHeadersPolicy operation /// </summary> public class DeleteResponseHeadersPolicyResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteResponseHeadersPolicyResponse response = new DeleteResponseHeadersPolicyResponse(); 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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalDelete")) { return IllegalDeleteExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidIfMatchVersion")) { return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchResponseHeadersPolicy")) { return NoSuchResponseHeadersPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("PreconditionFailed")) { return PreconditionFailedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResponseHeadersPolicyInUse")) { return ResponseHeadersPolicyInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeleteResponseHeadersPolicyResponseUnmarshaller _instance = new DeleteResponseHeadersPolicyResponseUnmarshaller(); internal static DeleteResponseHeadersPolicyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteResponseHeadersPolicyResponseUnmarshaller Instance { get { return _instance; } } } }
118
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// DeleteStreamingDistribution Request Marshaller /// </summary> public class DeleteStreamingDistributionRequestMarshaller : IMarshaller<IRequest, DeleteStreamingDistributionRequest> , 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((DeleteStreamingDistributionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteStreamingDistributionRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "DELETE"; if (publicRequest.IsSetIfMatch()) { request.Headers["If-Match"] = publicRequest.IfMatch; } if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/streaming-distribution/{Id}"; return request; } private static DeleteStreamingDistributionRequestMarshaller _instance = new DeleteStreamingDistributionRequestMarshaller(); internal static DeleteStreamingDistributionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteStreamingDistributionRequestMarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteStreamingDistribution operation /// </summary> public class DeleteStreamingDistributionResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DeleteStreamingDistributionResponse response = new DeleteStreamingDistributionResponse(); 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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidIfMatchVersion")) { return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchStreamingDistribution")) { return NoSuchStreamingDistributionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("PreconditionFailed")) { return PreconditionFailedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("StreamingDistributionNotDisabled")) { return StreamingDistributionNotDisabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DeleteStreamingDistributionResponseUnmarshaller _instance = new DeleteStreamingDistributionResponseUnmarshaller(); internal static DeleteStreamingDistributionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteStreamingDistributionResponseUnmarshaller Instance { get { return _instance; } } } }
114
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// DescribeFunction Request Marshaller /// </summary> public class DescribeFunctionRequestMarshaller : IMarshaller<IRequest, DescribeFunctionRequest> , 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((DescribeFunctionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DescribeFunctionRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetName()) throw new AmazonCloudFrontException("Request object does not have required field Name set"); request.AddPathResource("{Name}", StringUtils.FromString(publicRequest.Name)); if (publicRequest.IsSetStage()) request.Parameters.Add("Stage", StringUtils.FromString(publicRequest.Stage)); request.ResourcePath = "/2020-05-31/function/{Name}/describe"; request.UseQueryString = true; return request; } private static DescribeFunctionRequestMarshaller _instance = new DescribeFunctionRequestMarshaller(); internal static DescribeFunctionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeFunctionRequestMarshaller Instance { get { return _instance; } } } }
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DescribeFunction operation /// </summary> public class DescribeFunctionResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeFunctionResponse response = new DescribeFunctionResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeFunctionResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FunctionSummary", targetDepth)) { var unmarshaller = FunctionSummaryUnmarshaller.Instance; response.FunctionSummary = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchFunctionExists")) { return NoSuchFunctionExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedOperation")) { return UnsupportedOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static DescribeFunctionResponseUnmarshaller _instance = new DescribeFunctionResponseUnmarshaller(); internal static DescribeFunctionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DescribeFunctionResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DistributionAlreadyExistsException operation /// </summary> public class DistributionAlreadyExistsExceptionUnmarshaller : IErrorResponseUnmarshaller<DistributionAlreadyExistsException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DistributionAlreadyExistsException Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public DistributionAlreadyExistsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { DistributionAlreadyExistsException response = new DistributionAlreadyExistsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static DistributionAlreadyExistsExceptionUnmarshaller _instance = new DistributionAlreadyExistsExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DistributionAlreadyExistsExceptionUnmarshaller Instance { get { return _instance; } } } }
83
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DistributionConfig Object /// </summary> public class DistributionConfigUnmarshaller : IUnmarshaller<DistributionConfig, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DistributionConfig Unmarshall(XmlUnmarshallerContext context) { DistributionConfig unmarshalledObject = new DistributionConfig(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Aliases", targetDepth)) { var unmarshaller = AliasesUnmarshaller.Instance; unmarshalledObject.Aliases = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CacheBehaviors", targetDepth)) { var unmarshaller = CacheBehaviorsUnmarshaller.Instance; unmarshalledObject.CacheBehaviors = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CallerReference", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CallerReference = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Comment", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Comment = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ContinuousDeploymentPolicyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ContinuousDeploymentPolicyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CustomErrorResponses", targetDepth)) { var unmarshaller = CustomErrorResponsesUnmarshaller.Instance; unmarshalledObject.CustomErrorResponses = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DefaultCacheBehavior", targetDepth)) { var unmarshaller = DefaultCacheBehaviorUnmarshaller.Instance; unmarshalledObject.DefaultCacheBehavior = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DefaultRootObject", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DefaultRootObject = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Enabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Enabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HttpVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.HttpVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IsIPV6Enabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsIPV6Enabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Logging", targetDepth)) { var unmarshaller = LoggingConfigUnmarshaller.Instance; unmarshalledObject.Logging = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OriginGroups", targetDepth)) { var unmarshaller = OriginGroupsUnmarshaller.Instance; unmarshalledObject.OriginGroups = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Origins", targetDepth)) { var unmarshaller = OriginsUnmarshaller.Instance; unmarshalledObject.Origins = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PriceClass", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PriceClass = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Restrictions", targetDepth)) { var unmarshaller = RestrictionsUnmarshaller.Instance; unmarshalledObject.Restrictions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Staging", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Staging = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ViewerCertificate", targetDepth)) { var unmarshaller = ViewerCertificateUnmarshaller.Instance; unmarshalledObject.ViewerCertificate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("WebACLId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.WebACLId = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static DistributionConfigUnmarshaller _instance = new DistributionConfigUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DistributionConfigUnmarshaller Instance { get { return _instance; } } } }
194
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DistributionIdList Object /// </summary> public class DistributionIdListUnmarshaller : IUnmarshaller<DistributionIdList, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DistributionIdList Unmarshall(XmlUnmarshallerContext context) { DistributionIdList unmarshalledObject = new DistributionIdList(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("IsTruncated", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsTruncated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Items/DistributionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Items.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("Marker", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Marker = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxItems", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaxItems = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextMarker", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextMarker = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Quantity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Quantity = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static DistributionIdListUnmarshaller _instance = new DistributionIdListUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DistributionIdListUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DistributionList Object /// </summary> public class DistributionListUnmarshaller : IUnmarshaller<DistributionList, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DistributionList Unmarshall(XmlUnmarshallerContext context) { DistributionList unmarshalledObject = new DistributionList(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("IsTruncated", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsTruncated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Items/DistributionSummary", targetDepth)) { var unmarshaller = DistributionSummaryUnmarshaller.Instance; unmarshalledObject.Items.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("Marker", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Marker = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxItems", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaxItems = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextMarker", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextMarker = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Quantity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Quantity = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static DistributionListUnmarshaller _instance = new DistributionListUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DistributionListUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DistributionNotDisabledException operation /// </summary> public class DistributionNotDisabledExceptionUnmarshaller : IErrorResponseUnmarshaller<DistributionNotDisabledException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DistributionNotDisabledException Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public DistributionNotDisabledException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { DistributionNotDisabledException response = new DistributionNotDisabledException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static DistributionNotDisabledExceptionUnmarshaller _instance = new DistributionNotDisabledExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DistributionNotDisabledExceptionUnmarshaller Instance { get { return _instance; } } } }
83
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DistributionSummary Object /// </summary> public class DistributionSummaryUnmarshaller : IUnmarshaller<DistributionSummary, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DistributionSummary Unmarshall(XmlUnmarshallerContext context) { DistributionSummary unmarshalledObject = new DistributionSummary(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Aliases", targetDepth)) { var unmarshaller = AliasesUnmarshaller.Instance; unmarshalledObject.Aliases = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AliasICPRecordals/AliasICPRecordal", targetDepth)) { var unmarshaller = AliasICPRecordalUnmarshaller.Instance; unmarshalledObject.AliasICPRecordals.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("ARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CacheBehaviors", targetDepth)) { var unmarshaller = CacheBehaviorsUnmarshaller.Instance; unmarshalledObject.CacheBehaviors = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Comment", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Comment = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CustomErrorResponses", targetDepth)) { var unmarshaller = CustomErrorResponsesUnmarshaller.Instance; unmarshalledObject.CustomErrorResponses = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DefaultCacheBehavior", targetDepth)) { var unmarshaller = DefaultCacheBehaviorUnmarshaller.Instance; unmarshalledObject.DefaultCacheBehavior = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DomainName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DomainName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Enabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Enabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HttpVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.HttpVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IsIPV6Enabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsIPV6Enabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastModifiedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OriginGroups", targetDepth)) { var unmarshaller = OriginGroupsUnmarshaller.Instance; unmarshalledObject.OriginGroups = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Origins", targetDepth)) { var unmarshaller = OriginsUnmarshaller.Instance; unmarshalledObject.Origins = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PriceClass", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PriceClass = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Restrictions", targetDepth)) { var unmarshaller = RestrictionsUnmarshaller.Instance; unmarshalledObject.Restrictions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Staging", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Staging = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ViewerCertificate", targetDepth)) { var unmarshaller = ViewerCertificateUnmarshaller.Instance; unmarshalledObject.ViewerCertificate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("WebACLId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.WebACLId = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static DistributionSummaryUnmarshaller _instance = new DistributionSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DistributionSummaryUnmarshaller Instance { get { return _instance; } } } }
206
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Distribution Object /// </summary> public class DistributionUnmarshaller : IUnmarshaller<Distribution, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Distribution Unmarshall(XmlUnmarshallerContext context) { Distribution unmarshalledObject = new Distribution(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ActiveTrustedKeyGroups", targetDepth)) { var unmarshaller = ActiveTrustedKeyGroupsUnmarshaller.Instance; unmarshalledObject.ActiveTrustedKeyGroups = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ActiveTrustedSigners", targetDepth)) { var unmarshaller = ActiveTrustedSignersUnmarshaller.Instance; unmarshalledObject.ActiveTrustedSigners = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AliasICPRecordals/AliasICPRecordal", targetDepth)) { var unmarshaller = AliasICPRecordalUnmarshaller.Instance; unmarshalledObject.AliasICPRecordals.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("ARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DistributionConfig", targetDepth)) { var unmarshaller = DistributionConfigUnmarshaller.Instance; unmarshalledObject.DistributionConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DomainName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DomainName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("InProgressInvalidationBatches", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.InProgressInvalidationBatches = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastModifiedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static DistributionUnmarshaller _instance = new DistributionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DistributionUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for EncryptionEntities Object /// </summary> public class EncryptionEntitiesUnmarshaller : IUnmarshaller<EncryptionEntities, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public EncryptionEntities Unmarshall(XmlUnmarshallerContext context) { EncryptionEntities unmarshalledObject = new EncryptionEntities(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Items/EncryptionEntity", targetDepth)) { var unmarshaller = EncryptionEntityUnmarshaller.Instance; unmarshalledObject.Items.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("Quantity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Quantity = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static EncryptionEntitiesUnmarshaller _instance = new EncryptionEntitiesUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static EncryptionEntitiesUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for EncryptionEntity Object /// </summary> public class EncryptionEntityUnmarshaller : IUnmarshaller<EncryptionEntity, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public EncryptionEntity Unmarshall(XmlUnmarshallerContext context) { EncryptionEntity unmarshalledObject = new EncryptionEntity(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FieldPatterns", targetDepth)) { var unmarshaller = FieldPatternsUnmarshaller.Instance; unmarshalledObject.FieldPatterns = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProviderId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ProviderId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PublicKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PublicKeyId = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static EncryptionEntityUnmarshaller _instance = new EncryptionEntityUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static EncryptionEntityUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for EndPoint Object /// </summary> public class EndPointUnmarshaller : IUnmarshaller<EndPoint, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public EndPoint Unmarshall(XmlUnmarshallerContext context) { EndPoint unmarshalledObject = new EndPoint(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("KinesisStreamConfig", targetDepth)) { var unmarshaller = KinesisStreamConfigUnmarshaller.Instance; unmarshalledObject.KinesisStreamConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StreamType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StreamType = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static EndPointUnmarshaller _instance = new EndPointUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static EndPointUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionConfigAlreadyExistsException operation /// </summary> public class FieldLevelEncryptionConfigAlreadyExistsExceptionUnmarshaller : IErrorResponseUnmarshaller<FieldLevelEncryptionConfigAlreadyExistsException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionConfigAlreadyExistsException Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FieldLevelEncryptionConfigAlreadyExistsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { FieldLevelEncryptionConfigAlreadyExistsException response = new FieldLevelEncryptionConfigAlreadyExistsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static FieldLevelEncryptionConfigAlreadyExistsExceptionUnmarshaller _instance = new FieldLevelEncryptionConfigAlreadyExistsExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionConfigAlreadyExistsExceptionUnmarshaller Instance { get { return _instance; } } } }
83
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionConfigInUseException operation /// </summary> public class FieldLevelEncryptionConfigInUseExceptionUnmarshaller : IErrorResponseUnmarshaller<FieldLevelEncryptionConfigInUseException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionConfigInUseException Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FieldLevelEncryptionConfigInUseException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { FieldLevelEncryptionConfigInUseException response = new FieldLevelEncryptionConfigInUseException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static FieldLevelEncryptionConfigInUseExceptionUnmarshaller _instance = new FieldLevelEncryptionConfigInUseExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionConfigInUseExceptionUnmarshaller Instance { get { return _instance; } } } }
83
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionConfig Object /// </summary> public class FieldLevelEncryptionConfigUnmarshaller : IUnmarshaller<FieldLevelEncryptionConfig, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionConfig Unmarshall(XmlUnmarshallerContext context) { FieldLevelEncryptionConfig unmarshalledObject = new FieldLevelEncryptionConfig(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CallerReference", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CallerReference = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Comment", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Comment = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ContentTypeProfileConfig", targetDepth)) { var unmarshaller = ContentTypeProfileConfigUnmarshaller.Instance; unmarshalledObject.ContentTypeProfileConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("QueryArgProfileConfig", targetDepth)) { var unmarshaller = QueryArgProfileConfigUnmarshaller.Instance; unmarshalledObject.QueryArgProfileConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FieldLevelEncryptionConfigUnmarshaller _instance = new FieldLevelEncryptionConfigUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionConfigUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionList Object /// </summary> public class FieldLevelEncryptionListUnmarshaller : IUnmarshaller<FieldLevelEncryptionList, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionList Unmarshall(XmlUnmarshallerContext context) { FieldLevelEncryptionList unmarshalledObject = new FieldLevelEncryptionList(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Items/FieldLevelEncryptionSummary", targetDepth)) { var unmarshaller = FieldLevelEncryptionSummaryUnmarshaller.Instance; unmarshalledObject.Items.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("MaxItems", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaxItems = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextMarker", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextMarker = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Quantity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Quantity = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FieldLevelEncryptionListUnmarshaller _instance = new FieldLevelEncryptionListUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionListUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionProfileAlreadyExistsException operation /// </summary> public class FieldLevelEncryptionProfileAlreadyExistsExceptionUnmarshaller : IErrorResponseUnmarshaller<FieldLevelEncryptionProfileAlreadyExistsException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionProfileAlreadyExistsException Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FieldLevelEncryptionProfileAlreadyExistsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { FieldLevelEncryptionProfileAlreadyExistsException response = new FieldLevelEncryptionProfileAlreadyExistsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static FieldLevelEncryptionProfileAlreadyExistsExceptionUnmarshaller _instance = new FieldLevelEncryptionProfileAlreadyExistsExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionProfileAlreadyExistsExceptionUnmarshaller Instance { get { return _instance; } } } }
83
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionProfileConfig Object /// </summary> public class FieldLevelEncryptionProfileConfigUnmarshaller : IUnmarshaller<FieldLevelEncryptionProfileConfig, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionProfileConfig Unmarshall(XmlUnmarshallerContext context) { FieldLevelEncryptionProfileConfig unmarshalledObject = new FieldLevelEncryptionProfileConfig(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CallerReference", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CallerReference = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Comment", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Comment = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EncryptionEntities", targetDepth)) { var unmarshaller = EncryptionEntitiesUnmarshaller.Instance; unmarshalledObject.EncryptionEntities = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FieldLevelEncryptionProfileConfigUnmarshaller _instance = new FieldLevelEncryptionProfileConfigUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionProfileConfigUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionProfileInUseException operation /// </summary> public class FieldLevelEncryptionProfileInUseExceptionUnmarshaller : IErrorResponseUnmarshaller<FieldLevelEncryptionProfileInUseException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionProfileInUseException Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FieldLevelEncryptionProfileInUseException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { FieldLevelEncryptionProfileInUseException response = new FieldLevelEncryptionProfileInUseException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static FieldLevelEncryptionProfileInUseExceptionUnmarshaller _instance = new FieldLevelEncryptionProfileInUseExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionProfileInUseExceptionUnmarshaller Instance { get { return _instance; } } } }
83
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionProfileList Object /// </summary> public class FieldLevelEncryptionProfileListUnmarshaller : IUnmarshaller<FieldLevelEncryptionProfileList, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionProfileList Unmarshall(XmlUnmarshallerContext context) { FieldLevelEncryptionProfileList unmarshalledObject = new FieldLevelEncryptionProfileList(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Items/FieldLevelEncryptionProfileSummary", targetDepth)) { var unmarshaller = FieldLevelEncryptionProfileSummaryUnmarshaller.Instance; unmarshalledObject.Items.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("MaxItems", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaxItems = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextMarker", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextMarker = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Quantity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Quantity = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FieldLevelEncryptionProfileListUnmarshaller _instance = new FieldLevelEncryptionProfileListUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionProfileListUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionProfileSizeExceededException operation /// </summary> public class FieldLevelEncryptionProfileSizeExceededExceptionUnmarshaller : IErrorResponseUnmarshaller<FieldLevelEncryptionProfileSizeExceededException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionProfileSizeExceededException Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FieldLevelEncryptionProfileSizeExceededException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { FieldLevelEncryptionProfileSizeExceededException response = new FieldLevelEncryptionProfileSizeExceededException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static FieldLevelEncryptionProfileSizeExceededExceptionUnmarshaller _instance = new FieldLevelEncryptionProfileSizeExceededExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionProfileSizeExceededExceptionUnmarshaller Instance { get { return _instance; } } } }
83
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionProfileSummary Object /// </summary> public class FieldLevelEncryptionProfileSummaryUnmarshaller : IUnmarshaller<FieldLevelEncryptionProfileSummary, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionProfileSummary Unmarshall(XmlUnmarshallerContext context) { FieldLevelEncryptionProfileSummary unmarshalledObject = new FieldLevelEncryptionProfileSummary(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Comment", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Comment = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EncryptionEntities", targetDepth)) { var unmarshaller = EncryptionEntitiesUnmarshaller.Instance; unmarshalledObject.EncryptionEntities = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastModifiedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FieldLevelEncryptionProfileSummaryUnmarshaller _instance = new FieldLevelEncryptionProfileSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionProfileSummaryUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionProfile Object /// </summary> public class FieldLevelEncryptionProfileUnmarshaller : IUnmarshaller<FieldLevelEncryptionProfile, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionProfile Unmarshall(XmlUnmarshallerContext context) { FieldLevelEncryptionProfile unmarshalledObject = new FieldLevelEncryptionProfile(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FieldLevelEncryptionProfileConfig", targetDepth)) { var unmarshaller = FieldLevelEncryptionProfileConfigUnmarshaller.Instance; unmarshalledObject.FieldLevelEncryptionProfileConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastModifiedTime = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FieldLevelEncryptionProfileUnmarshaller _instance = new FieldLevelEncryptionProfileUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionProfileUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryptionSummary Object /// </summary> public class FieldLevelEncryptionSummaryUnmarshaller : IUnmarshaller<FieldLevelEncryptionSummary, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryptionSummary Unmarshall(XmlUnmarshallerContext context) { FieldLevelEncryptionSummary unmarshalledObject = new FieldLevelEncryptionSummary(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Comment", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Comment = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ContentTypeProfileConfig", targetDepth)) { var unmarshaller = ContentTypeProfileConfigUnmarshaller.Instance; unmarshalledObject.ContentTypeProfileConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastModifiedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("QueryArgProfileConfig", targetDepth)) { var unmarshaller = QueryArgProfileConfigUnmarshaller.Instance; unmarshalledObject.QueryArgProfileConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FieldLevelEncryptionSummaryUnmarshaller _instance = new FieldLevelEncryptionSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionSummaryUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldLevelEncryption Object /// </summary> public class FieldLevelEncryptionUnmarshaller : IUnmarshaller<FieldLevelEncryption, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldLevelEncryption Unmarshall(XmlUnmarshallerContext context) { FieldLevelEncryption unmarshalledObject = new FieldLevelEncryption(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FieldLevelEncryptionConfig", targetDepth)) { var unmarshaller = FieldLevelEncryptionConfigUnmarshaller.Instance; unmarshalledObject.FieldLevelEncryptionConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastModifiedTime = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FieldLevelEncryptionUnmarshaller _instance = new FieldLevelEncryptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldLevelEncryptionUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FieldPatterns Object /// </summary> public class FieldPatternsUnmarshaller : IUnmarshaller<FieldPatterns, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FieldPatterns Unmarshall(XmlUnmarshallerContext context) { FieldPatterns unmarshalledObject = new FieldPatterns(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Items/FieldPattern", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Items.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("Quantity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Quantity = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FieldPatternsUnmarshaller _instance = new FieldPatternsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FieldPatternsUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ForwardedValues Object /// </summary> public class ForwardedValuesUnmarshaller : IUnmarshaller<ForwardedValues, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ForwardedValues Unmarshall(XmlUnmarshallerContext context) { ForwardedValues unmarshalledObject = new ForwardedValues(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Cookies", targetDepth)) { var unmarshaller = CookiePreferenceUnmarshaller.Instance; unmarshalledObject.Cookies = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Headers", targetDepth)) { var unmarshaller = HeadersUnmarshaller.Instance; unmarshalledObject.Headers = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("QueryString", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.QueryString = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("QueryStringCacheKeys", targetDepth)) { var unmarshaller = QueryStringCacheKeysUnmarshaller.Instance; unmarshalledObject.QueryStringCacheKeys = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static ForwardedValuesUnmarshaller _instance = new ForwardedValuesUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ForwardedValuesUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FunctionAlreadyExistsException operation /// </summary> public class FunctionAlreadyExistsExceptionUnmarshaller : IErrorResponseUnmarshaller<FunctionAlreadyExistsException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FunctionAlreadyExistsException Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FunctionAlreadyExistsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { FunctionAlreadyExistsException response = new FunctionAlreadyExistsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static FunctionAlreadyExistsExceptionUnmarshaller _instance = new FunctionAlreadyExistsExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FunctionAlreadyExistsExceptionUnmarshaller Instance { get { return _instance; } } } }
83
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FunctionAssociations Object /// </summary> public class FunctionAssociationsUnmarshaller : IUnmarshaller<FunctionAssociations, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FunctionAssociations Unmarshall(XmlUnmarshallerContext context) { FunctionAssociations unmarshalledObject = new FunctionAssociations(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Items/FunctionAssociation", targetDepth)) { var unmarshaller = FunctionAssociationUnmarshaller.Instance; unmarshalledObject.Items.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("Quantity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Quantity = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FunctionAssociationsUnmarshaller _instance = new FunctionAssociationsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FunctionAssociationsUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FunctionAssociation Object /// </summary> public class FunctionAssociationUnmarshaller : IUnmarshaller<FunctionAssociation, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FunctionAssociation Unmarshall(XmlUnmarshallerContext context) { FunctionAssociation unmarshalledObject = new FunctionAssociation(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("EventType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EventType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FunctionARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FunctionARN = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FunctionAssociationUnmarshaller _instance = new FunctionAssociationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FunctionAssociationUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FunctionConfig Object /// </summary> public class FunctionConfigUnmarshaller : IUnmarshaller<FunctionConfig, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FunctionConfig Unmarshall(XmlUnmarshallerContext context) { FunctionConfig unmarshalledObject = new FunctionConfig(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Comment", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Comment = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Runtime", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Runtime = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FunctionConfigUnmarshaller _instance = new FunctionConfigUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FunctionConfigUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FunctionInUseException operation /// </summary> public class FunctionInUseExceptionUnmarshaller : IErrorResponseUnmarshaller<FunctionInUseException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FunctionInUseException Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FunctionInUseException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { FunctionInUseException response = new FunctionInUseException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static FunctionInUseExceptionUnmarshaller _instance = new FunctionInUseExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FunctionInUseExceptionUnmarshaller Instance { get { return _instance; } } } }
83
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FunctionList Object /// </summary> public class FunctionListUnmarshaller : IUnmarshaller<FunctionList, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FunctionList Unmarshall(XmlUnmarshallerContext context) { FunctionList unmarshalledObject = new FunctionList(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Items/FunctionSummary", targetDepth)) { var unmarshaller = FunctionSummaryUnmarshaller.Instance; unmarshalledObject.Items.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("MaxItems", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaxItems = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextMarker", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextMarker = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Quantity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Quantity = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FunctionListUnmarshaller _instance = new FunctionListUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FunctionListUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FunctionMetadata Object /// </summary> public class FunctionMetadataUnmarshaller : IUnmarshaller<FunctionMetadata, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FunctionMetadata Unmarshall(XmlUnmarshallerContext context) { FunctionMetadata unmarshalledObject = new FunctionMetadata(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CreatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FunctionARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FunctionARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastModifiedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Stage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Stage = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FunctionMetadataUnmarshaller _instance = new FunctionMetadataUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FunctionMetadataUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FunctionSizeLimitExceededException operation /// </summary> public class FunctionSizeLimitExceededExceptionUnmarshaller : IErrorResponseUnmarshaller<FunctionSizeLimitExceededException, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FunctionSizeLimitExceededException Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FunctionSizeLimitExceededException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { FunctionSizeLimitExceededException response = new FunctionSizeLimitExceededException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { } } return response; } private static FunctionSizeLimitExceededExceptionUnmarshaller _instance = new FunctionSizeLimitExceededExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FunctionSizeLimitExceededExceptionUnmarshaller Instance { get { return _instance; } } } }
83
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FunctionSummary Object /// </summary> public class FunctionSummaryUnmarshaller : IUnmarshaller<FunctionSummary, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FunctionSummary Unmarshall(XmlUnmarshallerContext context) { FunctionSummary unmarshalledObject = new FunctionSummary(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FunctionConfig", targetDepth)) { var unmarshaller = FunctionConfigUnmarshaller.Instance; unmarshalledObject.FunctionConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FunctionMetadata", targetDepth)) { var unmarshaller = FunctionMetadataUnmarshaller.Instance; unmarshalledObject.FunctionMetadata = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static FunctionSummaryUnmarshaller _instance = new FunctionSummaryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FunctionSummaryUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GeoRestriction Object /// </summary> public class GeoRestrictionUnmarshaller : IUnmarshaller<GeoRestriction, XmlUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GeoRestriction Unmarshall(XmlUnmarshallerContext context) { GeoRestriction unmarshalledObject = new GeoRestriction(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Items/Location", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Items.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("Quantity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Quantity = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RestrictionType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RestrictionType = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } private static GeoRestrictionUnmarshaller _instance = new GeoRestrictionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static GeoRestrictionUnmarshaller 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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetCachePolicyConfig Request Marshaller /// </summary> public class GetCachePolicyConfigRequestMarshaller : IMarshaller<IRequest, GetCachePolicyConfigRequest> , 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((GetCachePolicyConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetCachePolicyConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/cache-policy/{Id}/config"; return request; } private static GetCachePolicyConfigRequestMarshaller _instance = new GetCachePolicyConfigRequestMarshaller(); internal static GetCachePolicyConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetCachePolicyConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetCachePolicyConfig operation /// </summary> public class GetCachePolicyConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetCachePolicyConfigResponse response = new GetCachePolicyConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetCachePolicyConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CachePolicyConfig", targetDepth)) { var unmarshaller = CachePolicyConfigUnmarshaller.Instance; response.CachePolicyConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchCachePolicy")) { return NoSuchCachePolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetCachePolicyConfigResponseUnmarshaller _instance = new GetCachePolicyConfigResponseUnmarshaller(); internal static GetCachePolicyConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetCachePolicyConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetCachePolicy Request Marshaller /// </summary> public class GetCachePolicyRequestMarshaller : IMarshaller<IRequest, GetCachePolicyRequest> , 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((GetCachePolicyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetCachePolicyRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/cache-policy/{Id}"; return request; } private static GetCachePolicyRequestMarshaller _instance = new GetCachePolicyRequestMarshaller(); internal static GetCachePolicyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetCachePolicyRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetCachePolicy operation /// </summary> public class GetCachePolicyResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetCachePolicyResponse response = new GetCachePolicyResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetCachePolicyResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CachePolicy", targetDepth)) { var unmarshaller = CachePolicyUnmarshaller.Instance; response.CachePolicy = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchCachePolicy")) { return NoSuchCachePolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetCachePolicyResponseUnmarshaller _instance = new GetCachePolicyResponseUnmarshaller(); internal static GetCachePolicyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetCachePolicyResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetCloudFrontOriginAccessIdentityConfig Request Marshaller /// </summary> public class GetCloudFrontOriginAccessIdentityConfigRequestMarshaller : IMarshaller<IRequest, GetCloudFrontOriginAccessIdentityConfigRequest> , 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((GetCloudFrontOriginAccessIdentityConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetCloudFrontOriginAccessIdentityConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/origin-access-identity/cloudfront/{Id}/config"; return request; } private static GetCloudFrontOriginAccessIdentityConfigRequestMarshaller _instance = new GetCloudFrontOriginAccessIdentityConfigRequestMarshaller(); internal static GetCloudFrontOriginAccessIdentityConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetCloudFrontOriginAccessIdentityConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetCloudFrontOriginAccessIdentityConfig operation /// </summary> public class GetCloudFrontOriginAccessIdentityConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetCloudFrontOriginAccessIdentityConfigResponse response = new GetCloudFrontOriginAccessIdentityConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetCloudFrontOriginAccessIdentityConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CloudFrontOriginAccessIdentityConfig", targetDepth)) { var unmarshaller = CloudFrontOriginAccessIdentityConfigUnmarshaller.Instance; response.CloudFrontOriginAccessIdentityConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchCloudFrontOriginAccessIdentity")) { return NoSuchCloudFrontOriginAccessIdentityExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetCloudFrontOriginAccessIdentityConfigResponseUnmarshaller _instance = new GetCloudFrontOriginAccessIdentityConfigResponseUnmarshaller(); internal static GetCloudFrontOriginAccessIdentityConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetCloudFrontOriginAccessIdentityConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetCloudFrontOriginAccessIdentity Request Marshaller /// </summary> public class GetCloudFrontOriginAccessIdentityRequestMarshaller : IMarshaller<IRequest, GetCloudFrontOriginAccessIdentityRequest> , 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((GetCloudFrontOriginAccessIdentityRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetCloudFrontOriginAccessIdentityRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/origin-access-identity/cloudfront/{Id}"; return request; } private static GetCloudFrontOriginAccessIdentityRequestMarshaller _instance = new GetCloudFrontOriginAccessIdentityRequestMarshaller(); internal static GetCloudFrontOriginAccessIdentityRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetCloudFrontOriginAccessIdentityRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetCloudFrontOriginAccessIdentity operation /// </summary> public class GetCloudFrontOriginAccessIdentityResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetCloudFrontOriginAccessIdentityResponse response = new GetCloudFrontOriginAccessIdentityResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetCloudFrontOriginAccessIdentityResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CloudFrontOriginAccessIdentity", targetDepth)) { var unmarshaller = CloudFrontOriginAccessIdentityUnmarshaller.Instance; response.CloudFrontOriginAccessIdentity = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchCloudFrontOriginAccessIdentity")) { return NoSuchCloudFrontOriginAccessIdentityExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetCloudFrontOriginAccessIdentityResponseUnmarshaller _instance = new GetCloudFrontOriginAccessIdentityResponseUnmarshaller(); internal static GetCloudFrontOriginAccessIdentityResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetCloudFrontOriginAccessIdentityResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetContinuousDeploymentPolicyConfig Request Marshaller /// </summary> public class GetContinuousDeploymentPolicyConfigRequestMarshaller : IMarshaller<IRequest, GetContinuousDeploymentPolicyConfigRequest> , 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((GetContinuousDeploymentPolicyConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetContinuousDeploymentPolicyConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/continuous-deployment-policy/{Id}/config"; return request; } private static GetContinuousDeploymentPolicyConfigRequestMarshaller _instance = new GetContinuousDeploymentPolicyConfigRequestMarshaller(); internal static GetContinuousDeploymentPolicyConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetContinuousDeploymentPolicyConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetContinuousDeploymentPolicyConfig operation /// </summary> public class GetContinuousDeploymentPolicyConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetContinuousDeploymentPolicyConfigResponse response = new GetContinuousDeploymentPolicyConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetContinuousDeploymentPolicyConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ContinuousDeploymentPolicyConfig", targetDepth)) { var unmarshaller = ContinuousDeploymentPolicyConfigUnmarshaller.Instance; response.ContinuousDeploymentPolicyConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchContinuousDeploymentPolicy")) { return NoSuchContinuousDeploymentPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetContinuousDeploymentPolicyConfigResponseUnmarshaller _instance = new GetContinuousDeploymentPolicyConfigResponseUnmarshaller(); internal static GetContinuousDeploymentPolicyConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetContinuousDeploymentPolicyConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetContinuousDeploymentPolicy Request Marshaller /// </summary> public class GetContinuousDeploymentPolicyRequestMarshaller : IMarshaller<IRequest, GetContinuousDeploymentPolicyRequest> , 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((GetContinuousDeploymentPolicyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetContinuousDeploymentPolicyRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/continuous-deployment-policy/{Id}"; return request; } private static GetContinuousDeploymentPolicyRequestMarshaller _instance = new GetContinuousDeploymentPolicyRequestMarshaller(); internal static GetContinuousDeploymentPolicyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetContinuousDeploymentPolicyRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetContinuousDeploymentPolicy operation /// </summary> public class GetContinuousDeploymentPolicyResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetContinuousDeploymentPolicyResponse response = new GetContinuousDeploymentPolicyResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetContinuousDeploymentPolicyResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ContinuousDeploymentPolicy", targetDepth)) { var unmarshaller = ContinuousDeploymentPolicyUnmarshaller.Instance; response.ContinuousDeploymentPolicy = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchContinuousDeploymentPolicy")) { return NoSuchContinuousDeploymentPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetContinuousDeploymentPolicyResponseUnmarshaller _instance = new GetContinuousDeploymentPolicyResponseUnmarshaller(); internal static GetContinuousDeploymentPolicyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetContinuousDeploymentPolicyResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetDistributionConfig Request Marshaller /// </summary> public class GetDistributionConfigRequestMarshaller : IMarshaller<IRequest, GetDistributionConfigRequest> , 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((GetDistributionConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetDistributionConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/distribution/{Id}/config"; return request; } private static GetDistributionConfigRequestMarshaller _instance = new GetDistributionConfigRequestMarshaller(); internal static GetDistributionConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetDistributionConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetDistributionConfig operation /// </summary> public class GetDistributionConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetDistributionConfigResponse response = new GetDistributionConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetDistributionConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("DistributionConfig", targetDepth)) { var unmarshaller = DistributionConfigUnmarshaller.Instance; response.DistributionConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchDistribution")) { return NoSuchDistributionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetDistributionConfigResponseUnmarshaller _instance = new GetDistributionConfigResponseUnmarshaller(); internal static GetDistributionConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetDistributionConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetDistribution Request Marshaller /// </summary> public class GetDistributionRequestMarshaller : IMarshaller<IRequest, GetDistributionRequest> , 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((GetDistributionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetDistributionRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/distribution/{Id}"; return request; } private static GetDistributionRequestMarshaller _instance = new GetDistributionRequestMarshaller(); internal static GetDistributionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetDistributionRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetDistribution operation /// </summary> public class GetDistributionResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetDistributionResponse response = new GetDistributionResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetDistributionResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Distribution", targetDepth)) { var unmarshaller = DistributionUnmarshaller.Instance; response.Distribution = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchDistribution")) { return NoSuchDistributionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetDistributionResponseUnmarshaller _instance = new GetDistributionResponseUnmarshaller(); internal static GetDistributionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetDistributionResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetFieldLevelEncryptionConfig Request Marshaller /// </summary> public class GetFieldLevelEncryptionConfigRequestMarshaller : IMarshaller<IRequest, GetFieldLevelEncryptionConfigRequest> , 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((GetFieldLevelEncryptionConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetFieldLevelEncryptionConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/field-level-encryption/{Id}/config"; return request; } private static GetFieldLevelEncryptionConfigRequestMarshaller _instance = new GetFieldLevelEncryptionConfigRequestMarshaller(); internal static GetFieldLevelEncryptionConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFieldLevelEncryptionConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetFieldLevelEncryptionConfig operation /// </summary> public class GetFieldLevelEncryptionConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetFieldLevelEncryptionConfigResponse response = new GetFieldLevelEncryptionConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetFieldLevelEncryptionConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FieldLevelEncryptionConfig", targetDepth)) { var unmarshaller = FieldLevelEncryptionConfigUnmarshaller.Instance; response.FieldLevelEncryptionConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchFieldLevelEncryptionConfig")) { return NoSuchFieldLevelEncryptionConfigExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetFieldLevelEncryptionConfigResponseUnmarshaller _instance = new GetFieldLevelEncryptionConfigResponseUnmarshaller(); internal static GetFieldLevelEncryptionConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFieldLevelEncryptionConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetFieldLevelEncryptionProfileConfig Request Marshaller /// </summary> public class GetFieldLevelEncryptionProfileConfigRequestMarshaller : IMarshaller<IRequest, GetFieldLevelEncryptionProfileConfigRequest> , 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((GetFieldLevelEncryptionProfileConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetFieldLevelEncryptionProfileConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/field-level-encryption-profile/{Id}/config"; return request; } private static GetFieldLevelEncryptionProfileConfigRequestMarshaller _instance = new GetFieldLevelEncryptionProfileConfigRequestMarshaller(); internal static GetFieldLevelEncryptionProfileConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFieldLevelEncryptionProfileConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetFieldLevelEncryptionProfileConfig operation /// </summary> public class GetFieldLevelEncryptionProfileConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetFieldLevelEncryptionProfileConfigResponse response = new GetFieldLevelEncryptionProfileConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetFieldLevelEncryptionProfileConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FieldLevelEncryptionProfileConfig", targetDepth)) { var unmarshaller = FieldLevelEncryptionProfileConfigUnmarshaller.Instance; response.FieldLevelEncryptionProfileConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchFieldLevelEncryptionProfile")) { return NoSuchFieldLevelEncryptionProfileExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetFieldLevelEncryptionProfileConfigResponseUnmarshaller _instance = new GetFieldLevelEncryptionProfileConfigResponseUnmarshaller(); internal static GetFieldLevelEncryptionProfileConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFieldLevelEncryptionProfileConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetFieldLevelEncryptionProfile Request Marshaller /// </summary> public class GetFieldLevelEncryptionProfileRequestMarshaller : IMarshaller<IRequest, GetFieldLevelEncryptionProfileRequest> , 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((GetFieldLevelEncryptionProfileRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetFieldLevelEncryptionProfileRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/field-level-encryption-profile/{Id}"; return request; } private static GetFieldLevelEncryptionProfileRequestMarshaller _instance = new GetFieldLevelEncryptionProfileRequestMarshaller(); internal static GetFieldLevelEncryptionProfileRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFieldLevelEncryptionProfileRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetFieldLevelEncryptionProfile operation /// </summary> public class GetFieldLevelEncryptionProfileResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetFieldLevelEncryptionProfileResponse response = new GetFieldLevelEncryptionProfileResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetFieldLevelEncryptionProfileResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FieldLevelEncryptionProfile", targetDepth)) { var unmarshaller = FieldLevelEncryptionProfileUnmarshaller.Instance; response.FieldLevelEncryptionProfile = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchFieldLevelEncryptionProfile")) { return NoSuchFieldLevelEncryptionProfileExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetFieldLevelEncryptionProfileResponseUnmarshaller _instance = new GetFieldLevelEncryptionProfileResponseUnmarshaller(); internal static GetFieldLevelEncryptionProfileResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFieldLevelEncryptionProfileResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetFieldLevelEncryption Request Marshaller /// </summary> public class GetFieldLevelEncryptionRequestMarshaller : IMarshaller<IRequest, GetFieldLevelEncryptionRequest> , 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((GetFieldLevelEncryptionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetFieldLevelEncryptionRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/field-level-encryption/{Id}"; return request; } private static GetFieldLevelEncryptionRequestMarshaller _instance = new GetFieldLevelEncryptionRequestMarshaller(); internal static GetFieldLevelEncryptionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFieldLevelEncryptionRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetFieldLevelEncryption operation /// </summary> public class GetFieldLevelEncryptionResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetFieldLevelEncryptionResponse response = new GetFieldLevelEncryptionResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetFieldLevelEncryptionResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("FieldLevelEncryption", targetDepth)) { var unmarshaller = FieldLevelEncryptionUnmarshaller.Instance; response.FieldLevelEncryption = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchFieldLevelEncryptionConfig")) { return NoSuchFieldLevelEncryptionConfigExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetFieldLevelEncryptionResponseUnmarshaller _instance = new GetFieldLevelEncryptionResponseUnmarshaller(); internal static GetFieldLevelEncryptionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFieldLevelEncryptionResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetFunction Request Marshaller /// </summary> public class GetFunctionRequestMarshaller : IMarshaller<IRequest, GetFunctionRequest> , 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((GetFunctionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetFunctionRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetName()) throw new AmazonCloudFrontException("Request object does not have required field Name set"); request.AddPathResource("{Name}", StringUtils.FromString(publicRequest.Name)); if (publicRequest.IsSetStage()) request.Parameters.Add("Stage", StringUtils.FromString(publicRequest.Stage)); request.ResourcePath = "/2020-05-31/function/{Name}"; request.UseQueryString = true; return request; } private static GetFunctionRequestMarshaller _instance = new GetFunctionRequestMarshaller(); internal static GetFunctionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFunctionRequestMarshaller Instance { get { return _instance; } } } }
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetFunction operation /// </summary> public class GetFunctionResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetFunctionResponse response = new GetFunctionResponse(); var ms = new MemoryStream(); Amazon.Util.AWSSDKUtils.CopyStream(context.Stream, ms); ms.Seek(0, SeekOrigin.Begin); response.FunctionCode = ms; if (context.ResponseData.IsHeaderPresent("Content-Type")) response.ContentType = context.ResponseData.GetHeaderValue("Content-Type"); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); 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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchFunctionExists")) { return NoSuchFunctionExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedOperation")) { return UnsupportedOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetFunctionResponseUnmarshaller _instance = new GetFunctionResponseUnmarshaller(); internal static GetFunctionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetFunctionResponseUnmarshaller Instance { get { return _instance; } } } }
112
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetInvalidation Request Marshaller /// </summary> public class GetInvalidationRequestMarshaller : IMarshaller<IRequest, GetInvalidationRequest> , 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((GetInvalidationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetInvalidationRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetDistributionId()) throw new AmazonCloudFrontException("Request object does not have required field DistributionId set"); request.AddPathResource("{DistributionId}", StringUtils.FromString(publicRequest.DistributionId)); if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/distribution/{DistributionId}/invalidation/{Id}"; return request; } private static GetInvalidationRequestMarshaller _instance = new GetInvalidationRequestMarshaller(); internal static GetInvalidationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetInvalidationRequestMarshaller Instance { get { return _instance; } } } }
89
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetInvalidation operation /// </summary> public class GetInvalidationResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetInvalidationResponse response = new GetInvalidationResponse(); UnmarshallResult(context,response); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetInvalidationResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Invalidation", targetDepth)) { var unmarshaller = InvalidationUnmarshaller.Instance; response.Invalidation = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchDistribution")) { return NoSuchDistributionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchInvalidation")) { return NoSuchInvalidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetInvalidationResponseUnmarshaller _instance = new GetInvalidationResponseUnmarshaller(); internal static GetInvalidationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetInvalidationResponseUnmarshaller Instance { get { return _instance; } } } }
132
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetKeyGroupConfig Request Marshaller /// </summary> public class GetKeyGroupConfigRequestMarshaller : IMarshaller<IRequest, GetKeyGroupConfigRequest> , 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((GetKeyGroupConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetKeyGroupConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/key-group/{Id}/config"; return request; } private static GetKeyGroupConfigRequestMarshaller _instance = new GetKeyGroupConfigRequestMarshaller(); internal static GetKeyGroupConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetKeyGroupConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetKeyGroupConfig operation /// </summary> public class GetKeyGroupConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetKeyGroupConfigResponse response = new GetKeyGroupConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetKeyGroupConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("KeyGroupConfig", targetDepth)) { var unmarshaller = KeyGroupConfigUnmarshaller.Instance; response.KeyGroupConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchResource")) { return NoSuchResourceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetKeyGroupConfigResponseUnmarshaller _instance = new GetKeyGroupConfigResponseUnmarshaller(); internal static GetKeyGroupConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetKeyGroupConfigResponseUnmarshaller Instance { get { return _instance; } } } }
126
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetKeyGroup Request Marshaller /// </summary> public class GetKeyGroupRequestMarshaller : IMarshaller<IRequest, GetKeyGroupRequest> , 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((GetKeyGroupRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetKeyGroupRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/key-group/{Id}"; return request; } private static GetKeyGroupRequestMarshaller _instance = new GetKeyGroupRequestMarshaller(); internal static GetKeyGroupRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetKeyGroupRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetKeyGroup operation /// </summary> public class GetKeyGroupResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetKeyGroupResponse response = new GetKeyGroupResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetKeyGroupResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("KeyGroup", targetDepth)) { var unmarshaller = KeyGroupUnmarshaller.Instance; response.KeyGroup = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchResource")) { return NoSuchResourceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetKeyGroupResponseUnmarshaller _instance = new GetKeyGroupResponseUnmarshaller(); internal static GetKeyGroupResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetKeyGroupResponseUnmarshaller Instance { get { return _instance; } } } }
126
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetMonitoringSubscription Request Marshaller /// </summary> public class GetMonitoringSubscriptionRequestMarshaller : IMarshaller<IRequest, GetMonitoringSubscriptionRequest> , 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((GetMonitoringSubscriptionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetMonitoringSubscriptionRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetDistributionId()) throw new AmazonCloudFrontException("Request object does not have required field DistributionId set"); request.AddPathResource("{DistributionId}", StringUtils.FromString(publicRequest.DistributionId)); request.ResourcePath = "/2020-05-31/distributions/{DistributionId}/monitoring-subscription/"; return request; } private static GetMonitoringSubscriptionRequestMarshaller _instance = new GetMonitoringSubscriptionRequestMarshaller(); internal static GetMonitoringSubscriptionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetMonitoringSubscriptionRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetMonitoringSubscription operation /// </summary> public class GetMonitoringSubscriptionResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetMonitoringSubscriptionResponse response = new GetMonitoringSubscriptionResponse(); UnmarshallResult(context,response); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetMonitoringSubscriptionResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("MonitoringSubscription", targetDepth)) { var unmarshaller = MonitoringSubscriptionUnmarshaller.Instance; response.MonitoringSubscription = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchDistribution")) { return NoSuchDistributionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchMonitoringSubscription")) { return NoSuchMonitoringSubscriptionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedOperation")) { return UnsupportedOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetMonitoringSubscriptionResponseUnmarshaller _instance = new GetMonitoringSubscriptionResponseUnmarshaller(); internal static GetMonitoringSubscriptionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetMonitoringSubscriptionResponseUnmarshaller Instance { get { return _instance; } } } }
136
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetOriginAccessControlConfig Request Marshaller /// </summary> public class GetOriginAccessControlConfigRequestMarshaller : IMarshaller<IRequest, GetOriginAccessControlConfigRequest> , 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((GetOriginAccessControlConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetOriginAccessControlConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/origin-access-control/{Id}/config"; return request; } private static GetOriginAccessControlConfigRequestMarshaller _instance = new GetOriginAccessControlConfigRequestMarshaller(); internal static GetOriginAccessControlConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetOriginAccessControlConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetOriginAccessControlConfig operation /// </summary> public class GetOriginAccessControlConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetOriginAccessControlConfigResponse response = new GetOriginAccessControlConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetOriginAccessControlConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("OriginAccessControlConfig", targetDepth)) { var unmarshaller = OriginAccessControlConfigUnmarshaller.Instance; response.OriginAccessControlConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchOriginAccessControl")) { return NoSuchOriginAccessControlExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetOriginAccessControlConfigResponseUnmarshaller _instance = new GetOriginAccessControlConfigResponseUnmarshaller(); internal static GetOriginAccessControlConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetOriginAccessControlConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetOriginAccessControl Request Marshaller /// </summary> public class GetOriginAccessControlRequestMarshaller : IMarshaller<IRequest, GetOriginAccessControlRequest> , 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((GetOriginAccessControlRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetOriginAccessControlRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/origin-access-control/{Id}"; return request; } private static GetOriginAccessControlRequestMarshaller _instance = new GetOriginAccessControlRequestMarshaller(); internal static GetOriginAccessControlRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetOriginAccessControlRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetOriginAccessControl operation /// </summary> public class GetOriginAccessControlResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetOriginAccessControlResponse response = new GetOriginAccessControlResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetOriginAccessControlResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("OriginAccessControl", targetDepth)) { var unmarshaller = OriginAccessControlUnmarshaller.Instance; response.OriginAccessControl = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchOriginAccessControl")) { return NoSuchOriginAccessControlExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetOriginAccessControlResponseUnmarshaller _instance = new GetOriginAccessControlResponseUnmarshaller(); internal static GetOriginAccessControlResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetOriginAccessControlResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetOriginRequestPolicyConfig Request Marshaller /// </summary> public class GetOriginRequestPolicyConfigRequestMarshaller : IMarshaller<IRequest, GetOriginRequestPolicyConfigRequest> , 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((GetOriginRequestPolicyConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetOriginRequestPolicyConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/origin-request-policy/{Id}/config"; return request; } private static GetOriginRequestPolicyConfigRequestMarshaller _instance = new GetOriginRequestPolicyConfigRequestMarshaller(); internal static GetOriginRequestPolicyConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetOriginRequestPolicyConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetOriginRequestPolicyConfig operation /// </summary> public class GetOriginRequestPolicyConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetOriginRequestPolicyConfigResponse response = new GetOriginRequestPolicyConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetOriginRequestPolicyConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("OriginRequestPolicyConfig", targetDepth)) { var unmarshaller = OriginRequestPolicyConfigUnmarshaller.Instance; response.OriginRequestPolicyConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchOriginRequestPolicy")) { return NoSuchOriginRequestPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetOriginRequestPolicyConfigResponseUnmarshaller _instance = new GetOriginRequestPolicyConfigResponseUnmarshaller(); internal static GetOriginRequestPolicyConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetOriginRequestPolicyConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetOriginRequestPolicy Request Marshaller /// </summary> public class GetOriginRequestPolicyRequestMarshaller : IMarshaller<IRequest, GetOriginRequestPolicyRequest> , 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((GetOriginRequestPolicyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetOriginRequestPolicyRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/origin-request-policy/{Id}"; return request; } private static GetOriginRequestPolicyRequestMarshaller _instance = new GetOriginRequestPolicyRequestMarshaller(); internal static GetOriginRequestPolicyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetOriginRequestPolicyRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetOriginRequestPolicy operation /// </summary> public class GetOriginRequestPolicyResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetOriginRequestPolicyResponse response = new GetOriginRequestPolicyResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetOriginRequestPolicyResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("OriginRequestPolicy", targetDepth)) { var unmarshaller = OriginRequestPolicyUnmarshaller.Instance; response.OriginRequestPolicy = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchOriginRequestPolicy")) { return NoSuchOriginRequestPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetOriginRequestPolicyResponseUnmarshaller _instance = new GetOriginRequestPolicyResponseUnmarshaller(); internal static GetOriginRequestPolicyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetOriginRequestPolicyResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetPublicKeyConfig Request Marshaller /// </summary> public class GetPublicKeyConfigRequestMarshaller : IMarshaller<IRequest, GetPublicKeyConfigRequest> , 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((GetPublicKeyConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetPublicKeyConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/public-key/{Id}/config"; return request; } private static GetPublicKeyConfigRequestMarshaller _instance = new GetPublicKeyConfigRequestMarshaller(); internal static GetPublicKeyConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetPublicKeyConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetPublicKeyConfig operation /// </summary> public class GetPublicKeyConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetPublicKeyConfigResponse response = new GetPublicKeyConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetPublicKeyConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("PublicKeyConfig", targetDepth)) { var unmarshaller = PublicKeyConfigUnmarshaller.Instance; response.PublicKeyConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchPublicKey")) { return NoSuchPublicKeyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetPublicKeyConfigResponseUnmarshaller _instance = new GetPublicKeyConfigResponseUnmarshaller(); internal static GetPublicKeyConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetPublicKeyConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetPublicKey Request Marshaller /// </summary> public class GetPublicKeyRequestMarshaller : IMarshaller<IRequest, GetPublicKeyRequest> , 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((GetPublicKeyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetPublicKeyRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/public-key/{Id}"; return request; } private static GetPublicKeyRequestMarshaller _instance = new GetPublicKeyRequestMarshaller(); internal static GetPublicKeyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetPublicKeyRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetPublicKey operation /// </summary> public class GetPublicKeyResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetPublicKeyResponse response = new GetPublicKeyResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetPublicKeyResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("PublicKey", targetDepth)) { var unmarshaller = PublicKeyUnmarshaller.Instance; response.PublicKey = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchPublicKey")) { return NoSuchPublicKeyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetPublicKeyResponseUnmarshaller _instance = new GetPublicKeyResponseUnmarshaller(); internal static GetPublicKeyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetPublicKeyResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetRealtimeLogConfig Request Marshaller /// </summary> public class GetRealtimeLogConfigRequestMarshaller : IMarshaller<IRequest, GetRealtimeLogConfigRequest> , 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((GetRealtimeLogConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetRealtimeLogConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "POST"; request.ResourcePath = "/2020-05-31/get-realtime-log-config/"; var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture); using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) { xmlWriter.WriteStartElement("GetRealtimeLogConfigRequest", "http://cloudfront.amazonaws.com/doc/2020-05-31/"); if(publicRequest.IsSetARN()) xmlWriter.WriteElementString("ARN", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ARN)); if(publicRequest.IsSetName()) xmlWriter.WriteElementString("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.Name)); xmlWriter.WriteEndElement(); } try { string content = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(content); request.Headers["Content-Type"] = "application/xml"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-05-31"; } catch (EncoderFallbackException e) { throw new AmazonServiceException("Unable to marshall request to XML", e); } return request; } private static GetRealtimeLogConfigRequestMarshaller _instance = new GetRealtimeLogConfigRequestMarshaller(); internal static GetRealtimeLogConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetRealtimeLogConfigRequestMarshaller Instance { get { return _instance; } } } }
107
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetRealtimeLogConfig operation /// </summary> public class GetRealtimeLogConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetRealtimeLogConfigResponse response = new GetRealtimeLogConfigResponse(); UnmarshallResult(context,response); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetRealtimeLogConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("RealtimeLogConfig", targetDepth)) { var unmarshaller = RealtimeLogConfigUnmarshaller.Instance; response.RealtimeLogConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArgument")) { return InvalidArgumentExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchRealtimeLogConfig")) { return NoSuchRealtimeLogConfigExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetRealtimeLogConfigResponseUnmarshaller _instance = new GetRealtimeLogConfigResponseUnmarshaller(); internal static GetRealtimeLogConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetRealtimeLogConfigResponseUnmarshaller Instance { get { return _instance; } } } }
134
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetResponseHeadersPolicyConfig Request Marshaller /// </summary> public class GetResponseHeadersPolicyConfigRequestMarshaller : IMarshaller<IRequest, GetResponseHeadersPolicyConfigRequest> , 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((GetResponseHeadersPolicyConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetResponseHeadersPolicyConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/response-headers-policy/{Id}/config"; return request; } private static GetResponseHeadersPolicyConfigRequestMarshaller _instance = new GetResponseHeadersPolicyConfigRequestMarshaller(); internal static GetResponseHeadersPolicyConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetResponseHeadersPolicyConfigRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetResponseHeadersPolicyConfig operation /// </summary> public class GetResponseHeadersPolicyConfigResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetResponseHeadersPolicyConfigResponse response = new GetResponseHeadersPolicyConfigResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetResponseHeadersPolicyConfigResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ResponseHeadersPolicyConfig", targetDepth)) { var unmarshaller = ResponseHeadersPolicyConfigUnmarshaller.Instance; response.ResponseHeadersPolicyConfig = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchResponseHeadersPolicy")) { return NoSuchResponseHeadersPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetResponseHeadersPolicyConfigResponseUnmarshaller _instance = new GetResponseHeadersPolicyConfigResponseUnmarshaller(); internal static GetResponseHeadersPolicyConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetResponseHeadersPolicyConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetResponseHeadersPolicy Request Marshaller /// </summary> public class GetResponseHeadersPolicyRequestMarshaller : IMarshaller<IRequest, GetResponseHeadersPolicyRequest> , 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((GetResponseHeadersPolicyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetResponseHeadersPolicyRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/response-headers-policy/{Id}"; return request; } private static GetResponseHeadersPolicyRequestMarshaller _instance = new GetResponseHeadersPolicyRequestMarshaller(); internal static GetResponseHeadersPolicyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetResponseHeadersPolicyRequestMarshaller Instance { get { return _instance; } } } }
86
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for GetResponseHeadersPolicy operation /// </summary> public class GetResponseHeadersPolicyResponseUnmarshaller : XmlResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetResponseHeadersPolicyResponse response = new GetResponseHeadersPolicyResponse(); UnmarshallResult(context,response); if (context.ResponseData.IsHeaderPresent("ETag")) response.ETag = context.ResponseData.GetHeaderValue("ETag"); return response; } private static void UnmarshallResult(XmlUnmarshallerContext context, GetResponseHeadersPolicyResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ResponseHeadersPolicy", targetDepth)) { var unmarshaller = ResponseHeadersPolicyUnmarshaller.Instance; response.ResponseHeadersPolicy = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; } /// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDenied")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchResponseHeadersPolicy")) { return NoSuchResponseHeadersPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode); } private static GetResponseHeadersPolicyResponseUnmarshaller _instance = new GetResponseHeadersPolicyResponseUnmarshaller(); internal static GetResponseHeadersPolicyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetResponseHeadersPolicyResponseUnmarshaller Instance { get { return _instance; } } } }
130
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 cloudfront-2020-05-31.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.CloudFront.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using System.Xml; namespace Amazon.CloudFront.Model.Internal.MarshallTransformations { /// <summary> /// GetStreamingDistributionConfig Request Marshaller /// </summary> public class GetStreamingDistributionConfigRequestMarshaller : IMarshaller<IRequest, GetStreamingDistributionConfigRequest> , 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((GetStreamingDistributionConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(GetStreamingDistributionConfigRequest publicRequest) { var request = new DefaultRequest(publicRequest, "Amazon.CloudFront"); request.HttpMethod = "GET"; if (!publicRequest.IsSetId()) throw new AmazonCloudFrontException("Request object does not have required field Id set"); request.AddPathResource("{Id}", StringUtils.FromString(publicRequest.Id)); request.ResourcePath = "/2020-05-31/streaming-distribution/{Id}/config"; return request; } private static GetStreamingDistributionConfigRequestMarshaller _instance = new GetStreamingDistributionConfigRequestMarshaller(); internal static GetStreamingDistributionConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static GetStreamingDistributionConfigRequestMarshaller Instance { get { return _instance; } } } }
86