public static DescribeHaVipsResponse Unmarshall(UnmarshallerContext _ctx) { DescribeHaVipsResponse describeHaVipsResponse = new DescribeHaVipsResponse(); describeHaVipsResponse.HttpResponse = _ctx.HttpResponse; describeHaVipsResponse.RequestId = _ctx.StringValue("DescribeHaVips.RequestId"); describeHaVipsResponse.TotalCount = _ctx.IntegerValue("DescribeHaVips.TotalCount"); describeHaVipsResponse.PageNumber = _ctx.IntegerValue("DescribeHaVips.PageNumber"); describeHaVipsResponse.PageSize = _ctx.IntegerValue("DescribeHaVips.PageSize"); List <DescribeHaVipsResponse.DescribeHaVips_HaVip> describeHaVipsResponse_haVips = new List <DescribeHaVipsResponse.DescribeHaVips_HaVip>(); for (int i = 0; i < _ctx.Length("DescribeHaVips.HaVips.Length"); i++) { DescribeHaVipsResponse.DescribeHaVips_HaVip haVip = new DescribeHaVipsResponse.DescribeHaVips_HaVip(); haVip.HaVipId = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].HaVipId"); haVip.RegionId = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].RegionId"); haVip.VpcId = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].VpcId"); haVip.VSwitchId = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].VSwitchId"); haVip.IpAddress = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].IpAddress"); haVip.Status = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].Status"); haVip.MasterInstanceId = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].MasterInstanceId"); haVip.Description = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].Description"); haVip.Name = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].Name"); haVip.ChargeType = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].ChargeType"); haVip.CreateTime = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].CreateTime"); haVip.AssociatedInstanceType = _ctx.StringValue("DescribeHaVips.HaVips[" + i + "].AssociatedInstanceType"); List <string> haVip_associatedInstances = new List <string>(); for (int j = 0; j < _ctx.Length("DescribeHaVips.HaVips[" + i + "].AssociatedInstances.Length"); j++) { haVip_associatedInstances.Add(_ctx.StringValue("DescribeHaVips.HaVips[" + i + "].AssociatedInstances[" + j + "]")); } haVip.AssociatedInstances = haVip_associatedInstances; List <string> haVip_associatedEipAddresses = new List <string>(); for (int j = 0; j < _ctx.Length("DescribeHaVips.HaVips[" + i + "].AssociatedEipAddresses.Length"); j++) { haVip_associatedEipAddresses.Add(_ctx.StringValue("DescribeHaVips.HaVips[" + i + "].AssociatedEipAddresses[" + j + "]")); } haVip.AssociatedEipAddresses = haVip_associatedEipAddresses; describeHaVipsResponse_haVips.Add(haVip); } describeHaVipsResponse.HaVips = describeHaVipsResponse_haVips; return(describeHaVipsResponse); }
public static DescribeHaVipsResponse Unmarshall(UnmarshallerContext context) { DescribeHaVipsResponse describeHaVipsResponse = new DescribeHaVipsResponse() { HttpResponse = context.HttpResponse, RequestId = context.StringValue("DescribeHaVips.RequestId"), TotalCount = context.IntegerValue("DescribeHaVips.TotalCount"), PageNumber = context.IntegerValue("DescribeHaVips.PageNumber"), PageSize = context.IntegerValue("DescribeHaVips.PageSize") }; List <DescribeHaVipsResponse.HaVip> haVips = new List <DescribeHaVipsResponse.HaVip>(); for (int i = 0; i < context.Length("DescribeHaVips.HaVips.Length"); i++) { DescribeHaVipsResponse.HaVip haVip = new DescribeHaVipsResponse.HaVip() { HaVipId = context.StringValue($"DescribeHaVips.HaVips[{i}].HaVipId"), RegionId = context.StringValue($"DescribeHaVips.HaVips[{i}].RegionId"), VpcId = context.StringValue($"DescribeHaVips.HaVips[{i}].VpcId"), VSwitchId = context.StringValue($"DescribeHaVips.HaVips[{i}].VSwitchId"), IpAddress = context.StringValue($"DescribeHaVips.HaVips[{i}].IpAddress"), Status = context.StringValue($"DescribeHaVips.HaVips[{i}].Status"), MasterInstanceId = context.StringValue($"DescribeHaVips.HaVips[{i}].MasterInstanceId"), Description = context.StringValue($"DescribeHaVips.HaVips[{i}].Description"), CreateTime = context.StringValue($"DescribeHaVips.HaVips[{i}].CreateTime") }; List <string> associatedInstances = new List <string>(); for (int j = 0; j < context.Length($"DescribeHaVips.HaVips[{i}].AssociatedInstances.Length"); j++) { associatedInstances.Add(context.StringValue($"DescribeHaVips.HaVips[{i}].AssociatedInstances[{j}]")); } haVip.AssociatedInstances = associatedInstances; List <string> associatedEipAddresses = new List <string>(); for (int j = 0; j < context.Length($"DescribeHaVips.HaVips[{i}].AssociatedEipAddresses.Length"); j++) { associatedEipAddresses.Add(context.StringValue($"DescribeHaVips.HaVips[{i}].AssociatedEipAddresses[{j}]")); } haVip.AssociatedEipAddresses = associatedEipAddresses; haVips.Add(haVip); } describeHaVipsResponse.HaVips = haVips; return(describeHaVipsResponse); }