/* * 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 batch-2016-08-10.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.Batch.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Batch.Model.Internal.MarshallTransformations { /// /// Response Unmarshaller for JobDetail Object /// public class JobDetailUnmarshaller : IUnmarshaller, IUnmarshaller { /// /// Unmarshaller the response from the service to the response class. /// /// /// JobDetail IUnmarshaller.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// /// Unmarshaller the response from the service to the response class. /// /// /// public JobDetail Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; JobDetail unmarshalledObject = new JobDetail(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("arrayProperties", targetDepth)) { var unmarshaller = ArrayPropertiesDetailUnmarshaller.Instance; unmarshalledObject.ArrayProperties = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("attempts", targetDepth)) { var unmarshaller = new ListUnmarshaller(AttemptDetailUnmarshaller.Instance); unmarshalledObject.Attempts = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("container", targetDepth)) { var unmarshaller = ContainerDetailUnmarshaller.Instance; unmarshalledObject.Container = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("dependsOn", targetDepth)) { var unmarshaller = new ListUnmarshaller(JobDependencyUnmarshaller.Instance); unmarshalledObject.DependsOn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("eksAttempts", targetDepth)) { var unmarshaller = new ListUnmarshaller(EksAttemptDetailUnmarshaller.Instance); unmarshalledObject.EksAttempts = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("eksProperties", targetDepth)) { var unmarshaller = EksPropertiesDetailUnmarshaller.Instance; unmarshalledObject.EksProperties = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("isCancelled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsCancelled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("isTerminated", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IsTerminated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobDefinition", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobDefinition = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobQueue", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobQueue = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("nodeDetails", targetDepth)) { var unmarshaller = NodeDetailsUnmarshaller.Instance; unmarshalledObject.NodeDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("nodeProperties", targetDepth)) { var unmarshaller = NodePropertiesUnmarshaller.Instance; unmarshalledObject.NodeProperties = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("parameters", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Parameters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("platformCapabilities", targetDepth)) { var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance); unmarshalledObject.PlatformCapabilities = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("propagateTags", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.PropagateTags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("retryStrategy", targetDepth)) { var unmarshaller = RetryStrategyUnmarshaller.Instance; unmarshalledObject.RetryStrategy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("schedulingPriority", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.SchedulingPriority = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("shareIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ShareIdentifier = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("startedAt", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.StartedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("statusReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StatusReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("stoppedAt", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.StoppedAt = 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("timeout", targetDepth)) { var unmarshaller = JobTimeoutUnmarshaller.Instance; unmarshalledObject.Timeout = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static JobDetailUnmarshaller _instance = new JobDetailUnmarshaller(); /// /// Gets the singleton. /// public static JobDetailUnmarshaller Instance { get { return _instance; } } } }