/* * 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 sms-2016-10-24.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.ServerMigrationService.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.ServerMigrationService.Model.Internal.MarshallTransformations { /// /// Response Unmarshaller for ReplicationJob Object /// public class ReplicationJobUnmarshaller : IUnmarshaller, IUnmarshaller { /// /// Unmarshaller the response from the service to the response class. /// /// /// ReplicationJob IUnmarshaller.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// /// Unmarshaller the response from the service to the response class. /// /// /// public ReplicationJob Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ReplicationJob unmarshalledObject = new ReplicationJob(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("encrypted", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Encrypted = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("frequency", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Frequency = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("kmsKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("latestAmiId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LatestAmiId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("licenseType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LicenseType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("nextReplicationRunStartTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.NextReplicationRunStartTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("numberOfRecentAmisToKeep", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.NumberOfRecentAmisToKeep = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("replicationJobId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ReplicationJobId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("replicationRunList", targetDepth)) { var unmarshaller = new ListUnmarshaller(ReplicationRunUnmarshaller.Instance); unmarshalledObject.ReplicationRunList = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("roleName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RoleName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("runOnce", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.RunOnce = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("seedReplicationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.SeedReplicationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("serverId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ServerId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("serverType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ServerType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("state", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.State = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("statusMessage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StatusMessage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("vmServer", targetDepth)) { var unmarshaller = VmServerUnmarshaller.Instance; unmarshalledObject.VmServer = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ReplicationJobUnmarshaller _instance = new ReplicationJobUnmarshaller(); /// /// Gets the singleton. /// public static ReplicationJobUnmarshaller Instance { get { return _instance; } } } }