/* * 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 neptune-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.Neptune.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; namespace Amazon.Neptune.Model.Internal.MarshallTransformations { /// /// Response Unmarshaller for DBCluster Object /// public class DBClusterUnmarshaller : IUnmarshaller, IUnmarshaller { /// /// Unmarshaller the response from the service to the response class. /// /// /// public DBCluster Unmarshall(XmlUnmarshallerContext context) { DBCluster unmarshalledObject = new DBCluster(); 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("AllocatedStorage", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.AllocatedStorage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AssociatedRoles/DBClusterRole", targetDepth)) { var unmarshaller = DBClusterRoleUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.AssociatedRoles.Add(item); continue; } if (context.TestExpression("AutomaticRestartTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.AutomaticRestartTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AvailabilityZones/AvailabilityZone", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.AvailabilityZones.Add(item); continue; } if (context.TestExpression("BackupRetentionPeriod", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.BackupRetentionPeriod = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CharacterSetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CharacterSetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CloneGroupId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CloneGroupId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ClusterCreateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.ClusterCreateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CopyTagsToSnapshot", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.CopyTagsToSnapshot = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CrossAccountClone", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.CrossAccountClone = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DatabaseName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DatabaseName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DBClusterArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DBClusterArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DBClusterIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DBClusterIdentifier = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DBClusterMembers/DBClusterMember", targetDepth)) { var unmarshaller = DBClusterMemberUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.DBClusterMembers.Add(item); continue; } if (context.TestExpression("DBClusterOptionGroupMemberships/DBClusterOptionGroup", targetDepth)) { var unmarshaller = DBClusterOptionGroupStatusUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.DBClusterOptionGroupMemberships.Add(item); continue; } if (context.TestExpression("DBClusterParameterGroup", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DBClusterParameterGroup = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DbClusterResourceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DbClusterResourceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DBSubnetGroup", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DBSubnetGroup = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeletionProtection", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.DeletionProtection = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EarliestRestorableTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.EarliestRestorableTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EnabledCloudwatchLogsExports/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.EnabledCloudwatchLogsExports.Add(item); continue; } if (context.TestExpression("Endpoint", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Endpoint = 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("GlobalClusterIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GlobalClusterIdentifier = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HostedZoneId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.HostedZoneId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IAMDatabaseAuthenticationEnabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IAMDatabaseAuthenticationEnabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KmsKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LatestRestorableTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LatestRestorableTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MasterUsername", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.MasterUsername = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MultiAZ", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.MultiAZ = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PendingModifiedValues", targetDepth)) { var unmarshaller = ClusterPendingModifiedValuesUnmarshaller.Instance; unmarshalledObject.PendingModifiedValues = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PercentProgress", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PercentProgress = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Port", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Port = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PreferredBackupWindow", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PreferredBackupWindow = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PreferredMaintenanceWindow", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PreferredMaintenanceWindow = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ReaderEndpoint", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ReaderEndpoint = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ReadReplicaIdentifiers/ReadReplicaIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.ReadReplicaIdentifiers.Add(item); continue; } if (context.TestExpression("ReplicationSourceIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ReplicationSourceIdentifier = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ServerlessV2ScalingConfiguration", targetDepth)) { var unmarshaller = ServerlessV2ScalingConfigurationInfoUnmarshaller.Instance; unmarshalledObject.ServerlessV2ScalingConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StorageEncrypted", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.StorageEncrypted = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VpcSecurityGroups/VpcSecurityGroupMembership", targetDepth)) { var unmarshaller = VpcSecurityGroupMembershipUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.VpcSecurityGroups.Add(item); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return unmarshalledObject; } } return unmarshalledObject; } /// /// Unmarshaller error response to exception. /// /// /// public DBCluster Unmarshall(JsonUnmarshallerContext context) { return null; } private static DBClusterUnmarshaller _instance = new DBClusterUnmarshaller(); /// /// Gets the singleton. /// public static DBClusterUnmarshaller Instance { get { return _instance; } } } }