public static RestoreStatusUnmarshaller GetInstance() { if (instance == null) { instance = new RestoreStatusUnmarshaller(); } return(instance); }
public Cluster Unmarshall(XmlUnmarshallerContext context) { Cluster cluster = new Cluster(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } if (context.IsStartOfDocument) { targetDepth++; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ClusterIdentifier", targetDepth)) { cluster.ClusterIdentifier = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NodeType", targetDepth)) { cluster.NodeType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterStatus", targetDepth)) { cluster.ClusterStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ModifyStatus", targetDepth)) { cluster.ModifyStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MasterUsername", targetDepth)) { cluster.MasterUsername = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBName", targetDepth)) { cluster.DBName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Endpoint", targetDepth)) { cluster.Endpoint = EndpointUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterCreateTime", targetDepth)) { cluster.ClusterCreateTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AutomatedSnapshotRetentionPeriod", targetDepth)) { cluster.AutomatedSnapshotRetentionPeriod = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterSecurityGroups/ClusterSecurityGroup", targetDepth)) { cluster.ClusterSecurityGroups.Add(ClusterSecurityGroupMembershipUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("VpcSecurityGroups/VpcSecurityGroup", targetDepth)) { cluster.VpcSecurityGroups.Add(VpcSecurityGroupMembershipUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("ClusterParameterGroups/ClusterParameterGroup", targetDepth)) { cluster.ClusterParameterGroups.Add(ClusterParameterGroupStatusUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("ClusterSubnetGroupName", targetDepth)) { cluster.ClusterSubnetGroupName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VpcId", targetDepth)) { cluster.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AvailabilityZone", targetDepth)) { cluster.AvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PreferredMaintenanceWindow", targetDepth)) { cluster.PreferredMaintenanceWindow = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PendingModifiedValues", targetDepth)) { cluster.PendingModifiedValues = PendingModifiedValuesUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterVersion", targetDepth)) { cluster.ClusterVersion = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AllowVersionUpgrade", targetDepth)) { cluster.AllowVersionUpgrade = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NumberOfNodes", targetDepth)) { cluster.NumberOfNodes = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PubliclyAccessible", targetDepth)) { cluster.PubliclyAccessible = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Encrypted", targetDepth)) { cluster.Encrypted = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RestoreStatus", targetDepth)) { cluster.RestoreStatus = RestoreStatusUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("HsmStatus", targetDepth)) { cluster.HsmStatus = HsmStatusUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterSnapshotCopyStatus", targetDepth)) { cluster.ClusterSnapshotCopyStatus = ClusterSnapshotCopyStatusUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterPublicKey", targetDepth)) { cluster.ClusterPublicKey = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterNodes/member", targetDepth)) { cluster.ClusterNodes.Add(ClusterNodeUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("ElasticIpStatus", targetDepth)) { cluster.ElasticIpStatus = ElasticIpStatusUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterRevisionNumber", targetDepth)) { cluster.ClusterRevisionNumber = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(cluster); } } return(cluster); }