/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the eks-2017-11-01.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.EKS.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.EKS.Model.Internal.MarshallTransformations
{
///
/// Response Unmarshaller for Nodegroup Object
///
public class NodegroupUnmarshaller : IUnmarshaller, IUnmarshaller
{
///
/// Unmarshaller the response from the service to the response class.
///
///
///
Nodegroup IUnmarshaller.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
///
/// Unmarshaller the response from the service to the response class.
///
///
///
public Nodegroup Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Nodegroup unmarshalledObject = new Nodegroup();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("amiType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AmiType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("capacityType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CapacityType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("clusterName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ClusterName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("createdAt", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("diskSize", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.DiskSize = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("health", targetDepth))
{
var unmarshaller = NodegroupHealthUnmarshaller.Instance;
unmarshalledObject.Health = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("instanceTypes", targetDepth))
{
var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance);
unmarshalledObject.InstanceTypes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("labels", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.Labels = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("launchTemplate", targetDepth))
{
var unmarshaller = LaunchTemplateSpecificationUnmarshaller.Instance;
unmarshalledObject.LaunchTemplate = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("modifiedAt", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
unmarshalledObject.ModifiedAt = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nodegroupArn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.NodegroupArn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nodegroupName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.NodegroupName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nodeRole", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.NodeRole = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("releaseVersion", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ReleaseVersion = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("remoteAccess", targetDepth))
{
var unmarshaller = RemoteAccessConfigUnmarshaller.Instance;
unmarshalledObject.RemoteAccess = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resources", targetDepth))
{
var unmarshaller = NodegroupResourcesUnmarshaller.Instance;
unmarshalledObject.Resources = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("scalingConfig", targetDepth))
{
var unmarshaller = NodegroupScalingConfigUnmarshaller.Instance;
unmarshalledObject.ScalingConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("subnets", targetDepth))
{
var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance);
unmarshalledObject.Subnets = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("tags", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
unmarshalledObject.Tags = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("taints", targetDepth))
{
var unmarshaller = new ListUnmarshaller(TaintUnmarshaller.Instance);
unmarshalledObject.Taints = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("updateConfig", targetDepth))
{
var unmarshaller = NodegroupUpdateConfigUnmarshaller.Instance;
unmarshalledObject.UpdateConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("version", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Version = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static NodegroupUnmarshaller _instance = new NodegroupUnmarshaller();
///
/// Gets the singleton.
///
public static NodegroupUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}