public GatewayInfo unmarshall(JsonUnmarshallerContext context) throws Exception { GatewayInfo gatewayInfo = new GatewayInfo(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) return null; while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("GatewayId", targetDepth)) { context.nextToken(); gatewayInfo.setGatewayId(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("GatewayARN", targetDepth)) { context.nextToken(); gatewayInfo.setGatewayARN(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("GatewayType", targetDepth)) { context.nextToken(); gatewayInfo.setGatewayType(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("GatewayOperationalState", targetDepth)) { context.nextToken(); gatewayInfo.setGatewayOperationalState( context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("GatewayName", targetDepth)) { context.nextToken(); gatewayInfo.setGatewayName(context.getUnmarshaller(String.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return gatewayInfo; }
public DescribeBandwidthRateLimitResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeBandwidthRateLimitResult describeBandwidthRateLimitResult = new DescribeBandwidthRateLimitResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) return null; while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("GatewayARN", targetDepth)) { context.nextToken(); describeBandwidthRateLimitResult.setGatewayARN( context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("AverageUploadRateLimitInBitsPerSec", targetDepth)) { context.nextToken(); describeBandwidthRateLimitResult.setAverageUploadRateLimitInBitsPerSec( context.getUnmarshaller(Long.class).unmarshall(context)); } if (context.testExpression("AverageDownloadRateLimitInBitsPerSec", targetDepth)) { context.nextToken(); describeBandwidthRateLimitResult.setAverageDownloadRateLimitInBitsPerSec( context.getUnmarshaller(Long.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return describeBandwidthRateLimitResult; }
public CreateCachediSCSIVolumeResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateCachediSCSIVolumeResult createCachediSCSIVolumeResult = new CreateCachediSCSIVolumeResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) return null; while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("VolumeARN", targetDepth)) { context.nextToken(); createCachediSCSIVolumeResult.setVolumeARN( context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("TargetARN", targetDepth)) { context.nextToken(); createCachediSCSIVolumeResult.setTargetARN( context.getUnmarshaller(String.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return createCachediSCSIVolumeResult; }