/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetPatchBaselineResponse response = new GetPatchBaselineResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ApprovalRules", targetDepth)) { var unmarshaller = PatchRuleGroupUnmarshaller.Instance; response.ApprovalRules = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ApprovedPatches", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); response.ApprovedPatches = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("BaselineId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BaselineId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GlobalFilters", targetDepth)) { var unmarshaller = PatchFilterGroupUnmarshaller.Instance; response.GlobalFilters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ModifiedDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.ModifiedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PatchGroups", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); response.PatchGroups = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RejectedPatches", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); response.RejectedPatches = unmarshaller.Unmarshall(context); continue; } } return response; }