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 PutItemResult unmarshall(JsonUnmarshallerContext context) throws Exception { PutItemResult putItemResult = new PutItemResult(); int originalDepth = context.getCurrentDepth(); 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("Attributes", targetDepth)) { putItemResult.setAttributes( new MapUnmarshaller<String, AttributeValue>( StringJsonUnmarshaller.getInstance(), AttributeValueJsonUnmarshaller.getInstance()) .unmarshall(context)); } if (context.testExpression("ConsumedCapacityUnits", targetDepth)) { context.nextToken(); putItemResult.setConsumedCapacityUnits( DoubleJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getCurrentDepth() <= originalDepth) break; } token = context.nextToken(); } return putItemResult; }
public BatchResponse unmarshall(JsonUnmarshallerContext context) throws Exception { BatchResponse batchResponse = new BatchResponse(); int originalDepth = context.getCurrentDepth(); 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("Items", targetDepth)) { batchResponse.setItems( new ListUnmarshaller<java.util.Map<String, AttributeValue>>( new MapUnmarshaller<String, AttributeValue>( StringJsonUnmarshaller.getInstance(), AttributeValueJsonUnmarshaller.getInstance())) .unmarshall(context)); } if (context.testExpression("ConsumedCapacityUnits", targetDepth)) { context.nextToken(); batchResponse.setConsumedCapacityUnits( DoubleJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getCurrentDepth() <= originalDepth) break; } token = context.nextToken(); } return batchResponse; }
public Capacity unmarshall(JsonUnmarshallerContext context) throws Exception { Capacity capacity = new Capacity(); 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("CapacityUnits", targetDepth)) { context.nextToken(); capacity.setCapacityUnits(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 capacity; }
public ItemCollectionMetrics unmarshall(JsonUnmarshallerContext context) throws Exception { ItemCollectionMetrics itemCollectionMetrics = new ItemCollectionMetrics(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("ItemCollectionKey")) { itemCollectionMetrics.setItemCollectionKey( new MapUnmarshaller<AttributeValue>(AttributeValueJsonUnmarshaller.getInstance()) .unmarshall(context)); } else if (name.equals("SizeEstimateRangeGB")) { itemCollectionMetrics.setSizeEstimateRangeGB( new ListUnmarshaller<Double>(DoubleJsonUnmarshaller.getInstance()).unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return itemCollectionMetrics; }
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 DescribeCacheResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeCacheResult describeCacheResult = new DescribeCacheResult(); 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("GatewayARN", targetDepth)) { context.nextToken(); describeCacheResult.setGatewayARN( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("DiskIds", targetDepth)) { describeCacheResult.setDiskIds( new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()) .unmarshall(context)); } if (context.testExpression("CacheAllocatedInBytes", targetDepth)) { context.nextToken(); describeCacheResult.setCacheAllocatedInBytes( LongJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("CacheUsedPercentage", targetDepth)) { context.nextToken(); describeCacheResult.setCacheUsedPercentage( DoubleJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("CacheDirtyPercentage", targetDepth)) { context.nextToken(); describeCacheResult.setCacheDirtyPercentage( DoubleJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("CacheHitPercentage", targetDepth)) { context.nextToken(); describeCacheResult.setCacheHitPercentage( DoubleJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("CacheMissPercentage", targetDepth)) { context.nextToken(); describeCacheResult.setCacheMissPercentage( 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 describeCacheResult; }
public StorediSCSIVolume unmarshall(JsonUnmarshallerContext context) throws Exception { StorediSCSIVolume storediSCSIVolume = new StorediSCSIVolume(); 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(); storediSCSIVolume.setVolumeARN(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("VolumeId", targetDepth)) { context.nextToken(); storediSCSIVolume.setVolumeId(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("VolumeType", targetDepth)) { context.nextToken(); storediSCSIVolume.setVolumeType(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("VolumeStatus", targetDepth)) { context.nextToken(); storediSCSIVolume.setVolumeStatus( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("VolumeSizeInBytes", targetDepth)) { context.nextToken(); storediSCSIVolume.setVolumeSizeInBytes( LongJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("VolumeProgress", targetDepth)) { context.nextToken(); storediSCSIVolume.setVolumeProgress( DoubleJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("VolumeDiskId", targetDepth)) { context.nextToken(); storediSCSIVolume.setVolumeDiskId( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("SourceSnapshotId", targetDepth)) { context.nextToken(); storediSCSIVolume.setSourceSnapshotId( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("PreservedExistingData", targetDepth)) { context.nextToken(); storediSCSIVolume.setPreservedExistingData( BooleanJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("VolumeiSCSIAttributes", targetDepth)) { context.nextToken(); storediSCSIVolume.setVolumeiSCSIAttributes( VolumeiSCSIAttributesJsonUnmarshaller.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 storediSCSIVolume; }