/* * 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 rds-2014-10-31.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.RDS.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.RDS.Model.Internal.MarshallTransformations { /// /// Response Unmarshaller for OrderableDBInstanceOption Object /// public class OrderableDBInstanceOptionUnmarshaller : IUnmarshaller, IUnmarshaller { /// /// Unmarshaller the response from the service to the response class. /// /// /// public OrderableDBInstanceOption Unmarshall(XmlUnmarshallerContext context) { OrderableDBInstanceOption unmarshalledObject = new OrderableDBInstanceOption(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AvailabilityZoneGroup", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AvailabilityZoneGroup = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AvailabilityZones/AvailabilityZone", targetDepth)) { var unmarshaller = AvailabilityZoneUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.AvailabilityZones.Add(item); continue; } if (context.TestExpression("AvailableProcessorFeatures/AvailableProcessorFeature", targetDepth)) { var unmarshaller = AvailableProcessorFeatureUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.AvailableProcessorFeatures.Add(item); continue; } if (context.TestExpression("DBInstanceClass", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DBInstanceClass = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Engine", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Engine = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EngineVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EngineVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LicenseModel", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LicenseModel = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxIopsPerDbInstance", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaxIopsPerDbInstance = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxIopsPerGib", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.MaxIopsPerGib = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxStorageSize", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaxStorageSize = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxStorageThroughputPerDbInstance", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MaxStorageThroughputPerDbInstance = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxStorageThroughputPerIops", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.MaxStorageThroughputPerIops = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MinIopsPerDbInstance", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MinIopsPerDbInstance = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MinIopsPerGib", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.MinIopsPerGib = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MinStorageSize", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MinStorageSize = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MinStorageThroughputPerDbInstance", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MinStorageThroughputPerDbInstance = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MinStorageThroughputPerIops", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.MinStorageThroughputPerIops = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MultiAZCapable", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.MultiAZCapable = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OutpostCapable", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.OutpostCapable = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ReadReplicaCapable", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.ReadReplicaCapable = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StorageType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StorageType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportedActivityStreamModes/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.SupportedActivityStreamModes.Add(item); continue; } if (context.TestExpression("SupportedEngineModes/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.SupportedEngineModes.Add(item); continue; } if (context.TestExpression("SupportedNetworkTypes/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.SupportedNetworkTypes.Add(item); continue; } if (context.TestExpression("SupportsClusters", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.SupportsClusters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportsEnhancedMonitoring", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.SupportsEnhancedMonitoring = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportsGlobalDatabases", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.SupportsGlobalDatabases = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportsIAMDatabaseAuthentication", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.SupportsIAMDatabaseAuthentication = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportsIops", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.SupportsIops = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportsKerberosAuthentication", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.SupportsKerberosAuthentication = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportsPerformanceInsights", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.SupportsPerformanceInsights = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportsStorageAutoscaling", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.SupportsStorageAutoscaling = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportsStorageEncryption", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.SupportsStorageEncryption = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportsStorageThroughput", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.SupportsStorageThroughput = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Vpc", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Vpc = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// /// Unmarshaller error response to exception. /// /// /// public OrderableDBInstanceOption Unmarshall(JsonUnmarshallerContext context) { return null; } private static OrderableDBInstanceOptionUnmarshaller _instance = new OrderableDBInstanceOptionUnmarshaller(); /// /// Gets the singleton. /// public static OrderableDBInstanceOptionUnmarshaller Instance { get { return _instance; } } } }