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.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 StreamingDistributionSummary Object
/// </summary>
public class StreamingDistributionSummaryUnmarshaller : IUnmarshaller<StreamingDistributionSummary, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public StreamingDistributionSummary Unmarshall(XmlUnmarshallerContext context)
{
StreamingDistributionSummary unmarshalledObject = new StreamingDistributionSummary();
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("ARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ARN = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Comment", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Comment = 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("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("PriceClass", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PriceClass = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("S3Origin", targetDepth))
{
var unmarshaller = S3OriginUnmarshaller.Instance;
unmarshalledObject.S3Origin = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TrustedSigners", targetDepth))
{
var unmarshaller = TrustedSignersUnmarshaller.Instance;
unmarshalledObject.TrustedSigners = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
private static StreamingDistributionSummaryUnmarshaller _instance = new StreamingDistributionSummaryUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static StreamingDistributionSummaryUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 146 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the 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 StreamingDistribution Object
/// </summary>
public class StreamingDistributionUnmarshaller : IUnmarshaller<StreamingDistribution, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public StreamingDistribution Unmarshall(XmlUnmarshallerContext context)
{
StreamingDistribution unmarshalledObject = new StreamingDistribution();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("ActiveTrustedSigners", targetDepth))
{
var unmarshaller = ActiveTrustedSignersUnmarshaller.Instance;
unmarshalledObject.ActiveTrustedSigners = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ARN = 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("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;
}
if (context.TestExpression("StreamingDistributionConfig", targetDepth))
{
var unmarshaller = StreamingDistributionConfigUnmarshaller.Instance;
unmarshalledObject.StreamingDistributionConfig = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
private static StreamingDistributionUnmarshaller _instance = new StreamingDistributionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static StreamingDistributionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 122 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the 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 StreamingLoggingConfig Object
/// </summary>
public class StreamingLoggingConfigUnmarshaller : IUnmarshaller<StreamingLoggingConfig, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public StreamingLoggingConfig Unmarshall(XmlUnmarshallerContext context)
{
StreamingLoggingConfig unmarshalledObject = new StreamingLoggingConfig();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Bucket", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Bucket = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Enabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Enabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Prefix", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Prefix = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
private static StreamingLoggingConfigUnmarshaller _instance = new StreamingLoggingConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static StreamingLoggingConfigUnmarshaller 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>
/// TagResource Request Marshaller
/// </summary>
public class TagResourceRequestMarshaller : IMarshaller<IRequest, TagResourceRequest> , 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((TagResourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(TagResourceRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "POST";
request.AddSubResource("Operation", "Tag");
if (publicRequest.IsSetResource())
request.Parameters.Add("Resource", StringUtils.FromString(publicRequest.Resource));
request.ResourcePath = "/2020-05-31/tagging";
var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture);
using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize }))
{
if (publicRequest.IsSetTags())
{
xmlWriter.WriteStartElement("Tags", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestTagsItems = publicRequest.Tags.Items;
if (publicRequestTagsItems != null && publicRequestTagsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestTagsItemsValue in publicRequestTagsItems)
{
if (publicRequestTagsItemsValue != null)
{
xmlWriter.WriteStartElement("Tag", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestTagsItemsValue.IsSetKey())
xmlWriter.WriteElementString("Key", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestTagsItemsValue.Key));
if(publicRequestTagsItemsValue.IsSetValue())
xmlWriter.WriteElementString("Value", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestTagsItemsValue.Value));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
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);
}
request.UseQueryString = true;
return request;
}
private static TagResourceRequestMarshaller _instance = new TagResourceRequestMarshaller();
internal static TagResourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static TagResourceRequestMarshaller 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 TagResource operation
/// </summary>
public class TagResourceResponseUnmarshaller : 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)
{
TagResourceResponse response = new TagResourceResponse();
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("InvalidTagging"))
{
return InvalidTaggingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
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 TagResourceResponseUnmarshaller _instance = new TagResourceResponseUnmarshaller();
internal static TagResourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static TagResourceResponseUnmarshaller 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 Tags Object
/// </summary>
public class TagsUnmarshaller : IUnmarshaller<Tags, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public Tags Unmarshall(XmlUnmarshallerContext context)
{
Tags unmarshalledObject = new Tags();
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/Tag", targetDepth))
{
var unmarshaller = TagUnmarshaller.Instance;
unmarshalledObject.Items.Add(unmarshaller.Unmarshall(context));
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
private static TagsUnmarshaller _instance = new TagsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TagsUnmarshaller 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 Tag Object
/// </summary>
public class TagUnmarshaller : IUnmarshaller<Tag, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public Tag Unmarshall(XmlUnmarshallerContext context)
{
Tag unmarshalledObject = new Tag();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Key", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Key = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Value", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Value = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
private static TagUnmarshaller _instance = new TagUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TagUnmarshaller 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 TestFunctionFailedException operation
/// </summary>
public class TestFunctionFailedExceptionUnmarshaller : IErrorResponseUnmarshaller<TestFunctionFailedException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TestFunctionFailedException 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 TestFunctionFailedException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TestFunctionFailedException response = new TestFunctionFailedException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TestFunctionFailedExceptionUnmarshaller _instance = new TestFunctionFailedExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TestFunctionFailedExceptionUnmarshaller 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.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>
/// TestFunction Request Marshaller
/// </summary>
public class TestFunctionRequestMarshaller : IMarshaller<IRequest, TestFunctionRequest> , 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((TestFunctionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(TestFunctionRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "POST";
if (publicRequest.IsSetIfMatch())
{
request.Headers["If-Match"] = publicRequest.IfMatch;
}
if (!publicRequest.IsSetName())
throw new AmazonCloudFrontException("Request object does not have required field Name set");
request.AddPathResource("{Name}", StringUtils.FromString(publicRequest.Name));
request.ResourcePath = "/2020-05-31/function/{Name}/test";
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("TestFunctionRequest", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.IsSetEventObject())
xmlWriter.WriteElementString("EventObject", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromMemoryStream(publicRequest.EventObject));
if(publicRequest.IsSetStage())
xmlWriter.WriteElementString("Stage", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.Stage));
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 TestFunctionRequestMarshaller _instance = new TestFunctionRequestMarshaller();
internal static TestFunctionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static TestFunctionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 115 |
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 TestFunction operation
/// </summary>
public class TestFunctionResponseUnmarshaller : 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)
{
TestFunctionResponse response = new TestFunctionResponse();
UnmarshallResult(context,response);
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, TestFunctionResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("TestResult", targetDepth))
{
var unmarshaller = TestResultUnmarshaller.Instance;
response.TestResult = 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("InvalidArgument"))
{
return InvalidArgumentExceptionUnmarshaller.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("NoSuchFunctionExists"))
{
return NoSuchFunctionExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TestFunctionFailed"))
{
return TestFunctionFailedExceptionUnmarshaller.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 TestFunctionResponseUnmarshaller _instance = new TestFunctionResponseUnmarshaller();
internal static TestFunctionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static TestFunctionResponseUnmarshaller 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 TestResult Object
/// </summary>
public class TestResultUnmarshaller : IUnmarshaller<TestResult, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TestResult Unmarshall(XmlUnmarshallerContext context)
{
TestResult unmarshalledObject = new TestResult();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("ComputeUtilization", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ComputeUtilization = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("FunctionErrorMessage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FunctionErrorMessage = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("FunctionExecutionLogs/member", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FunctionExecutionLogs.Add(unmarshaller.Unmarshall(context));
continue;
}
if (context.TestExpression("FunctionOutput", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FunctionOutput = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("FunctionSummary", targetDepth))
{
var unmarshaller = FunctionSummaryUnmarshaller.Instance;
unmarshalledObject.FunctionSummary = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
private static TestResultUnmarshaller _instance = new TestResultUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TestResultUnmarshaller 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 TooLongCSPInResponseHeadersPolicyException operation
/// </summary>
public class TooLongCSPInResponseHeadersPolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooLongCSPInResponseHeadersPolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooLongCSPInResponseHeadersPolicyException 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 TooLongCSPInResponseHeadersPolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooLongCSPInResponseHeadersPolicyException response = new TooLongCSPInResponseHeadersPolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooLongCSPInResponseHeadersPolicyExceptionUnmarshaller _instance = new TooLongCSPInResponseHeadersPolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooLongCSPInResponseHeadersPolicyExceptionUnmarshaller 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 TooManyCacheBehaviorsException operation
/// </summary>
public class TooManyCacheBehaviorsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyCacheBehaviorsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyCacheBehaviorsException 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 TooManyCacheBehaviorsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyCacheBehaviorsException response = new TooManyCacheBehaviorsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyCacheBehaviorsExceptionUnmarshaller _instance = new TooManyCacheBehaviorsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyCacheBehaviorsExceptionUnmarshaller 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 TooManyCachePoliciesException operation
/// </summary>
public class TooManyCachePoliciesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyCachePoliciesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyCachePoliciesException 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 TooManyCachePoliciesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyCachePoliciesException response = new TooManyCachePoliciesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyCachePoliciesExceptionUnmarshaller _instance = new TooManyCachePoliciesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyCachePoliciesExceptionUnmarshaller 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 TooManyCertificatesException operation
/// </summary>
public class TooManyCertificatesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyCertificatesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyCertificatesException 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 TooManyCertificatesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyCertificatesException response = new TooManyCertificatesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyCertificatesExceptionUnmarshaller _instance = new TooManyCertificatesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyCertificatesExceptionUnmarshaller 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 TooManyCloudFrontOriginAccessIdentitiesException operation
/// </summary>
public class TooManyCloudFrontOriginAccessIdentitiesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyCloudFrontOriginAccessIdentitiesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyCloudFrontOriginAccessIdentitiesException 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 TooManyCloudFrontOriginAccessIdentitiesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyCloudFrontOriginAccessIdentitiesException response = new TooManyCloudFrontOriginAccessIdentitiesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyCloudFrontOriginAccessIdentitiesExceptionUnmarshaller _instance = new TooManyCloudFrontOriginAccessIdentitiesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyCloudFrontOriginAccessIdentitiesExceptionUnmarshaller 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 TooManyContinuousDeploymentPoliciesException operation
/// </summary>
public class TooManyContinuousDeploymentPoliciesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyContinuousDeploymentPoliciesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyContinuousDeploymentPoliciesException 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 TooManyContinuousDeploymentPoliciesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyContinuousDeploymentPoliciesException response = new TooManyContinuousDeploymentPoliciesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyContinuousDeploymentPoliciesExceptionUnmarshaller _instance = new TooManyContinuousDeploymentPoliciesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyContinuousDeploymentPoliciesExceptionUnmarshaller 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 TooManyCookieNamesInWhiteListException operation
/// </summary>
public class TooManyCookieNamesInWhiteListExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyCookieNamesInWhiteListException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyCookieNamesInWhiteListException 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 TooManyCookieNamesInWhiteListException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyCookieNamesInWhiteListException response = new TooManyCookieNamesInWhiteListException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyCookieNamesInWhiteListExceptionUnmarshaller _instance = new TooManyCookieNamesInWhiteListExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyCookieNamesInWhiteListExceptionUnmarshaller 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 TooManyCookiesInCachePolicyException operation
/// </summary>
public class TooManyCookiesInCachePolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyCookiesInCachePolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyCookiesInCachePolicyException 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 TooManyCookiesInCachePolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyCookiesInCachePolicyException response = new TooManyCookiesInCachePolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyCookiesInCachePolicyExceptionUnmarshaller _instance = new TooManyCookiesInCachePolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyCookiesInCachePolicyExceptionUnmarshaller 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 TooManyCookiesInOriginRequestPolicyException operation
/// </summary>
public class TooManyCookiesInOriginRequestPolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyCookiesInOriginRequestPolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyCookiesInOriginRequestPolicyException 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 TooManyCookiesInOriginRequestPolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyCookiesInOriginRequestPolicyException response = new TooManyCookiesInOriginRequestPolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyCookiesInOriginRequestPolicyExceptionUnmarshaller _instance = new TooManyCookiesInOriginRequestPolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyCookiesInOriginRequestPolicyExceptionUnmarshaller 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 TooManyCustomHeadersInResponseHeadersPolicyException operation
/// </summary>
public class TooManyCustomHeadersInResponseHeadersPolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyCustomHeadersInResponseHeadersPolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyCustomHeadersInResponseHeadersPolicyException 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 TooManyCustomHeadersInResponseHeadersPolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyCustomHeadersInResponseHeadersPolicyException response = new TooManyCustomHeadersInResponseHeadersPolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyCustomHeadersInResponseHeadersPolicyExceptionUnmarshaller _instance = new TooManyCustomHeadersInResponseHeadersPolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyCustomHeadersInResponseHeadersPolicyExceptionUnmarshaller 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 TooManyDistributionCNAMEsException operation
/// </summary>
public class TooManyDistributionCNAMEsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionCNAMEsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionCNAMEsException 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 TooManyDistributionCNAMEsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionCNAMEsException response = new TooManyDistributionCNAMEsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionCNAMEsExceptionUnmarshaller _instance = new TooManyDistributionCNAMEsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionCNAMEsExceptionUnmarshaller 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 TooManyDistributionsAssociatedToCachePolicyException operation
/// </summary>
public class TooManyDistributionsAssociatedToCachePolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionsAssociatedToCachePolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionsAssociatedToCachePolicyException 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 TooManyDistributionsAssociatedToCachePolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionsAssociatedToCachePolicyException response = new TooManyDistributionsAssociatedToCachePolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionsAssociatedToCachePolicyExceptionUnmarshaller _instance = new TooManyDistributionsAssociatedToCachePolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionsAssociatedToCachePolicyExceptionUnmarshaller 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 TooManyDistributionsAssociatedToFieldLevelEncryptionConfigException operation
/// </summary>
public class TooManyDistributionsAssociatedToFieldLevelEncryptionConfigExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionsAssociatedToFieldLevelEncryptionConfigException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionsAssociatedToFieldLevelEncryptionConfigException 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 TooManyDistributionsAssociatedToFieldLevelEncryptionConfigException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionsAssociatedToFieldLevelEncryptionConfigException response = new TooManyDistributionsAssociatedToFieldLevelEncryptionConfigException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionsAssociatedToFieldLevelEncryptionConfigExceptionUnmarshaller _instance = new TooManyDistributionsAssociatedToFieldLevelEncryptionConfigExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionsAssociatedToFieldLevelEncryptionConfigExceptionUnmarshaller 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 TooManyDistributionsAssociatedToKeyGroupException operation
/// </summary>
public class TooManyDistributionsAssociatedToKeyGroupExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionsAssociatedToKeyGroupException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionsAssociatedToKeyGroupException 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 TooManyDistributionsAssociatedToKeyGroupException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionsAssociatedToKeyGroupException response = new TooManyDistributionsAssociatedToKeyGroupException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionsAssociatedToKeyGroupExceptionUnmarshaller _instance = new TooManyDistributionsAssociatedToKeyGroupExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionsAssociatedToKeyGroupExceptionUnmarshaller 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 TooManyDistributionsAssociatedToOriginAccessControlException operation
/// </summary>
public class TooManyDistributionsAssociatedToOriginAccessControlExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionsAssociatedToOriginAccessControlException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionsAssociatedToOriginAccessControlException 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 TooManyDistributionsAssociatedToOriginAccessControlException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionsAssociatedToOriginAccessControlException response = new TooManyDistributionsAssociatedToOriginAccessControlException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionsAssociatedToOriginAccessControlExceptionUnmarshaller _instance = new TooManyDistributionsAssociatedToOriginAccessControlExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionsAssociatedToOriginAccessControlExceptionUnmarshaller 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 TooManyDistributionsAssociatedToOriginRequestPolicyException operation
/// </summary>
public class TooManyDistributionsAssociatedToOriginRequestPolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionsAssociatedToOriginRequestPolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionsAssociatedToOriginRequestPolicyException 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 TooManyDistributionsAssociatedToOriginRequestPolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionsAssociatedToOriginRequestPolicyException response = new TooManyDistributionsAssociatedToOriginRequestPolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionsAssociatedToOriginRequestPolicyExceptionUnmarshaller _instance = new TooManyDistributionsAssociatedToOriginRequestPolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionsAssociatedToOriginRequestPolicyExceptionUnmarshaller 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 TooManyDistributionsAssociatedToResponseHeadersPolicyException operation
/// </summary>
public class TooManyDistributionsAssociatedToResponseHeadersPolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionsAssociatedToResponseHeadersPolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionsAssociatedToResponseHeadersPolicyException 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 TooManyDistributionsAssociatedToResponseHeadersPolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionsAssociatedToResponseHeadersPolicyException response = new TooManyDistributionsAssociatedToResponseHeadersPolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionsAssociatedToResponseHeadersPolicyExceptionUnmarshaller _instance = new TooManyDistributionsAssociatedToResponseHeadersPolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionsAssociatedToResponseHeadersPolicyExceptionUnmarshaller 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 TooManyDistributionsException operation
/// </summary>
public class TooManyDistributionsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionsException 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 TooManyDistributionsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionsException response = new TooManyDistributionsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionsExceptionUnmarshaller _instance = new TooManyDistributionsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionsExceptionUnmarshaller 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 TooManyDistributionsWithFunctionAssociationsException operation
/// </summary>
public class TooManyDistributionsWithFunctionAssociationsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionsWithFunctionAssociationsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionsWithFunctionAssociationsException 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 TooManyDistributionsWithFunctionAssociationsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionsWithFunctionAssociationsException response = new TooManyDistributionsWithFunctionAssociationsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionsWithFunctionAssociationsExceptionUnmarshaller _instance = new TooManyDistributionsWithFunctionAssociationsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionsWithFunctionAssociationsExceptionUnmarshaller 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 TooManyDistributionsWithLambdaAssociationsException operation
/// </summary>
public class TooManyDistributionsWithLambdaAssociationsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionsWithLambdaAssociationsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionsWithLambdaAssociationsException 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 TooManyDistributionsWithLambdaAssociationsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionsWithLambdaAssociationsException response = new TooManyDistributionsWithLambdaAssociationsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionsWithLambdaAssociationsExceptionUnmarshaller _instance = new TooManyDistributionsWithLambdaAssociationsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionsWithLambdaAssociationsExceptionUnmarshaller 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 TooManyDistributionsWithSingleFunctionARNException operation
/// </summary>
public class TooManyDistributionsWithSingleFunctionARNExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyDistributionsWithSingleFunctionARNException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyDistributionsWithSingleFunctionARNException 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 TooManyDistributionsWithSingleFunctionARNException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyDistributionsWithSingleFunctionARNException response = new TooManyDistributionsWithSingleFunctionARNException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyDistributionsWithSingleFunctionARNExceptionUnmarshaller _instance = new TooManyDistributionsWithSingleFunctionARNExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyDistributionsWithSingleFunctionARNExceptionUnmarshaller 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 TooManyFieldLevelEncryptionConfigsException operation
/// </summary>
public class TooManyFieldLevelEncryptionConfigsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyFieldLevelEncryptionConfigsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyFieldLevelEncryptionConfigsException 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 TooManyFieldLevelEncryptionConfigsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyFieldLevelEncryptionConfigsException response = new TooManyFieldLevelEncryptionConfigsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyFieldLevelEncryptionConfigsExceptionUnmarshaller _instance = new TooManyFieldLevelEncryptionConfigsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyFieldLevelEncryptionConfigsExceptionUnmarshaller 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 TooManyFieldLevelEncryptionContentTypeProfilesException operation
/// </summary>
public class TooManyFieldLevelEncryptionContentTypeProfilesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyFieldLevelEncryptionContentTypeProfilesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyFieldLevelEncryptionContentTypeProfilesException 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 TooManyFieldLevelEncryptionContentTypeProfilesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyFieldLevelEncryptionContentTypeProfilesException response = new TooManyFieldLevelEncryptionContentTypeProfilesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyFieldLevelEncryptionContentTypeProfilesExceptionUnmarshaller _instance = new TooManyFieldLevelEncryptionContentTypeProfilesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyFieldLevelEncryptionContentTypeProfilesExceptionUnmarshaller 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 TooManyFieldLevelEncryptionEncryptionEntitiesException operation
/// </summary>
public class TooManyFieldLevelEncryptionEncryptionEntitiesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyFieldLevelEncryptionEncryptionEntitiesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyFieldLevelEncryptionEncryptionEntitiesException 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 TooManyFieldLevelEncryptionEncryptionEntitiesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyFieldLevelEncryptionEncryptionEntitiesException response = new TooManyFieldLevelEncryptionEncryptionEntitiesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyFieldLevelEncryptionEncryptionEntitiesExceptionUnmarshaller _instance = new TooManyFieldLevelEncryptionEncryptionEntitiesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyFieldLevelEncryptionEncryptionEntitiesExceptionUnmarshaller 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 TooManyFieldLevelEncryptionFieldPatternsException operation
/// </summary>
public class TooManyFieldLevelEncryptionFieldPatternsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyFieldLevelEncryptionFieldPatternsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyFieldLevelEncryptionFieldPatternsException 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 TooManyFieldLevelEncryptionFieldPatternsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyFieldLevelEncryptionFieldPatternsException response = new TooManyFieldLevelEncryptionFieldPatternsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyFieldLevelEncryptionFieldPatternsExceptionUnmarshaller _instance = new TooManyFieldLevelEncryptionFieldPatternsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyFieldLevelEncryptionFieldPatternsExceptionUnmarshaller 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 TooManyFieldLevelEncryptionProfilesException operation
/// </summary>
public class TooManyFieldLevelEncryptionProfilesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyFieldLevelEncryptionProfilesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyFieldLevelEncryptionProfilesException 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 TooManyFieldLevelEncryptionProfilesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyFieldLevelEncryptionProfilesException response = new TooManyFieldLevelEncryptionProfilesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyFieldLevelEncryptionProfilesExceptionUnmarshaller _instance = new TooManyFieldLevelEncryptionProfilesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyFieldLevelEncryptionProfilesExceptionUnmarshaller 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 TooManyFieldLevelEncryptionQueryArgProfilesException operation
/// </summary>
public class TooManyFieldLevelEncryptionQueryArgProfilesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyFieldLevelEncryptionQueryArgProfilesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyFieldLevelEncryptionQueryArgProfilesException 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 TooManyFieldLevelEncryptionQueryArgProfilesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyFieldLevelEncryptionQueryArgProfilesException response = new TooManyFieldLevelEncryptionQueryArgProfilesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyFieldLevelEncryptionQueryArgProfilesExceptionUnmarshaller _instance = new TooManyFieldLevelEncryptionQueryArgProfilesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyFieldLevelEncryptionQueryArgProfilesExceptionUnmarshaller 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 TooManyFunctionAssociationsException operation
/// </summary>
public class TooManyFunctionAssociationsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyFunctionAssociationsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyFunctionAssociationsException 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 TooManyFunctionAssociationsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyFunctionAssociationsException response = new TooManyFunctionAssociationsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyFunctionAssociationsExceptionUnmarshaller _instance = new TooManyFunctionAssociationsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyFunctionAssociationsExceptionUnmarshaller 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 TooManyFunctionsException operation
/// </summary>
public class TooManyFunctionsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyFunctionsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyFunctionsException 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 TooManyFunctionsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyFunctionsException response = new TooManyFunctionsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyFunctionsExceptionUnmarshaller _instance = new TooManyFunctionsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyFunctionsExceptionUnmarshaller 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 TooManyHeadersInCachePolicyException operation
/// </summary>
public class TooManyHeadersInCachePolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyHeadersInCachePolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyHeadersInCachePolicyException 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 TooManyHeadersInCachePolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyHeadersInCachePolicyException response = new TooManyHeadersInCachePolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyHeadersInCachePolicyExceptionUnmarshaller _instance = new TooManyHeadersInCachePolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyHeadersInCachePolicyExceptionUnmarshaller 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 TooManyHeadersInForwardedValuesException operation
/// </summary>
public class TooManyHeadersInForwardedValuesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyHeadersInForwardedValuesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyHeadersInForwardedValuesException 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 TooManyHeadersInForwardedValuesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyHeadersInForwardedValuesException response = new TooManyHeadersInForwardedValuesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyHeadersInForwardedValuesExceptionUnmarshaller _instance = new TooManyHeadersInForwardedValuesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyHeadersInForwardedValuesExceptionUnmarshaller 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 TooManyHeadersInOriginRequestPolicyException operation
/// </summary>
public class TooManyHeadersInOriginRequestPolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyHeadersInOriginRequestPolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyHeadersInOriginRequestPolicyException 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 TooManyHeadersInOriginRequestPolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyHeadersInOriginRequestPolicyException response = new TooManyHeadersInOriginRequestPolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyHeadersInOriginRequestPolicyExceptionUnmarshaller _instance = new TooManyHeadersInOriginRequestPolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyHeadersInOriginRequestPolicyExceptionUnmarshaller 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 TooManyInvalidationsInProgressException operation
/// </summary>
public class TooManyInvalidationsInProgressExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyInvalidationsInProgressException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyInvalidationsInProgressException 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 TooManyInvalidationsInProgressException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyInvalidationsInProgressException response = new TooManyInvalidationsInProgressException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyInvalidationsInProgressExceptionUnmarshaller _instance = new TooManyInvalidationsInProgressExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyInvalidationsInProgressExceptionUnmarshaller 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 TooManyKeyGroupsAssociatedToDistributionException operation
/// </summary>
public class TooManyKeyGroupsAssociatedToDistributionExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyKeyGroupsAssociatedToDistributionException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyKeyGroupsAssociatedToDistributionException 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 TooManyKeyGroupsAssociatedToDistributionException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyKeyGroupsAssociatedToDistributionException response = new TooManyKeyGroupsAssociatedToDistributionException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyKeyGroupsAssociatedToDistributionExceptionUnmarshaller _instance = new TooManyKeyGroupsAssociatedToDistributionExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyKeyGroupsAssociatedToDistributionExceptionUnmarshaller 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 TooManyKeyGroupsException operation
/// </summary>
public class TooManyKeyGroupsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyKeyGroupsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyKeyGroupsException 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 TooManyKeyGroupsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyKeyGroupsException response = new TooManyKeyGroupsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyKeyGroupsExceptionUnmarshaller _instance = new TooManyKeyGroupsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyKeyGroupsExceptionUnmarshaller 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 TooManyLambdaFunctionAssociationsException operation
/// </summary>
public class TooManyLambdaFunctionAssociationsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyLambdaFunctionAssociationsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyLambdaFunctionAssociationsException 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 TooManyLambdaFunctionAssociationsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyLambdaFunctionAssociationsException response = new TooManyLambdaFunctionAssociationsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyLambdaFunctionAssociationsExceptionUnmarshaller _instance = new TooManyLambdaFunctionAssociationsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyLambdaFunctionAssociationsExceptionUnmarshaller 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 TooManyOriginAccessControlsException operation
/// </summary>
public class TooManyOriginAccessControlsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyOriginAccessControlsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyOriginAccessControlsException 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 TooManyOriginAccessControlsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyOriginAccessControlsException response = new TooManyOriginAccessControlsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyOriginAccessControlsExceptionUnmarshaller _instance = new TooManyOriginAccessControlsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyOriginAccessControlsExceptionUnmarshaller 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 TooManyOriginCustomHeadersException operation
/// </summary>
public class TooManyOriginCustomHeadersExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyOriginCustomHeadersException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyOriginCustomHeadersException 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 TooManyOriginCustomHeadersException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyOriginCustomHeadersException response = new TooManyOriginCustomHeadersException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyOriginCustomHeadersExceptionUnmarshaller _instance = new TooManyOriginCustomHeadersExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyOriginCustomHeadersExceptionUnmarshaller 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 TooManyOriginGroupsPerDistributionException operation
/// </summary>
public class TooManyOriginGroupsPerDistributionExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyOriginGroupsPerDistributionException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyOriginGroupsPerDistributionException 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 TooManyOriginGroupsPerDistributionException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyOriginGroupsPerDistributionException response = new TooManyOriginGroupsPerDistributionException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyOriginGroupsPerDistributionExceptionUnmarshaller _instance = new TooManyOriginGroupsPerDistributionExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyOriginGroupsPerDistributionExceptionUnmarshaller 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 TooManyOriginRequestPoliciesException operation
/// </summary>
public class TooManyOriginRequestPoliciesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyOriginRequestPoliciesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyOriginRequestPoliciesException 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 TooManyOriginRequestPoliciesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyOriginRequestPoliciesException response = new TooManyOriginRequestPoliciesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyOriginRequestPoliciesExceptionUnmarshaller _instance = new TooManyOriginRequestPoliciesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyOriginRequestPoliciesExceptionUnmarshaller 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 TooManyOriginsException operation
/// </summary>
public class TooManyOriginsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyOriginsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyOriginsException 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 TooManyOriginsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyOriginsException response = new TooManyOriginsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyOriginsExceptionUnmarshaller _instance = new TooManyOriginsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyOriginsExceptionUnmarshaller 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 TooManyPublicKeysException operation
/// </summary>
public class TooManyPublicKeysExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyPublicKeysException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyPublicKeysException 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 TooManyPublicKeysException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyPublicKeysException response = new TooManyPublicKeysException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyPublicKeysExceptionUnmarshaller _instance = new TooManyPublicKeysExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyPublicKeysExceptionUnmarshaller 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 TooManyPublicKeysInKeyGroupException operation
/// </summary>
public class TooManyPublicKeysInKeyGroupExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyPublicKeysInKeyGroupException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyPublicKeysInKeyGroupException 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 TooManyPublicKeysInKeyGroupException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyPublicKeysInKeyGroupException response = new TooManyPublicKeysInKeyGroupException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyPublicKeysInKeyGroupExceptionUnmarshaller _instance = new TooManyPublicKeysInKeyGroupExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyPublicKeysInKeyGroupExceptionUnmarshaller 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 TooManyQueryStringParametersException operation
/// </summary>
public class TooManyQueryStringParametersExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyQueryStringParametersException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyQueryStringParametersException 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 TooManyQueryStringParametersException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyQueryStringParametersException response = new TooManyQueryStringParametersException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyQueryStringParametersExceptionUnmarshaller _instance = new TooManyQueryStringParametersExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyQueryStringParametersExceptionUnmarshaller 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 TooManyQueryStringsInCachePolicyException operation
/// </summary>
public class TooManyQueryStringsInCachePolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyQueryStringsInCachePolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyQueryStringsInCachePolicyException 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 TooManyQueryStringsInCachePolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyQueryStringsInCachePolicyException response = new TooManyQueryStringsInCachePolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyQueryStringsInCachePolicyExceptionUnmarshaller _instance = new TooManyQueryStringsInCachePolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyQueryStringsInCachePolicyExceptionUnmarshaller 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 TooManyQueryStringsInOriginRequestPolicyException operation
/// </summary>
public class TooManyQueryStringsInOriginRequestPolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyQueryStringsInOriginRequestPolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyQueryStringsInOriginRequestPolicyException 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 TooManyQueryStringsInOriginRequestPolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyQueryStringsInOriginRequestPolicyException response = new TooManyQueryStringsInOriginRequestPolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyQueryStringsInOriginRequestPolicyExceptionUnmarshaller _instance = new TooManyQueryStringsInOriginRequestPolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyQueryStringsInOriginRequestPolicyExceptionUnmarshaller 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 TooManyRealtimeLogConfigsException operation
/// </summary>
public class TooManyRealtimeLogConfigsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyRealtimeLogConfigsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyRealtimeLogConfigsException 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 TooManyRealtimeLogConfigsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyRealtimeLogConfigsException response = new TooManyRealtimeLogConfigsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyRealtimeLogConfigsExceptionUnmarshaller _instance = new TooManyRealtimeLogConfigsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyRealtimeLogConfigsExceptionUnmarshaller 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 TooManyRemoveHeadersInResponseHeadersPolicyException operation
/// </summary>
public class TooManyRemoveHeadersInResponseHeadersPolicyExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyRemoveHeadersInResponseHeadersPolicyException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyRemoveHeadersInResponseHeadersPolicyException 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 TooManyRemoveHeadersInResponseHeadersPolicyException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyRemoveHeadersInResponseHeadersPolicyException response = new TooManyRemoveHeadersInResponseHeadersPolicyException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyRemoveHeadersInResponseHeadersPolicyExceptionUnmarshaller _instance = new TooManyRemoveHeadersInResponseHeadersPolicyExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyRemoveHeadersInResponseHeadersPolicyExceptionUnmarshaller 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 TooManyResponseHeadersPoliciesException operation
/// </summary>
public class TooManyResponseHeadersPoliciesExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyResponseHeadersPoliciesException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyResponseHeadersPoliciesException 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 TooManyResponseHeadersPoliciesException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyResponseHeadersPoliciesException response = new TooManyResponseHeadersPoliciesException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyResponseHeadersPoliciesExceptionUnmarshaller _instance = new TooManyResponseHeadersPoliciesExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyResponseHeadersPoliciesExceptionUnmarshaller 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 TooManyStreamingDistributionCNAMEsException operation
/// </summary>
public class TooManyStreamingDistributionCNAMEsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyStreamingDistributionCNAMEsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyStreamingDistributionCNAMEsException 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 TooManyStreamingDistributionCNAMEsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyStreamingDistributionCNAMEsException response = new TooManyStreamingDistributionCNAMEsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyStreamingDistributionCNAMEsExceptionUnmarshaller _instance = new TooManyStreamingDistributionCNAMEsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyStreamingDistributionCNAMEsExceptionUnmarshaller 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 TooManyStreamingDistributionsException operation
/// </summary>
public class TooManyStreamingDistributionsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyStreamingDistributionsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyStreamingDistributionsException 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 TooManyStreamingDistributionsException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyStreamingDistributionsException response = new TooManyStreamingDistributionsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyStreamingDistributionsExceptionUnmarshaller _instance = new TooManyStreamingDistributionsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyStreamingDistributionsExceptionUnmarshaller 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 TooManyTrustedSignersException operation
/// </summary>
public class TooManyTrustedSignersExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyTrustedSignersException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyTrustedSignersException 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 TooManyTrustedSignersException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TooManyTrustedSignersException response = new TooManyTrustedSignersException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyTrustedSignersExceptionUnmarshaller _instance = new TooManyTrustedSignersExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyTrustedSignersExceptionUnmarshaller 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 TrafficConfig Object
/// </summary>
public class TrafficConfigUnmarshaller : IUnmarshaller<TrafficConfig, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TrafficConfig Unmarshall(XmlUnmarshallerContext context)
{
TrafficConfig unmarshalledObject = new TrafficConfig();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("SingleHeaderConfig", targetDepth))
{
var unmarshaller = ContinuousDeploymentSingleHeaderConfigUnmarshaller.Instance;
unmarshalledObject.SingleHeaderConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SingleWeightConfig", targetDepth))
{
var unmarshaller = ContinuousDeploymentSingleWeightConfigUnmarshaller.Instance;
unmarshalledObject.SingleWeightConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Type", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Type = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
private static TrafficConfigUnmarshaller _instance = new TrafficConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TrafficConfigUnmarshaller 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 TrustedKeyGroupDoesNotExistException operation
/// </summary>
public class TrustedKeyGroupDoesNotExistExceptionUnmarshaller : IErrorResponseUnmarshaller<TrustedKeyGroupDoesNotExistException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TrustedKeyGroupDoesNotExistException 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 TrustedKeyGroupDoesNotExistException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TrustedKeyGroupDoesNotExistException response = new TrustedKeyGroupDoesNotExistException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TrustedKeyGroupDoesNotExistExceptionUnmarshaller _instance = new TrustedKeyGroupDoesNotExistExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TrustedKeyGroupDoesNotExistExceptionUnmarshaller 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 TrustedKeyGroups Object
/// </summary>
public class TrustedKeyGroupsUnmarshaller : IUnmarshaller<TrustedKeyGroups, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TrustedKeyGroups Unmarshall(XmlUnmarshallerContext context)
{
TrustedKeyGroups unmarshalledObject = new TrustedKeyGroups();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Enabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Enabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Items/KeyGroup", 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 TrustedKeyGroupsUnmarshaller _instance = new TrustedKeyGroupsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TrustedKeyGroupsUnmarshaller 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 TrustedSignerDoesNotExistException operation
/// </summary>
public class TrustedSignerDoesNotExistExceptionUnmarshaller : IErrorResponseUnmarshaller<TrustedSignerDoesNotExistException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TrustedSignerDoesNotExistException 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 TrustedSignerDoesNotExistException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
TrustedSignerDoesNotExistException response = new TrustedSignerDoesNotExistException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TrustedSignerDoesNotExistExceptionUnmarshaller _instance = new TrustedSignerDoesNotExistExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TrustedSignerDoesNotExistExceptionUnmarshaller 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 TrustedSigners Object
/// </summary>
public class TrustedSignersUnmarshaller : IUnmarshaller<TrustedSigners, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TrustedSigners Unmarshall(XmlUnmarshallerContext context)
{
TrustedSigners unmarshalledObject = new TrustedSigners();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Enabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Enabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Items/AwsAccountNumber", 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 TrustedSignersUnmarshaller _instance = new TrustedSignersUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TrustedSignersUnmarshaller 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 UnsupportedOperationException operation
/// </summary>
public class UnsupportedOperationExceptionUnmarshaller : IErrorResponseUnmarshaller<UnsupportedOperationException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public UnsupportedOperationException 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 UnsupportedOperationException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
UnsupportedOperationException response = new UnsupportedOperationException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static UnsupportedOperationExceptionUnmarshaller _instance = new UnsupportedOperationExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static UnsupportedOperationExceptionUnmarshaller 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.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>
/// UntagResource Request Marshaller
/// </summary>
public class UntagResourceRequestMarshaller : IMarshaller<IRequest, UntagResourceRequest> , 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((UntagResourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UntagResourceRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "POST";
request.AddSubResource("Operation", "Untag");
if (publicRequest.IsSetResource())
request.Parameters.Add("Resource", StringUtils.FromString(publicRequest.Resource));
request.ResourcePath = "/2020-05-31/tagging";
var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture);
using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize }))
{
if (publicRequest.IsSetTagKeys())
{
xmlWriter.WriteStartElement("TagKeys", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestTagKeysItems = publicRequest.TagKeys.Items;
if (publicRequestTagKeysItems != null && publicRequestTagKeysItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestTagKeysItemsValue in publicRequestTagKeysItems)
{
xmlWriter.WriteStartElement("Key", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestTagKeysItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
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);
}
request.UseQueryString = true;
return request;
}
private static UntagResourceRequestMarshaller _instance = new UntagResourceRequestMarshaller();
internal static UntagResourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UntagResourceRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 121 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the 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 UntagResource operation
/// </summary>
public class UntagResourceResponseUnmarshaller : 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)
{
UntagResourceResponse response = new UntagResourceResponse();
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("InvalidTagging"))
{
return InvalidTaggingExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
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 UntagResourceResponseUnmarshaller _instance = new UntagResourceResponseUnmarshaller();
internal static UntagResourceResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UntagResourceResponseUnmarshaller 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>
/// UpdateCachePolicy Request Marshaller
/// </summary>
public class UpdateCachePolicyRequestMarshaller : IMarshaller<IRequest, UpdateCachePolicyRequest> , 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((UpdateCachePolicyRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateCachePolicyRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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/cache-policy/{Id}";
var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture);
using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize }))
{
if (publicRequest.IsSetCachePolicyConfig())
{
xmlWriter.WriteStartElement("CachePolicyConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.CachePolicyConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.CachePolicyConfig.Comment));
if(publicRequest.CachePolicyConfig.IsSetDefaultTTL())
xmlWriter.WriteElementString("DefaultTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequest.CachePolicyConfig.DefaultTTL));
if(publicRequest.CachePolicyConfig.IsSetMaxTTL())
xmlWriter.WriteElementString("MaxTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequest.CachePolicyConfig.MaxTTL));
if(publicRequest.CachePolicyConfig.IsSetMinTTL())
xmlWriter.WriteElementString("MinTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequest.CachePolicyConfig.MinTTL));
if(publicRequest.CachePolicyConfig.IsSetName())
xmlWriter.WriteElementString("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.CachePolicyConfig.Name));
if (publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin != null)
{
xmlWriter.WriteStartElement("ParametersInCacheKeyAndForwardedToOrigin", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.CookiesConfig != null)
{
xmlWriter.WriteStartElement("CookiesConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.CookiesConfig.IsSetCookieBehavior())
xmlWriter.WriteElementString("CookieBehavior", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.CookiesConfig.CookieBehavior));
if (publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.CookiesConfig.Cookies != null)
{
xmlWriter.WriteStartElement("Cookies", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginCookiesConfigCookiesItems = publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.CookiesConfig.Cookies.Items;
if (publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginCookiesConfigCookiesItems != null && publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginCookiesConfigCookiesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginCookiesConfigCookiesItemsValue in publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginCookiesConfigCookiesItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginCookiesConfigCookiesItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.CookiesConfig.Cookies.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.CookiesConfig.Cookies.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.IsSetEnableAcceptEncodingBrotli())
xmlWriter.WriteElementString("EnableAcceptEncodingBrotli", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.EnableAcceptEncodingBrotli));
if(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.IsSetEnableAcceptEncodingGzip())
xmlWriter.WriteElementString("EnableAcceptEncodingGzip", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.EnableAcceptEncodingGzip));
if (publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.HeadersConfig != null)
{
xmlWriter.WriteStartElement("HeadersConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.HeadersConfig.IsSetHeaderBehavior())
xmlWriter.WriteElementString("HeaderBehavior", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.HeadersConfig.HeaderBehavior));
if (publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.HeadersConfig.Headers != null)
{
xmlWriter.WriteStartElement("Headers", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginHeadersConfigHeadersItems = publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.HeadersConfig.Headers.Items;
if (publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginHeadersConfigHeadersItems != null && publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginHeadersConfigHeadersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginHeadersConfigHeadersItemsValue in publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginHeadersConfigHeadersItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginHeadersConfigHeadersItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.HeadersConfig.Headers.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.HeadersConfig.Headers.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if (publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.QueryStringsConfig != null)
{
xmlWriter.WriteStartElement("QueryStringsConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.QueryStringsConfig.IsSetQueryStringBehavior())
xmlWriter.WriteElementString("QueryStringBehavior", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.QueryStringsConfig.QueryStringBehavior));
if (publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.QueryStringsConfig.QueryStrings != null)
{
xmlWriter.WriteStartElement("QueryStrings", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginQueryStringsConfigQueryStringsItems = publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.QueryStringsConfig.QueryStrings.Items;
if (publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginQueryStringsConfigQueryStringsItems != null && publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginQueryStringsConfigQueryStringsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginQueryStringsConfigQueryStringsItemsValue in publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginQueryStringsConfigQueryStringsItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestCachePolicyConfigParametersInCacheKeyAndForwardedToOriginQueryStringsConfigQueryStringsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.QueryStringsConfig.QueryStrings.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.QueryStringsConfig.QueryStrings.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
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 UpdateCachePolicyRequestMarshaller _instance = new UpdateCachePolicyRequestMarshaller();
internal static UpdateCachePolicyRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateCachePolicyRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 229 |
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 UpdateCachePolicy operation
/// </summary>
public class UpdateCachePolicyResponseUnmarshaller : 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)
{
UpdateCachePolicyResponse response = new UpdateCachePolicyResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateCachePolicyResponse 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("CachePolicyAlreadyExists"))
{
return CachePolicyAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalUpdate"))
{
return IllegalUpdateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InconsistentQuantities"))
{
return InconsistentQuantitiesExceptionUnmarshaller.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("InvalidIfMatchVersion"))
{
return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchCachePolicy"))
{
return NoSuchCachePolicyExceptionUnmarshaller.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("TooManyCookiesInCachePolicy"))
{
return TooManyCookiesInCachePolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyHeadersInCachePolicy"))
{
return TooManyHeadersInCachePolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyQueryStringsInCachePolicy"))
{
return TooManyQueryStringsInCachePolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateCachePolicyResponseUnmarshaller _instance = new UpdateCachePolicyResponseUnmarshaller();
internal static UpdateCachePolicyResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateCachePolicyResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 166 |
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>
/// UpdateCloudFrontOriginAccessIdentity Request Marshaller
/// </summary>
public class UpdateCloudFrontOriginAccessIdentityRequestMarshaller : IMarshaller<IRequest, UpdateCloudFrontOriginAccessIdentityRequest> , 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((UpdateCloudFrontOriginAccessIdentityRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateCloudFrontOriginAccessIdentityRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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-access-identity/cloudfront/{Id}/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 }))
{
if (publicRequest.IsSetCloudFrontOriginAccessIdentityConfig())
{
xmlWriter.WriteStartElement("CloudFrontOriginAccessIdentityConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.CloudFrontOriginAccessIdentityConfig.IsSetCallerReference())
xmlWriter.WriteElementString("CallerReference", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.CloudFrontOriginAccessIdentityConfig.CallerReference));
if(publicRequest.CloudFrontOriginAccessIdentityConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.CloudFrontOriginAccessIdentityConfig.Comment));
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 UpdateCloudFrontOriginAccessIdentityRequestMarshaller _instance = new UpdateCloudFrontOriginAccessIdentityRequestMarshaller();
internal static UpdateCloudFrontOriginAccessIdentityRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateCloudFrontOriginAccessIdentityRequestMarshaller 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.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 UpdateCloudFrontOriginAccessIdentity operation
/// </summary>
public class UpdateCloudFrontOriginAccessIdentityResponseUnmarshaller : 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)
{
UpdateCloudFrontOriginAccessIdentityResponse response = new UpdateCloudFrontOriginAccessIdentityResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateCloudFrontOriginAccessIdentityResponse 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("IllegalUpdate"))
{
return IllegalUpdateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InconsistentQuantities"))
{
return InconsistentQuantitiesExceptionUnmarshaller.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("InvalidIfMatchVersion"))
{
return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("MissingBody"))
{
return MissingBodyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchCloudFrontOriginAccessIdentity"))
{
return NoSuchCloudFrontOriginAccessIdentityExceptionUnmarshaller.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 UpdateCloudFrontOriginAccessIdentityResponseUnmarshaller _instance = new UpdateCloudFrontOriginAccessIdentityResponseUnmarshaller();
internal static UpdateCloudFrontOriginAccessIdentityResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateCloudFrontOriginAccessIdentityResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 154 |
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>
/// UpdateContinuousDeploymentPolicy Request Marshaller
/// </summary>
public class UpdateContinuousDeploymentPolicyRequestMarshaller : IMarshaller<IRequest, UpdateContinuousDeploymentPolicyRequest> , 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((UpdateContinuousDeploymentPolicyRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateContinuousDeploymentPolicyRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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/continuous-deployment-policy/{Id}";
var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture);
using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize }))
{
if (publicRequest.IsSetContinuousDeploymentPolicyConfig())
{
xmlWriter.WriteStartElement("ContinuousDeploymentPolicyConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ContinuousDeploymentPolicyConfig.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ContinuousDeploymentPolicyConfig.Enabled));
if (publicRequest.ContinuousDeploymentPolicyConfig.StagingDistributionDnsNames != null)
{
xmlWriter.WriteStartElement("StagingDistributionDnsNames", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestContinuousDeploymentPolicyConfigStagingDistributionDnsNamesItems = publicRequest.ContinuousDeploymentPolicyConfig.StagingDistributionDnsNames.Items;
if (publicRequestContinuousDeploymentPolicyConfigStagingDistributionDnsNamesItems != null && publicRequestContinuousDeploymentPolicyConfigStagingDistributionDnsNamesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestContinuousDeploymentPolicyConfigStagingDistributionDnsNamesItemsValue in publicRequestContinuousDeploymentPolicyConfigStagingDistributionDnsNamesItems)
{
xmlWriter.WriteStartElement("DnsName", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestContinuousDeploymentPolicyConfigStagingDistributionDnsNamesItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.ContinuousDeploymentPolicyConfig.StagingDistributionDnsNames.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ContinuousDeploymentPolicyConfig.StagingDistributionDnsNames.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig != null)
{
xmlWriter.WriteStartElement("TrafficConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleHeaderConfig != null)
{
xmlWriter.WriteStartElement("SingleHeaderConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleHeaderConfig.IsSetHeader())
xmlWriter.WriteElementString("Header", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleHeaderConfig.Header));
if(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleHeaderConfig.IsSetValue())
xmlWriter.WriteElementString("Value", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleHeaderConfig.Value));
xmlWriter.WriteEndElement();
}
if (publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleWeightConfig != null)
{
xmlWriter.WriteStartElement("SingleWeightConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleWeightConfig.SessionStickinessConfig != null)
{
xmlWriter.WriteStartElement("SessionStickinessConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleWeightConfig.SessionStickinessConfig.IsSetIdleTTL())
xmlWriter.WriteElementString("IdleTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleWeightConfig.SessionStickinessConfig.IdleTTL));
if(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleWeightConfig.SessionStickinessConfig.IsSetMaximumTTL())
xmlWriter.WriteElementString("MaximumTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleWeightConfig.SessionStickinessConfig.MaximumTTL));
xmlWriter.WriteEndElement();
}
if(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleWeightConfig.IsSetWeight())
xmlWriter.WriteElementString("Weight", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromFloat(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.SingleWeightConfig.Weight));
xmlWriter.WriteEndElement();
}
if(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.IsSetType())
xmlWriter.WriteElementString("Type", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ContinuousDeploymentPolicyConfig.TrafficConfig.Type));
xmlWriter.WriteEndElement();
}
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 UpdateContinuousDeploymentPolicyRequestMarshaller _instance = new UpdateContinuousDeploymentPolicyRequestMarshaller();
internal static UpdateContinuousDeploymentPolicyRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateContinuousDeploymentPolicyRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 178 |
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 UpdateContinuousDeploymentPolicy operation
/// </summary>
public class UpdateContinuousDeploymentPolicyResponseUnmarshaller : 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)
{
UpdateContinuousDeploymentPolicyResponse response = new UpdateContinuousDeploymentPolicyResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateContinuousDeploymentPolicyResponse 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("InconsistentQuantities"))
{
return InconsistentQuantitiesExceptionUnmarshaller.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("InvalidIfMatchVersion"))
{
return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchContinuousDeploymentPolicy"))
{
return NoSuchContinuousDeploymentPolicyExceptionUnmarshaller.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("StagingDistributionInUse"))
{
return StagingDistributionInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateContinuousDeploymentPolicyResponseUnmarshaller _instance = new UpdateContinuousDeploymentPolicyResponseUnmarshaller();
internal static UpdateContinuousDeploymentPolicyResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateContinuousDeploymentPolicyResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 150 |
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>
/// UpdateDistribution Request Marshaller
/// </summary>
public class UpdateDistributionRequestMarshaller : IMarshaller<IRequest, UpdateDistributionRequest> , 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((UpdateDistributionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateDistributionRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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/distribution/{Id}/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 }))
{
if (publicRequest.IsSetDistributionConfig())
{
xmlWriter.WriteStartElement("DistributionConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.DistributionConfig.Aliases != null)
{
xmlWriter.WriteStartElement("Aliases", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigAliasesItems = publicRequest.DistributionConfig.Aliases.Items;
if (publicRequestDistributionConfigAliasesItems != null && publicRequestDistributionConfigAliasesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigAliasesItemsValue in publicRequestDistributionConfigAliasesItems)
{
xmlWriter.WriteStartElement("CNAME", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigAliasesItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.Aliases.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.Aliases.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequest.DistributionConfig.CacheBehaviors != null)
{
xmlWriter.WriteStartElement("CacheBehaviors", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigCacheBehaviorsItems = publicRequest.DistributionConfig.CacheBehaviors.Items;
if (publicRequestDistributionConfigCacheBehaviorsItems != null && publicRequestDistributionConfigCacheBehaviorsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCacheBehaviorsItemsValue in publicRequestDistributionConfigCacheBehaviorsItems)
{
if (publicRequestDistributionConfigCacheBehaviorsItemsValue != null)
{
xmlWriter.WriteStartElement("CacheBehavior", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.AllowedMethods != null)
{
xmlWriter.WriteStartElement("AllowedMethods", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.AllowedMethods.CachedMethods != null)
{
xmlWriter.WriteStartElement("CachedMethods", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsCachedMethodsItems = publicRequestDistributionConfigCacheBehaviorsItemsValue.AllowedMethods.CachedMethods.Items;
if (publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsCachedMethodsItems != null && publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsCachedMethodsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsCachedMethodsItemsValue in publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsCachedMethodsItems)
{
xmlWriter.WriteStartElement("Method", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsCachedMethodsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.AllowedMethods.CachedMethods.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigCacheBehaviorsItemsValue.AllowedMethods.CachedMethods.Quantity));
xmlWriter.WriteEndElement();
}
var publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsItems = publicRequestDistributionConfigCacheBehaviorsItemsValue.AllowedMethods.Items;
if (publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsItems != null && publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsItemsValue in publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsItems)
{
xmlWriter.WriteStartElement("Method", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigCacheBehaviorsItemsValueAllowedMethodsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.AllowedMethods.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigCacheBehaviorsItemsValue.AllowedMethods.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetCachePolicyId())
xmlWriter.WriteElementString("CachePolicyId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValue.CachePolicyId));
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetCompress())
xmlWriter.WriteElementString("Compress", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequestDistributionConfigCacheBehaviorsItemsValue.Compress));
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetDefaultTTL())
xmlWriter.WriteElementString("DefaultTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequestDistributionConfigCacheBehaviorsItemsValue.DefaultTTL));
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetFieldLevelEncryptionId())
xmlWriter.WriteElementString("FieldLevelEncryptionId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValue.FieldLevelEncryptionId));
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues != null)
{
xmlWriter.WriteStartElement("ForwardedValues", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Cookies != null)
{
xmlWriter.WriteStartElement("Cookies", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Cookies.IsSetForward())
xmlWriter.WriteElementString("Forward", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Cookies.Forward));
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Cookies.WhitelistedNames != null)
{
xmlWriter.WriteStartElement("WhitelistedNames", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesCookiesWhitelistedNamesItems = publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Cookies.WhitelistedNames.Items;
if (publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesCookiesWhitelistedNamesItems != null && publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesCookiesWhitelistedNamesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesCookiesWhitelistedNamesItemsValue in publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesCookiesWhitelistedNamesItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesCookiesWhitelistedNamesItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Cookies.WhitelistedNames.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Cookies.WhitelistedNames.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Headers != null)
{
xmlWriter.WriteStartElement("Headers", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesHeadersItems = publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Headers.Items;
if (publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesHeadersItems != null && publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesHeadersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesHeadersItemsValue in publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesHeadersItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesHeadersItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Headers.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.Headers.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.IsSetQueryString())
xmlWriter.WriteElementString("QueryString", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.QueryString));
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.QueryStringCacheKeys != null)
{
xmlWriter.WriteStartElement("QueryStringCacheKeys", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesQueryStringCacheKeysItems = publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.QueryStringCacheKeys.Items;
if (publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesQueryStringCacheKeysItems != null && publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesQueryStringCacheKeysItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesQueryStringCacheKeysItemsValue in publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesQueryStringCacheKeysItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigCacheBehaviorsItemsValueForwardedValuesQueryStringCacheKeysItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.QueryStringCacheKeys.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigCacheBehaviorsItemsValue.ForwardedValues.QueryStringCacheKeys.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.FunctionAssociations != null)
{
xmlWriter.WriteStartElement("FunctionAssociations", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigCacheBehaviorsItemsValueFunctionAssociationsItems = publicRequestDistributionConfigCacheBehaviorsItemsValue.FunctionAssociations.Items;
if (publicRequestDistributionConfigCacheBehaviorsItemsValueFunctionAssociationsItems != null && publicRequestDistributionConfigCacheBehaviorsItemsValueFunctionAssociationsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCacheBehaviorsItemsValueFunctionAssociationsItemsValue in publicRequestDistributionConfigCacheBehaviorsItemsValueFunctionAssociationsItems)
{
if (publicRequestDistributionConfigCacheBehaviorsItemsValueFunctionAssociationsItemsValue != null)
{
xmlWriter.WriteStartElement("FunctionAssociation", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigCacheBehaviorsItemsValueFunctionAssociationsItemsValue.IsSetEventType())
xmlWriter.WriteElementString("EventType", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValueFunctionAssociationsItemsValue.EventType));
if(publicRequestDistributionConfigCacheBehaviorsItemsValueFunctionAssociationsItemsValue.IsSetFunctionARN())
xmlWriter.WriteElementString("FunctionARN", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValueFunctionAssociationsItemsValue.FunctionARN));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.FunctionAssociations.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigCacheBehaviorsItemsValue.FunctionAssociations.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.LambdaFunctionAssociations != null)
{
xmlWriter.WriteStartElement("LambdaFunctionAssociations", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItems = publicRequestDistributionConfigCacheBehaviorsItemsValue.LambdaFunctionAssociations.Items;
if (publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItems != null && publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItemsValue in publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItems)
{
if (publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItemsValue != null)
{
xmlWriter.WriteStartElement("LambdaFunctionAssociation", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItemsValue.IsSetEventType())
xmlWriter.WriteElementString("EventType", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItemsValue.EventType));
if(publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItemsValue.IsSetIncludeBody())
xmlWriter.WriteElementString("IncludeBody", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItemsValue.IncludeBody));
if(publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItemsValue.IsSetLambdaFunctionARN())
xmlWriter.WriteElementString("LambdaFunctionARN", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValueLambdaFunctionAssociationsItemsValue.LambdaFunctionARN));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.LambdaFunctionAssociations.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigCacheBehaviorsItemsValue.LambdaFunctionAssociations.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetMaxTTL())
xmlWriter.WriteElementString("MaxTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequestDistributionConfigCacheBehaviorsItemsValue.MaxTTL));
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetMinTTL())
xmlWriter.WriteElementString("MinTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequestDistributionConfigCacheBehaviorsItemsValue.MinTTL));
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetOriginRequestPolicyId())
xmlWriter.WriteElementString("OriginRequestPolicyId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValue.OriginRequestPolicyId));
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetPathPattern())
xmlWriter.WriteElementString("PathPattern", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValue.PathPattern));
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetRealtimeLogConfigArn())
xmlWriter.WriteElementString("RealtimeLogConfigArn", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValue.RealtimeLogConfigArn));
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetResponseHeadersPolicyId())
xmlWriter.WriteElementString("ResponseHeadersPolicyId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValue.ResponseHeadersPolicyId));
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetSmoothStreaming())
xmlWriter.WriteElementString("SmoothStreaming", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequestDistributionConfigCacheBehaviorsItemsValue.SmoothStreaming));
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetTargetOriginId())
xmlWriter.WriteElementString("TargetOriginId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValue.TargetOriginId));
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedKeyGroups != null)
{
xmlWriter.WriteStartElement("TrustedKeyGroups", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedKeyGroups.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedKeyGroups.Enabled));
var publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedKeyGroupsItems = publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedKeyGroups.Items;
if (publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedKeyGroupsItems != null && publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedKeyGroupsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedKeyGroupsItemsValue in publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedKeyGroupsItems)
{
xmlWriter.WriteStartElement("KeyGroup", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedKeyGroupsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedKeyGroups.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedKeyGroups.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedSigners != null)
{
xmlWriter.WriteStartElement("TrustedSigners", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedSigners.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedSigners.Enabled));
var publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedSignersItems = publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedSigners.Items;
if (publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedSignersItems != null && publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedSignersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedSignersItemsValue in publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedSignersItems)
{
xmlWriter.WriteStartElement("AwsAccountNumber", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigCacheBehaviorsItemsValueTrustedSignersItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedSigners.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigCacheBehaviorsItemsValue.TrustedSigners.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigCacheBehaviorsItemsValue.IsSetViewerProtocolPolicy())
xmlWriter.WriteElementString("ViewerProtocolPolicy", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCacheBehaviorsItemsValue.ViewerProtocolPolicy));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.CacheBehaviors.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.CacheBehaviors.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.IsSetCallerReference())
xmlWriter.WriteElementString("CallerReference", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.CallerReference));
if(publicRequest.DistributionConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.Comment));
if(publicRequest.DistributionConfig.IsSetContinuousDeploymentPolicyId())
xmlWriter.WriteElementString("ContinuousDeploymentPolicyId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.ContinuousDeploymentPolicyId));
if (publicRequest.DistributionConfig.CustomErrorResponses != null)
{
xmlWriter.WriteStartElement("CustomErrorResponses", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigCustomErrorResponsesItems = publicRequest.DistributionConfig.CustomErrorResponses.Items;
if (publicRequestDistributionConfigCustomErrorResponsesItems != null && publicRequestDistributionConfigCustomErrorResponsesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigCustomErrorResponsesItemsValue in publicRequestDistributionConfigCustomErrorResponsesItems)
{
if (publicRequestDistributionConfigCustomErrorResponsesItemsValue != null)
{
xmlWriter.WriteStartElement("CustomErrorResponse", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigCustomErrorResponsesItemsValue.IsSetErrorCachingMinTTL())
xmlWriter.WriteElementString("ErrorCachingMinTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequestDistributionConfigCustomErrorResponsesItemsValue.ErrorCachingMinTTL));
if(publicRequestDistributionConfigCustomErrorResponsesItemsValue.IsSetErrorCode())
xmlWriter.WriteElementString("ErrorCode", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigCustomErrorResponsesItemsValue.ErrorCode));
if(publicRequestDistributionConfigCustomErrorResponsesItemsValue.IsSetResponseCode())
xmlWriter.WriteElementString("ResponseCode", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCustomErrorResponsesItemsValue.ResponseCode));
if(publicRequestDistributionConfigCustomErrorResponsesItemsValue.IsSetResponsePagePath())
xmlWriter.WriteElementString("ResponsePagePath", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigCustomErrorResponsesItemsValue.ResponsePagePath));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.CustomErrorResponses.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.CustomErrorResponses.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequest.DistributionConfig.DefaultCacheBehavior != null)
{
xmlWriter.WriteStartElement("DefaultCacheBehavior", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.DistributionConfig.DefaultCacheBehavior.AllowedMethods != null)
{
xmlWriter.WriteStartElement("AllowedMethods", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.DistributionConfig.DefaultCacheBehavior.AllowedMethods.CachedMethods != null)
{
xmlWriter.WriteStartElement("CachedMethods", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsCachedMethodsItems = publicRequest.DistributionConfig.DefaultCacheBehavior.AllowedMethods.CachedMethods.Items;
if (publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsCachedMethodsItems != null && publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsCachedMethodsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsCachedMethodsItemsValue in publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsCachedMethodsItems)
{
xmlWriter.WriteStartElement("Method", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsCachedMethodsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.AllowedMethods.CachedMethods.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.DefaultCacheBehavior.AllowedMethods.CachedMethods.Quantity));
xmlWriter.WriteEndElement();
}
var publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsItems = publicRequest.DistributionConfig.DefaultCacheBehavior.AllowedMethods.Items;
if (publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsItems != null && publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsItemsValue in publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsItems)
{
xmlWriter.WriteStartElement("Method", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigDefaultCacheBehaviorAllowedMethodsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.AllowedMethods.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.DefaultCacheBehavior.AllowedMethods.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetCachePolicyId())
xmlWriter.WriteElementString("CachePolicyId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.DefaultCacheBehavior.CachePolicyId));
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetCompress())
xmlWriter.WriteElementString("Compress", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.DefaultCacheBehavior.Compress));
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetDefaultTTL())
xmlWriter.WriteElementString("DefaultTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequest.DistributionConfig.DefaultCacheBehavior.DefaultTTL));
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetFieldLevelEncryptionId())
xmlWriter.WriteElementString("FieldLevelEncryptionId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.DefaultCacheBehavior.FieldLevelEncryptionId));
if (publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues != null)
{
xmlWriter.WriteStartElement("ForwardedValues", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Cookies != null)
{
xmlWriter.WriteStartElement("Cookies", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Cookies.IsSetForward())
xmlWriter.WriteElementString("Forward", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Cookies.Forward));
if (publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Cookies.WhitelistedNames != null)
{
xmlWriter.WriteStartElement("WhitelistedNames", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesCookiesWhitelistedNamesItems = publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Cookies.WhitelistedNames.Items;
if (publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesCookiesWhitelistedNamesItems != null && publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesCookiesWhitelistedNamesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesCookiesWhitelistedNamesItemsValue in publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesCookiesWhitelistedNamesItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesCookiesWhitelistedNamesItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Cookies.WhitelistedNames.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Cookies.WhitelistedNames.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if (publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Headers != null)
{
xmlWriter.WriteStartElement("Headers", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesHeadersItems = publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Headers.Items;
if (publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesHeadersItems != null && publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesHeadersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesHeadersItemsValue in publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesHeadersItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesHeadersItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Headers.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.Headers.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.IsSetQueryString())
xmlWriter.WriteElementString("QueryString", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.QueryString));
if (publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.QueryStringCacheKeys != null)
{
xmlWriter.WriteStartElement("QueryStringCacheKeys", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesQueryStringCacheKeysItems = publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.QueryStringCacheKeys.Items;
if (publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesQueryStringCacheKeysItems != null && publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesQueryStringCacheKeysItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesQueryStringCacheKeysItemsValue in publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesQueryStringCacheKeysItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigDefaultCacheBehaviorForwardedValuesQueryStringCacheKeysItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.QueryStringCacheKeys.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.DefaultCacheBehavior.ForwardedValues.QueryStringCacheKeys.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if (publicRequest.DistributionConfig.DefaultCacheBehavior.FunctionAssociations != null)
{
xmlWriter.WriteStartElement("FunctionAssociations", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigDefaultCacheBehaviorFunctionAssociationsItems = publicRequest.DistributionConfig.DefaultCacheBehavior.FunctionAssociations.Items;
if (publicRequestDistributionConfigDefaultCacheBehaviorFunctionAssociationsItems != null && publicRequestDistributionConfigDefaultCacheBehaviorFunctionAssociationsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigDefaultCacheBehaviorFunctionAssociationsItemsValue in publicRequestDistributionConfigDefaultCacheBehaviorFunctionAssociationsItems)
{
if (publicRequestDistributionConfigDefaultCacheBehaviorFunctionAssociationsItemsValue != null)
{
xmlWriter.WriteStartElement("FunctionAssociation", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigDefaultCacheBehaviorFunctionAssociationsItemsValue.IsSetEventType())
xmlWriter.WriteElementString("EventType", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigDefaultCacheBehaviorFunctionAssociationsItemsValue.EventType));
if(publicRequestDistributionConfigDefaultCacheBehaviorFunctionAssociationsItemsValue.IsSetFunctionARN())
xmlWriter.WriteElementString("FunctionARN", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigDefaultCacheBehaviorFunctionAssociationsItemsValue.FunctionARN));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.FunctionAssociations.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.DefaultCacheBehavior.FunctionAssociations.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequest.DistributionConfig.DefaultCacheBehavior.LambdaFunctionAssociations != null)
{
xmlWriter.WriteStartElement("LambdaFunctionAssociations", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItems = publicRequest.DistributionConfig.DefaultCacheBehavior.LambdaFunctionAssociations.Items;
if (publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItems != null && publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItemsValue in publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItems)
{
if (publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItemsValue != null)
{
xmlWriter.WriteStartElement("LambdaFunctionAssociation", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItemsValue.IsSetEventType())
xmlWriter.WriteElementString("EventType", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItemsValue.EventType));
if(publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItemsValue.IsSetIncludeBody())
xmlWriter.WriteElementString("IncludeBody", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItemsValue.IncludeBody));
if(publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItemsValue.IsSetLambdaFunctionARN())
xmlWriter.WriteElementString("LambdaFunctionARN", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigDefaultCacheBehaviorLambdaFunctionAssociationsItemsValue.LambdaFunctionARN));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.LambdaFunctionAssociations.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.DefaultCacheBehavior.LambdaFunctionAssociations.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetMaxTTL())
xmlWriter.WriteElementString("MaxTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequest.DistributionConfig.DefaultCacheBehavior.MaxTTL));
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetMinTTL())
xmlWriter.WriteElementString("MinTTL", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequest.DistributionConfig.DefaultCacheBehavior.MinTTL));
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetOriginRequestPolicyId())
xmlWriter.WriteElementString("OriginRequestPolicyId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.DefaultCacheBehavior.OriginRequestPolicyId));
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetRealtimeLogConfigArn())
xmlWriter.WriteElementString("RealtimeLogConfigArn", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.DefaultCacheBehavior.RealtimeLogConfigArn));
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetResponseHeadersPolicyId())
xmlWriter.WriteElementString("ResponseHeadersPolicyId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.DefaultCacheBehavior.ResponseHeadersPolicyId));
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetSmoothStreaming())
xmlWriter.WriteElementString("SmoothStreaming", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.DefaultCacheBehavior.SmoothStreaming));
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetTargetOriginId())
xmlWriter.WriteElementString("TargetOriginId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.DefaultCacheBehavior.TargetOriginId));
if (publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedKeyGroups != null)
{
xmlWriter.WriteStartElement("TrustedKeyGroups", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedKeyGroups.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedKeyGroups.Enabled));
var publicRequestDistributionConfigDefaultCacheBehaviorTrustedKeyGroupsItems = publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedKeyGroups.Items;
if (publicRequestDistributionConfigDefaultCacheBehaviorTrustedKeyGroupsItems != null && publicRequestDistributionConfigDefaultCacheBehaviorTrustedKeyGroupsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigDefaultCacheBehaviorTrustedKeyGroupsItemsValue in publicRequestDistributionConfigDefaultCacheBehaviorTrustedKeyGroupsItems)
{
xmlWriter.WriteStartElement("KeyGroup", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigDefaultCacheBehaviorTrustedKeyGroupsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedKeyGroups.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedKeyGroups.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedSigners != null)
{
xmlWriter.WriteStartElement("TrustedSigners", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedSigners.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedSigners.Enabled));
var publicRequestDistributionConfigDefaultCacheBehaviorTrustedSignersItems = publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedSigners.Items;
if (publicRequestDistributionConfigDefaultCacheBehaviorTrustedSignersItems != null && publicRequestDistributionConfigDefaultCacheBehaviorTrustedSignersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigDefaultCacheBehaviorTrustedSignersItemsValue in publicRequestDistributionConfigDefaultCacheBehaviorTrustedSignersItems)
{
xmlWriter.WriteStartElement("AwsAccountNumber", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigDefaultCacheBehaviorTrustedSignersItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedSigners.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.DefaultCacheBehavior.TrustedSigners.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.DefaultCacheBehavior.IsSetViewerProtocolPolicy())
xmlWriter.WriteElementString("ViewerProtocolPolicy", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.DefaultCacheBehavior.ViewerProtocolPolicy));
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.IsSetDefaultRootObject())
xmlWriter.WriteElementString("DefaultRootObject", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.DefaultRootObject));
if(publicRequest.DistributionConfig.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.Enabled));
if(publicRequest.DistributionConfig.IsSetHttpVersion())
xmlWriter.WriteElementString("HttpVersion", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.HttpVersion));
if(publicRequest.DistributionConfig.IsSetIsIPV6Enabled())
xmlWriter.WriteElementString("IsIPV6Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.IsIPV6Enabled));
if (publicRequest.DistributionConfig.Logging != null)
{
xmlWriter.WriteStartElement("Logging", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.DistributionConfig.Logging.IsSetBucket())
xmlWriter.WriteElementString("Bucket", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.Logging.Bucket));
if(publicRequest.DistributionConfig.Logging.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.Logging.Enabled));
if(publicRequest.DistributionConfig.Logging.IsSetIncludeCookies())
xmlWriter.WriteElementString("IncludeCookies", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.Logging.IncludeCookies));
if(publicRequest.DistributionConfig.Logging.IsSetPrefix())
xmlWriter.WriteElementString("Prefix", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.Logging.Prefix));
xmlWriter.WriteEndElement();
}
if (publicRequest.DistributionConfig.OriginGroups != null)
{
xmlWriter.WriteStartElement("OriginGroups", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigOriginGroupsItems = publicRequest.DistributionConfig.OriginGroups.Items;
if (publicRequestDistributionConfigOriginGroupsItems != null && publicRequestDistributionConfigOriginGroupsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigOriginGroupsItemsValue in publicRequestDistributionConfigOriginGroupsItems)
{
if (publicRequestDistributionConfigOriginGroupsItemsValue != null)
{
xmlWriter.WriteStartElement("OriginGroup", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequestDistributionConfigOriginGroupsItemsValue.FailoverCriteria != null)
{
xmlWriter.WriteStartElement("FailoverCriteria", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequestDistributionConfigOriginGroupsItemsValue.FailoverCriteria.StatusCodes != null)
{
xmlWriter.WriteStartElement("StatusCodes", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigOriginGroupsItemsValueFailoverCriteriaStatusCodesItems = publicRequestDistributionConfigOriginGroupsItemsValue.FailoverCriteria.StatusCodes.Items;
if (publicRequestDistributionConfigOriginGroupsItemsValueFailoverCriteriaStatusCodesItems != null && publicRequestDistributionConfigOriginGroupsItemsValueFailoverCriteriaStatusCodesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigOriginGroupsItemsValueFailoverCriteriaStatusCodesItemsValue in publicRequestDistributionConfigOriginGroupsItemsValueFailoverCriteriaStatusCodesItems)
{
xmlWriter.WriteStartElement("StatusCode", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigOriginGroupsItemsValueFailoverCriteriaStatusCodesItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigOriginGroupsItemsValue.FailoverCriteria.StatusCodes.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigOriginGroupsItemsValue.FailoverCriteria.StatusCodes.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigOriginGroupsItemsValue.IsSetId())
xmlWriter.WriteElementString("Id", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginGroupsItemsValue.Id));
if (publicRequestDistributionConfigOriginGroupsItemsValue.Members != null)
{
xmlWriter.WriteStartElement("Members", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigOriginGroupsItemsValueMembersItems = publicRequestDistributionConfigOriginGroupsItemsValue.Members.Items;
if (publicRequestDistributionConfigOriginGroupsItemsValueMembersItems != null && publicRequestDistributionConfigOriginGroupsItemsValueMembersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigOriginGroupsItemsValueMembersItemsValue in publicRequestDistributionConfigOriginGroupsItemsValueMembersItems)
{
if (publicRequestDistributionConfigOriginGroupsItemsValueMembersItemsValue != null)
{
xmlWriter.WriteStartElement("OriginGroupMember", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigOriginGroupsItemsValueMembersItemsValue.IsSetOriginId())
xmlWriter.WriteElementString("OriginId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginGroupsItemsValueMembersItemsValue.OriginId));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigOriginGroupsItemsValue.Members.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigOriginGroupsItemsValue.Members.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.OriginGroups.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.OriginGroups.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequest.DistributionConfig.Origins != null)
{
xmlWriter.WriteStartElement("Origins", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigOriginsItems = publicRequest.DistributionConfig.Origins.Items;
if (publicRequestDistributionConfigOriginsItems != null && publicRequestDistributionConfigOriginsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigOriginsItemsValue in publicRequestDistributionConfigOriginsItems)
{
if (publicRequestDistributionConfigOriginsItemsValue != null)
{
xmlWriter.WriteStartElement("Origin", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigOriginsItemsValue.IsSetConnectionAttempts())
xmlWriter.WriteElementString("ConnectionAttempts", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigOriginsItemsValue.ConnectionAttempts));
if(publicRequestDistributionConfigOriginsItemsValue.IsSetConnectionTimeout())
xmlWriter.WriteElementString("ConnectionTimeout", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigOriginsItemsValue.ConnectionTimeout));
if (publicRequestDistributionConfigOriginsItemsValue.CustomHeaders != null)
{
xmlWriter.WriteStartElement("CustomHeaders", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigOriginsItemsValueCustomHeadersItems = publicRequestDistributionConfigOriginsItemsValue.CustomHeaders.Items;
if (publicRequestDistributionConfigOriginsItemsValueCustomHeadersItems != null && publicRequestDistributionConfigOriginsItemsValueCustomHeadersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigOriginsItemsValueCustomHeadersItemsValue in publicRequestDistributionConfigOriginsItemsValueCustomHeadersItems)
{
if (publicRequestDistributionConfigOriginsItemsValueCustomHeadersItemsValue != null)
{
xmlWriter.WriteStartElement("OriginCustomHeader", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigOriginsItemsValueCustomHeadersItemsValue.IsSetHeaderName())
xmlWriter.WriteElementString("HeaderName", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginsItemsValueCustomHeadersItemsValue.HeaderName));
if(publicRequestDistributionConfigOriginsItemsValueCustomHeadersItemsValue.IsSetHeaderValue())
xmlWriter.WriteElementString("HeaderValue", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginsItemsValueCustomHeadersItemsValue.HeaderValue));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigOriginsItemsValue.CustomHeaders.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigOriginsItemsValue.CustomHeaders.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig != null)
{
xmlWriter.WriteStartElement("CustomOriginConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.IsSetHTTPPort())
xmlWriter.WriteElementString("HTTPPort", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.HTTPPort));
if(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.IsSetHTTPSPort())
xmlWriter.WriteElementString("HTTPSPort", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.HTTPSPort));
if(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.IsSetOriginKeepaliveTimeout())
xmlWriter.WriteElementString("OriginKeepaliveTimeout", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.OriginKeepaliveTimeout));
if(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.IsSetOriginProtocolPolicy())
xmlWriter.WriteElementString("OriginProtocolPolicy", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.OriginProtocolPolicy));
if(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.IsSetOriginReadTimeout())
xmlWriter.WriteElementString("OriginReadTimeout", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.OriginReadTimeout));
if (publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.OriginSslProtocols != null)
{
xmlWriter.WriteStartElement("OriginSslProtocols", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigOriginsItemsValueCustomOriginConfigOriginSslProtocolsItems = publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.OriginSslProtocols.Items;
if (publicRequestDistributionConfigOriginsItemsValueCustomOriginConfigOriginSslProtocolsItems != null && publicRequestDistributionConfigOriginsItemsValueCustomOriginConfigOriginSslProtocolsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigOriginsItemsValueCustomOriginConfigOriginSslProtocolsItemsValue in publicRequestDistributionConfigOriginsItemsValueCustomOriginConfigOriginSslProtocolsItems)
{
xmlWriter.WriteStartElement("SslProtocol", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigOriginsItemsValueCustomOriginConfigOriginSslProtocolsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.OriginSslProtocols.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestDistributionConfigOriginsItemsValue.CustomOriginConfig.OriginSslProtocols.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestDistributionConfigOriginsItemsValue.IsSetDomainName())
xmlWriter.WriteElementString("DomainName", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginsItemsValue.DomainName));
if(publicRequestDistributionConfigOriginsItemsValue.IsSetId())
xmlWriter.WriteElementString("Id", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginsItemsValue.Id));
if(publicRequestDistributionConfigOriginsItemsValue.IsSetOriginAccessControlId())
xmlWriter.WriteElementString("OriginAccessControlId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginsItemsValue.OriginAccessControlId));
if(publicRequestDistributionConfigOriginsItemsValue.IsSetOriginPath())
xmlWriter.WriteElementString("OriginPath", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginsItemsValue.OriginPath));
if (publicRequestDistributionConfigOriginsItemsValue.OriginShield != null)
{
xmlWriter.WriteStartElement("OriginShield", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigOriginsItemsValue.OriginShield.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequestDistributionConfigOriginsItemsValue.OriginShield.Enabled));
if(publicRequestDistributionConfigOriginsItemsValue.OriginShield.IsSetOriginShieldRegion())
xmlWriter.WriteElementString("OriginShieldRegion", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginsItemsValue.OriginShield.OriginShieldRegion));
xmlWriter.WriteEndElement();
}
if (publicRequestDistributionConfigOriginsItemsValue.S3OriginConfig != null)
{
xmlWriter.WriteStartElement("S3OriginConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestDistributionConfigOriginsItemsValue.S3OriginConfig.IsSetOriginAccessIdentity())
xmlWriter.WriteElementString("OriginAccessIdentity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestDistributionConfigOriginsItemsValue.S3OriginConfig.OriginAccessIdentity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.Origins.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.Origins.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.IsSetPriceClass())
xmlWriter.WriteElementString("PriceClass", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.PriceClass));
if (publicRequest.DistributionConfig.Restrictions != null)
{
xmlWriter.WriteStartElement("Restrictions", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.DistributionConfig.Restrictions.GeoRestriction != null)
{
xmlWriter.WriteStartElement("GeoRestriction", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestDistributionConfigRestrictionsGeoRestrictionItems = publicRequest.DistributionConfig.Restrictions.GeoRestriction.Items;
if (publicRequestDistributionConfigRestrictionsGeoRestrictionItems != null && publicRequestDistributionConfigRestrictionsGeoRestrictionItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestDistributionConfigRestrictionsGeoRestrictionItemsValue in publicRequestDistributionConfigRestrictionsGeoRestrictionItems)
{
xmlWriter.WriteStartElement("Location", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestDistributionConfigRestrictionsGeoRestrictionItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.Restrictions.GeoRestriction.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.DistributionConfig.Restrictions.GeoRestriction.Quantity));
if(publicRequest.DistributionConfig.Restrictions.GeoRestriction.IsSetRestrictionType())
xmlWriter.WriteElementString("RestrictionType", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.Restrictions.GeoRestriction.RestrictionType));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.IsSetStaging())
xmlWriter.WriteElementString("Staging", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.Staging));
if (publicRequest.DistributionConfig.ViewerCertificate != null)
{
xmlWriter.WriteStartElement("ViewerCertificate", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.DistributionConfig.ViewerCertificate.IsSetACMCertificateArn())
xmlWriter.WriteElementString("ACMCertificateArn", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.ViewerCertificate.ACMCertificateArn));
if(publicRequest.DistributionConfig.ViewerCertificate.IsSetCertificate())
xmlWriter.WriteElementString("Certificate", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.ViewerCertificate.Certificate));
if(publicRequest.DistributionConfig.ViewerCertificate.IsSetCertificateSource())
xmlWriter.WriteElementString("CertificateSource", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.ViewerCertificate.CertificateSource));
if(publicRequest.DistributionConfig.ViewerCertificate.IsSetCloudFrontDefaultCertificate())
xmlWriter.WriteElementString("CloudFrontDefaultCertificate", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.DistributionConfig.ViewerCertificate.CloudFrontDefaultCertificate));
if(publicRequest.DistributionConfig.ViewerCertificate.IsSetIAMCertificateId())
xmlWriter.WriteElementString("IAMCertificateId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.ViewerCertificate.IAMCertificateId));
if(publicRequest.DistributionConfig.ViewerCertificate.IsSetMinimumProtocolVersion())
xmlWriter.WriteElementString("MinimumProtocolVersion", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.ViewerCertificate.MinimumProtocolVersion));
if(publicRequest.DistributionConfig.ViewerCertificate.IsSetSSLSupportMethod())
xmlWriter.WriteElementString("SSLSupportMethod", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.ViewerCertificate.SSLSupportMethod));
xmlWriter.WriteEndElement();
}
if(publicRequest.DistributionConfig.IsSetWebACLId())
xmlWriter.WriteElementString("WebACLId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.DistributionConfig.WebACLId));
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 UpdateDistributionRequestMarshaller _instance = new UpdateDistributionRequestMarshaller();
internal static UpdateDistributionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateDistributionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 1,063 |
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 UpdateDistribution operation
/// </summary>
public class UpdateDistributionResponseUnmarshaller : 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)
{
UpdateDistributionResponse response = new UpdateDistributionResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateDistributionResponse 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("CNAMEAlreadyExists"))
{
return CNAMEAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ContinuousDeploymentPolicyInUse"))
{
return ContinuousDeploymentPolicyInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior"))
{
return IllegalFieldLevelEncryptionConfigAssociationWithCacheBehaviorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalOriginAccessConfiguration"))
{
return IllegalOriginAccessConfigurationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalUpdate"))
{
return IllegalUpdateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InconsistentQuantities"))
{
return InconsistentQuantitiesExceptionUnmarshaller.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("InvalidDefaultRootObject"))
{
return InvalidDefaultRootObjectExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidDomainNameForOriginAccessControl"))
{
return InvalidDomainNameForOriginAccessControlExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidErrorCode"))
{
return InvalidErrorCodeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidForwardCookies"))
{
return InvalidForwardCookiesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidFunctionAssociation"))
{
return InvalidFunctionAssociationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidGeoRestrictionParameter"))
{
return InvalidGeoRestrictionParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidHeadersForS3Origin"))
{
return InvalidHeadersForS3OriginExceptionUnmarshaller.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("InvalidLambdaFunctionAssociation"))
{
return InvalidLambdaFunctionAssociationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidLocationCode"))
{
return InvalidLocationCodeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidMinimumProtocolVersion"))
{
return InvalidMinimumProtocolVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOriginAccessControl"))
{
return InvalidOriginAccessControlExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOriginAccessIdentity"))
{
return InvalidOriginAccessIdentityExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOriginKeepaliveTimeout"))
{
return InvalidOriginKeepaliveTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOriginReadTimeout"))
{
return InvalidOriginReadTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidQueryStringParameters"))
{
return InvalidQueryStringParametersExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRelativePath"))
{
return InvalidRelativePathExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequiredProtocol"))
{
return InvalidRequiredProtocolExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidResponseCode"))
{
return InvalidResponseCodeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidTTLOrder"))
{
return InvalidTTLOrderExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidViewerCertificate"))
{
return InvalidViewerCertificateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidWebACLId"))
{
return InvalidWebACLIdExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("MissingBody"))
{
return MissingBodyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchCachePolicy"))
{
return NoSuchCachePolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchContinuousDeploymentPolicy"))
{
return NoSuchContinuousDeploymentPolicyExceptionUnmarshaller.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("NoSuchFieldLevelEncryptionConfig"))
{
return NoSuchFieldLevelEncryptionConfigExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchOrigin"))
{
return NoSuchOriginExceptionUnmarshaller.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("NoSuchRealtimeLogConfig"))
{
return NoSuchRealtimeLogConfigExceptionUnmarshaller.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("RealtimeLogConfigOwnerMismatch"))
{
return RealtimeLogConfigOwnerMismatchExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("StagingDistributionInUse"))
{
return StagingDistributionInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyCacheBehaviors"))
{
return TooManyCacheBehaviorsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyCertificates"))
{
return TooManyCertificatesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyCookieNamesInWhiteList"))
{
return TooManyCookieNamesInWhiteListExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionCNAMEs"))
{
return TooManyDistributionCNAMEsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsAssociatedToCachePolicy"))
{
return TooManyDistributionsAssociatedToCachePolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsAssociatedToFieldLevelEncryptionConfig"))
{
return TooManyDistributionsAssociatedToFieldLevelEncryptionConfigExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsAssociatedToKeyGroup"))
{
return TooManyDistributionsAssociatedToKeyGroupExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsAssociatedToOriginRequestPolicy"))
{
return TooManyDistributionsAssociatedToOriginRequestPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsAssociatedToResponseHeadersPolicy"))
{
return TooManyDistributionsAssociatedToResponseHeadersPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsWithFunctionAssociations"))
{
return TooManyDistributionsWithFunctionAssociationsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsWithLambdaAssociations"))
{
return TooManyDistributionsWithLambdaAssociationsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsWithSingleFunctionARN"))
{
return TooManyDistributionsWithSingleFunctionARNExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyFunctionAssociations"))
{
return TooManyFunctionAssociationsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyHeadersInForwardedValues"))
{
return TooManyHeadersInForwardedValuesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyKeyGroupsAssociatedToDistribution"))
{
return TooManyKeyGroupsAssociatedToDistributionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyLambdaFunctionAssociations"))
{
return TooManyLambdaFunctionAssociationsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyOriginCustomHeaders"))
{
return TooManyOriginCustomHeadersExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyOriginGroupsPerDistribution"))
{
return TooManyOriginGroupsPerDistributionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyOrigins"))
{
return TooManyOriginsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyQueryStringParameters"))
{
return TooManyQueryStringParametersExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyTrustedSigners"))
{
return TooManyTrustedSignersExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TrustedKeyGroupDoesNotExist"))
{
return TrustedKeyGroupDoesNotExistExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TrustedSignerDoesNotExist"))
{
return TrustedSignerDoesNotExistExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateDistributionResponseUnmarshaller _instance = new UpdateDistributionResponseUnmarshaller();
internal static UpdateDistributionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateDistributionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 382 |
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>
/// UpdateDistributionWithStagingConfig Request Marshaller
/// </summary>
public class UpdateDistributionWithStagingConfigRequestMarshaller : IMarshaller<IRequest, UpdateDistributionWithStagingConfigRequest> , 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((UpdateDistributionWithStagingConfigRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateDistributionWithStagingConfigRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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));
if (publicRequest.IsSetStagingDistributionId())
request.Parameters.Add("StagingDistributionId", StringUtils.FromString(publicRequest.StagingDistributionId));
request.ResourcePath = "/2020-05-31/distribution/{Id}/promote-staging-config";
request.UseQueryString = true;
return request;
}
private static UpdateDistributionWithStagingConfigRequestMarshaller _instance = new UpdateDistributionWithStagingConfigRequestMarshaller();
internal static UpdateDistributionWithStagingConfigRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateDistributionWithStagingConfigRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 95 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the 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 UpdateDistributionWithStagingConfig operation
/// </summary>
public class UpdateDistributionWithStagingConfigResponseUnmarshaller : 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)
{
UpdateDistributionWithStagingConfigResponse response = new UpdateDistributionWithStagingConfigResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateDistributionWithStagingConfigResponse 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("CNAMEAlreadyExists"))
{
return CNAMEAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior"))
{
return IllegalFieldLevelEncryptionConfigAssociationWithCacheBehaviorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalUpdate"))
{
return IllegalUpdateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InconsistentQuantities"))
{
return InconsistentQuantitiesExceptionUnmarshaller.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("InvalidDefaultRootObject"))
{
return InvalidDefaultRootObjectExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidErrorCode"))
{
return InvalidErrorCodeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidForwardCookies"))
{
return InvalidForwardCookiesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidFunctionAssociation"))
{
return InvalidFunctionAssociationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidGeoRestrictionParameter"))
{
return InvalidGeoRestrictionParameterExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidHeadersForS3Origin"))
{
return InvalidHeadersForS3OriginExceptionUnmarshaller.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("InvalidLambdaFunctionAssociation"))
{
return InvalidLambdaFunctionAssociationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidLocationCode"))
{
return InvalidLocationCodeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidMinimumProtocolVersion"))
{
return InvalidMinimumProtocolVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOriginAccessControl"))
{
return InvalidOriginAccessControlExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOriginAccessIdentity"))
{
return InvalidOriginAccessIdentityExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOriginKeepaliveTimeout"))
{
return InvalidOriginKeepaliveTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidOriginReadTimeout"))
{
return InvalidOriginReadTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidQueryStringParameters"))
{
return InvalidQueryStringParametersExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRelativePath"))
{
return InvalidRelativePathExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRequiredProtocol"))
{
return InvalidRequiredProtocolExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidResponseCode"))
{
return InvalidResponseCodeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidTTLOrder"))
{
return InvalidTTLOrderExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidViewerCertificate"))
{
return InvalidViewerCertificateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidWebACLId"))
{
return InvalidWebACLIdExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("MissingBody"))
{
return MissingBodyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchCachePolicy"))
{
return NoSuchCachePolicyExceptionUnmarshaller.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("NoSuchFieldLevelEncryptionConfig"))
{
return NoSuchFieldLevelEncryptionConfigExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchOrigin"))
{
return NoSuchOriginExceptionUnmarshaller.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("NoSuchRealtimeLogConfig"))
{
return NoSuchRealtimeLogConfigExceptionUnmarshaller.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("RealtimeLogConfigOwnerMismatch"))
{
return RealtimeLogConfigOwnerMismatchExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyCacheBehaviors"))
{
return TooManyCacheBehaviorsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyCertificates"))
{
return TooManyCertificatesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyCookieNamesInWhiteList"))
{
return TooManyCookieNamesInWhiteListExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionCNAMEs"))
{
return TooManyDistributionCNAMEsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsAssociatedToCachePolicy"))
{
return TooManyDistributionsAssociatedToCachePolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsAssociatedToFieldLevelEncryptionConfig"))
{
return TooManyDistributionsAssociatedToFieldLevelEncryptionConfigExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsAssociatedToKeyGroup"))
{
return TooManyDistributionsAssociatedToKeyGroupExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsAssociatedToOriginRequestPolicy"))
{
return TooManyDistributionsAssociatedToOriginRequestPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsAssociatedToResponseHeadersPolicy"))
{
return TooManyDistributionsAssociatedToResponseHeadersPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsWithFunctionAssociations"))
{
return TooManyDistributionsWithFunctionAssociationsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsWithLambdaAssociations"))
{
return TooManyDistributionsWithLambdaAssociationsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyDistributionsWithSingleFunctionARN"))
{
return TooManyDistributionsWithSingleFunctionARNExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyFunctionAssociations"))
{
return TooManyFunctionAssociationsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyHeadersInForwardedValues"))
{
return TooManyHeadersInForwardedValuesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyKeyGroupsAssociatedToDistribution"))
{
return TooManyKeyGroupsAssociatedToDistributionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyLambdaFunctionAssociations"))
{
return TooManyLambdaFunctionAssociationsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyOriginCustomHeaders"))
{
return TooManyOriginCustomHeadersExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyOriginGroupsPerDistribution"))
{
return TooManyOriginGroupsPerDistributionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyOrigins"))
{
return TooManyOriginsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyQueryStringParameters"))
{
return TooManyQueryStringParametersExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyTrustedSigners"))
{
return TooManyTrustedSignersExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TrustedKeyGroupDoesNotExist"))
{
return TrustedKeyGroupDoesNotExistExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TrustedSignerDoesNotExist"))
{
return TrustedSignerDoesNotExistExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateDistributionWithStagingConfigResponseUnmarshaller _instance = new UpdateDistributionWithStagingConfigResponseUnmarshaller();
internal static UpdateDistributionWithStagingConfigResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateDistributionWithStagingConfigResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 362 |
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>
/// UpdateFieldLevelEncryptionConfig Request Marshaller
/// </summary>
public class UpdateFieldLevelEncryptionConfigRequestMarshaller : IMarshaller<IRequest, UpdateFieldLevelEncryptionConfigRequest> , 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((UpdateFieldLevelEncryptionConfigRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateFieldLevelEncryptionConfigRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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/field-level-encryption/{Id}/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 }))
{
if (publicRequest.IsSetFieldLevelEncryptionConfig())
{
xmlWriter.WriteStartElement("FieldLevelEncryptionConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.FieldLevelEncryptionConfig.IsSetCallerReference())
xmlWriter.WriteElementString("CallerReference", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.FieldLevelEncryptionConfig.CallerReference));
if(publicRequest.FieldLevelEncryptionConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.FieldLevelEncryptionConfig.Comment));
if (publicRequest.FieldLevelEncryptionConfig.ContentTypeProfileConfig != null)
{
xmlWriter.WriteStartElement("ContentTypeProfileConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.FieldLevelEncryptionConfig.ContentTypeProfileConfig.ContentTypeProfiles != null)
{
xmlWriter.WriteStartElement("ContentTypeProfiles", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItems = publicRequest.FieldLevelEncryptionConfig.ContentTypeProfileConfig.ContentTypeProfiles.Items;
if (publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItems != null && publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemsValue in publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItems)
{
if (publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemsValue != null)
{
xmlWriter.WriteStartElement("ContentTypeProfile", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemsValue.IsSetContentType())
xmlWriter.WriteElementString("ContentType", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemsValue.ContentType));
if(publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemsValue.IsSetFormat())
xmlWriter.WriteElementString("Format", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemsValue.Format));
if(publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemsValue.IsSetProfileId())
xmlWriter.WriteElementString("ProfileId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestFieldLevelEncryptionConfigContentTypeProfileConfigContentTypeProfilesItemsValue.ProfileId));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.FieldLevelEncryptionConfig.ContentTypeProfileConfig.ContentTypeProfiles.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.FieldLevelEncryptionConfig.ContentTypeProfileConfig.ContentTypeProfiles.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.FieldLevelEncryptionConfig.ContentTypeProfileConfig.IsSetForwardWhenContentTypeIsUnknown())
xmlWriter.WriteElementString("ForwardWhenContentTypeIsUnknown", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.FieldLevelEncryptionConfig.ContentTypeProfileConfig.ForwardWhenContentTypeIsUnknown));
xmlWriter.WriteEndElement();
}
if (publicRequest.FieldLevelEncryptionConfig.QueryArgProfileConfig != null)
{
xmlWriter.WriteStartElement("QueryArgProfileConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.FieldLevelEncryptionConfig.QueryArgProfileConfig.IsSetForwardWhenQueryArgProfileIsUnknown())
xmlWriter.WriteElementString("ForwardWhenQueryArgProfileIsUnknown", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.FieldLevelEncryptionConfig.QueryArgProfileConfig.ForwardWhenQueryArgProfileIsUnknown));
if (publicRequest.FieldLevelEncryptionConfig.QueryArgProfileConfig.QueryArgProfiles != null)
{
xmlWriter.WriteStartElement("QueryArgProfiles", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItems = publicRequest.FieldLevelEncryptionConfig.QueryArgProfileConfig.QueryArgProfiles.Items;
if (publicRequestFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItems != null && publicRequestFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemsValue in publicRequestFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItems)
{
if (publicRequestFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemsValue != null)
{
xmlWriter.WriteStartElement("QueryArgProfile", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemsValue.IsSetProfileId())
xmlWriter.WriteElementString("ProfileId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemsValue.ProfileId));
if(publicRequestFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemsValue.IsSetQueryArg())
xmlWriter.WriteElementString("QueryArg", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestFieldLevelEncryptionConfigQueryArgProfileConfigQueryArgProfilesItemsValue.QueryArg));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.FieldLevelEncryptionConfig.QueryArgProfileConfig.QueryArgProfiles.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.FieldLevelEncryptionConfig.QueryArgProfileConfig.QueryArgProfiles.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
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 UpdateFieldLevelEncryptionConfigRequestMarshaller _instance = new UpdateFieldLevelEncryptionConfigRequestMarshaller();
internal static UpdateFieldLevelEncryptionConfigRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateFieldLevelEncryptionConfigRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 199 |
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 UpdateFieldLevelEncryptionConfig operation
/// </summary>
public class UpdateFieldLevelEncryptionConfigResponseUnmarshaller : 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)
{
UpdateFieldLevelEncryptionConfigResponse response = new UpdateFieldLevelEncryptionConfigResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateFieldLevelEncryptionConfigResponse 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("IllegalUpdate"))
{
return IllegalUpdateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InconsistentQuantities"))
{
return InconsistentQuantitiesExceptionUnmarshaller.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("InvalidIfMatchVersion"))
{
return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchFieldLevelEncryptionConfig"))
{
return NoSuchFieldLevelEncryptionConfigExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchFieldLevelEncryptionProfile"))
{
return NoSuchFieldLevelEncryptionProfileExceptionUnmarshaller.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("QueryArgProfileEmpty"))
{
return QueryArgProfileEmptyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyFieldLevelEncryptionContentTypeProfiles"))
{
return TooManyFieldLevelEncryptionContentTypeProfilesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyFieldLevelEncryptionQueryArgProfiles"))
{
return TooManyFieldLevelEncryptionQueryArgProfilesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateFieldLevelEncryptionConfigResponseUnmarshaller _instance = new UpdateFieldLevelEncryptionConfigResponseUnmarshaller();
internal static UpdateFieldLevelEncryptionConfigResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateFieldLevelEncryptionConfigResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 166 |
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>
/// UpdateFieldLevelEncryptionProfile Request Marshaller
/// </summary>
public class UpdateFieldLevelEncryptionProfileRequestMarshaller : IMarshaller<IRequest, UpdateFieldLevelEncryptionProfileRequest> , 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((UpdateFieldLevelEncryptionProfileRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateFieldLevelEncryptionProfileRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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/field-level-encryption-profile/{Id}/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 }))
{
if (publicRequest.IsSetFieldLevelEncryptionProfileConfig())
{
xmlWriter.WriteStartElement("FieldLevelEncryptionProfileConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.FieldLevelEncryptionProfileConfig.IsSetCallerReference())
xmlWriter.WriteElementString("CallerReference", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.FieldLevelEncryptionProfileConfig.CallerReference));
if(publicRequest.FieldLevelEncryptionProfileConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.FieldLevelEncryptionProfileConfig.Comment));
if (publicRequest.FieldLevelEncryptionProfileConfig.EncryptionEntities != null)
{
xmlWriter.WriteStartElement("EncryptionEntities", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItems = publicRequest.FieldLevelEncryptionProfileConfig.EncryptionEntities.Items;
if (publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItems != null && publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValue in publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItems)
{
if (publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValue != null)
{
xmlWriter.WriteStartElement("EncryptionEntity", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValue.FieldPatterns != null)
{
xmlWriter.WriteStartElement("FieldPatterns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValueFieldPatternsItems = publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValue.FieldPatterns.Items;
if (publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValueFieldPatternsItems != null && publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValueFieldPatternsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValueFieldPatternsItemsValue in publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValueFieldPatternsItems)
{
xmlWriter.WriteStartElement("FieldPattern", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValueFieldPatternsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValue.FieldPatterns.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValue.FieldPatterns.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValue.IsSetProviderId())
xmlWriter.WriteElementString("ProviderId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValue.ProviderId));
if(publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValue.IsSetPublicKeyId())
xmlWriter.WriteElementString("PublicKeyId", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestFieldLevelEncryptionProfileConfigEncryptionEntitiesItemsValue.PublicKeyId));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.FieldLevelEncryptionProfileConfig.EncryptionEntities.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.FieldLevelEncryptionProfileConfig.EncryptionEntities.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.FieldLevelEncryptionProfileConfig.IsSetName())
xmlWriter.WriteElementString("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.FieldLevelEncryptionProfileConfig.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 UpdateFieldLevelEncryptionProfileRequestMarshaller _instance = new UpdateFieldLevelEncryptionProfileRequestMarshaller();
internal static UpdateFieldLevelEncryptionProfileRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateFieldLevelEncryptionProfileRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 172 |
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 UpdateFieldLevelEncryptionProfile operation
/// </summary>
public class UpdateFieldLevelEncryptionProfileResponseUnmarshaller : 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)
{
UpdateFieldLevelEncryptionProfileResponse response = new UpdateFieldLevelEncryptionProfileResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateFieldLevelEncryptionProfileResponse 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("FieldLevelEncryptionProfileAlreadyExists"))
{
return FieldLevelEncryptionProfileAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("FieldLevelEncryptionProfileSizeExceeded"))
{
return FieldLevelEncryptionProfileSizeExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalUpdate"))
{
return IllegalUpdateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InconsistentQuantities"))
{
return InconsistentQuantitiesExceptionUnmarshaller.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("InvalidIfMatchVersion"))
{
return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchFieldLevelEncryptionProfile"))
{
return NoSuchFieldLevelEncryptionProfileExceptionUnmarshaller.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("TooManyFieldLevelEncryptionEncryptionEntities"))
{
return TooManyFieldLevelEncryptionEncryptionEntitiesExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyFieldLevelEncryptionFieldPatterns"))
{
return TooManyFieldLevelEncryptionFieldPatternsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateFieldLevelEncryptionProfileResponseUnmarshaller _instance = new UpdateFieldLevelEncryptionProfileResponseUnmarshaller();
internal static UpdateFieldLevelEncryptionProfileResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateFieldLevelEncryptionProfileResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 170 |
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>
/// UpdateFunction Request Marshaller
/// </summary>
public class UpdateFunctionRequestMarshaller : IMarshaller<IRequest, UpdateFunctionRequest> , 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((UpdateFunctionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateFunctionRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
if (publicRequest.IsSetIfMatch())
{
request.Headers["If-Match"] = publicRequest.IfMatch;
}
if (!publicRequest.IsSetName())
throw new AmazonCloudFrontException("Request object does not have required field Name set");
request.AddPathResource("{Name}", StringUtils.FromString(publicRequest.Name));
request.ResourcePath = "/2020-05-31/function/{Name}";
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("UpdateFunctionRequest", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.IsSetFunctionCode())
xmlWriter.WriteElementString("FunctionCode", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromMemoryStream(publicRequest.FunctionCode));
if (publicRequest.FunctionConfig != null)
{
xmlWriter.WriteStartElement("FunctionConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.FunctionConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.FunctionConfig.Comment));
if(publicRequest.FunctionConfig.IsSetRuntime())
xmlWriter.WriteElementString("Runtime", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.FunctionConfig.Runtime));
xmlWriter.WriteEndElement();
}
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 UpdateFunctionRequestMarshaller _instance = new UpdateFunctionRequestMarshaller();
internal static UpdateFunctionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateFunctionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 124 |
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 UpdateFunction operation
/// </summary>
public class UpdateFunctionResponseUnmarshaller : 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)
{
UpdateFunctionResponse response = new UpdateFunctionResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETtag"))
response.ETag = context.ResponseData.GetHeaderValue("ETtag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateFunctionResponse 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("FunctionSizeLimitExceeded"))
{
return FunctionSizeLimitExceededExceptionUnmarshaller.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("InvalidIfMatchVersion"))
{
return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchFunctionExists"))
{
return NoSuchFunctionExistsExceptionUnmarshaller.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("UnsupportedOperation"))
{
return UnsupportedOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateFunctionResponseUnmarshaller _instance = new UpdateFunctionResponseUnmarshaller();
internal static UpdateFunctionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateFunctionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 146 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the 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>
/// UpdateKeyGroup Request Marshaller
/// </summary>
public class UpdateKeyGroupRequestMarshaller : IMarshaller<IRequest, UpdateKeyGroupRequest> , 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((UpdateKeyGroupRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateKeyGroupRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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/key-group/{Id}";
var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture);
using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize }))
{
if (publicRequest.IsSetKeyGroupConfig())
{
xmlWriter.WriteStartElement("KeyGroupConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.KeyGroupConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.KeyGroupConfig.Comment));
var publicRequestKeyGroupConfigItems = publicRequest.KeyGroupConfig.Items;
if (publicRequestKeyGroupConfigItems != null && publicRequestKeyGroupConfigItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestKeyGroupConfigItemsValue in publicRequestKeyGroupConfigItems)
{
xmlWriter.WriteStartElement("PublicKey", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestKeyGroupConfigItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.KeyGroupConfig.IsSetName())
xmlWriter.WriteElementString("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.KeyGroupConfig.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 UpdateKeyGroupRequestMarshaller _instance = new UpdateKeyGroupRequestMarshaller();
internal static UpdateKeyGroupRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateKeyGroupRequestMarshaller 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 UpdateKeyGroup operation
/// </summary>
public class UpdateKeyGroupResponseUnmarshaller : 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)
{
UpdateKeyGroupResponse response = new UpdateKeyGroupResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateKeyGroupResponse 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("InvalidArgument"))
{
return InvalidArgumentExceptionUnmarshaller.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("KeyGroupAlreadyExists"))
{
return KeyGroupAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchResource"))
{
return NoSuchResourceExceptionUnmarshaller.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("TooManyPublicKeysInKeyGroup"))
{
return TooManyPublicKeysInKeyGroupExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateKeyGroupResponseUnmarshaller _instance = new UpdateKeyGroupResponseUnmarshaller();
internal static UpdateKeyGroupResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateKeyGroupResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 146 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the 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>
/// UpdateOriginAccessControl Request Marshaller
/// </summary>
public class UpdateOriginAccessControlRequestMarshaller : IMarshaller<IRequest, UpdateOriginAccessControlRequest> , 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((UpdateOriginAccessControlRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateOriginAccessControlRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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-access-control/{Id}/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 }))
{
if (publicRequest.IsSetOriginAccessControlConfig())
{
xmlWriter.WriteStartElement("OriginAccessControlConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.OriginAccessControlConfig.IsSetDescription())
xmlWriter.WriteElementString("Description", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.OriginAccessControlConfig.Description));
if(publicRequest.OriginAccessControlConfig.IsSetName())
xmlWriter.WriteElementString("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.OriginAccessControlConfig.Name));
if(publicRequest.OriginAccessControlConfig.IsSetOriginAccessControlOriginType())
xmlWriter.WriteElementString("OriginAccessControlOriginType", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.OriginAccessControlConfig.OriginAccessControlOriginType));
if(publicRequest.OriginAccessControlConfig.IsSetSigningBehavior())
xmlWriter.WriteElementString("SigningBehavior", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.OriginAccessControlConfig.SigningBehavior));
if(publicRequest.OriginAccessControlConfig.IsSetSigningProtocol())
xmlWriter.WriteElementString("SigningProtocol", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.OriginAccessControlConfig.SigningProtocol));
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 UpdateOriginAccessControlRequestMarshaller _instance = new UpdateOriginAccessControlRequestMarshaller();
internal static UpdateOriginAccessControlRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateOriginAccessControlRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 127 |
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 UpdateOriginAccessControl operation
/// </summary>
public class UpdateOriginAccessControlResponseUnmarshaller : 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)
{
UpdateOriginAccessControlResponse response = new UpdateOriginAccessControlResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateOriginAccessControlResponse 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("IllegalUpdate"))
{
return IllegalUpdateExceptionUnmarshaller.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("InvalidIfMatchVersion"))
{
return InvalidIfMatchVersionExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NoSuchOriginAccessControl"))
{
return NoSuchOriginAccessControlExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("OriginAccessControlAlreadyExists"))
{
return OriginAccessControlAlreadyExistsExceptionUnmarshaller.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 UpdateOriginAccessControlResponseUnmarshaller _instance = new UpdateOriginAccessControlResponseUnmarshaller();
internal static UpdateOriginAccessControlResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateOriginAccessControlResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 150 |
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>
/// UpdateOriginRequestPolicy Request Marshaller
/// </summary>
public class UpdateOriginRequestPolicyRequestMarshaller : IMarshaller<IRequest, UpdateOriginRequestPolicyRequest> , 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((UpdateOriginRequestPolicyRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateOriginRequestPolicyRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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}";
var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture);
using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize }))
{
if (publicRequest.IsSetOriginRequestPolicyConfig())
{
xmlWriter.WriteStartElement("OriginRequestPolicyConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.OriginRequestPolicyConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.OriginRequestPolicyConfig.Comment));
if (publicRequest.OriginRequestPolicyConfig.CookiesConfig != null)
{
xmlWriter.WriteStartElement("CookiesConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.OriginRequestPolicyConfig.CookiesConfig.IsSetCookieBehavior())
xmlWriter.WriteElementString("CookieBehavior", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.OriginRequestPolicyConfig.CookiesConfig.CookieBehavior));
if (publicRequest.OriginRequestPolicyConfig.CookiesConfig.Cookies != null)
{
xmlWriter.WriteStartElement("Cookies", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestOriginRequestPolicyConfigCookiesConfigCookiesItems = publicRequest.OriginRequestPolicyConfig.CookiesConfig.Cookies.Items;
if (publicRequestOriginRequestPolicyConfigCookiesConfigCookiesItems != null && publicRequestOriginRequestPolicyConfigCookiesConfigCookiesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestOriginRequestPolicyConfigCookiesConfigCookiesItemsValue in publicRequestOriginRequestPolicyConfigCookiesConfigCookiesItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestOriginRequestPolicyConfigCookiesConfigCookiesItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.OriginRequestPolicyConfig.CookiesConfig.Cookies.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.OriginRequestPolicyConfig.CookiesConfig.Cookies.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if (publicRequest.OriginRequestPolicyConfig.HeadersConfig != null)
{
xmlWriter.WriteStartElement("HeadersConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.OriginRequestPolicyConfig.HeadersConfig.IsSetHeaderBehavior())
xmlWriter.WriteElementString("HeaderBehavior", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.OriginRequestPolicyConfig.HeadersConfig.HeaderBehavior));
if (publicRequest.OriginRequestPolicyConfig.HeadersConfig.Headers != null)
{
xmlWriter.WriteStartElement("Headers", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestOriginRequestPolicyConfigHeadersConfigHeadersItems = publicRequest.OriginRequestPolicyConfig.HeadersConfig.Headers.Items;
if (publicRequestOriginRequestPolicyConfigHeadersConfigHeadersItems != null && publicRequestOriginRequestPolicyConfigHeadersConfigHeadersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestOriginRequestPolicyConfigHeadersConfigHeadersItemsValue in publicRequestOriginRequestPolicyConfigHeadersConfigHeadersItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestOriginRequestPolicyConfigHeadersConfigHeadersItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.OriginRequestPolicyConfig.HeadersConfig.Headers.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.OriginRequestPolicyConfig.HeadersConfig.Headers.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.OriginRequestPolicyConfig.IsSetName())
xmlWriter.WriteElementString("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.OriginRequestPolicyConfig.Name));
if (publicRequest.OriginRequestPolicyConfig.QueryStringsConfig != null)
{
xmlWriter.WriteStartElement("QueryStringsConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.OriginRequestPolicyConfig.QueryStringsConfig.IsSetQueryStringBehavior())
xmlWriter.WriteElementString("QueryStringBehavior", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.OriginRequestPolicyConfig.QueryStringsConfig.QueryStringBehavior));
if (publicRequest.OriginRequestPolicyConfig.QueryStringsConfig.QueryStrings != null)
{
xmlWriter.WriteStartElement("QueryStrings", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestOriginRequestPolicyConfigQueryStringsConfigQueryStringsItems = publicRequest.OriginRequestPolicyConfig.QueryStringsConfig.QueryStrings.Items;
if (publicRequestOriginRequestPolicyConfigQueryStringsConfigQueryStringsItems != null && publicRequestOriginRequestPolicyConfigQueryStringsConfigQueryStringsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestOriginRequestPolicyConfigQueryStringsConfigQueryStringsItemsValue in publicRequestOriginRequestPolicyConfigQueryStringsConfigQueryStringsItems)
{
xmlWriter.WriteStartElement("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestOriginRequestPolicyConfigQueryStringsConfigQueryStringsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.OriginRequestPolicyConfig.QueryStringsConfig.QueryStrings.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.OriginRequestPolicyConfig.QueryStringsConfig.QueryStrings.Quantity));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
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 UpdateOriginRequestPolicyRequestMarshaller _instance = new UpdateOriginRequestPolicyRequestMarshaller();
internal static UpdateOriginRequestPolicyRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateOriginRequestPolicyRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 208 |
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 UpdateOriginRequestPolicy operation
/// </summary>
public class UpdateOriginRequestPolicyResponseUnmarshaller : 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)
{
UpdateOriginRequestPolicyResponse response = new UpdateOriginRequestPolicyResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateOriginRequestPolicyResponse 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("IllegalUpdate"))
{
return IllegalUpdateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InconsistentQuantities"))
{
return InconsistentQuantitiesExceptionUnmarshaller.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("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("OriginRequestPolicyAlreadyExists"))
{
return OriginRequestPolicyAlreadyExistsExceptionUnmarshaller.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("TooManyCookiesInOriginRequestPolicy"))
{
return TooManyCookiesInOriginRequestPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyHeadersInOriginRequestPolicy"))
{
return TooManyHeadersInOriginRequestPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyQueryStringsInOriginRequestPolicy"))
{
return TooManyQueryStringsInOriginRequestPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateOriginRequestPolicyResponseUnmarshaller _instance = new UpdateOriginRequestPolicyResponseUnmarshaller();
internal static UpdateOriginRequestPolicyResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateOriginRequestPolicyResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 166 |
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>
/// UpdatePublicKey Request Marshaller
/// </summary>
public class UpdatePublicKeyRequestMarshaller : IMarshaller<IRequest, UpdatePublicKeyRequest> , 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((UpdatePublicKeyRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdatePublicKeyRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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}/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 }))
{
if (publicRequest.IsSetPublicKeyConfig())
{
xmlWriter.WriteStartElement("PublicKeyConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.PublicKeyConfig.IsSetCallerReference())
xmlWriter.WriteElementString("CallerReference", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.PublicKeyConfig.CallerReference));
if(publicRequest.PublicKeyConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.PublicKeyConfig.Comment));
if(publicRequest.PublicKeyConfig.IsSetEncodedKey())
xmlWriter.WriteElementString("EncodedKey", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.PublicKeyConfig.EncodedKey));
if(publicRequest.PublicKeyConfig.IsSetName())
xmlWriter.WriteElementString("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.PublicKeyConfig.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 UpdatePublicKeyRequestMarshaller _instance = new UpdatePublicKeyRequestMarshaller();
internal static UpdatePublicKeyRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdatePublicKeyRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 124 |
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 UpdatePublicKey operation
/// </summary>
public class UpdatePublicKeyResponseUnmarshaller : 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)
{
UpdatePublicKeyResponse response = new UpdatePublicKeyResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdatePublicKeyResponse 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("CannotChangeImmutablePublicKeyFields"))
{
return CannotChangeImmutablePublicKeyFieldsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("IllegalUpdate"))
{
return IllegalUpdateExceptionUnmarshaller.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("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);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdatePublicKeyResponseUnmarshaller _instance = new UpdatePublicKeyResponseUnmarshaller();
internal static UpdatePublicKeyResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdatePublicKeyResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 150 |
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>
/// UpdateRealtimeLogConfig Request Marshaller
/// </summary>
public class UpdateRealtimeLogConfigRequestMarshaller : IMarshaller<IRequest, UpdateRealtimeLogConfigRequest> , 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((UpdateRealtimeLogConfigRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateRealtimeLogConfigRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
request.ResourcePath = "/2020-05-31/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("UpdateRealtimeLogConfigRequest", "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));
var publicRequestEndPoints = publicRequest.EndPoints;
if (publicRequestEndPoints != null && publicRequestEndPoints.Count > 0)
{
xmlWriter.WriteStartElement("EndPoints", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestEndPointsValue in publicRequestEndPoints)
{
if (publicRequestEndPointsValue != null)
{
xmlWriter.WriteStartElement("member", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequestEndPointsValue.KinesisStreamConfig != null)
{
xmlWriter.WriteStartElement("KinesisStreamConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestEndPointsValue.KinesisStreamConfig.IsSetRoleARN())
xmlWriter.WriteElementString("RoleARN", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestEndPointsValue.KinesisStreamConfig.RoleARN));
if(publicRequestEndPointsValue.KinesisStreamConfig.IsSetStreamARN())
xmlWriter.WriteElementString("StreamARN", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestEndPointsValue.KinesisStreamConfig.StreamARN));
xmlWriter.WriteEndElement();
}
if(publicRequestEndPointsValue.IsSetStreamType())
xmlWriter.WriteElementString("StreamType", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestEndPointsValue.StreamType));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
var publicRequestFields = publicRequest.Fields;
if (publicRequestFields != null && publicRequestFields.Count > 0)
{
xmlWriter.WriteStartElement("Fields", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestFieldsValue in publicRequestFields)
{
xmlWriter.WriteStartElement("Field", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestFieldsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.IsSetName())
xmlWriter.WriteElementString("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.Name));
if(publicRequest.IsSetSamplingRate())
xmlWriter.WriteElementString("SamplingRate", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromLong(publicRequest.SamplingRate));
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 UpdateRealtimeLogConfigRequestMarshaller _instance = new UpdateRealtimeLogConfigRequestMarshaller();
internal static UpdateRealtimeLogConfigRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateRealtimeLogConfigRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 152 |
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 UpdateRealtimeLogConfig operation
/// </summary>
public class UpdateRealtimeLogConfigResponseUnmarshaller : 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)
{
UpdateRealtimeLogConfigResponse response = new UpdateRealtimeLogConfigResponse();
UnmarshallResult(context,response);
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateRealtimeLogConfigResponse 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 UpdateRealtimeLogConfigResponseUnmarshaller _instance = new UpdateRealtimeLogConfigResponseUnmarshaller();
internal static UpdateRealtimeLogConfigResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateRealtimeLogConfigResponseUnmarshaller 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>
/// UpdateResponseHeadersPolicy Request Marshaller
/// </summary>
public class UpdateResponseHeadersPolicyRequestMarshaller : IMarshaller<IRequest, UpdateResponseHeadersPolicyRequest> , 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((UpdateResponseHeadersPolicyRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateResponseHeadersPolicyRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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}";
var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture);
using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize }))
{
if (publicRequest.IsSetResponseHeadersPolicyConfig())
{
xmlWriter.WriteStartElement("ResponseHeadersPolicyConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ResponseHeadersPolicyConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ResponseHeadersPolicyConfig.Comment));
if (publicRequest.ResponseHeadersPolicyConfig.CorsConfig != null)
{
xmlWriter.WriteStartElement("CorsConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.IsSetAccessControlAllowCredentials())
xmlWriter.WriteElementString("AccessControlAllowCredentials", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowCredentials));
if (publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowHeaders != null)
{
xmlWriter.WriteStartElement("AccessControlAllowHeaders", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowHeadersItems = publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowHeaders.Items;
if (publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowHeadersItems != null && publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowHeadersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowHeadersItemsValue in publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowHeadersItems)
{
xmlWriter.WriteStartElement("Header", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowHeadersItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowHeaders.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowHeaders.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowMethods != null)
{
xmlWriter.WriteStartElement("AccessControlAllowMethods", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowMethodsItems = publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowMethods.Items;
if (publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowMethodsItems != null && publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowMethodsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowMethodsItemsValue in publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowMethodsItems)
{
xmlWriter.WriteStartElement("Method", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowMethodsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowMethods.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowMethods.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowOrigins != null)
{
xmlWriter.WriteStartElement("AccessControlAllowOrigins", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowOriginsItems = publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowOrigins.Items;
if (publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowOriginsItems != null && publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowOriginsItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowOriginsItemsValue in publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowOriginsItems)
{
xmlWriter.WriteStartElement("Origin", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlAllowOriginsItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowOrigins.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlAllowOrigins.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlExposeHeaders != null)
{
xmlWriter.WriteStartElement("AccessControlExposeHeaders", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlExposeHeadersItems = publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlExposeHeaders.Items;
if (publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlExposeHeadersItems != null && publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlExposeHeadersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlExposeHeadersItemsValue in publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlExposeHeadersItems)
{
xmlWriter.WriteStartElement("Header", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestResponseHeadersPolicyConfigCorsConfigAccessControlExposeHeadersItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlExposeHeaders.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlExposeHeaders.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.IsSetAccessControlMaxAgeSec())
xmlWriter.WriteElementString("AccessControlMaxAgeSec", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.AccessControlMaxAgeSec));
if(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.IsSetOriginOverride())
xmlWriter.WriteElementString("OriginOverride", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.CorsConfig.OriginOverride));
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.CustomHeadersConfig != null)
{
xmlWriter.WriteStartElement("CustomHeadersConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItems = publicRequest.ResponseHeadersPolicyConfig.CustomHeadersConfig.Items;
if (publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItems != null && publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItemsValue in publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItems)
{
if (publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItemsValue != null)
{
xmlWriter.WriteStartElement("ResponseHeadersPolicyCustomHeader", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItemsValue.IsSetHeader())
xmlWriter.WriteElementString("Header", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItemsValue.Header));
if(publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItemsValue.IsSetOverride())
xmlWriter.WriteElementString("Override", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItemsValue.Override));
if(publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItemsValue.IsSetValue())
xmlWriter.WriteElementString("Value", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestResponseHeadersPolicyConfigCustomHeadersConfigItemsValue.Value));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.ResponseHeadersPolicyConfig.CustomHeadersConfig.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ResponseHeadersPolicyConfig.CustomHeadersConfig.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.ResponseHeadersPolicyConfig.IsSetName())
xmlWriter.WriteElementString("Name", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ResponseHeadersPolicyConfig.Name));
if (publicRequest.ResponseHeadersPolicyConfig.RemoveHeadersConfig != null)
{
xmlWriter.WriteStartElement("RemoveHeadersConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestResponseHeadersPolicyConfigRemoveHeadersConfigItems = publicRequest.ResponseHeadersPolicyConfig.RemoveHeadersConfig.Items;
if (publicRequestResponseHeadersPolicyConfigRemoveHeadersConfigItems != null && publicRequestResponseHeadersPolicyConfigRemoveHeadersConfigItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestResponseHeadersPolicyConfigRemoveHeadersConfigItemsValue in publicRequestResponseHeadersPolicyConfigRemoveHeadersConfigItems)
{
if (publicRequestResponseHeadersPolicyConfigRemoveHeadersConfigItemsValue != null)
{
xmlWriter.WriteStartElement("ResponseHeadersPolicyRemoveHeader", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequestResponseHeadersPolicyConfigRemoveHeadersConfigItemsValue.IsSetHeader())
xmlWriter.WriteElementString("Header", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequestResponseHeadersPolicyConfigRemoveHeadersConfigItemsValue.Header));
xmlWriter.WriteEndElement();
}
}
xmlWriter.WriteEndElement();
}
if(publicRequest.ResponseHeadersPolicyConfig.RemoveHeadersConfig.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ResponseHeadersPolicyConfig.RemoveHeadersConfig.Quantity));
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig != null)
{
xmlWriter.WriteStartElement("SecurityHeadersConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ContentSecurityPolicy != null)
{
xmlWriter.WriteStartElement("ContentSecurityPolicy", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ContentSecurityPolicy.IsSetContentSecurityPolicy())
xmlWriter.WriteElementString("ContentSecurityPolicy", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ContentSecurityPolicy.ContentSecurityPolicy));
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ContentSecurityPolicy.IsSetOverride())
xmlWriter.WriteElementString("Override", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ContentSecurityPolicy.Override));
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ContentTypeOptions != null)
{
xmlWriter.WriteStartElement("ContentTypeOptions", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ContentTypeOptions.IsSetOverride())
xmlWriter.WriteElementString("Override", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ContentTypeOptions.Override));
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.FrameOptions != null)
{
xmlWriter.WriteStartElement("FrameOptions", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.FrameOptions.IsSetFrameOption())
xmlWriter.WriteElementString("FrameOption", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.FrameOptions.FrameOption));
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.FrameOptions.IsSetOverride())
xmlWriter.WriteElementString("Override", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.FrameOptions.Override));
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ReferrerPolicy != null)
{
xmlWriter.WriteStartElement("ReferrerPolicy", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ReferrerPolicy.IsSetOverride())
xmlWriter.WriteElementString("Override", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ReferrerPolicy.Override));
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ReferrerPolicy.IsSetReferrerPolicy())
xmlWriter.WriteElementString("ReferrerPolicy", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.ReferrerPolicy.ReferrerPolicy));
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.StrictTransportSecurity != null)
{
xmlWriter.WriteStartElement("StrictTransportSecurity", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.StrictTransportSecurity.IsSetAccessControlMaxAgeSec())
xmlWriter.WriteElementString("AccessControlMaxAgeSec", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.StrictTransportSecurity.AccessControlMaxAgeSec));
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.StrictTransportSecurity.IsSetIncludeSubdomains())
xmlWriter.WriteElementString("IncludeSubdomains", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.StrictTransportSecurity.IncludeSubdomains));
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.StrictTransportSecurity.IsSetOverride())
xmlWriter.WriteElementString("Override", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.StrictTransportSecurity.Override));
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.StrictTransportSecurity.IsSetPreload())
xmlWriter.WriteElementString("Preload", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.StrictTransportSecurity.Preload));
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.XSSProtection != null)
{
xmlWriter.WriteStartElement("XSSProtection", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.XSSProtection.IsSetModeBlock())
xmlWriter.WriteElementString("ModeBlock", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.XSSProtection.ModeBlock));
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.XSSProtection.IsSetOverride())
xmlWriter.WriteElementString("Override", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.XSSProtection.Override));
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.XSSProtection.IsSetProtection())
xmlWriter.WriteElementString("Protection", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.XSSProtection.Protection));
if(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.XSSProtection.IsSetReportUri())
xmlWriter.WriteElementString("ReportUri", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.ResponseHeadersPolicyConfig.SecurityHeadersConfig.XSSProtection.ReportUri));
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if (publicRequest.ResponseHeadersPolicyConfig.ServerTimingHeadersConfig != null)
{
xmlWriter.WriteStartElement("ServerTimingHeadersConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.ResponseHeadersPolicyConfig.ServerTimingHeadersConfig.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.ResponseHeadersPolicyConfig.ServerTimingHeadersConfig.Enabled));
if(publicRequest.ResponseHeadersPolicyConfig.ServerTimingHeadersConfig.IsSetSamplingRate())
xmlWriter.WriteElementString("SamplingRate", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromDouble(publicRequest.ResponseHeadersPolicyConfig.ServerTimingHeadersConfig.SamplingRate));
xmlWriter.WriteEndElement();
}
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 UpdateResponseHeadersPolicyRequestMarshaller _instance = new UpdateResponseHeadersPolicyRequestMarshaller();
internal static UpdateResponseHeadersPolicyRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateResponseHeadersPolicyRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 376 |
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 UpdateResponseHeadersPolicy operation
/// </summary>
public class UpdateResponseHeadersPolicyResponseUnmarshaller : 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)
{
UpdateResponseHeadersPolicyResponse response = new UpdateResponseHeadersPolicyResponse();
UnmarshallResult(context,response);
if (context.ResponseData.IsHeaderPresent("ETag"))
response.ETag = context.ResponseData.GetHeaderValue("ETag");
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, UpdateResponseHeadersPolicyResponse 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("IllegalUpdate"))
{
return IllegalUpdateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InconsistentQuantities"))
{
return InconsistentQuantitiesExceptionUnmarshaller.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("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("ResponseHeadersPolicyAlreadyExists"))
{
return ResponseHeadersPolicyAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooLongCSPInResponseHeadersPolicy"))
{
return TooLongCSPInResponseHeadersPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyCustomHeadersInResponseHeadersPolicy"))
{
return TooManyCustomHeadersInResponseHeadersPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRemoveHeadersInResponseHeadersPolicy"))
{
return TooManyRemoveHeadersInResponseHeadersPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudFrontException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static UpdateResponseHeadersPolicyResponseUnmarshaller _instance = new UpdateResponseHeadersPolicyResponseUnmarshaller();
internal static UpdateResponseHeadersPolicyResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateResponseHeadersPolicyResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 166 |
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>
/// UpdateStreamingDistribution Request Marshaller
/// </summary>
public class UpdateStreamingDistributionRequestMarshaller : IMarshaller<IRequest, UpdateStreamingDistributionRequest> , 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((UpdateStreamingDistributionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(UpdateStreamingDistributionRequest publicRequest)
{
var request = new DefaultRequest(publicRequest, "Amazon.CloudFront");
request.HttpMethod = "PUT";
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}/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 }))
{
if (publicRequest.IsSetStreamingDistributionConfig())
{
xmlWriter.WriteStartElement("StreamingDistributionConfig", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if (publicRequest.StreamingDistributionConfig.Aliases != null)
{
xmlWriter.WriteStartElement("Aliases", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
var publicRequestStreamingDistributionConfigAliasesItems = publicRequest.StreamingDistributionConfig.Aliases.Items;
if (publicRequestStreamingDistributionConfigAliasesItems != null && publicRequestStreamingDistributionConfigAliasesItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestStreamingDistributionConfigAliasesItemsValue in publicRequestStreamingDistributionConfigAliasesItems)
{
xmlWriter.WriteStartElement("CNAME", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestStreamingDistributionConfigAliasesItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.StreamingDistributionConfig.Aliases.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.StreamingDistributionConfig.Aliases.Quantity));
xmlWriter.WriteEndElement();
}
if(publicRequest.StreamingDistributionConfig.IsSetCallerReference())
xmlWriter.WriteElementString("CallerReference", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.StreamingDistributionConfig.CallerReference));
if(publicRequest.StreamingDistributionConfig.IsSetComment())
xmlWriter.WriteElementString("Comment", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.StreamingDistributionConfig.Comment));
if(publicRequest.StreamingDistributionConfig.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.StreamingDistributionConfig.Enabled));
if (publicRequest.StreamingDistributionConfig.Logging != null)
{
xmlWriter.WriteStartElement("Logging", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.StreamingDistributionConfig.Logging.IsSetBucket())
xmlWriter.WriteElementString("Bucket", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.StreamingDistributionConfig.Logging.Bucket));
if(publicRequest.StreamingDistributionConfig.Logging.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.StreamingDistributionConfig.Logging.Enabled));
if(publicRequest.StreamingDistributionConfig.Logging.IsSetPrefix())
xmlWriter.WriteElementString("Prefix", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.StreamingDistributionConfig.Logging.Prefix));
xmlWriter.WriteEndElement();
}
if(publicRequest.StreamingDistributionConfig.IsSetPriceClass())
xmlWriter.WriteElementString("PriceClass", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.StreamingDistributionConfig.PriceClass));
if (publicRequest.StreamingDistributionConfig.S3Origin != null)
{
xmlWriter.WriteStartElement("S3Origin", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.StreamingDistributionConfig.S3Origin.IsSetDomainName())
xmlWriter.WriteElementString("DomainName", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.StreamingDistributionConfig.S3Origin.DomainName));
if(publicRequest.StreamingDistributionConfig.S3Origin.IsSetOriginAccessIdentity())
xmlWriter.WriteElementString("OriginAccessIdentity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromString(publicRequest.StreamingDistributionConfig.S3Origin.OriginAccessIdentity));
xmlWriter.WriteEndElement();
}
if (publicRequest.StreamingDistributionConfig.TrustedSigners != null)
{
xmlWriter.WriteStartElement("TrustedSigners", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
if(publicRequest.StreamingDistributionConfig.TrustedSigners.IsSetEnabled())
xmlWriter.WriteElementString("Enabled", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromBool(publicRequest.StreamingDistributionConfig.TrustedSigners.Enabled));
var publicRequestStreamingDistributionConfigTrustedSignersItems = publicRequest.StreamingDistributionConfig.TrustedSigners.Items;
if (publicRequestStreamingDistributionConfigTrustedSignersItems != null && publicRequestStreamingDistributionConfigTrustedSignersItems.Count > 0)
{
xmlWriter.WriteStartElement("Items", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
foreach (var publicRequestStreamingDistributionConfigTrustedSignersItemsValue in publicRequestStreamingDistributionConfigTrustedSignersItems)
{
xmlWriter.WriteStartElement("AwsAccountNumber", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
xmlWriter.WriteValue(publicRequestStreamingDistributionConfigTrustedSignersItemsValue);
xmlWriter.WriteEndElement();
}
xmlWriter.WriteEndElement();
}
if(publicRequest.StreamingDistributionConfig.TrustedSigners.IsSetQuantity())
xmlWriter.WriteElementString("Quantity", "http://cloudfront.amazonaws.com/doc/2020-05-31/", StringUtils.FromInt(publicRequest.StreamingDistributionConfig.TrustedSigners.Quantity));
xmlWriter.WriteEndElement();
}
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 UpdateStreamingDistributionRequestMarshaller _instance = new UpdateStreamingDistributionRequestMarshaller();
internal static UpdateStreamingDistributionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static UpdateStreamingDistributionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 196 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.