private static void UnmarshallResult(XmlUnmarshallerContext context, ModifyRuleResponse response) { 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("Rules/member", targetDepth)) { var unmarshaller = RuleUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Rules.Add(item); continue; } } } return; }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ModifyRuleResponse response = new ModifyRuleResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if (context.TestExpression("ModifyRuleResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return(response); }
public static ModifyRuleResponse Unmarshall(UnmarshallerContext _ctx) { ModifyRuleResponse modifyRuleResponse = new ModifyRuleResponse(); modifyRuleResponse.HttpResponse = _ctx.HttpResponse; modifyRuleResponse.Code = _ctx.StringValue("ModifyRule.Code"); modifyRuleResponse.Success = _ctx.BooleanValue("ModifyRule.Success"); modifyRuleResponse.Message = _ctx.StringValue("ModifyRule.Message"); modifyRuleResponse.RequestId = _ctx.StringValue("ModifyRule.RequestId"); ModifyRuleResponse.ModifyRule_Model model = new ModifyRuleResponse.ModifyRule_Model(); model.CreateTime = _ctx.LongValue("ModifyRule.Model.CreateTime"); model.ModifyTime = _ctx.LongValue("ModifyRule.Model.ModifyTime"); model.TenantId = _ctx.StringValue("ModifyRule.Model.TenantId"); model.RuleName = _ctx.StringValue("ModifyRule.Model.RuleName"); model.RuleRId = _ctx.StringValue("ModifyRule.Model.RuleRId"); model.RuleType = _ctx.StringValue("ModifyRule.Model.RuleType"); model.RelatedAdSlots = _ctx.StringValue("ModifyRule.Model.RelatedAdSlots"); model.RuleConfig = _ctx.StringValue("ModifyRule.Model.RuleConfig"); model.Status = _ctx.StringValue("ModifyRule.Model.Status"); model.ExtInfo = _ctx.StringValue("ModifyRule.Model.ExtInfo"); model.Version = _ctx.LongValue("ModifyRule.Model.Version"); model.RuleId = _ctx.StringValue("ModifyRule.Model.RuleId"); modifyRuleResponse.Model = model; return(modifyRuleResponse); }
public static ModifyRuleResponse Unmarshall(UnmarshallerContext context) { ModifyRuleResponse modifyRuleResponse = new ModifyRuleResponse(); modifyRuleResponse.HttpResponse = context.HttpResponse; modifyRuleResponse.RequestId = context.StringValue("ModifyRule.RequestId"); return(modifyRuleResponse); }
public static ModifyRuleResponse Unmarshall(UnmarshallerContext _ctx) { ModifyRuleResponse modifyRuleResponse = new ModifyRuleResponse(); modifyRuleResponse.HttpResponse = _ctx.HttpResponse; modifyRuleResponse.RequestId = _ctx.StringValue("ModifyRule.requestId"); modifyRuleResponse.Code = _ctx.StringValue("ModifyRule.code"); modifyRuleResponse.Message = _ctx.StringValue("ModifyRule.message"); ModifyRuleResponse.ModifyRule_Result result = new ModifyRuleResponse.ModifyRule_Result(); result.GmtCreate = _ctx.StringValue("ModifyRule.Result.gmtCreate"); result.GmtModified = _ctx.StringValue("ModifyRule.Result.gmtModified"); result.RuleId = _ctx.StringValue("ModifyRule.Result.ruleId"); result.RuleMeta = _ctx.StringValue("ModifyRule.Result.ruleMeta"); result.Status = _ctx.StringValue("ModifyRule.Result.status"); modifyRuleResponse.Result = result; return(modifyRuleResponse); }