/* * 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 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("ActivityStreamKinesisStreamName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ActivityStreamKinesisStreamName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ActivityStreamKmsKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ActivityStreamKmsKeyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ActivityStreamMode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ActivityStreamMode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ActivityStreamStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ActivityStreamStatus = unmarshaller.Unmarshall(context); continue; } 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("AutoMinorVersionUpgrade", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.AutoMinorVersionUpgrade = 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("BacktrackConsumedChangeRecords", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.BacktrackConsumedChangeRecords = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BacktrackWindow", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.BacktrackWindow = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BackupRetentionPeriod", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.BackupRetentionPeriod = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Capacity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Capacity = 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("CustomEndpoints/member", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.CustomEndpoints.Add(item); 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("DBClusterInstanceClass", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DBClusterInstanceClass = 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("DBSystemId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DBSystemId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeletionProtection", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.DeletionProtection = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DomainMemberships/DomainMembership", targetDepth)) { var unmarshaller = DomainMembershipUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.DomainMemberships.Add(item); continue; } if (context.TestExpression("EarliestBacktrackTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.EarliestBacktrackTime = 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("EngineMode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EngineMode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EngineVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EngineVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GlobalWriteForwardingRequested", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.GlobalWriteForwardingRequested = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GlobalWriteForwardingStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GlobalWriteForwardingStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HostedZoneId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.HostedZoneId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HttpEndpointEnabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.HttpEndpointEnabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IAMDatabaseAuthenticationEnabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.IAMDatabaseAuthenticationEnabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IOOptimizedNextAllowedModificationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.IOOptimizedNextAllowedModificationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Iops", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Iops = 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("MasterUserSecret", targetDepth)) { var unmarshaller = MasterUserSecretUnmarshaller.Instance; unmarshalledObject.MasterUserSecret = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MonitoringInterval", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.MonitoringInterval = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MonitoringRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.MonitoringRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MultiAZ", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.MultiAZ = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NetworkType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.NetworkType = 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("PerformanceInsightsEnabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.PerformanceInsightsEnabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PerformanceInsightsKMSKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PerformanceInsightsKMSKeyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PerformanceInsightsRetentionPeriod", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.PerformanceInsightsRetentionPeriod = 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("PubliclyAccessible", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.PubliclyAccessible = 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("ScalingConfigurationInfo", targetDepth)) { var unmarshaller = ScalingConfigurationInfoUnmarshaller.Instance; unmarshalledObject.ScalingConfigurationInfo = 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("StorageType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StorageType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TagList/Tag", targetDepth)) { var unmarshaller = TagUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); unmarshalledObject.TagList.Add(item); 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; } } } }