/* * 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 appstream-2016-12-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.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// /// Response Unmarshaller for Fleet Object /// public class FleetUnmarshaller : IUnmarshaller, IUnmarshaller { /// /// Unmarshaller the response from the service to the response class. /// /// /// Fleet IUnmarshaller.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// /// Unmarshaller the response from the service to the response class. /// /// /// public Fleet Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Fleet unmarshalledObject = new Fleet(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ComputeCapacityStatus", targetDepth)) { var unmarshaller = ComputeCapacityStatusUnmarshaller.Instance; unmarshalledObject.ComputeCapacityStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DisconnectTimeoutInSeconds", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.DisconnectTimeoutInSeconds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DomainJoinInfo", targetDepth)) { var unmarshaller = DomainJoinInfoUnmarshaller.Instance; unmarshalledObject.DomainJoinInfo = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EnableDefaultInternetAccess", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.EnableDefaultInternetAccess = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FleetErrors", targetDepth)) { var unmarshaller = new ListUnmarshaller(FleetErrorUnmarshaller.Instance); unmarshalledObject.FleetErrors = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FleetType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FleetType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IamRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.IamRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IdleDisconnectTimeoutInSeconds", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.IdleDisconnectTimeoutInSeconds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ImageArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ImageArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ImageName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ImageName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("InstanceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.InstanceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxConcurrentSessions", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaxConcurrentSessions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxUserDurationInSeconds", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaxUserDurationInSeconds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Platform", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Platform = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SessionScriptS3Location", targetDepth)) { var unmarshaller = S3LocationUnmarshaller.Instance; unmarshalledObject.SessionScriptS3Location = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.State = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StreamView", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StreamView = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("UsbDeviceFilterStrings", targetDepth)) { var unmarshaller = new ListUnmarshaller(StringUnmarshaller.Instance); unmarshalledObject.UsbDeviceFilterStrings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VpcConfig", targetDepth)) { var unmarshaller = VpcConfigUnmarshaller.Instance; unmarshalledObject.VpcConfig = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static FleetUnmarshaller _instance = new FleetUnmarshaller(); /// /// Gets the singleton. /// public static FleetUnmarshaller Instance { get { return _instance; } } } }