/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the securityhub-2018-10-26.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.SecurityHub.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.SecurityHub.Model.Internal.MarshallTransformations { /// /// Response Unmarshaller for AwsSnsTopicDetails Object /// public class AwsSnsTopicDetailsUnmarshaller : IUnmarshaller, IUnmarshaller { /// /// Unmarshaller the response from the service to the response class. /// /// /// AwsSnsTopicDetails IUnmarshaller.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// /// Unmarshaller the response from the service to the response class. /// /// /// public AwsSnsTopicDetails Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AwsSnsTopicDetails unmarshalledObject = new AwsSnsTopicDetails(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ApplicationSuccessFeedbackRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ApplicationSuccessFeedbackRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FirehoseFailureFeedbackRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FirehoseFailureFeedbackRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FirehoseSuccessFeedbackRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FirehoseSuccessFeedbackRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HttpFailureFeedbackRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.HttpFailureFeedbackRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HttpSuccessFeedbackRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.HttpSuccessFeedbackRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KmsMasterKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsMasterKeyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Owner", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Owner = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SqsFailureFeedbackRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SqsFailureFeedbackRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SqsSuccessFeedbackRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SqsSuccessFeedbackRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Subscription", targetDepth)) { var unmarshaller = new ListUnmarshaller(AwsSnsTopicSubscriptionUnmarshaller.Instance); unmarshalledObject.Subscription = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TopicName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TopicName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AwsSnsTopicDetailsUnmarshaller _instance = new AwsSnsTopicDetailsUnmarshaller(); /// /// Gets the singleton. /// public static AwsSnsTopicDetailsUnmarshaller Instance { get { return _instance; } } } }