Пример #1
0
        public static DescribeDBInstancesResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeDBInstancesResponse describeDBInstancesResponse = new DescribeDBInstancesResponse();

            describeDBInstancesResponse.HttpResponse = context.HttpResponse;
            describeDBInstancesResponse.RequestId    = context.StringValue("DescribeDBInstances.RequestId");
            describeDBInstancesResponse.PageNumber   = context.IntegerValue("DescribeDBInstances.PageNumber");
            describeDBInstancesResponse.PageSize     = context.IntegerValue("DescribeDBInstances.PageSize");
            describeDBInstancesResponse.TotalCount   = context.IntegerValue("DescribeDBInstances.TotalCount");

            List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance> describeDBInstancesResponse_dBInstances = new List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance>();

            for (int i = 0; i < context.Length("DescribeDBInstances.DBInstances.Length"); i++)
            {
                DescribeDBInstancesResponse.DescribeDBInstances_DBInstance dBInstance = new DescribeDBInstancesResponse.DescribeDBInstances_DBInstance();
                dBInstance.DBInstanceId          = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceId");
                dBInstance.DBInstanceDescription = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceDescription");
                dBInstance.RegionId          = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].RegionId");
                dBInstance.ZoneId            = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].ZoneId");
                dBInstance.Engine            = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].Engine");
                dBInstance.EngineVersion     = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].EngineVersion");
                dBInstance.DBInstanceClass   = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceClass");
                dBInstance.DBInstanceStorage = context.IntegerValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceStorage");
                dBInstance.DBInstanceStatus  = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceStatus");
                dBInstance.LockMode          = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].LockMode");
                dBInstance.ChargeType        = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].ChargeType");
                dBInstance.NetworkType       = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].NetworkType");
                dBInstance.CreationTime      = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].CreationTime");
                dBInstance.ExpireTime        = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].ExpireTime");
                dBInstance.DBInstanceType    = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceType");
                dBInstance.LastDowngradeTime = context.IntegerValue("DescribeDBInstances.DBInstances[" + i + "].LastDowngradeTime");
                dBInstance.ReplicationFactor = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].ReplicationFactor");
                dBInstance.DestroyTime       = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].DestroyTime");

                List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_MongosAttribute> dBInstance_mongosList = new List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_MongosAttribute>();
                for (int j = 0; j < context.Length("DescribeDBInstances.DBInstances[" + i + "].MongosList.Length"); j++)
                {
                    DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_MongosAttribute mongosAttribute = new DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_MongosAttribute();
                    mongosAttribute.NodeId          = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].MongosList[" + j + "].NodeId");
                    mongosAttribute.NodeDescription = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].MongosList[" + j + "].NodeDescription");
                    mongosAttribute.NodeClass       = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].MongosList[" + j + "].NodeClass");
                    mongosAttribute.ConnectSting    = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].MongosList[" + j + "].ConnectSting");
                    mongosAttribute.Port            = context.IntegerValue("DescribeDBInstances.DBInstances[" + i + "].MongosList[" + j + "].Port");

                    dBInstance_mongosList.Add(mongosAttribute);
                }
                dBInstance.MongosList = dBInstance_mongosList;

                List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_ShardAttribute> dBInstance_shardList = new List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_ShardAttribute>();
                for (int j = 0; j < context.Length("DescribeDBInstances.DBInstances[" + i + "].ShardList.Length"); j++)
                {
                    DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_ShardAttribute shardAttribute = new DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_ShardAttribute();
                    shardAttribute.NodeId          = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].ShardList[" + j + "].NodeId");
                    shardAttribute.NodeDescription = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].ShardList[" + j + "].NodeDescription");
                    shardAttribute.NodeClass       = context.StringValue("DescribeDBInstances.DBInstances[" + i + "].ShardList[" + j + "].NodeClass");
                    shardAttribute.NodeStorage     = context.IntegerValue("DescribeDBInstances.DBInstances[" + i + "].ShardList[" + j + "].NodeStorage");

                    dBInstance_shardList.Add(shardAttribute);
                }
                dBInstance.ShardList = dBInstance_shardList;

                describeDBInstancesResponse_dBInstances.Add(dBInstance);
            }
            describeDBInstancesResponse.DBInstances = describeDBInstancesResponse_dBInstances;

            return(describeDBInstancesResponse);
        }
        public static DescribeDBInstancesResponse Unmarshall(UnmarshallerContext _ctx)
        {
            DescribeDBInstancesResponse describeDBInstancesResponse = new DescribeDBInstancesResponse();

            describeDBInstancesResponse.HttpResponse = _ctx.HttpResponse;
            describeDBInstancesResponse.TotalCount   = _ctx.IntegerValue("DescribeDBInstances.TotalCount");
            describeDBInstancesResponse.PageSize     = _ctx.IntegerValue("DescribeDBInstances.PageSize");
            describeDBInstancesResponse.RequestId    = _ctx.StringValue("DescribeDBInstances.RequestId");
            describeDBInstancesResponse.PageNumber   = _ctx.IntegerValue("DescribeDBInstances.PageNumber");

            List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance> describeDBInstancesResponse_dBInstances = new List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance>();

            for (int i = 0; i < _ctx.Length("DescribeDBInstances.DBInstances.Length"); i++)
            {
                DescribeDBInstancesResponse.DescribeDBInstances_DBInstance dBInstance = new DescribeDBInstancesResponse.DescribeDBInstances_DBInstance();
                dBInstance.EngineVersion         = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].EngineVersion");
                dBInstance.ReplicationFactor     = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].ReplicationFactor");
                dBInstance.ZoneId                = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].ZoneId");
                dBInstance.ResourceGroupId       = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].ResourceGroupId");
                dBInstance.DBInstanceStatus      = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceStatus");
                dBInstance.DBInstanceClass       = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceClass");
                dBInstance.DestroyTime           = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].DestroyTime");
                dBInstance.DBInstanceType        = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceType");
                dBInstance.LockMode              = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].LockMode");
                dBInstance.DBInstanceId          = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceId");
                dBInstance.NetworkType           = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].NetworkType");
                dBInstance.VpcAuthMode           = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].VpcAuthMode");
                dBInstance.ChargeType            = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].ChargeType");
                dBInstance.DBInstanceStorage     = _ctx.IntegerValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceStorage");
                dBInstance.LastDowngradeTime     = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].LastDowngradeTime");
                dBInstance.CreationTime          = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].CreationTime");
                dBInstance.RegionId              = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].RegionId");
                dBInstance.ExpireTime            = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].ExpireTime");
                dBInstance.KindCode              = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].KindCode");
                dBInstance.Engine                = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].Engine");
                dBInstance.DBInstanceDescription = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].DBInstanceDescription");

                List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_MongosAttribute> dBInstance_mongosList = new List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_MongosAttribute>();
                for (int j = 0; j < _ctx.Length("DescribeDBInstances.DBInstances[" + i + "].MongosList.Length"); j++)
                {
                    DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_MongosAttribute mongosAttribute = new DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_MongosAttribute();
                    mongosAttribute.NodeClass       = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].MongosList[" + j + "].NodeClass");
                    mongosAttribute.NodeDescription = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].MongosList[" + j + "].NodeDescription");
                    mongosAttribute.NodeId          = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].MongosList[" + j + "].NodeId");

                    dBInstance_mongosList.Add(mongosAttribute);
                }
                dBInstance.MongosList = dBInstance_mongosList;

                List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_ShardAttribute> dBInstance_shardList = new List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_ShardAttribute>();
                for (int j = 0; j < _ctx.Length("DescribeDBInstances.DBInstances[" + i + "].ShardList.Length"); j++)
                {
                    DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_ShardAttribute shardAttribute = new DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_ShardAttribute();
                    shardAttribute.NodeClass        = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].ShardList[" + j + "].NodeClass");
                    shardAttribute.NodeDescription  = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].ShardList[" + j + "].NodeDescription");
                    shardAttribute.ReadonlyReplicas = _ctx.IntegerValue("DescribeDBInstances.DBInstances[" + i + "].ShardList[" + j + "].ReadonlyReplicas");
                    shardAttribute.NodeId           = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].ShardList[" + j + "].NodeId");
                    shardAttribute.NodeStorage      = _ctx.IntegerValue("DescribeDBInstances.DBInstances[" + i + "].ShardList[" + j + "].NodeStorage");

                    dBInstance_shardList.Add(shardAttribute);
                }
                dBInstance.ShardList = dBInstance_shardList;

                List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_Tag> dBInstance_tags = new List <DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_Tag>();
                for (int j = 0; j < _ctx.Length("DescribeDBInstances.DBInstances[" + i + "].Tags.Length"); j++)
                {
                    DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_Tag tag = new DescribeDBInstancesResponse.DescribeDBInstances_DBInstance.DescribeDBInstances_Tag();
                    tag._Value = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].Tags[" + j + "].Value");
                    tag.Key    = _ctx.StringValue("DescribeDBInstances.DBInstances[" + i + "].Tags[" + j + "].Key");

                    dBInstance_tags.Add(tag);
                }
                dBInstance.Tags = dBInstance_tags;

                describeDBInstancesResponse_dBInstances.Add(dBInstance);
            }
            describeDBInstancesResponse.DBInstances = describeDBInstancesResponse_dBInstances;

            return(describeDBInstancesResponse);
        }