/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See 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 AwsAutoScalingLaunchConfigurationDetails Object
///
public class AwsAutoScalingLaunchConfigurationDetailsUnmarshaller : IUnmarshaller, IUnmarshaller
{
///
/// Unmarshaller the response from the service to the response class.
///
///
///
AwsAutoScalingLaunchConfigurationDetails IUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
///
/// Unmarshaller the response from the service to the response class.
///
///
///
public AwsAutoScalingLaunchConfigurationDetails Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
AwsAutoScalingLaunchConfigurationDetails unmarshalledObject = new AwsAutoScalingLaunchConfigurationDetails();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AssociatePublicIpAddress", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.AssociatePublicIpAddress = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("BlockDeviceMappings", targetDepth))
{
var unmarshaller = new ListUnmarshaller(AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetailsUnmarshaller.Instance);
unmarshalledObject.BlockDeviceMappings = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ClassicLinkVpcId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ClassicLinkVpcId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ClassicLinkVpcSecurityGroups", targetDepth))
{
var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance);
unmarshalledObject.ClassicLinkVpcSecurityGroups = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CreatedTime", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CreatedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EbsOptimized", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EbsOptimized = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IamInstanceProfile", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.IamInstanceProfile = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ImageId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ImageId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InstanceMonitoring", targetDepth))
{
var unmarshaller = AwsAutoScalingLaunchConfigurationInstanceMonitoringDetailsUnmarshaller.Instance;
unmarshalledObject.InstanceMonitoring = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("InstanceType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.InstanceType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("KernelId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.KernelId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("KeyName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.KeyName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LaunchConfigurationName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.LaunchConfigurationName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("MetadataOptions", targetDepth))
{
var unmarshaller = AwsAutoScalingLaunchConfigurationMetadataOptionsUnmarshaller.Instance;
unmarshalledObject.MetadataOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("PlacementTenancy", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PlacementTenancy = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RamdiskId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.RamdiskId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SecurityGroups", targetDepth))
{
var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance);
unmarshalledObject.SecurityGroups = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SpotPrice", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SpotPrice = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UserData", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.UserData = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static AwsAutoScalingLaunchConfigurationDetailsUnmarshaller _instance = new AwsAutoScalingLaunchConfigurationDetailsUnmarshaller();
///
/// Gets the singleton.
///
public static AwsAutoScalingLaunchConfigurationDetailsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}