/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetDetectorResponse response = new GetDetectorResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("dataSources", targetDepth)) { var unmarshaller = DataSourceConfigurationsResultUnmarshaller.Instance; response.DataSources = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("findingPublishingFrequency", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.FindingPublishingFrequency = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("serviceRole", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ServiceRole = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("updatedAt", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.UpdatedAt = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetDetectorResponse response = new GetDetectorResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("findingPublishingFrequency", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.FindingPublishingFrequency = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("serviceRole", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ServiceRole = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("updatedAt", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.UpdatedAt = unmarshaller.Unmarshall(context); continue; } } return(response); }