/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { PutIntegrationResponse response = new PutIntegrationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CreatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DomainName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DomainName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastUpdatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastUpdatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ObjectTypeName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ObjectTypeName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ObjectTypeNames", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.ObjectTypeNames = 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("Uri", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Uri = 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) { PutIntegrationResponse response = new PutIntegrationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("cacheKeyParameters", targetDepth)) { var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance); response.CacheKeyParameters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("cacheNamespace", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CacheNamespace = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("connectionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ConnectionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("connectionType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ConnectionType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("contentHandling", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ContentHandling = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("credentials", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Credentials = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("httpMethod", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.HttpMethod = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("integrationResponses", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, IntegrationResponse, StringUnmarshaller, IntegrationResponseUnmarshaller>(StringUnmarshaller.Instance, IntegrationResponseUnmarshaller.Instance); response.IntegrationResponses = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("passthroughBehavior", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PassthroughBehavior = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("requestParameters", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.RequestParameters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("requestTemplates", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.RequestTemplates = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("timeoutInMillis", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.TimeoutInMillis = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tlsConfig", targetDepth)) { var unmarshaller = TlsConfigUnmarshaller.Instance; response.TlsConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Type = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("uri", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Uri = unmarshaller.Unmarshall(context); continue; } } return(response); }