public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeGatewayInformationResponse response = new DescribeGatewayInformationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("GatewayARN", targetDepth)) { response.GatewayARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("GatewayId", targetDepth)) { response.GatewayId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("GatewayTimezone", targetDepth)) { response.GatewayTimezone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("GatewayState", targetDepth)) { response.GatewayState = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("GatewayNetworkInterfaces", targetDepth)) { var unmarshaller = new ListUnmarshaller <NetworkInterface, NetworkInterfaceUnmarshaller>( NetworkInterfaceUnmarshaller.GetInstance()); response.GatewayNetworkInterfaces = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayType", targetDepth)) { response.GatewayType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextUpdateAvailabilityDate", targetDepth)) { response.NextUpdateAvailabilityDate = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(response); }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeGatewayInformationResponse response = new DescribeGatewayInformationResponse(); context.Read(); response.DescribeGatewayInformationResult = DescribeGatewayInformationResultUnmarshaller.GetInstance().Unmarshall(context); return(response); }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeGatewayInformationResponse response = new DescribeGatewayInformationResponse(); context.Read(); UnmarshallResult(context, response); 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) { DescribeGatewayInformationResponse response = new DescribeGatewayInformationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CloudWatchLogGroupARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CloudWatchLogGroupARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeprecationDate", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DeprecationDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Ec2InstanceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Ec2InstanceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Ec2InstanceRegion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Ec2InstanceRegion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndpointType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EndpointType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayCapacity", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayCapacity = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayNetworkInterfaces", targetDepth)) { var unmarshaller = new ListUnmarshaller <NetworkInterface, NetworkInterfaceUnmarshaller>(NetworkInterfaceUnmarshaller.Instance); response.GatewayNetworkInterfaces = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayState", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayState = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayTimezone", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayTimezone = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HostEnvironment", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.HostEnvironment = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HostEnvironmentId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.HostEnvironmentId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastSoftwareUpdate", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.LastSoftwareUpdate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextUpdateAvailabilityDate", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextUpdateAvailabilityDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SoftwareUpdatesEndDate", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SoftwareUpdatesEndDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SupportedGatewayCapacities", targetDepth)) { var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance); response.SupportedGatewayCapacities = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Tags", targetDepth)) { var unmarshaller = new ListUnmarshaller <Tag, TagUnmarshaller>(TagUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VPCEndpoint", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VPCEndpoint = unmarshaller.Unmarshall(context); continue; } } return(response); }
private static void UnmarshallResult(JsonUnmarshallerContext context, DescribeGatewayInformationResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("GatewayARN", targetDepth)) { context.Read(); response.GatewayARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("GatewayId", targetDepth)) { context.Read(); response.GatewayId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("GatewayTimezone", targetDepth)) { context.Read(); response.GatewayTimezone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("GatewayState", targetDepth)) { context.Read(); response.GatewayState = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("GatewayNetworkInterfaces", targetDepth)) { context.Read(); response.GatewayNetworkInterfaces = new List <NetworkInterface>(); NetworkInterfaceUnmarshaller unmarshaller = NetworkInterfaceUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } response.GatewayNetworkInterfaces.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("GatewayType", targetDepth)) { context.Read(); response.GatewayType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextUpdateAvailabilityDate", targetDepth)) { context.Read(); response.NextUpdateAvailabilityDate = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return; } } return; }