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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchDetachPolicy Marshaller /// </summary> public class BatchDetachPolicyMarshaller : IRequestMarshaller<BatchDetachPolicy, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchDetachPolicy requestObject, JsonMarshallerContext context) { if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetPolicyReference()) { context.Writer.WritePropertyName("PolicyReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.PolicyReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchDetachPolicyMarshaller Instance = new BatchDetachPolicyMarshaller(); } }
78
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchDetachPolicyResponse Object /// </summary> public class BatchDetachPolicyResponseUnmarshaller : IUnmarshaller<BatchDetachPolicyResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchDetachPolicyResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchDetachPolicyResponse IUnmarshaller<BatchDetachPolicyResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchDetachPolicyResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchDetachPolicyResponse unmarshalledObject = new BatchDetachPolicyResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static BatchDetachPolicyResponseUnmarshaller _instance = new BatchDetachPolicyResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchDetachPolicyResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchDetachTypedLink Marshaller /// </summary> public class BatchDetachTypedLinkMarshaller : IRequestMarshaller<BatchDetachTypedLink, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchDetachTypedLink requestObject, JsonMarshallerContext context) { if(requestObject.IsSetTypedLinkSpecifier()) { context.Writer.WritePropertyName("TypedLinkSpecifier"); context.Writer.WriteObjectStart(); var marshaller = TypedLinkSpecifierMarshaller.Instance; marshaller.Marshall(requestObject.TypedLinkSpecifier, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchDetachTypedLinkMarshaller Instance = new BatchDetachTypedLinkMarshaller(); } }
67
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchDetachTypedLinkResponse Object /// </summary> public class BatchDetachTypedLinkResponseUnmarshaller : IUnmarshaller<BatchDetachTypedLinkResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchDetachTypedLinkResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchDetachTypedLinkResponse IUnmarshaller<BatchDetachTypedLinkResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchDetachTypedLinkResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchDetachTypedLinkResponse unmarshalledObject = new BatchDetachTypedLinkResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static BatchDetachTypedLinkResponseUnmarshaller _instance = new BatchDetachTypedLinkResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchDetachTypedLinkResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchGetLinkAttributes Marshaller /// </summary> public class BatchGetLinkAttributesMarshaller : IRequestMarshaller<BatchGetLinkAttributes, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchGetLinkAttributes requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAttributeNames()) { context.Writer.WritePropertyName("AttributeNames"); context.Writer.WriteArrayStart(); foreach(var requestObjectAttributeNamesListValue in requestObject.AttributeNames) { context.Writer.Write(requestObjectAttributeNamesListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetTypedLinkSpecifier()) { context.Writer.WritePropertyName("TypedLinkSpecifier"); context.Writer.WriteObjectStart(); var marshaller = TypedLinkSpecifierMarshaller.Instance; marshaller.Marshall(requestObject.TypedLinkSpecifier, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchGetLinkAttributesMarshaller Instance = new BatchGetLinkAttributesMarshaller(); } }
78
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchGetLinkAttributesResponse Object /// </summary> public class BatchGetLinkAttributesResponseUnmarshaller : IUnmarshaller<BatchGetLinkAttributesResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchGetLinkAttributesResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchGetLinkAttributesResponse IUnmarshaller<BatchGetLinkAttributesResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchGetLinkAttributesResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchGetLinkAttributesResponse unmarshalledObject = new BatchGetLinkAttributesResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Attributes", targetDepth)) { var unmarshaller = new ListUnmarshaller<AttributeKeyAndValue, AttributeKeyAndValueUnmarshaller>(AttributeKeyAndValueUnmarshaller.Instance); unmarshalledObject.Attributes = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchGetLinkAttributesResponseUnmarshaller _instance = new BatchGetLinkAttributesResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchGetLinkAttributesResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchGetObjectAttributes Marshaller /// </summary> public class BatchGetObjectAttributesMarshaller : IRequestMarshaller<BatchGetObjectAttributes, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchGetObjectAttributes requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAttributeNames()) { context.Writer.WritePropertyName("AttributeNames"); context.Writer.WriteArrayStart(); foreach(var requestObjectAttributeNamesListValue in requestObject.AttributeNames) { context.Writer.Write(requestObjectAttributeNamesListValue); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetSchemaFacet()) { context.Writer.WritePropertyName("SchemaFacet"); context.Writer.WriteObjectStart(); var marshaller = SchemaFacetMarshaller.Instance; marshaller.Marshall(requestObject.SchemaFacet, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchGetObjectAttributesMarshaller Instance = new BatchGetObjectAttributesMarshaller(); } }
89
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchGetObjectAttributesResponse Object /// </summary> public class BatchGetObjectAttributesResponseUnmarshaller : IUnmarshaller<BatchGetObjectAttributesResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchGetObjectAttributesResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchGetObjectAttributesResponse IUnmarshaller<BatchGetObjectAttributesResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchGetObjectAttributesResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchGetObjectAttributesResponse unmarshalledObject = new BatchGetObjectAttributesResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Attributes", targetDepth)) { var unmarshaller = new ListUnmarshaller<AttributeKeyAndValue, AttributeKeyAndValueUnmarshaller>(AttributeKeyAndValueUnmarshaller.Instance); unmarshalledObject.Attributes = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchGetObjectAttributesResponseUnmarshaller _instance = new BatchGetObjectAttributesResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchGetObjectAttributesResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchGetObjectInformation Marshaller /// </summary> public class BatchGetObjectInformationMarshaller : IRequestMarshaller<BatchGetObjectInformation, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchGetObjectInformation requestObject, JsonMarshallerContext context) { if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchGetObjectInformationMarshaller Instance = new BatchGetObjectInformationMarshaller(); } }
67
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchGetObjectInformationResponse Object /// </summary> public class BatchGetObjectInformationResponseUnmarshaller : IUnmarshaller<BatchGetObjectInformationResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchGetObjectInformationResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchGetObjectInformationResponse IUnmarshaller<BatchGetObjectInformationResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchGetObjectInformationResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchGetObjectInformationResponse unmarshalledObject = new BatchGetObjectInformationResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ObjectIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ObjectIdentifier = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SchemaFacets", targetDepth)) { var unmarshaller = new ListUnmarshaller<SchemaFacet, SchemaFacetUnmarshaller>(SchemaFacetUnmarshaller.Instance); unmarshalledObject.SchemaFacets = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchGetObjectInformationResponseUnmarshaller _instance = new BatchGetObjectInformationResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchGetObjectInformationResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchListAttachedIndices Marshaller /// </summary> public class BatchListAttachedIndicesMarshaller : IRequestMarshaller<BatchListAttachedIndices, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchListAttachedIndices requestObject, JsonMarshallerContext context) { if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetTargetReference()) { context.Writer.WritePropertyName("TargetReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.TargetReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchListAttachedIndicesMarshaller Instance = new BatchListAttachedIndicesMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchListAttachedIndicesResponse Object /// </summary> public class BatchListAttachedIndicesResponseUnmarshaller : IUnmarshaller<BatchListAttachedIndicesResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchListAttachedIndicesResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchListAttachedIndicesResponse IUnmarshaller<BatchListAttachedIndicesResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchListAttachedIndicesResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchListAttachedIndicesResponse unmarshalledObject = new BatchListAttachedIndicesResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("IndexAttachments", targetDepth)) { var unmarshaller = new ListUnmarshaller<IndexAttachment, IndexAttachmentUnmarshaller>(IndexAttachmentUnmarshaller.Instance); unmarshalledObject.IndexAttachments = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchListAttachedIndicesResponseUnmarshaller _instance = new BatchListAttachedIndicesResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchListAttachedIndicesResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchListIncomingTypedLinks Marshaller /// </summary> public class BatchListIncomingTypedLinksMarshaller : IRequestMarshaller<BatchListIncomingTypedLinks, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchListIncomingTypedLinks requestObject, JsonMarshallerContext context) { if(requestObject.IsSetFilterAttributeRanges()) { context.Writer.WritePropertyName("FilterAttributeRanges"); context.Writer.WriteArrayStart(); foreach(var requestObjectFilterAttributeRangesListValue in requestObject.FilterAttributeRanges) { context.Writer.WriteObjectStart(); var marshaller = TypedLinkAttributeRangeMarshaller.Instance; marshaller.Marshall(requestObjectFilterAttributeRangesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetFilterTypedLink()) { context.Writer.WritePropertyName("FilterTypedLink"); context.Writer.WriteObjectStart(); var marshaller = TypedLinkSchemaAndFacetNameMarshaller.Instance; marshaller.Marshall(requestObject.FilterTypedLink, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchListIncomingTypedLinksMarshaller Instance = new BatchListIncomingTypedLinksMarshaller(); } }
106
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchListIncomingTypedLinksResponse Object /// </summary> public class BatchListIncomingTypedLinksResponseUnmarshaller : IUnmarshaller<BatchListIncomingTypedLinksResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchListIncomingTypedLinksResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchListIncomingTypedLinksResponse IUnmarshaller<BatchListIncomingTypedLinksResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchListIncomingTypedLinksResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchListIncomingTypedLinksResponse unmarshalledObject = new BatchListIncomingTypedLinksResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("LinkSpecifiers", targetDepth)) { var unmarshaller = new ListUnmarshaller<TypedLinkSpecifier, TypedLinkSpecifierUnmarshaller>(TypedLinkSpecifierUnmarshaller.Instance); unmarshalledObject.LinkSpecifiers = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchListIncomingTypedLinksResponseUnmarshaller _instance = new BatchListIncomingTypedLinksResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchListIncomingTypedLinksResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchListIndex Marshaller /// </summary> public class BatchListIndexMarshaller : IRequestMarshaller<BatchListIndex, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchListIndex requestObject, JsonMarshallerContext context) { if(requestObject.IsSetIndexReference()) { context.Writer.WritePropertyName("IndexReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.IndexReference, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetRangesOnIndexedValues()) { context.Writer.WritePropertyName("RangesOnIndexedValues"); context.Writer.WriteArrayStart(); foreach(var requestObjectRangesOnIndexedValuesListValue in requestObject.RangesOnIndexedValues) { context.Writer.WriteObjectStart(); var marshaller = ObjectAttributeRangeMarshaller.Instance; marshaller.Marshall(requestObjectRangesOnIndexedValuesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchListIndexMarshaller Instance = new BatchListIndexMarshaller(); } }
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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchListIndexResponse Object /// </summary> public class BatchListIndexResponseUnmarshaller : IUnmarshaller<BatchListIndexResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchListIndexResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchListIndexResponse IUnmarshaller<BatchListIndexResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchListIndexResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchListIndexResponse unmarshalledObject = new BatchListIndexResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("IndexAttachments", targetDepth)) { var unmarshaller = new ListUnmarshaller<IndexAttachment, IndexAttachmentUnmarshaller>(IndexAttachmentUnmarshaller.Instance); unmarshalledObject.IndexAttachments = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchListIndexResponseUnmarshaller _instance = new BatchListIndexResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchListIndexResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchListObjectAttributes Marshaller /// </summary> public class BatchListObjectAttributesMarshaller : IRequestMarshaller<BatchListObjectAttributes, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchListObjectAttributes requestObject, JsonMarshallerContext context) { if(requestObject.IsSetFacetFilter()) { context.Writer.WritePropertyName("FacetFilter"); context.Writer.WriteObjectStart(); var marshaller = SchemaFacetMarshaller.Instance; marshaller.Marshall(requestObject.FacetFilter, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchListObjectAttributesMarshaller Instance = new BatchListObjectAttributesMarshaller(); } }
90
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchListObjectAttributesResponse Object /// </summary> public class BatchListObjectAttributesResponseUnmarshaller : IUnmarshaller<BatchListObjectAttributesResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchListObjectAttributesResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchListObjectAttributesResponse IUnmarshaller<BatchListObjectAttributesResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchListObjectAttributesResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchListObjectAttributesResponse unmarshalledObject = new BatchListObjectAttributesResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Attributes", targetDepth)) { var unmarshaller = new ListUnmarshaller<AttributeKeyAndValue, AttributeKeyAndValueUnmarshaller>(AttributeKeyAndValueUnmarshaller.Instance); unmarshalledObject.Attributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchListObjectAttributesResponseUnmarshaller _instance = new BatchListObjectAttributesResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchListObjectAttributesResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchListObjectChildren Marshaller /// </summary> public class BatchListObjectChildrenMarshaller : IRequestMarshaller<BatchListObjectChildren, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchListObjectChildren requestObject, JsonMarshallerContext context) { if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchListObjectChildrenMarshaller Instance = new BatchListObjectChildrenMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchListObjectChildrenResponse Object /// </summary> public class BatchListObjectChildrenResponseUnmarshaller : IUnmarshaller<BatchListObjectChildrenResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchListObjectChildrenResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchListObjectChildrenResponse IUnmarshaller<BatchListObjectChildrenResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchListObjectChildrenResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchListObjectChildrenResponse unmarshalledObject = new BatchListObjectChildrenResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Children", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Children = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchListObjectChildrenResponseUnmarshaller _instance = new BatchListObjectChildrenResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchListObjectChildrenResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchListObjectParentPaths Marshaller /// </summary> public class BatchListObjectParentPathsMarshaller : IRequestMarshaller<BatchListObjectParentPaths, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchListObjectParentPaths requestObject, JsonMarshallerContext context) { if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchListObjectParentPathsMarshaller Instance = new BatchListObjectParentPathsMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchListObjectParentPathsResponse Object /// </summary> public class BatchListObjectParentPathsResponseUnmarshaller : IUnmarshaller<BatchListObjectParentPathsResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchListObjectParentPathsResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchListObjectParentPathsResponse IUnmarshaller<BatchListObjectParentPathsResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchListObjectParentPathsResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchListObjectParentPathsResponse unmarshalledObject = new BatchListObjectParentPathsResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PathToObjectIdentifiersList", targetDepth)) { var unmarshaller = new ListUnmarshaller<PathToObjectIdentifiers, PathToObjectIdentifiersUnmarshaller>(PathToObjectIdentifiersUnmarshaller.Instance); unmarshalledObject.PathToObjectIdentifiersList = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchListObjectParentPathsResponseUnmarshaller _instance = new BatchListObjectParentPathsResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchListObjectParentPathsResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchListObjectParents Marshaller /// </summary> public class BatchListObjectParentsMarshaller : IRequestMarshaller<BatchListObjectParents, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchListObjectParents requestObject, JsonMarshallerContext context) { if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchListObjectParentsMarshaller Instance = new BatchListObjectParentsMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchListObjectParentsResponse Object /// </summary> public class BatchListObjectParentsResponseUnmarshaller : IUnmarshaller<BatchListObjectParentsResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchListObjectParentsResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchListObjectParentsResponse IUnmarshaller<BatchListObjectParentsResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchListObjectParentsResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchListObjectParentsResponse unmarshalledObject = new BatchListObjectParentsResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ParentLinks", targetDepth)) { var unmarshaller = new ListUnmarshaller<ObjectIdentifierAndLinkNameTuple, ObjectIdentifierAndLinkNameTupleUnmarshaller>(ObjectIdentifierAndLinkNameTupleUnmarshaller.Instance); unmarshalledObject.ParentLinks = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchListObjectParentsResponseUnmarshaller _instance = new BatchListObjectParentsResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchListObjectParentsResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchListObjectPolicies Marshaller /// </summary> public class BatchListObjectPoliciesMarshaller : IRequestMarshaller<BatchListObjectPolicies, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchListObjectPolicies requestObject, JsonMarshallerContext context) { if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchListObjectPoliciesMarshaller Instance = new BatchListObjectPoliciesMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchListObjectPoliciesResponse Object /// </summary> public class BatchListObjectPoliciesResponseUnmarshaller : IUnmarshaller<BatchListObjectPoliciesResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchListObjectPoliciesResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchListObjectPoliciesResponse IUnmarshaller<BatchListObjectPoliciesResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchListObjectPoliciesResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchListObjectPoliciesResponse unmarshalledObject = new BatchListObjectPoliciesResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AttachedPolicyIds", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.AttachedPolicyIds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchListObjectPoliciesResponseUnmarshaller _instance = new BatchListObjectPoliciesResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchListObjectPoliciesResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchListOutgoingTypedLinks Marshaller /// </summary> public class BatchListOutgoingTypedLinksMarshaller : IRequestMarshaller<BatchListOutgoingTypedLinks, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchListOutgoingTypedLinks requestObject, JsonMarshallerContext context) { if(requestObject.IsSetFilterAttributeRanges()) { context.Writer.WritePropertyName("FilterAttributeRanges"); context.Writer.WriteArrayStart(); foreach(var requestObjectFilterAttributeRangesListValue in requestObject.FilterAttributeRanges) { context.Writer.WriteObjectStart(); var marshaller = TypedLinkAttributeRangeMarshaller.Instance; marshaller.Marshall(requestObjectFilterAttributeRangesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetFilterTypedLink()) { context.Writer.WritePropertyName("FilterTypedLink"); context.Writer.WriteObjectStart(); var marshaller = TypedLinkSchemaAndFacetNameMarshaller.Instance; marshaller.Marshall(requestObject.FilterTypedLink, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchListOutgoingTypedLinksMarshaller Instance = new BatchListOutgoingTypedLinksMarshaller(); } }
106
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchListOutgoingTypedLinksResponse Object /// </summary> public class BatchListOutgoingTypedLinksResponseUnmarshaller : IUnmarshaller<BatchListOutgoingTypedLinksResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchListOutgoingTypedLinksResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchListOutgoingTypedLinksResponse IUnmarshaller<BatchListOutgoingTypedLinksResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchListOutgoingTypedLinksResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchListOutgoingTypedLinksResponse unmarshalledObject = new BatchListOutgoingTypedLinksResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TypedLinkSpecifiers", targetDepth)) { var unmarshaller = new ListUnmarshaller<TypedLinkSpecifier, TypedLinkSpecifierUnmarshaller>(TypedLinkSpecifierUnmarshaller.Instance); unmarshalledObject.TypedLinkSpecifiers = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchListOutgoingTypedLinksResponseUnmarshaller _instance = new BatchListOutgoingTypedLinksResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchListOutgoingTypedLinksResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchListPolicyAttachments Marshaller /// </summary> public class BatchListPolicyAttachmentsMarshaller : IRequestMarshaller<BatchListPolicyAttachments, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchListPolicyAttachments requestObject, JsonMarshallerContext context) { if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetPolicyReference()) { context.Writer.WritePropertyName("PolicyReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.PolicyReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchListPolicyAttachmentsMarshaller Instance = new BatchListPolicyAttachmentsMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchListPolicyAttachmentsResponse Object /// </summary> public class BatchListPolicyAttachmentsResponseUnmarshaller : IUnmarshaller<BatchListPolicyAttachmentsResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchListPolicyAttachmentsResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchListPolicyAttachmentsResponse IUnmarshaller<BatchListPolicyAttachmentsResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchListPolicyAttachmentsResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchListPolicyAttachmentsResponse unmarshalledObject = new BatchListPolicyAttachmentsResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ObjectIdentifiers", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.ObjectIdentifiers = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchListPolicyAttachmentsResponseUnmarshaller _instance = new BatchListPolicyAttachmentsResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchListPolicyAttachmentsResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchLookupPolicy Marshaller /// </summary> public class BatchLookupPolicyMarshaller : IRequestMarshaller<BatchLookupPolicy, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchLookupPolicy requestObject, JsonMarshallerContext context) { if(requestObject.IsSetMaxResults()) { context.Writer.WritePropertyName("MaxResults"); context.Writer.Write(requestObject.MaxResults); } if(requestObject.IsSetNextToken()) { context.Writer.WritePropertyName("NextToken"); context.Writer.Write(requestObject.NextToken); } if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchLookupPolicyMarshaller Instance = new BatchLookupPolicyMarshaller(); } }
79
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchLookupPolicyResponse Object /// </summary> public class BatchLookupPolicyResponseUnmarshaller : IUnmarshaller<BatchLookupPolicyResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchLookupPolicyResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchLookupPolicyResponse IUnmarshaller<BatchLookupPolicyResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchLookupPolicyResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchLookupPolicyResponse unmarshalledObject = new BatchLookupPolicyResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PolicyToPathList", targetDepth)) { var unmarshaller = new ListUnmarshaller<PolicyToPath, PolicyToPathUnmarshaller>(PolicyToPathUnmarshaller.Instance); unmarshalledObject.PolicyToPathList = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchLookupPolicyResponseUnmarshaller _instance = new BatchLookupPolicyResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchLookupPolicyResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchReadException Object /// </summary> public class BatchReadExceptionUnmarshaller : IUnmarshaller<BatchReadException, XmlUnmarshallerContext>, IUnmarshaller<BatchReadException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchReadException IUnmarshaller<BatchReadException, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchReadException Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchReadException unmarshalledObject = new BatchReadException(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Message", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Message = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchReadExceptionUnmarshaller _instance = new BatchReadExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchReadExceptionUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchReadOperation Marshaller /// </summary> public class BatchReadOperationMarshaller : IRequestMarshaller<BatchReadOperation, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchReadOperation requestObject, JsonMarshallerContext context) { if(requestObject.IsSetGetLinkAttributes()) { context.Writer.WritePropertyName("GetLinkAttributes"); context.Writer.WriteObjectStart(); var marshaller = BatchGetLinkAttributesMarshaller.Instance; marshaller.Marshall(requestObject.GetLinkAttributes, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetGetObjectAttributes()) { context.Writer.WritePropertyName("GetObjectAttributes"); context.Writer.WriteObjectStart(); var marshaller = BatchGetObjectAttributesMarshaller.Instance; marshaller.Marshall(requestObject.GetObjectAttributes, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetGetObjectInformation()) { context.Writer.WritePropertyName("GetObjectInformation"); context.Writer.WriteObjectStart(); var marshaller = BatchGetObjectInformationMarshaller.Instance; marshaller.Marshall(requestObject.GetObjectInformation, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetListAttachedIndices()) { context.Writer.WritePropertyName("ListAttachedIndices"); context.Writer.WriteObjectStart(); var marshaller = BatchListAttachedIndicesMarshaller.Instance; marshaller.Marshall(requestObject.ListAttachedIndices, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetListIncomingTypedLinks()) { context.Writer.WritePropertyName("ListIncomingTypedLinks"); context.Writer.WriteObjectStart(); var marshaller = BatchListIncomingTypedLinksMarshaller.Instance; marshaller.Marshall(requestObject.ListIncomingTypedLinks, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetListIndex()) { context.Writer.WritePropertyName("ListIndex"); context.Writer.WriteObjectStart(); var marshaller = BatchListIndexMarshaller.Instance; marshaller.Marshall(requestObject.ListIndex, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetListObjectAttributes()) { context.Writer.WritePropertyName("ListObjectAttributes"); context.Writer.WriteObjectStart(); var marshaller = BatchListObjectAttributesMarshaller.Instance; marshaller.Marshall(requestObject.ListObjectAttributes, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetListObjectChildren()) { context.Writer.WritePropertyName("ListObjectChildren"); context.Writer.WriteObjectStart(); var marshaller = BatchListObjectChildrenMarshaller.Instance; marshaller.Marshall(requestObject.ListObjectChildren, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetListObjectParentPaths()) { context.Writer.WritePropertyName("ListObjectParentPaths"); context.Writer.WriteObjectStart(); var marshaller = BatchListObjectParentPathsMarshaller.Instance; marshaller.Marshall(requestObject.ListObjectParentPaths, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetListObjectParents()) { context.Writer.WritePropertyName("ListObjectParents"); context.Writer.WriteObjectStart(); var marshaller = BatchListObjectParentsMarshaller.Instance; marshaller.Marshall(requestObject.ListObjectParents, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetListObjectPolicies()) { context.Writer.WritePropertyName("ListObjectPolicies"); context.Writer.WriteObjectStart(); var marshaller = BatchListObjectPoliciesMarshaller.Instance; marshaller.Marshall(requestObject.ListObjectPolicies, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetListOutgoingTypedLinks()) { context.Writer.WritePropertyName("ListOutgoingTypedLinks"); context.Writer.WriteObjectStart(); var marshaller = BatchListOutgoingTypedLinksMarshaller.Instance; marshaller.Marshall(requestObject.ListOutgoingTypedLinks, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetListPolicyAttachments()) { context.Writer.WritePropertyName("ListPolicyAttachments"); context.Writer.WriteObjectStart(); var marshaller = BatchListPolicyAttachmentsMarshaller.Instance; marshaller.Marshall(requestObject.ListPolicyAttachments, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetLookupPolicy()) { context.Writer.WritePropertyName("LookupPolicy"); context.Writer.WriteObjectStart(); var marshaller = BatchLookupPolicyMarshaller.Instance; marshaller.Marshall(requestObject.LookupPolicy, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchReadOperationMarshaller Instance = new BatchReadOperationMarshaller(); } }
210
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchReadOperationResponse Object /// </summary> public class BatchReadOperationResponseUnmarshaller : IUnmarshaller<BatchReadOperationResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchReadOperationResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchReadOperationResponse IUnmarshaller<BatchReadOperationResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchReadOperationResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchReadOperationResponse unmarshalledObject = new BatchReadOperationResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ExceptionResponse", targetDepth)) { var unmarshaller = BatchReadExceptionUnmarshaller.Instance; unmarshalledObject.ExceptionResponse = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SuccessfulResponse", targetDepth)) { var unmarshaller = BatchReadSuccessfulResponseUnmarshaller.Instance; unmarshalledObject.SuccessfulResponse = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchReadOperationResponseUnmarshaller _instance = new BatchReadOperationResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchReadOperationResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchRead Request Marshaller /// </summary> public class BatchReadRequestMarshaller : IMarshaller<IRequest, BatchReadRequest> , 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((BatchReadRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(BatchReadRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "POST"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/batchread"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetOperations()) { context.Writer.WritePropertyName("Operations"); context.Writer.WriteArrayStart(); foreach(var publicRequestOperationsListValue in publicRequest.Operations) { context.Writer.WriteObjectStart(); var marshaller = BatchReadOperationMarshaller.Instance; marshaller.Marshall(publicRequestOperationsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetConsistencyLevel()) { request.Headers["x-amz-consistency-level"] = publicRequest.ConsistencyLevel; } if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static BatchReadRequestMarshaller _instance = new BatchReadRequestMarshaller(); internal static BatchReadRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static BatchReadRequestMarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchRead operation /// </summary> public class BatchReadResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { BatchReadResponse response = new BatchReadResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Responses", targetDepth)) { var unmarshaller = new ListUnmarshaller<BatchReadOperationResponse, BatchReadOperationResponseUnmarshaller>(BatchReadOperationResponseUnmarshaller.Instance); response.Responses = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryNotEnabledException")) { return DirectoryNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static BatchReadResponseUnmarshaller _instance = new BatchReadResponseUnmarshaller(); internal static BatchReadResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static BatchReadResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchReadSuccessfulResponse Object /// </summary> public class BatchReadSuccessfulResponseUnmarshaller : IUnmarshaller<BatchReadSuccessfulResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchReadSuccessfulResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchReadSuccessfulResponse IUnmarshaller<BatchReadSuccessfulResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchReadSuccessfulResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchReadSuccessfulResponse unmarshalledObject = new BatchReadSuccessfulResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("GetLinkAttributes", targetDepth)) { var unmarshaller = BatchGetLinkAttributesResponseUnmarshaller.Instance; unmarshalledObject.GetLinkAttributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GetObjectAttributes", targetDepth)) { var unmarshaller = BatchGetObjectAttributesResponseUnmarshaller.Instance; unmarshalledObject.GetObjectAttributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GetObjectInformation", targetDepth)) { var unmarshaller = BatchGetObjectInformationResponseUnmarshaller.Instance; unmarshalledObject.GetObjectInformation = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ListAttachedIndices", targetDepth)) { var unmarshaller = BatchListAttachedIndicesResponseUnmarshaller.Instance; unmarshalledObject.ListAttachedIndices = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ListIncomingTypedLinks", targetDepth)) { var unmarshaller = BatchListIncomingTypedLinksResponseUnmarshaller.Instance; unmarshalledObject.ListIncomingTypedLinks = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ListIndex", targetDepth)) { var unmarshaller = BatchListIndexResponseUnmarshaller.Instance; unmarshalledObject.ListIndex = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ListObjectAttributes", targetDepth)) { var unmarshaller = BatchListObjectAttributesResponseUnmarshaller.Instance; unmarshalledObject.ListObjectAttributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ListObjectChildren", targetDepth)) { var unmarshaller = BatchListObjectChildrenResponseUnmarshaller.Instance; unmarshalledObject.ListObjectChildren = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ListObjectParentPaths", targetDepth)) { var unmarshaller = BatchListObjectParentPathsResponseUnmarshaller.Instance; unmarshalledObject.ListObjectParentPaths = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ListObjectParents", targetDepth)) { var unmarshaller = BatchListObjectParentsResponseUnmarshaller.Instance; unmarshalledObject.ListObjectParents = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ListObjectPolicies", targetDepth)) { var unmarshaller = BatchListObjectPoliciesResponseUnmarshaller.Instance; unmarshalledObject.ListObjectPolicies = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ListOutgoingTypedLinks", targetDepth)) { var unmarshaller = BatchListOutgoingTypedLinksResponseUnmarshaller.Instance; unmarshalledObject.ListOutgoingTypedLinks = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ListPolicyAttachments", targetDepth)) { var unmarshaller = BatchListPolicyAttachmentsResponseUnmarshaller.Instance; unmarshalledObject.ListPolicyAttachments = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LookupPolicy", targetDepth)) { var unmarshaller = BatchLookupPolicyResponseUnmarshaller.Instance; unmarshalledObject.LookupPolicy = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchReadSuccessfulResponseUnmarshaller _instance = new BatchReadSuccessfulResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchReadSuccessfulResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchRemoveFacetFromObject Marshaller /// </summary> public class BatchRemoveFacetFromObjectMarshaller : IRequestMarshaller<BatchRemoveFacetFromObject, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchRemoveFacetFromObject requestObject, JsonMarshallerContext context) { if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetSchemaFacet()) { context.Writer.WritePropertyName("SchemaFacet"); context.Writer.WriteObjectStart(); var marshaller = SchemaFacetMarshaller.Instance; marshaller.Marshall(requestObject.SchemaFacet, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchRemoveFacetFromObjectMarshaller Instance = new BatchRemoveFacetFromObjectMarshaller(); } }
78
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchRemoveFacetFromObjectResponse Object /// </summary> public class BatchRemoveFacetFromObjectResponseUnmarshaller : IUnmarshaller<BatchRemoveFacetFromObjectResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchRemoveFacetFromObjectResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchRemoveFacetFromObjectResponse IUnmarshaller<BatchRemoveFacetFromObjectResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchRemoveFacetFromObjectResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchRemoveFacetFromObjectResponse unmarshalledObject = new BatchRemoveFacetFromObjectResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static BatchRemoveFacetFromObjectResponseUnmarshaller _instance = new BatchRemoveFacetFromObjectResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchRemoveFacetFromObjectResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchUpdateLinkAttributes Marshaller /// </summary> public class BatchUpdateLinkAttributesMarshaller : IRequestMarshaller<BatchUpdateLinkAttributes, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchUpdateLinkAttributes requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAttributeUpdates()) { context.Writer.WritePropertyName("AttributeUpdates"); context.Writer.WriteArrayStart(); foreach(var requestObjectAttributeUpdatesListValue in requestObject.AttributeUpdates) { context.Writer.WriteObjectStart(); var marshaller = LinkAttributeUpdateMarshaller.Instance; marshaller.Marshall(requestObjectAttributeUpdatesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetTypedLinkSpecifier()) { context.Writer.WritePropertyName("TypedLinkSpecifier"); context.Writer.WriteObjectStart(); var marshaller = TypedLinkSpecifierMarshaller.Instance; marshaller.Marshall(requestObject.TypedLinkSpecifier, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchUpdateLinkAttributesMarshaller Instance = new BatchUpdateLinkAttributesMarshaller(); } }
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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchUpdateLinkAttributesResponse Object /// </summary> public class BatchUpdateLinkAttributesResponseUnmarshaller : IUnmarshaller<BatchUpdateLinkAttributesResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchUpdateLinkAttributesResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchUpdateLinkAttributesResponse IUnmarshaller<BatchUpdateLinkAttributesResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchUpdateLinkAttributesResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchUpdateLinkAttributesResponse unmarshalledObject = new BatchUpdateLinkAttributesResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static BatchUpdateLinkAttributesResponseUnmarshaller _instance = new BatchUpdateLinkAttributesResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchUpdateLinkAttributesResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchUpdateObjectAttributes Marshaller /// </summary> public class BatchUpdateObjectAttributesMarshaller : IRequestMarshaller<BatchUpdateObjectAttributes, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchUpdateObjectAttributes requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAttributeUpdates()) { context.Writer.WritePropertyName("AttributeUpdates"); context.Writer.WriteArrayStart(); foreach(var requestObjectAttributeUpdatesListValue in requestObject.AttributeUpdates) { context.Writer.WriteObjectStart(); var marshaller = ObjectAttributeUpdateMarshaller.Instance; marshaller.Marshall(requestObjectAttributeUpdatesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(requestObject.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(requestObject.ObjectReference, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchUpdateObjectAttributesMarshaller Instance = new BatchUpdateObjectAttributesMarshaller(); } }
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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchUpdateObjectAttributesResponse Object /// </summary> public class BatchUpdateObjectAttributesResponseUnmarshaller : IUnmarshaller<BatchUpdateObjectAttributesResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchUpdateObjectAttributesResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchUpdateObjectAttributesResponse IUnmarshaller<BatchUpdateObjectAttributesResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchUpdateObjectAttributesResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchUpdateObjectAttributesResponse unmarshalledObject = new BatchUpdateObjectAttributesResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ObjectIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ObjectIdentifier = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchUpdateObjectAttributesResponseUnmarshaller _instance = new BatchUpdateObjectAttributesResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchUpdateObjectAttributesResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchWriteException Object /// </summary> public class BatchWriteExceptionUnmarshaller : IErrorResponseUnmarshaller<BatchWriteException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchWriteException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public BatchWriteException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); BatchWriteException unmarshalledObject = new BatchWriteException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Index", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Index = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchWriteExceptionUnmarshaller _instance = new BatchWriteExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchWriteExceptionUnmarshaller Instance { get { return _instance; } } } }
97
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchWriteOperation Marshaller /// </summary> public class BatchWriteOperationMarshaller : IRequestMarshaller<BatchWriteOperation, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(BatchWriteOperation requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAddFacetToObject()) { context.Writer.WritePropertyName("AddFacetToObject"); context.Writer.WriteObjectStart(); var marshaller = BatchAddFacetToObjectMarshaller.Instance; marshaller.Marshall(requestObject.AddFacetToObject, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetAttachObject()) { context.Writer.WritePropertyName("AttachObject"); context.Writer.WriteObjectStart(); var marshaller = BatchAttachObjectMarshaller.Instance; marshaller.Marshall(requestObject.AttachObject, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetAttachPolicy()) { context.Writer.WritePropertyName("AttachPolicy"); context.Writer.WriteObjectStart(); var marshaller = BatchAttachPolicyMarshaller.Instance; marshaller.Marshall(requestObject.AttachPolicy, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetAttachToIndex()) { context.Writer.WritePropertyName("AttachToIndex"); context.Writer.WriteObjectStart(); var marshaller = BatchAttachToIndexMarshaller.Instance; marshaller.Marshall(requestObject.AttachToIndex, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetAttachTypedLink()) { context.Writer.WritePropertyName("AttachTypedLink"); context.Writer.WriteObjectStart(); var marshaller = BatchAttachTypedLinkMarshaller.Instance; marshaller.Marshall(requestObject.AttachTypedLink, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetCreateIndex()) { context.Writer.WritePropertyName("CreateIndex"); context.Writer.WriteObjectStart(); var marshaller = BatchCreateIndexMarshaller.Instance; marshaller.Marshall(requestObject.CreateIndex, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetCreateObject()) { context.Writer.WritePropertyName("CreateObject"); context.Writer.WriteObjectStart(); var marshaller = BatchCreateObjectMarshaller.Instance; marshaller.Marshall(requestObject.CreateObject, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetDeleteObject()) { context.Writer.WritePropertyName("DeleteObject"); context.Writer.WriteObjectStart(); var marshaller = BatchDeleteObjectMarshaller.Instance; marshaller.Marshall(requestObject.DeleteObject, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetDetachFromIndex()) { context.Writer.WritePropertyName("DetachFromIndex"); context.Writer.WriteObjectStart(); var marshaller = BatchDetachFromIndexMarshaller.Instance; marshaller.Marshall(requestObject.DetachFromIndex, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetDetachObject()) { context.Writer.WritePropertyName("DetachObject"); context.Writer.WriteObjectStart(); var marshaller = BatchDetachObjectMarshaller.Instance; marshaller.Marshall(requestObject.DetachObject, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetDetachPolicy()) { context.Writer.WritePropertyName("DetachPolicy"); context.Writer.WriteObjectStart(); var marshaller = BatchDetachPolicyMarshaller.Instance; marshaller.Marshall(requestObject.DetachPolicy, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetDetachTypedLink()) { context.Writer.WritePropertyName("DetachTypedLink"); context.Writer.WriteObjectStart(); var marshaller = BatchDetachTypedLinkMarshaller.Instance; marshaller.Marshall(requestObject.DetachTypedLink, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetRemoveFacetFromObject()) { context.Writer.WritePropertyName("RemoveFacetFromObject"); context.Writer.WriteObjectStart(); var marshaller = BatchRemoveFacetFromObjectMarshaller.Instance; marshaller.Marshall(requestObject.RemoveFacetFromObject, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetUpdateLinkAttributes()) { context.Writer.WritePropertyName("UpdateLinkAttributes"); context.Writer.WriteObjectStart(); var marshaller = BatchUpdateLinkAttributesMarshaller.Instance; marshaller.Marshall(requestObject.UpdateLinkAttributes, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetUpdateObjectAttributes()) { context.Writer.WritePropertyName("UpdateObjectAttributes"); context.Writer.WriteObjectStart(); var marshaller = BatchUpdateObjectAttributesMarshaller.Instance; marshaller.Marshall(requestObject.UpdateObjectAttributes, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static BatchWriteOperationMarshaller Instance = new BatchWriteOperationMarshaller(); } }
221
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchWriteOperationResponse Object /// </summary> public class BatchWriteOperationResponseUnmarshaller : IUnmarshaller<BatchWriteOperationResponse, XmlUnmarshallerContext>, IUnmarshaller<BatchWriteOperationResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> BatchWriteOperationResponse IUnmarshaller<BatchWriteOperationResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public BatchWriteOperationResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; BatchWriteOperationResponse unmarshalledObject = new BatchWriteOperationResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AddFacetToObject", targetDepth)) { var unmarshaller = BatchAddFacetToObjectResponseUnmarshaller.Instance; unmarshalledObject.AddFacetToObject = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AttachObject", targetDepth)) { var unmarshaller = BatchAttachObjectResponseUnmarshaller.Instance; unmarshalledObject.AttachObject = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AttachPolicy", targetDepth)) { var unmarshaller = BatchAttachPolicyResponseUnmarshaller.Instance; unmarshalledObject.AttachPolicy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AttachToIndex", targetDepth)) { var unmarshaller = BatchAttachToIndexResponseUnmarshaller.Instance; unmarshalledObject.AttachToIndex = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AttachTypedLink", targetDepth)) { var unmarshaller = BatchAttachTypedLinkResponseUnmarshaller.Instance; unmarshalledObject.AttachTypedLink = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreateIndex", targetDepth)) { var unmarshaller = BatchCreateIndexResponseUnmarshaller.Instance; unmarshalledObject.CreateIndex = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreateObject", targetDepth)) { var unmarshaller = BatchCreateObjectResponseUnmarshaller.Instance; unmarshalledObject.CreateObject = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeleteObject", targetDepth)) { var unmarshaller = BatchDeleteObjectResponseUnmarshaller.Instance; unmarshalledObject.DeleteObject = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DetachFromIndex", targetDepth)) { var unmarshaller = BatchDetachFromIndexResponseUnmarshaller.Instance; unmarshalledObject.DetachFromIndex = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DetachObject", targetDepth)) { var unmarshaller = BatchDetachObjectResponseUnmarshaller.Instance; unmarshalledObject.DetachObject = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DetachPolicy", targetDepth)) { var unmarshaller = BatchDetachPolicyResponseUnmarshaller.Instance; unmarshalledObject.DetachPolicy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DetachTypedLink", targetDepth)) { var unmarshaller = BatchDetachTypedLinkResponseUnmarshaller.Instance; unmarshalledObject.DetachTypedLink = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RemoveFacetFromObject", targetDepth)) { var unmarshaller = BatchRemoveFacetFromObjectResponseUnmarshaller.Instance; unmarshalledObject.RemoveFacetFromObject = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("UpdateLinkAttributes", targetDepth)) { var unmarshaller = BatchUpdateLinkAttributesResponseUnmarshaller.Instance; unmarshalledObject.UpdateLinkAttributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("UpdateObjectAttributes", targetDepth)) { var unmarshaller = BatchUpdateObjectAttributesResponseUnmarshaller.Instance; unmarshalledObject.UpdateObjectAttributes = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static BatchWriteOperationResponseUnmarshaller _instance = new BatchWriteOperationResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static BatchWriteOperationResponseUnmarshaller Instance { get { return _instance; } } } }
176
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// BatchWrite Request Marshaller /// </summary> public class BatchWriteRequestMarshaller : IMarshaller<IRequest, BatchWriteRequest> , 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((BatchWriteRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(BatchWriteRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/batchwrite"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetOperations()) { context.Writer.WritePropertyName("Operations"); context.Writer.WriteArrayStart(); foreach(var publicRequestOperationsListValue in publicRequest.Operations) { context.Writer.WriteObjectStart(); var marshaller = BatchWriteOperationMarshaller.Instance; marshaller.Marshall(publicRequestOperationsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static BatchWriteRequestMarshaller _instance = new BatchWriteRequestMarshaller(); internal static BatchWriteRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static BatchWriteRequestMarshaller Instance { get { return _instance; } } } }
116
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchWrite operation /// </summary> public class BatchWriteResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { BatchWriteResponse response = new BatchWriteResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Responses", targetDepth)) { var unmarshaller = new ListUnmarshaller<BatchWriteOperationResponse, BatchWriteOperationResponseUnmarshaller>(BatchWriteOperationResponseUnmarshaller.Instance); response.Responses = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("BatchWriteException")) { return BatchWriteExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryNotEnabledException")) { return DirectoryNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static BatchWriteResponseUnmarshaller _instance = new BatchWriteResponseUnmarshaller(); internal static BatchWriteResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static BatchWriteResponseUnmarshaller Instance { get { return _instance; } } } }
138
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CannotListParentOfRootException Object /// </summary> public class CannotListParentOfRootExceptionUnmarshaller : IErrorResponseUnmarshaller<CannotListParentOfRootException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public CannotListParentOfRootException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public CannotListParentOfRootException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); CannotListParentOfRootException unmarshalledObject = new CannotListParentOfRootException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static CannotListParentOfRootExceptionUnmarshaller _instance = new CannotListParentOfRootExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CannotListParentOfRootExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// CreateDirectory Request Marshaller /// </summary> public class CreateDirectoryRequestMarshaller : IMarshaller<IRequest, CreateDirectoryRequest> , 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((CreateDirectoryRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateDirectoryRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/directory/create"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetSchemaArn()) { request.Headers["x-amz-data-partition"] = publicRequest.SchemaArn; } return request; } private static CreateDirectoryRequestMarshaller _instance = new CreateDirectoryRequestMarshaller(); internal static CreateDirectoryRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDirectoryRequestMarshaller Instance { get { return _instance; } } } }
106
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateDirectory operation /// </summary> public class CreateDirectoryResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateDirectoryResponse response = new CreateDirectoryResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AppliedSchemaArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AppliedSchemaArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DirectoryArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DirectoryArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ObjectIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ObjectIdentifier = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryAlreadyExistsException")) { return DirectoryAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateDirectoryResponseUnmarshaller _instance = new CreateDirectoryResponseUnmarshaller(); internal static CreateDirectoryResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDirectoryResponseUnmarshaller Instance { get { return _instance; } } } }
156
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// CreateFacet Request Marshaller /// </summary> public class CreateFacetRequestMarshaller : IMarshaller<IRequest, CreateFacetRequest> , 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((CreateFacetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateFacetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/facet/create"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAttributes()) { context.Writer.WritePropertyName("Attributes"); context.Writer.WriteArrayStart(); foreach(var publicRequestAttributesListValue in publicRequest.Attributes) { context.Writer.WriteObjectStart(); var marshaller = FacetAttributeMarshaller.Instance; marshaller.Marshall(publicRequestAttributesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetFacetStyle()) { context.Writer.WritePropertyName("FacetStyle"); context.Writer.Write(publicRequest.FacetStyle); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetObjectType()) { context.Writer.WritePropertyName("ObjectType"); context.Writer.Write(publicRequest.ObjectType); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetSchemaArn()) { request.Headers["x-amz-data-partition"] = publicRequest.SchemaArn; } return request; } private static CreateFacetRequestMarshaller _instance = new CreateFacetRequestMarshaller(); internal static CreateFacetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateFacetRequestMarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateFacet operation /// </summary> public class CreateFacetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateFacetResponse response = new CreateFacetResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("FacetAlreadyExistsException")) { return FacetAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("FacetValidationException")) { return FacetValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRuleException")) { return InvalidRuleExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateFacetResponseUnmarshaller _instance = new CreateFacetResponseUnmarshaller(); internal static CreateFacetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateFacetResponseUnmarshaller Instance { get { return _instance; } } } }
135
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// CreateIndex Request Marshaller /// </summary> public class CreateIndexRequestMarshaller : IMarshaller<IRequest, CreateIndexRequest> , 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((CreateIndexRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateIndexRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/index"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetIsUnique()) { context.Writer.WritePropertyName("IsUnique"); context.Writer.Write(publicRequest.IsUnique); } if(publicRequest.IsSetLinkName()) { context.Writer.WritePropertyName("LinkName"); context.Writer.Write(publicRequest.LinkName); } if(publicRequest.IsSetOrderedIndexedAttributeList()) { context.Writer.WritePropertyName("OrderedIndexedAttributeList"); context.Writer.WriteArrayStart(); foreach(var publicRequestOrderedIndexedAttributeListListValue in publicRequest.OrderedIndexedAttributeList) { context.Writer.WriteObjectStart(); var marshaller = AttributeKeyMarshaller.Instance; marshaller.Marshall(publicRequestOrderedIndexedAttributeListListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetParentReference()) { context.Writer.WritePropertyName("ParentReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(publicRequest.ParentReference, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static CreateIndexRequestMarshaller _instance = new CreateIndexRequestMarshaller(); internal static CreateIndexRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateIndexRequestMarshaller Instance { get { return _instance; } } } }
139
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateIndex operation /// </summary> public class CreateIndexResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateIndexResponse response = new CreateIndexResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ObjectIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ObjectIdentifier = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryNotEnabledException")) { return DirectoryNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("FacetValidationException")) { return FacetValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LinkNameAlreadyInUseException")) { return LinkNameAlreadyInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedIndexTypeException")) { return UnsupportedIndexTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateIndexResponseUnmarshaller _instance = new CreateIndexResponseUnmarshaller(); internal static CreateIndexResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateIndexResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// CreateObject Request Marshaller /// </summary> public class CreateObjectRequestMarshaller : IMarshaller<IRequest, CreateObjectRequest> , 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((CreateObjectRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateObjectRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/object"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetLinkName()) { context.Writer.WritePropertyName("LinkName"); context.Writer.Write(publicRequest.LinkName); } if(publicRequest.IsSetObjectAttributeList()) { context.Writer.WritePropertyName("ObjectAttributeList"); context.Writer.WriteArrayStart(); foreach(var publicRequestObjectAttributeListListValue in publicRequest.ObjectAttributeList) { context.Writer.WriteObjectStart(); var marshaller = AttributeKeyAndValueMarshaller.Instance; marshaller.Marshall(publicRequestObjectAttributeListListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetParentReference()) { context.Writer.WritePropertyName("ParentReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(publicRequest.ParentReference, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetSchemaFacets()) { context.Writer.WritePropertyName("SchemaFacets"); context.Writer.WriteArrayStart(); foreach(var publicRequestSchemaFacetsListValue in publicRequest.SchemaFacets) { context.Writer.WriteObjectStart(); var marshaller = SchemaFacetMarshaller.Instance; marshaller.Marshall(publicRequestSchemaFacetsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static CreateObjectRequestMarshaller _instance = new CreateObjectRequestMarshaller(); internal static CreateObjectRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateObjectRequestMarshaller Instance { get { return _instance; } } } }
149
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateObject operation /// </summary> public class CreateObjectResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateObjectResponse response = new CreateObjectResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ObjectIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ObjectIdentifier = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryNotEnabledException")) { return DirectoryNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("FacetValidationException")) { return FacetValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LinkNameAlreadyInUseException")) { return LinkNameAlreadyInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("UnsupportedIndexTypeException")) { return UnsupportedIndexTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateObjectResponseUnmarshaller _instance = new CreateObjectResponseUnmarshaller(); internal static CreateObjectResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateObjectResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// CreateSchema Request Marshaller /// </summary> public class CreateSchemaRequestMarshaller : IMarshaller<IRequest, CreateSchemaRequest> , 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((CreateSchemaRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateSchemaRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/schema/create"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateSchemaRequestMarshaller _instance = new CreateSchemaRequestMarshaller(); internal static CreateSchemaRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateSchemaRequestMarshaller Instance { get { return _instance; } } } }
101
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateSchema operation /// </summary> public class CreateSchemaResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateSchemaResponse response = new CreateSchemaResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("SchemaArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SchemaArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("SchemaAlreadyExistsException")) { return SchemaAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateSchemaResponseUnmarshaller _instance = new CreateSchemaResponseUnmarshaller(); internal static CreateSchemaResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateSchemaResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// CreateTypedLinkFacet Request Marshaller /// </summary> public class CreateTypedLinkFacetRequestMarshaller : IMarshaller<IRequest, CreateTypedLinkFacetRequest> , 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((CreateTypedLinkFacetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateTypedLinkFacetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/typedlink/facet/create"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetFacet()) { context.Writer.WritePropertyName("Facet"); context.Writer.WriteObjectStart(); var marshaller = TypedLinkFacetMarshaller.Instance; marshaller.Marshall(publicRequest.Facet, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetSchemaArn()) { request.Headers["x-amz-data-partition"] = publicRequest.SchemaArn; } return request; } private static CreateTypedLinkFacetRequestMarshaller _instance = new CreateTypedLinkFacetRequestMarshaller(); internal static CreateTypedLinkFacetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateTypedLinkFacetRequestMarshaller Instance { get { return _instance; } } } }
111
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateTypedLinkFacet operation /// </summary> public class CreateTypedLinkFacetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateTypedLinkFacetResponse response = new CreateTypedLinkFacetResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("FacetAlreadyExistsException")) { return FacetAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("FacetValidationException")) { return FacetValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRuleException")) { return InvalidRuleExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateTypedLinkFacetResponseUnmarshaller _instance = new CreateTypedLinkFacetResponseUnmarshaller(); internal static CreateTypedLinkFacetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateTypedLinkFacetResponseUnmarshaller Instance { get { return _instance; } } } }
135
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// DeleteDirectory Request Marshaller /// </summary> public class DeleteDirectoryRequestMarshaller : IMarshaller<IRequest, DeleteDirectoryRequest> , 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((DeleteDirectoryRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteDirectoryRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/directory"; if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static DeleteDirectoryRequestMarshaller _instance = new DeleteDirectoryRequestMarshaller(); internal static DeleteDirectoryRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteDirectoryRequestMarshaller Instance { get { return _instance; } } } }
90
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteDirectory operation /// </summary> public class DeleteDirectoryResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteDirectoryResponse response = new DeleteDirectoryResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DirectoryArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DirectoryArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryDeletedException")) { return DirectoryDeletedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryNotDisabledException")) { return DirectoryNotDisabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteDirectoryResponseUnmarshaller _instance = new DeleteDirectoryResponseUnmarshaller(); internal static DeleteDirectoryResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteDirectoryResponseUnmarshaller Instance { get { return _instance; } } } }
142
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// DeleteFacet Request Marshaller /// </summary> public class DeleteFacetRequestMarshaller : IMarshaller<IRequest, DeleteFacetRequest> , 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((DeleteFacetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteFacetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/facet/delete"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetSchemaArn()) { request.Headers["x-amz-data-partition"] = publicRequest.SchemaArn; } return request; } private static DeleteFacetRequestMarshaller _instance = new DeleteFacetRequestMarshaller(); internal static DeleteFacetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteFacetRequestMarshaller Instance { get { return _instance; } } } }
106
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteFacet operation /// </summary> public class DeleteFacetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteFacetResponse response = new DeleteFacetResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("FacetInUseException")) { return FacetInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("FacetNotFoundException")) { return FacetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteFacetResponseUnmarshaller _instance = new DeleteFacetResponseUnmarshaller(); internal static DeleteFacetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteFacetResponseUnmarshaller Instance { get { return _instance; } } } }
131
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// DeleteObject Request Marshaller /// </summary> public class DeleteObjectRequestMarshaller : IMarshaller<IRequest, DeleteObjectRequest> , 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((DeleteObjectRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteObjectRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/object/delete"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(publicRequest.ObjectReference, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static DeleteObjectRequestMarshaller _instance = new DeleteObjectRequestMarshaller(); internal static DeleteObjectRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteObjectRequestMarshaller Instance { get { return _instance; } } } }
111
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteObject operation /// </summary> public class DeleteObjectResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteObjectResponse response = new DeleteObjectResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryNotEnabledException")) { return DirectoryNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ObjectNotDetachedException")) { return ObjectNotDetachedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteObjectResponseUnmarshaller _instance = new DeleteObjectResponseUnmarshaller(); internal static DeleteObjectResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteObjectResponseUnmarshaller Instance { get { return _instance; } } } }
131
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// DeleteSchema Request Marshaller /// </summary> public class DeleteSchemaRequestMarshaller : IMarshaller<IRequest, DeleteSchemaRequest> , 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((DeleteSchemaRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteSchemaRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/schema"; if (publicRequest.IsSetSchemaArn()) { request.Headers["x-amz-data-partition"] = publicRequest.SchemaArn; } return request; } private static DeleteSchemaRequestMarshaller _instance = new DeleteSchemaRequestMarshaller(); internal static DeleteSchemaRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteSchemaRequestMarshaller Instance { get { return _instance; } } } }
90
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteSchema operation /// </summary> public class DeleteSchemaResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteSchemaResponse response = new DeleteSchemaResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("SchemaArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SchemaArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("StillContainsLinksException")) { return StillContainsLinksExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteSchemaResponseUnmarshaller _instance = new DeleteSchemaResponseUnmarshaller(); internal static DeleteSchemaResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteSchemaResponseUnmarshaller Instance { get { return _instance; } } } }
138
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// DeleteTypedLinkFacet Request Marshaller /// </summary> public class DeleteTypedLinkFacetRequestMarshaller : IMarshaller<IRequest, DeleteTypedLinkFacetRequest> , 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((DeleteTypedLinkFacetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteTypedLinkFacetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/typedlink/facet/delete"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetSchemaArn()) { request.Headers["x-amz-data-partition"] = publicRequest.SchemaArn; } return request; } private static DeleteTypedLinkFacetRequestMarshaller _instance = new DeleteTypedLinkFacetRequestMarshaller(); internal static DeleteTypedLinkFacetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteTypedLinkFacetRequestMarshaller Instance { get { return _instance; } } } }
106
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteTypedLinkFacet operation /// </summary> public class DeleteTypedLinkFacetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteTypedLinkFacetResponse response = new DeleteTypedLinkFacetResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("FacetNotFoundException")) { return FacetNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteTypedLinkFacetResponseUnmarshaller _instance = new DeleteTypedLinkFacetResponseUnmarshaller(); internal static DeleteTypedLinkFacetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteTypedLinkFacetResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// DetachFromIndex Request Marshaller /// </summary> public class DetachFromIndexRequestMarshaller : IMarshaller<IRequest, DetachFromIndexRequest> , 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((DetachFromIndexRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DetachFromIndexRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/index/detach"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetIndexReference()) { context.Writer.WritePropertyName("IndexReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(publicRequest.IndexReference, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTargetReference()) { context.Writer.WritePropertyName("TargetReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(publicRequest.TargetReference, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static DetachFromIndexRequestMarshaller _instance = new DetachFromIndexRequestMarshaller(); internal static DetachFromIndexRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetachFromIndexRequestMarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DetachFromIndex operation /// </summary> public class DetachFromIndexResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DetachFromIndexResponse response = new DetachFromIndexResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DetachedObjectIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DetachedObjectIdentifier = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryNotEnabledException")) { return DirectoryNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotIndexException")) { return NotIndexExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ObjectAlreadyDetachedException")) { return ObjectAlreadyDetachedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DetachFromIndexResponseUnmarshaller _instance = new DetachFromIndexResponseUnmarshaller(); internal static DetachFromIndexResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetachFromIndexResponseUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// DetachObject Request Marshaller /// </summary> public class DetachObjectRequestMarshaller : IMarshaller<IRequest, DetachObjectRequest> , 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((DetachObjectRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DetachObjectRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/object/detach"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetLinkName()) { context.Writer.WritePropertyName("LinkName"); context.Writer.Write(publicRequest.LinkName); } if(publicRequest.IsSetParentReference()) { context.Writer.WritePropertyName("ParentReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(publicRequest.ParentReference, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static DetachObjectRequestMarshaller _instance = new DetachObjectRequestMarshaller(); internal static DetachObjectRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetachObjectRequestMarshaller Instance { get { return _instance; } } } }
117
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DetachObject operation /// </summary> public class DetachObjectResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DetachObjectResponse response = new DetachObjectResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DetachedObjectIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DetachedObjectIdentifier = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryNotEnabledException")) { return DirectoryNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotNodeException")) { return NotNodeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DetachObjectResponseUnmarshaller _instance = new DetachObjectResponseUnmarshaller(); internal static DetachObjectResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetachObjectResponseUnmarshaller Instance { get { return _instance; } } } }
142
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// DetachPolicy Request Marshaller /// </summary> public class DetachPolicyRequestMarshaller : IMarshaller<IRequest, DetachPolicyRequest> , 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((DetachPolicyRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DetachPolicyRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/policy/detach"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetObjectReference()) { context.Writer.WritePropertyName("ObjectReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(publicRequest.ObjectReference, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetPolicyReference()) { context.Writer.WritePropertyName("PolicyReference"); context.Writer.WriteObjectStart(); var marshaller = ObjectReferenceMarshaller.Instance; marshaller.Marshall(publicRequest.PolicyReference, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static DetachPolicyRequestMarshaller _instance = new DetachPolicyRequestMarshaller(); internal static DetachPolicyRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetachPolicyRequestMarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DetachPolicy operation /// </summary> public class DetachPolicyResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DetachPolicyResponse response = new DetachPolicyResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryNotEnabledException")) { return DirectoryNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotPolicyException")) { return NotPolicyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DetachPolicyResponseUnmarshaller _instance = new DetachPolicyResponseUnmarshaller(); internal static DetachPolicyResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetachPolicyResponseUnmarshaller Instance { get { return _instance; } } } }
131
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// DetachTypedLink Request Marshaller /// </summary> public class DetachTypedLinkRequestMarshaller : IMarshaller<IRequest, DetachTypedLinkRequest> , 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((DetachTypedLinkRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DetachTypedLinkRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/typedlink/detach"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetTypedLinkSpecifier()) { context.Writer.WritePropertyName("TypedLinkSpecifier"); context.Writer.WriteObjectStart(); var marshaller = TypedLinkSpecifierMarshaller.Instance; marshaller.Marshall(publicRequest.TypedLinkSpecifier, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static DetachTypedLinkRequestMarshaller _instance = new DetachTypedLinkRequestMarshaller(); internal static DetachTypedLinkRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetachTypedLinkRequestMarshaller Instance { get { return _instance; } } } }
111
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DetachTypedLink operation /// </summary> public class DetachTypedLinkResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DetachTypedLinkResponse response = new DetachTypedLinkResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryNotEnabledException")) { return DirectoryNotEnabledExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("FacetValidationException")) { return FacetValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DetachTypedLinkResponseUnmarshaller _instance = new DetachTypedLinkResponseUnmarshaller(); internal static DetachTypedLinkResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DetachTypedLinkResponseUnmarshaller Instance { get { return _instance; } } } }
131
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DirectoryAlreadyExistsException Object /// </summary> public class DirectoryAlreadyExistsExceptionUnmarshaller : IErrorResponseUnmarshaller<DirectoryAlreadyExistsException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DirectoryAlreadyExistsException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public DirectoryAlreadyExistsException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); DirectoryAlreadyExistsException unmarshalledObject = new DirectoryAlreadyExistsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static DirectoryAlreadyExistsExceptionUnmarshaller _instance = new DirectoryAlreadyExistsExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DirectoryAlreadyExistsExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DirectoryDeletedException Object /// </summary> public class DirectoryDeletedExceptionUnmarshaller : IErrorResponseUnmarshaller<DirectoryDeletedException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DirectoryDeletedException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public DirectoryDeletedException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); DirectoryDeletedException unmarshalledObject = new DirectoryDeletedException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static DirectoryDeletedExceptionUnmarshaller _instance = new DirectoryDeletedExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DirectoryDeletedExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DirectoryNotDisabledException Object /// </summary> public class DirectoryNotDisabledExceptionUnmarshaller : IErrorResponseUnmarshaller<DirectoryNotDisabledException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DirectoryNotDisabledException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public DirectoryNotDisabledException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); DirectoryNotDisabledException unmarshalledObject = new DirectoryNotDisabledException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static DirectoryNotDisabledExceptionUnmarshaller _instance = new DirectoryNotDisabledExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DirectoryNotDisabledExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DirectoryNotEnabledException Object /// </summary> public class DirectoryNotEnabledExceptionUnmarshaller : IErrorResponseUnmarshaller<DirectoryNotEnabledException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DirectoryNotEnabledException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public DirectoryNotEnabledException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); DirectoryNotEnabledException unmarshalledObject = new DirectoryNotEnabledException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static DirectoryNotEnabledExceptionUnmarshaller _instance = new DirectoryNotEnabledExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DirectoryNotEnabledExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Directory Object /// </summary> public class DirectoryUnmarshaller : IUnmarshaller<Directory, XmlUnmarshallerContext>, IUnmarshaller<Directory, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Directory IUnmarshaller<Directory, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Directory Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Directory unmarshalledObject = new Directory(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CreationDateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreationDateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DirectoryArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DirectoryArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.State = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static DirectoryUnmarshaller _instance = new DirectoryUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static DirectoryUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// DisableDirectory Request Marshaller /// </summary> public class DisableDirectoryRequestMarshaller : IMarshaller<IRequest, DisableDirectoryRequest> , 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((DisableDirectoryRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DisableDirectoryRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/directory/disable"; if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static DisableDirectoryRequestMarshaller _instance = new DisableDirectoryRequestMarshaller(); internal static DisableDirectoryRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisableDirectoryRequestMarshaller Instance { get { return _instance; } } } }
90
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DisableDirectory operation /// </summary> public class DisableDirectoryResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DisableDirectoryResponse response = new DisableDirectoryResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DirectoryArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DirectoryArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryDeletedException")) { return DirectoryDeletedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DisableDirectoryResponseUnmarshaller _instance = new DisableDirectoryResponseUnmarshaller(); internal static DisableDirectoryResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DisableDirectoryResponseUnmarshaller Instance { get { return _instance; } } } }
138
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// EnableDirectory Request Marshaller /// </summary> public class EnableDirectoryRequestMarshaller : IMarshaller<IRequest, EnableDirectoryRequest> , 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((EnableDirectoryRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(EnableDirectoryRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudDirectory"); request.Headers["Content-Type"] = "application/json"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-01-11"; request.HttpMethod = "PUT"; request.ResourcePath = "/amazonclouddirectory/2017-01-11/directory/enable"; if (publicRequest.IsSetDirectoryArn()) { request.Headers["x-amz-data-partition"] = publicRequest.DirectoryArn; } return request; } private static EnableDirectoryRequestMarshaller _instance = new EnableDirectoryRequestMarshaller(); internal static EnableDirectoryRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static EnableDirectoryRequestMarshaller Instance { get { return _instance; } } } }
90
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for EnableDirectory operation /// </summary> public class EnableDirectoryResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { EnableDirectoryResponse response = new EnableDirectoryResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DirectoryArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DirectoryArn = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("AccessDeniedException")) { return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("DirectoryDeletedException")) { return DirectoryDeletedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServiceException")) { return InternalServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidArnException")) { return InvalidArnExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RetryableConflictException")) { return RetryableConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException")) { return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonCloudDirectoryException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static EnableDirectoryResponseUnmarshaller _instance = new EnableDirectoryResponseUnmarshaller(); internal static EnableDirectoryResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static EnableDirectoryResponseUnmarshaller Instance { get { return _instance; } } } }
138
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FacetAlreadyExistsException Object /// </summary> public class FacetAlreadyExistsExceptionUnmarshaller : IErrorResponseUnmarshaller<FacetAlreadyExistsException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FacetAlreadyExistsException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FacetAlreadyExistsException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); FacetAlreadyExistsException unmarshalledObject = new FacetAlreadyExistsException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static FacetAlreadyExistsExceptionUnmarshaller _instance = new FacetAlreadyExistsExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FacetAlreadyExistsExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// FacetAttributeDefinition Marshaller /// </summary> public class FacetAttributeDefinitionMarshaller : IRequestMarshaller<FacetAttributeDefinition, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(FacetAttributeDefinition requestObject, JsonMarshallerContext context) { if(requestObject.IsSetDefaultValue()) { context.Writer.WritePropertyName("DefaultValue"); context.Writer.WriteObjectStart(); var marshaller = TypedAttributeValueMarshaller.Instance; marshaller.Marshall(requestObject.DefaultValue, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetIsImmutable()) { context.Writer.WritePropertyName("IsImmutable"); context.Writer.Write(requestObject.IsImmutable); } if(requestObject.IsSetRules()) { context.Writer.WritePropertyName("Rules"); context.Writer.WriteObjectStart(); foreach (var requestObjectRulesKvp in requestObject.Rules) { context.Writer.WritePropertyName(requestObjectRulesKvp.Key); var requestObjectRulesValue = requestObjectRulesKvp.Value; context.Writer.WriteObjectStart(); var marshaller = RuleMarshaller.Instance; marshaller.Marshall(requestObjectRulesValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteObjectEnd(); } if(requestObject.IsSetType()) { context.Writer.WritePropertyName("Type"); context.Writer.Write(requestObject.Type); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static FacetAttributeDefinitionMarshaller Instance = new FacetAttributeDefinitionMarshaller(); } }
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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FacetAttributeDefinition Object /// </summary> public class FacetAttributeDefinitionUnmarshaller : IUnmarshaller<FacetAttributeDefinition, XmlUnmarshallerContext>, IUnmarshaller<FacetAttributeDefinition, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> FacetAttributeDefinition IUnmarshaller<FacetAttributeDefinition, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FacetAttributeDefinition Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; FacetAttributeDefinition unmarshalledObject = new FacetAttributeDefinition(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DefaultValue", targetDepth)) { var unmarshaller = TypedAttributeValueUnmarshaller.Instance; unmarshalledObject.DefaultValue = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IsImmutable", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsImmutable = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Rules", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, Rule, StringUnmarshaller, RuleUnmarshaller>(StringUnmarshaller.Instance, RuleUnmarshaller.Instance); unmarshalledObject.Rules = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static FacetAttributeDefinitionUnmarshaller _instance = new FacetAttributeDefinitionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FacetAttributeDefinitionUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// FacetAttribute Marshaller /// </summary> public class FacetAttributeMarshaller : IRequestMarshaller<FacetAttribute, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(FacetAttribute requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAttributeDefinition()) { context.Writer.WritePropertyName("AttributeDefinition"); context.Writer.WriteObjectStart(); var marshaller = FacetAttributeDefinitionMarshaller.Instance; marshaller.Marshall(requestObject.AttributeDefinition, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetAttributeReference()) { context.Writer.WritePropertyName("AttributeReference"); context.Writer.WriteObjectStart(); var marshaller = FacetAttributeReferenceMarshaller.Instance; marshaller.Marshall(requestObject.AttributeReference, context); context.Writer.WriteObjectEnd(); } if(requestObject.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(requestObject.Name); } if(requestObject.IsSetRequiredBehavior()) { context.Writer.WritePropertyName("RequiredBehavior"); context.Writer.Write(requestObject.RequiredBehavior); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static FacetAttributeMarshaller Instance = new FacetAttributeMarshaller(); } }
90
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// FacetAttributeReference Marshaller /// </summary> public class FacetAttributeReferenceMarshaller : IRequestMarshaller<FacetAttributeReference, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(FacetAttributeReference requestObject, JsonMarshallerContext context) { if(requestObject.IsSetTargetAttributeName()) { context.Writer.WritePropertyName("TargetAttributeName"); context.Writer.Write(requestObject.TargetAttributeName); } if(requestObject.IsSetTargetFacetName()) { context.Writer.WritePropertyName("TargetFacetName"); context.Writer.Write(requestObject.TargetFacetName); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static FacetAttributeReferenceMarshaller Instance = new FacetAttributeReferenceMarshaller(); } }
68
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FacetAttributeReference Object /// </summary> public class FacetAttributeReferenceUnmarshaller : IUnmarshaller<FacetAttributeReference, XmlUnmarshallerContext>, IUnmarshaller<FacetAttributeReference, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> FacetAttributeReference IUnmarshaller<FacetAttributeReference, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FacetAttributeReference Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; FacetAttributeReference unmarshalledObject = new FacetAttributeReference(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("TargetAttributeName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TargetAttributeName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TargetFacetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TargetFacetName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static FacetAttributeReferenceUnmarshaller _instance = new FacetAttributeReferenceUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FacetAttributeReferenceUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FacetAttribute Object /// </summary> public class FacetAttributeUnmarshaller : IUnmarshaller<FacetAttribute, XmlUnmarshallerContext>, IUnmarshaller<FacetAttribute, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> FacetAttribute IUnmarshaller<FacetAttribute, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FacetAttribute Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; FacetAttribute unmarshalledObject = new FacetAttribute(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AttributeDefinition", targetDepth)) { var unmarshaller = FacetAttributeDefinitionUnmarshaller.Instance; unmarshalledObject.AttributeDefinition = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AttributeReference", targetDepth)) { var unmarshaller = FacetAttributeReferenceUnmarshaller.Instance; unmarshalledObject.AttributeReference = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RequiredBehavior", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RequiredBehavior = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static FacetAttributeUnmarshaller _instance = new FacetAttributeUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FacetAttributeUnmarshaller 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 clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// FacetAttributeUpdate Marshaller /// </summary> public class FacetAttributeUpdateMarshaller : IRequestMarshaller<FacetAttributeUpdate, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(FacetAttributeUpdate requestObject, JsonMarshallerContext context) { if(requestObject.IsSetAction()) { context.Writer.WritePropertyName("Action"); context.Writer.Write(requestObject.Action); } if(requestObject.IsSetAttribute()) { context.Writer.WritePropertyName("Attribute"); context.Writer.WriteObjectStart(); var marshaller = FacetAttributeMarshaller.Instance; marshaller.Marshall(requestObject.Attribute, context); context.Writer.WriteObjectEnd(); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static FacetAttributeUpdateMarshaller Instance = new FacetAttributeUpdateMarshaller(); } }
73
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FacetInUseException Object /// </summary> public class FacetInUseExceptionUnmarshaller : IErrorResponseUnmarshaller<FacetInUseException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FacetInUseException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FacetInUseException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); FacetInUseException unmarshalledObject = new FacetInUseException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static FacetInUseExceptionUnmarshaller _instance = new FacetInUseExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FacetInUseExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for FacetNotFoundException Object /// </summary> public class FacetNotFoundExceptionUnmarshaller : IErrorResponseUnmarshaller<FacetNotFoundException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public FacetNotFoundException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public FacetNotFoundException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); FacetNotFoundException unmarshalledObject = new FacetNotFoundException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static FacetNotFoundExceptionUnmarshaller _instance = new FacetNotFoundExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FacetNotFoundExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the clouddirectory-2017-01-11.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.CloudDirectory.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.CloudDirectory.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Facet Object /// </summary> public class FacetUnmarshaller : IUnmarshaller<Facet, XmlUnmarshallerContext>, IUnmarshaller<Facet, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Facet IUnmarshaller<Facet, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Facet Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Facet unmarshalledObject = new Facet(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("FacetStyle", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FacetStyle = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ObjectType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ObjectType = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static FacetUnmarshaller _instance = new FacetUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static FacetUnmarshaller Instance { get { return _instance; } } } }
104