/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetEnvironmentResponse response = new GetEnvironmentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ApplicationId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ApplicationId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Monitors", targetDepth)) { var unmarshaller = new ListUnmarshaller <Monitor, MonitorUnmarshaller>(MonitorUnmarshaller.Instance); response.Monitors = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.State = 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) { GetEnvironmentResponse response = new GetEnvironmentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("environment", targetDepth)) { var unmarshaller = EnvironmentUnmarshaller.Instance; response.Environment = 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) { GetEnvironmentResponse response = new GetEnvironmentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EnvironmentId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EnvironmentId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Error", targetDepth)) { var unmarshaller = ErrorResponseUnmarshaller.Instance; response.Error = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastUpdatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastUpdatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NetworkFabricType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NetworkFabricType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OwnerAccountId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OwnerAccountId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.State = 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("TransitGatewayId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TransitGatewayId = unmarshaller.Unmarshall(context); continue; } } return(response); }