public static DescribePriceResponse Unmarshall(UnmarshallerContext context) { DescribePriceResponse describePriceResponse = new DescribePriceResponse(); describePriceResponse.HttpResponse = context.HttpResponse; describePriceResponse.RequestId = context.StringValue("DescribePrice.RequestId"); DescribePriceResponse.DescribePrice_PriceInfo priceInfo = new DescribePriceResponse.DescribePrice_PriceInfo(); DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price price = new DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price(); price.OriginalPrice = context.FloatValue("DescribePrice.PriceInfo.Price.OriginalPrice"); price.DiscountPrice = context.FloatValue("DescribePrice.PriceInfo.Price.DiscountPrice"); price.TradePrice = context.FloatValue("DescribePrice.PriceInfo.Price.TradePrice"); price.Currency = context.StringValue("DescribePrice.PriceInfo.Price.Currency"); priceInfo.Price = price; List <DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Rule> priceInfo_rules = new List <DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Rule>(); for (int i = 0; i < context.Length("DescribePrice.PriceInfo.Rules.Length"); i++) { DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Rule rule = new DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Rule(); rule.RuleId = context.LongValue("DescribePrice.PriceInfo.Rules[" + i + "].RuleId"); rule.Description = context.StringValue("DescribePrice.PriceInfo.Rules[" + i + "].Description"); priceInfo_rules.Add(rule); } priceInfo.Rules = priceInfo_rules; describePriceResponse.PriceInfo = priceInfo; return(describePriceResponse); }
public static DescribePriceResponse Unmarshall(UnmarshallerContext context) { DescribePriceResponse describePriceResponse = new DescribePriceResponse(); describePriceResponse.HttpResponse = context.HttpResponse; describePriceResponse.RequestId = context.StringValue("DescribePrice.RequestId"); DescribePriceResponse.DescribePrice_PriceInfo priceInfo = new DescribePriceResponse.DescribePrice_PriceInfo(); DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price price = new DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price(); price.OriginalPrice = context.FloatValue("DescribePrice.PriceInfo.Price.OriginalPrice"); price.DiscountPrice = context.FloatValue("DescribePrice.PriceInfo.Price.DiscountPrice"); price.TradePrice = context.FloatValue("DescribePrice.PriceInfo.Price.TradePrice"); price.ReservedInstanceHourPrice = context.FloatValue("DescribePrice.PriceInfo.Price.ReservedInstanceHourPrice"); price.Currency = context.StringValue("DescribePrice.PriceInfo.Price.Currency"); List <DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price.DescribePrice_ResourcePriceModel> price_detailInfos = new List <DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price.DescribePrice_ResourcePriceModel>(); for (int i = 0; i < context.Length("DescribePrice.PriceInfo.Price.DetailInfos.Length"); i++) { DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price.DescribePrice_ResourcePriceModel resourcePriceModel = new DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price.DescribePrice_ResourcePriceModel(); resourcePriceModel.Resource = context.StringValue("DescribePrice.PriceInfo.Price.DetailInfos[" + i + "].Resource"); resourcePriceModel.OriginalPrice = context.FloatValue("DescribePrice.PriceInfo.Price.DetailInfos[" + i + "].OriginalPrice"); resourcePriceModel.DiscountPrice = context.FloatValue("DescribePrice.PriceInfo.Price.DetailInfos[" + i + "].DiscountPrice"); resourcePriceModel.TradePrice = context.FloatValue("DescribePrice.PriceInfo.Price.DetailInfos[" + i + "].TradePrice"); List <DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price.DescribePrice_ResourcePriceModel.DescribePrice_Rule1> resourcePriceModel_subRules = new List <DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price.DescribePrice_ResourcePriceModel.DescribePrice_Rule1>(); for (int j = 0; j < context.Length("DescribePrice.PriceInfo.Price.DetailInfos[" + i + "].SubRules.Length"); j++) { DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price.DescribePrice_ResourcePriceModel.DescribePrice_Rule1 rule1 = new DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Price.DescribePrice_ResourcePriceModel.DescribePrice_Rule1(); rule1.RuleId = context.LongValue("DescribePrice.PriceInfo.Price.DetailInfos[" + i + "].SubRules[" + j + "].RuleId"); rule1.Description = context.StringValue("DescribePrice.PriceInfo.Price.DetailInfos[" + i + "].SubRules[" + j + "].Description"); resourcePriceModel_subRules.Add(rule1); } resourcePriceModel.SubRules = resourcePriceModel_subRules; price_detailInfos.Add(resourcePriceModel); } price.DetailInfos = price_detailInfos; priceInfo.Price = price; List <DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Rule> priceInfo_rules = new List <DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Rule>(); for (int i = 0; i < context.Length("DescribePrice.PriceInfo.Rules.Length"); i++) { DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Rule rule = new DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Rule(); rule.RuleId = context.LongValue("DescribePrice.PriceInfo.Rules[" + i + "].RuleId"); rule.Description = context.StringValue("DescribePrice.PriceInfo.Rules[" + i + "].Description"); priceInfo_rules.Add(rule); } priceInfo.Rules = priceInfo_rules; describePriceResponse.PriceInfo = priceInfo; return(describePriceResponse); }
public static DescribePriceResponse Unmarshall(UnmarshallerContext context) { DescribePriceResponse describePriceResponse = new DescribePriceResponse(); describePriceResponse.HttpResponse = context.HttpResponse; describePriceResponse.RequestId = context.StringValue("DescribePrice.RequestId"); DescribePriceResponse.DescribePrice_PriceInfo priceInfo = new DescribePriceResponse.DescribePrice_PriceInfo(); priceInfo.Currency = context.StringValue("DescribePrice.PriceInfo.Currency"); priceInfo.OriginalPrice = context.FloatValue("DescribePrice.PriceInfo.OriginalPrice"); priceInfo.TradePrice = context.FloatValue("DescribePrice.PriceInfo.TradePrice"); priceInfo.DiscountPrice = context.FloatValue("DescribePrice.PriceInfo.DiscountPrice"); List <string> priceInfo_ruleIds = new List <string>(); for (int i = 0; i < context.Length("DescribePrice.PriceInfo.RuleIds.Length"); i++) { priceInfo_ruleIds.Add(context.StringValue("DescribePrice.PriceInfo.RuleIds[" + i + "]")); } priceInfo.RuleIds = priceInfo_ruleIds; DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_ActivityInfo activityInfo = new DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_ActivityInfo(); activityInfo.CheckErrMsg = context.StringValue("DescribePrice.PriceInfo.ActivityInfo.CheckErrMsg"); activityInfo.ErrorCode = context.StringValue("DescribePrice.PriceInfo.ActivityInfo.ErrorCode"); activityInfo.Success = context.StringValue("DescribePrice.PriceInfo.ActivityInfo.Success"); priceInfo.ActivityInfo = activityInfo; List <DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Coupon> priceInfo_coupons = new List <DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Coupon>(); for (int i = 0; i < context.Length("DescribePrice.PriceInfo.Coupons.Length"); i++) { DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Coupon coupon = new DescribePriceResponse.DescribePrice_PriceInfo.DescribePrice_Coupon(); coupon.CouponNo = context.StringValue("DescribePrice.PriceInfo.Coupons[" + i + "].CouponNo"); coupon.Name = context.StringValue("DescribePrice.PriceInfo.Coupons[" + i + "].Name"); coupon.Description = context.StringValue("DescribePrice.PriceInfo.Coupons[" + i + "].Description"); coupon.IsSelected = context.StringValue("DescribePrice.PriceInfo.Coupons[" + i + "].IsSelected"); priceInfo_coupons.Add(coupon); } priceInfo.Coupons = priceInfo_coupons; describePriceResponse.PriceInfo = priceInfo; List <DescribePriceResponse.DescribePrice_Rule> describePriceResponse_rules = new List <DescribePriceResponse.DescribePrice_Rule>(); for (int i = 0; i < context.Length("DescribePrice.Rules.Length"); i++) { DescribePriceResponse.DescribePrice_Rule rule = new DescribePriceResponse.DescribePrice_Rule(); rule.RuleId = context.LongValue("DescribePrice.Rules[" + i + "].RuleId"); rule.Name = context.StringValue("DescribePrice.Rules[" + i + "].Name"); rule.Description = context.StringValue("DescribePrice.Rules[" + i + "].Description"); describePriceResponse_rules.Add(rule); } describePriceResponse.Rules = describePriceResponse_rules; return(describePriceResponse); }
public static DescribePriceResponse Unmarshall(UnmarshallerContext context) { DescribePriceResponse describePriceResponse = new DescribePriceResponse(); describePriceResponse.HttpResponse = context.HttpResponse; describePriceResponse.RequestId = context.StringValue("DescribePrice.RequestId"); describePriceResponse.TotalTradePrice = context.FloatValue("DescribePrice.TotalTradePrice"); List <DescribePriceResponse.DescribePrice_PriceInfo> describePriceResponse_prices = new List <DescribePriceResponse.DescribePrice_PriceInfo>(); for (int i = 0; i < context.Length("DescribePrice.Prices.Length"); i++) { DescribePriceResponse.DescribePrice_PriceInfo priceInfo = new DescribePriceResponse.DescribePrice_PriceInfo(); priceInfo.NodeType = context.StringValue("DescribePrice.Prices[" + i + "].NodeType"); priceInfo.OriginalPrice = context.FloatValue("DescribePrice.Prices[" + i + "].OriginalPrice"); priceInfo.TradePrice = context.FloatValue("DescribePrice.Prices[" + i + "].TradePrice"); priceInfo.Currency = context.StringValue("DescribePrice.Prices[" + i + "].Currency"); describePriceResponse_prices.Add(priceInfo); } describePriceResponse.Prices = describePriceResponse_prices; return(describePriceResponse); }