public QueryResult unmarshall(JsonUnmarshallerContext context) throws Exception { QueryResult queryResult = new QueryResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.currentToken; 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("Items", targetDepth)) { context.nextToken(); queryResult.setItems( new ListUnmarshaller<java.util.Map<String, AttributeValue>>( new MapUnmarshaller<String, AttributeValue>( StringJsonUnmarshaller.getInstance(), AttributeValueJsonUnmarshaller.getInstance())) .unmarshall(context)); } if (context.testExpression("Count", targetDepth)) { context.nextToken(); queryResult.setCount(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("ScannedCount", targetDepth)) { context.nextToken(); queryResult.setScannedCount(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("LastEvaluatedKey", targetDepth)) { context.nextToken(); queryResult.setLastEvaluatedKey( new MapUnmarshaller<String, AttributeValue>( StringJsonUnmarshaller.getInstance(), AttributeValueJsonUnmarshaller.getInstance()) .unmarshall(context)); } if (context.testExpression("ConsumedCapacity", targetDepth)) { context.nextToken(); queryResult.setConsumedCapacity( ConsumedCapacityJsonUnmarshaller.getInstance().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 queryResult; }
public AutoScalingThresholds unmarshall(JsonUnmarshallerContext context) throws Exception { AutoScalingThresholds autoScalingThresholds = new AutoScalingThresholds(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.currentToken; if (token == null) token = context.nextToken(); while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("InstanceCount", targetDepth)) { context.nextToken(); autoScalingThresholds.setInstanceCount( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("ThresholdsWaitTime", targetDepth)) { context.nextToken(); autoScalingThresholds.setThresholdsWaitTime( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("IgnoreMetricsTime", targetDepth)) { context.nextToken(); autoScalingThresholds.setIgnoreMetricsTime( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("CpuThreshold", targetDepth)) { context.nextToken(); autoScalingThresholds.setCpuThreshold( DoubleJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("MemoryThreshold", targetDepth)) { context.nextToken(); autoScalingThresholds.setMemoryThreshold( DoubleJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("LoadThreshold", targetDepth)) { context.nextToken(); autoScalingThresholds.setLoadThreshold( DoubleJsonUnmarshaller.getInstance().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 autoScalingThresholds; }
public VolumeConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception { VolumeConfiguration volumeConfiguration = new VolumeConfiguration(); 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("MountPoint", targetDepth)) { context.nextToken(); volumeConfiguration.setMountPoint( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("RaidLevel", targetDepth)) { context.nextToken(); volumeConfiguration.setRaidLevel( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("NumberOfDisks", targetDepth)) { context.nextToken(); volumeConfiguration.setNumberOfDisks( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Size", targetDepth)) { context.nextToken(); volumeConfiguration.setSize(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("VolumeType", targetDepth)) { context.nextToken(); volumeConfiguration.setVolumeType( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Iops", targetDepth)) { context.nextToken(); volumeConfiguration.setIops(IntegerJsonUnmarshaller.getInstance().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 volumeConfiguration; }
public StackSummary unmarshall(JsonUnmarshallerContext context) throws Exception { StackSummary stackSummary = new StackSummary(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.currentToken; 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("StackId", targetDepth)) { context.nextToken(); stackSummary.setStackId(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Name", targetDepth)) { context.nextToken(); stackSummary.setName(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Arn", targetDepth)) { context.nextToken(); stackSummary.setArn(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("LayersCount", targetDepth)) { context.nextToken(); stackSummary.setLayersCount(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("AppsCount", targetDepth)) { context.nextToken(); stackSummary.setAppsCount(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("InstancesCount", targetDepth)) { context.nextToken(); stackSummary.setInstancesCount( InstancesCountJsonUnmarshaller.getInstance().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 stackSummary; }
public VolumeiSCSIAttributes unmarshall(JsonUnmarshallerContext context) throws Exception { VolumeiSCSIAttributes volumeiSCSIAttributes = new VolumeiSCSIAttributes(); 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("TargetARN", targetDepth)) { context.nextToken(); volumeiSCSIAttributes.setTargetARN( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("NetworkInterfaceId", targetDepth)) { context.nextToken(); volumeiSCSIAttributes.setNetworkInterfaceId( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("NetworkInterfacePort", targetDepth)) { context.nextToken(); volumeiSCSIAttributes.setNetworkInterfacePort( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("LunNumber", targetDepth)) { context.nextToken(); volumeiSCSIAttributes.setLunNumber( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("ChapEnabled", targetDepth)) { context.nextToken(); volumeiSCSIAttributes.setChapEnabled( BooleanJsonUnmarshaller.getInstance().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 volumeiSCSIAttributes; }
public WorkflowExecutionCount unmarshall(JsonUnmarshallerContext context) throws Exception { WorkflowExecutionCount workflowExecutionCount = new WorkflowExecutionCount(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; JsonToken token = context.currentToken; if (token == null) token = context.nextToken(); while (true) { if (token == null) return workflowExecutionCount; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("count", targetDepth)) { context.nextToken(); workflowExecutionCount.setCount( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("truncated", targetDepth)) { context.nextToken(); workflowExecutionCount.setTruncated( BooleanJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getCurrentDepth() <= originalDepth) { return workflowExecutionCount; } } token = context.nextToken(); } }
public Ulimit unmarshall(JsonUnmarshallerContext context) throws Exception { Ulimit ulimit = new Ulimit(); 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("name", targetDepth)) { context.nextToken(); ulimit.setName(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("softLimit", targetDepth)) { context.nextToken(); ulimit.setSoftLimit(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("hardLimit", targetDepth)) { context.nextToken(); ulimit.setHardLimit(IntegerJsonUnmarshaller.getInstance().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 ulimit; }
public PutEventsResult unmarshall(JsonUnmarshallerContext context) throws Exception { PutEventsResult putEventsResult = new PutEventsResult(); 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("FailedEntryCount", targetDepth)) { context.nextToken(); putEventsResult.setFailedEntryCount( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Entries", targetDepth)) { context.nextToken(); putEventsResult.setEntries( new ListUnmarshaller<PutEventsResultEntry>( PutEventsResultEntryJsonUnmarshaller.getInstance()) .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 putEventsResult; }
public VirtualInterface unmarshall(JsonUnmarshallerContext context) throws Exception { VirtualInterface virtualInterface = new VirtualInterface(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.currentToken; 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("ownerAccount", targetDepth)) { context.nextToken(); virtualInterface.setOwnerAccount( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("virtualInterfaceId", targetDepth)) { context.nextToken(); virtualInterface.setVirtualInterfaceId( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("location", targetDepth)) { context.nextToken(); virtualInterface.setLocation(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("connectionId", targetDepth)) { context.nextToken(); virtualInterface.setConnectionId( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("virtualInterfaceType", targetDepth)) { context.nextToken(); virtualInterface.setVirtualInterfaceType( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("virtualInterfaceName", targetDepth)) { context.nextToken(); virtualInterface.setVirtualInterfaceName( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("vlan", targetDepth)) { context.nextToken(); virtualInterface.setVlan(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("asn", targetDepth)) { context.nextToken(); virtualInterface.setAsn(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("authKey", targetDepth)) { context.nextToken(); virtualInterface.setAuthKey(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("amazonAddress", targetDepth)) { context.nextToken(); virtualInterface.setAmazonAddress( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("customerAddress", targetDepth)) { context.nextToken(); virtualInterface.setCustomerAddress( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("virtualInterfaceState", targetDepth)) { context.nextToken(); virtualInterface.setVirtualInterfaceState( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("customerRouterConfig", targetDepth)) { context.nextToken(); virtualInterface.setCustomerRouterConfig( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("virtualGatewayId", targetDepth)) { context.nextToken(); virtualInterface.setVirtualGatewayId( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("routeFilterPrefixes", targetDepth)) { virtualInterface.setRouteFilterPrefixes( new ListUnmarshaller<RouteFilterPrefix>( RouteFilterPrefixJsonUnmarshaller.getInstance()) .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 virtualInterface; }
public AllocateConnectionOnInterconnectResult unmarshall(JsonUnmarshallerContext context) throws Exception { AllocateConnectionOnInterconnectResult allocateConnectionOnInterconnectResult = new AllocateConnectionOnInterconnectResult(); 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("ownerAccount", targetDepth)) { context.nextToken(); allocateConnectionOnInterconnectResult.setOwnerAccount( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("connectionId", targetDepth)) { context.nextToken(); allocateConnectionOnInterconnectResult.setConnectionId( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("connectionName", targetDepth)) { context.nextToken(); allocateConnectionOnInterconnectResult.setConnectionName( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("connectionState", targetDepth)) { context.nextToken(); allocateConnectionOnInterconnectResult.setConnectionState( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("region", targetDepth)) { context.nextToken(); allocateConnectionOnInterconnectResult.setRegion( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("location", targetDepth)) { context.nextToken(); allocateConnectionOnInterconnectResult.setLocation( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("bandwidth", targetDepth)) { context.nextToken(); allocateConnectionOnInterconnectResult.setBandwidth( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("vlan", targetDepth)) { context.nextToken(); allocateConnectionOnInterconnectResult.setVlan( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("partnerName", targetDepth)) { context.nextToken(); allocateConnectionOnInterconnectResult.setPartnerName( StringJsonUnmarshaller.getInstance().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 allocateConnectionOnInterconnectResult; }
public MethodSetting unmarshall(JsonUnmarshallerContext context) throws Exception { MethodSetting methodSetting = new MethodSetting(); 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("metricsEnabled", targetDepth)) { context.nextToken(); methodSetting.setMetricsEnabled( BooleanJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("loggingLevel", targetDepth)) { context.nextToken(); methodSetting.setLoggingLevel(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("dataTraceEnabled", targetDepth)) { context.nextToken(); methodSetting.setDataTraceEnabled( BooleanJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("throttlingBurstLimit", targetDepth)) { context.nextToken(); methodSetting.setThrottlingBurstLimit( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("throttlingRateLimit", targetDepth)) { context.nextToken(); methodSetting.setThrottlingRateLimit( DoubleJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("cachingEnabled", targetDepth)) { context.nextToken(); methodSetting.setCachingEnabled( BooleanJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("cacheTtlInSeconds", targetDepth)) { context.nextToken(); methodSetting.setCacheTtlInSeconds( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("cacheDataEncrypted", targetDepth)) { context.nextToken(); methodSetting.setCacheDataEncrypted( BooleanJsonUnmarshaller.getInstance().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 methodSetting; }
public RadiusSettings unmarshall(JsonUnmarshallerContext context) throws Exception { RadiusSettings radiusSettings = new RadiusSettings(); 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("RadiusServers", targetDepth)) { context.nextToken(); radiusSettings.setRadiusServers( new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()) .unmarshall(context)); } if (context.testExpression("RadiusPort", targetDepth)) { context.nextToken(); radiusSettings.setRadiusPort(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("RadiusTimeout", targetDepth)) { context.nextToken(); radiusSettings.setRadiusTimeout( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("RadiusRetries", targetDepth)) { context.nextToken(); radiusSettings.setRadiusRetries( IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("SharedSecret", targetDepth)) { context.nextToken(); radiusSettings.setSharedSecret(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("AuthenticationProtocol", targetDepth)) { context.nextToken(); radiusSettings.setAuthenticationProtocol( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("DisplayLabel", targetDepth)) { context.nextToken(); radiusSettings.setDisplayLabel(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("UseSameUsername", targetDepth)) { context.nextToken(); radiusSettings.setUseSameUsername( BooleanJsonUnmarshaller.getInstance().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 radiusSettings; }
public Service unmarshall(JsonUnmarshallerContext context) throws Exception { Service service = new Service(); 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("serviceArn", targetDepth)) { context.nextToken(); service.setServiceArn(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("serviceName", targetDepth)) { context.nextToken(); service.setServiceName(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("clusterArn", targetDepth)) { context.nextToken(); service.setClusterArn(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("loadBalancers", targetDepth)) { context.nextToken(); service.setLoadBalancers( new ListUnmarshaller<LoadBalancer>(LoadBalancerJsonUnmarshaller.getInstance()) .unmarshall(context)); } if (context.testExpression("status", targetDepth)) { context.nextToken(); service.setStatus(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("desiredCount", targetDepth)) { context.nextToken(); service.setDesiredCount(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("runningCount", targetDepth)) { context.nextToken(); service.setRunningCount(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("pendingCount", targetDepth)) { context.nextToken(); service.setPendingCount(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("taskDefinition", targetDepth)) { context.nextToken(); service.setTaskDefinition(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("deployments", targetDepth)) { context.nextToken(); service.setDeployments( new ListUnmarshaller<Deployment>(DeploymentJsonUnmarshaller.getInstance()) .unmarshall(context)); } if (context.testExpression("roleArn", targetDepth)) { context.nextToken(); service.setRoleArn(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("events", targetDepth)) { context.nextToken(); service.setEvents( new ListUnmarshaller<ServiceEvent>(ServiceEventJsonUnmarshaller.getInstance()) .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 service; }
public RaidArray unmarshall(JsonUnmarshallerContext context) throws Exception { RaidArray raidArray = new RaidArray(); 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("RaidArrayId", targetDepth)) { context.nextToken(); raidArray.setRaidArrayId(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("InstanceId", targetDepth)) { context.nextToken(); raidArray.setInstanceId(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Name", targetDepth)) { context.nextToken(); raidArray.setName(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("RaidLevel", targetDepth)) { context.nextToken(); raidArray.setRaidLevel(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("NumberOfDisks", targetDepth)) { context.nextToken(); raidArray.setNumberOfDisks(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Size", targetDepth)) { context.nextToken(); raidArray.setSize(IntegerJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Device", targetDepth)) { context.nextToken(); raidArray.setDevice(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("MountPoint", targetDepth)) { context.nextToken(); raidArray.setMountPoint(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("AvailabilityZone", targetDepth)) { context.nextToken(); raidArray.setAvailabilityZone(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("CreatedAt", targetDepth)) { context.nextToken(); raidArray.setCreatedAt(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("StackId", targetDepth)) { context.nextToken(); raidArray.setStackId(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("VolumeType", targetDepth)) { context.nextToken(); raidArray.setVolumeType(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Iops", targetDepth)) { context.nextToken(); raidArray.setIops(IntegerJsonUnmarshaller.getInstance().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 raidArray; }