public GetUserAttributeVerificationCodeResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetUserAttributeVerificationCodeResult getUserAttributeVerificationCodeResult = new GetUserAttributeVerificationCodeResult(); 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("CodeDeliveryDetails", targetDepth)) { context.nextToken(); getUserAttributeVerificationCodeResult.setCodeDeliveryDetails( CodeDeliveryDetailsTypeJsonUnmarshaller.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 getUserAttributeVerificationCodeResult; }
public InstallToRemoteAccessSessionResult unmarshall(JsonUnmarshallerContext context) throws Exception { InstallToRemoteAccessSessionResult installToRemoteAccessSessionResult = new InstallToRemoteAccessSessionResult(); 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("appUpload", targetDepth)) { context.nextToken(); installToRemoteAccessSessionResult.setAppUpload( UploadJsonUnmarshaller.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 installToRemoteAccessSessionResult; }
public DescribeCachediSCSIVolumesResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeCachediSCSIVolumesResult describeCachediSCSIVolumesResult = new DescribeCachediSCSIVolumesResult(); 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("CachediSCSIVolumes", targetDepth)) { describeCachediSCSIVolumesResult.setCachediSCSIVolumes( new ListUnmarshaller<CachediSCSIVolume>( CachediSCSIVolumeJsonUnmarshaller.getInstance()) .unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getCurrentDepth() <= originalDepth) break; } token = context.nextToken(); } return describeCachediSCSIVolumesResult; }
public UpdateDomainContactPrivacyResult unmarshall(JsonUnmarshallerContext context) throws Exception { UpdateDomainContactPrivacyResult updateDomainContactPrivacyResult = new UpdateDomainContactPrivacyResult(); 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("OperationId", targetDepth)) { context.nextToken(); updateDomainContactPrivacyResult.setOperationId( 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 updateDomainContactPrivacyResult; }
/** @see com.amazonaws.http.HttpResponseHandler#handle(com.amazonaws.http.HttpResponse) */ public AmazonWebServiceResponse<T> handle(HttpResponse response) throws Exception { log.trace("Parsing service response JSON"); JsonParser jsonParser = jsonFactory.createJsonParser(response.getContent()); try { AmazonWebServiceResponse<T> awsResponse = new AmazonWebServiceResponse<T>(); JsonUnmarshallerContext unmarshallerContext = new JsonUnmarshallerContext(jsonParser); // TODO: Anything else to do for JSON metadata? unmarshallerContext.registerMetadataExpression( "ResponseMetadata/RequestId", 2, ResponseMetadata.AWS_REQUEST_ID); unmarshallerContext.registerMetadataExpression( "requestId", 2, ResponseMetadata.AWS_REQUEST_ID); registerAdditionalMetadataExpressions(unmarshallerContext); T result = responseUnmarshaller.unmarshall(unmarshallerContext); awsResponse.setResult(result); Map<String, String> metadata = unmarshallerContext.getMetadata(); awsResponse.setResponseMetadata(new ResponseMetadata(metadata)); log.trace("Done parsing service response"); return awsResponse; } finally { try { jsonParser.close(); } catch (Exception e) { } } }
public DeleteRequest unmarshall(JsonUnmarshallerContext context) throws Exception { DeleteRequest deleteRequest = new DeleteRequest(); 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("Key", targetDepth)) { context.nextToken(); deleteRequest.setKey( new MapUnmarshaller<String, AttributeValue>( StringJsonUnmarshaller.getInstance(), AttributeValueJsonUnmarshaller.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 deleteRequest; }
public ConfirmConnectionResult unmarshall(JsonUnmarshallerContext context) throws Exception { ConfirmConnectionResult confirmConnectionResult = new ConfirmConnectionResult(); 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("connectionState", targetDepth)) { context.nextToken(); confirmConnectionResult.setConnectionState( 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 confirmConnectionResult; }
public DomainInfo unmarshall(JsonUnmarshallerContext context) throws Exception { DomainInfo domainInfo = new DomainInfo(); 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("DomainName", targetDepth)) { context.nextToken(); domainInfo.setDomainName(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 domainInfo; }
public NetworkInterface unmarshall(JsonUnmarshallerContext context) throws Exception { NetworkInterface networkInterface = new NetworkInterface(); 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("Ipv4Address", targetDepth)) { context.nextToken(); networkInterface.setIpv4Address(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("MacAddress", targetDepth)) { context.nextToken(); networkInterface.setMacAddress(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Ipv6Address", targetDepth)) { context.nextToken(); networkInterface.setIpv6Address(StringJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getCurrentDepth() <= originalDepth) break; } token = context.nextToken(); } return networkInterface; }
public AddCommunicationToCaseResult unmarshall(JsonUnmarshallerContext context) throws Exception { AddCommunicationToCaseResult addCommunicationToCaseResult = new AddCommunicationToCaseResult(); 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("result", targetDepth)) { context.nextToken(); addCommunicationToCaseResult.setResult( 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 addCommunicationToCaseResult; }
public ReleaseStaticIpResult unmarshall(JsonUnmarshallerContext context) throws Exception { ReleaseStaticIpResult releaseStaticIpResult = new ReleaseStaticIpResult(); 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("operations", targetDepth)) { context.nextToken(); releaseStaticIpResult.setOperations( new ListUnmarshaller<Operation>(OperationJsonUnmarshaller.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 releaseStaticIpResult; }
public PlacementType unmarshall(JsonUnmarshallerContext context) throws Exception { PlacementType placementType = new PlacementType(); 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("AvailabilityZone", targetDepth)) { context.nextToken(); placementType.setAvailabilityZone( 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 placementType; }
public DescribeLoadBasedAutoScalingResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeLoadBasedAutoScalingResult describeLoadBasedAutoScalingResult = new DescribeLoadBasedAutoScalingResult(); 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("LoadBasedAutoScalingConfigurations", targetDepth)) { context.nextToken(); describeLoadBasedAutoScalingResult.setLoadBasedAutoScalingConfigurations( new ListUnmarshaller<LoadBasedAutoScalingConfiguration>( LoadBasedAutoScalingConfigurationJsonUnmarshaller.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 describeLoadBasedAutoScalingResult; }
public KMSEncryptionConfig unmarshall(JsonUnmarshallerContext context) throws Exception { KMSEncryptionConfig kMSEncryptionConfig = new KMSEncryptionConfig(); 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("AWSKMSKeyARN", targetDepth)) { context.nextToken(); kMSEncryptionConfig.setAWSKMSKeyARN( 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 kMSEncryptionConfig; }
public VaultAccessPolicy unmarshall(JsonUnmarshallerContext context) throws Exception { VaultAccessPolicy vaultAccessPolicy = new VaultAccessPolicy(); 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("Policy", targetDepth)) { context.nextToken(); vaultAccessPolicy.setPolicy(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 vaultAccessPolicy; }
public Clip unmarshall(JsonUnmarshallerContext context) throws Exception { Clip clip = new Clip(); 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("TimeSpan", targetDepth)) { context.nextToken(); clip.setTimeSpan(TimeSpanJsonUnmarshaller.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 clip; }
public ListJobsByPipelineResult unmarshall(JsonUnmarshallerContext context) throws Exception { ListJobsByPipelineResult listJobsByPipelineResult = new ListJobsByPipelineResult(); 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("Jobs", targetDepth)) { listJobsByPipelineResult.setJobs( new ListUnmarshaller<Job>(JobJsonUnmarshaller.getInstance()).unmarshall(context)); } if (context.testExpression("NextPageToken", targetDepth)) { context.nextToken(); listJobsByPipelineResult.setNextPageToken( 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 listJobsByPipelineResult; }
public BatchGetDeploymentsResult unmarshall(JsonUnmarshallerContext context) throws Exception { BatchGetDeploymentsResult batchGetDeploymentsResult = new BatchGetDeploymentsResult(); 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("deploymentsInfo", targetDepth)) { context.nextToken(); batchGetDeploymentsResult.setDeploymentsInfo( new ListUnmarshaller<DeploymentInfo>(DeploymentInfoJsonUnmarshaller.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 batchGetDeploymentsResult; }
public GetCampaignVersionsResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetCampaignVersionsResult getCampaignVersionsResult = new GetCampaignVersionsResult(); if (context.getHeader("Access-Control-Allow-Origin") != null) getCampaignVersionsResult.setAccessControlAllowOrigin( context.getHeader("Access-Control-Allow-Origin")); return getCampaignVersionsResult; }
public CreateVaultResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateVaultResult createVaultResult = new CreateVaultResult(); if (context.isStartOfDocument()) { if (context.getHeader("Location") != null) createVaultResult.setLocation(context.getHeader("Location")); } return createVaultResult; }
public AddWorkingStorageResult unmarshall(JsonUnmarshallerContext context) throws Exception { AddWorkingStorageResult addWorkingStorageResult = new AddWorkingStorageResult(); 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("GatewayARN", targetDepth)) { context.nextToken(); addWorkingStorageResult.setGatewayARN( 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 addWorkingStorageResult; }
public AudioCodecOptions unmarshall(JsonUnmarshallerContext context) throws Exception { AudioCodecOptions audioCodecOptions = new AudioCodecOptions(); 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("Profile", targetDepth)) { context.nextToken(); audioCodecOptions.setProfile(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 audioCodecOptions; }
/** @see com.amazonaws.http.HttpResponseHandler#handle(com.amazonaws.http.HttpResponse) */ public AmazonWebServiceResponse<T> handle(HttpResponse response) throws Exception { log.trace("Parsing service response JSON"); String CRC32Checksum = response.getHeaders().get("x-amz-crc32"); CRC32ChecksumCalculatingInputStream crc32ChecksumInputStream = null; JsonParser jsonParser = null; if (!needsConnectionLeftOpen) { if (CRC32Checksum != null) { crc32ChecksumInputStream = new CRC32ChecksumCalculatingInputStream(response.getContent()); jsonParser = jsonFactory.createParser(crc32ChecksumInputStream); } else { jsonParser = jsonFactory.createParser(response.getContent()); } } try { AmazonWebServiceResponse<T> awsResponse = new AmazonWebServiceResponse<T>(); JsonUnmarshallerContext unmarshallerContext = new JsonUnmarshallerContext(jsonParser, response); registerAdditionalMetadataExpressions(unmarshallerContext); T result = responseUnmarshaller.unmarshall(unmarshallerContext); if (CRC32Checksum != null) { long serverSideCRC = Long.parseLong(CRC32Checksum); long clientSideCRC = crc32ChecksumInputStream.getCRC32Checksum(); if (clientSideCRC != serverSideCRC) { throw new CRC32MismatchException( "Client calculated crc32 checksum didn't match that calculated by server side"); } } awsResponse.setResult(result); Map<String, String> metadata = unmarshallerContext.getMetadata(); metadata.put(ResponseMetadata.AWS_REQUEST_ID, response.getHeaders().get("x-amzn-RequestId")); awsResponse.setResponseMetadata(new ResponseMetadata(metadata)); log.trace("Done parsing service response"); return awsResponse; } finally { if (!needsConnectionLeftOpen) { try { jsonParser.close(); } catch (IOException e) { log.warn("Error closing json parser", e); } } } }
public Key unmarshall(JsonUnmarshallerContext context) throws Exception { Key key = new Key(); 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("HashKeyElement", targetDepth)) { context.nextToken(); key.setHashKeyElement(AttributeValueJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("RangeKeyElement", targetDepth)) { context.nextToken(); key.setRangeKeyElement(AttributeValueJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getCurrentDepth() <= originalDepth) break; } token = context.nextToken(); } return key; }
public WriteRequest unmarshall(JsonUnmarshallerContext context) throws Exception { WriteRequest writeRequest = new WriteRequest(); 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("PutRequest", targetDepth)) { context.nextToken(); writeRequest.setPutRequest(PutRequestJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("DeleteRequest", targetDepth)) { context.nextToken(); writeRequest.setDeleteRequest( DeleteRequestJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getCurrentDepth() <= originalDepth) break; } token = context.nextToken(); } return writeRequest; }
public DescribeServicesResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeServicesResult describeServicesResult = new DescribeServicesResult(); 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("services", targetDepth)) { describeServicesResult.setServices( new ListUnmarshaller<Service>(ServiceJsonUnmarshaller.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 describeServicesResult; }
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 CertificateDescription unmarshall(JsonUnmarshallerContext context) throws Exception { CertificateDescription certificateDescription = new CertificateDescription(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("certificateArn")) { certificateDescription.setCertificateArn( StringJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("certificateId")) { certificateDescription.setCertificateId( StringJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("status")) { certificateDescription.setStatus(StringJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("certificatePem")) { certificateDescription.setCertificatePem( StringJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("ownedBy")) { certificateDescription.setOwnedBy(StringJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("creationDate")) { certificateDescription.setCreationDate( DateJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("lastModifiedDate")) { certificateDescription.setLastModifiedDate( DateJsonUnmarshaller.getInstance().unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return certificateDescription; }
public DeviceType unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } DeviceType deviceType = new DeviceType(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("DeviceKey")) { deviceType.setDeviceKey(StringJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("DeviceAttributes")) { deviceType.setDeviceAttributes( new ListUnmarshaller<AttributeType>(AttributeTypeJsonUnmarshaller.getInstance()) .unmarshall(context)); } else if (name.equals("DeviceCreateDate")) { deviceType.setDeviceCreateDate(DateJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("DeviceLastModifiedDate")) { deviceType.setDeviceLastModifiedDate( DateJsonUnmarshaller.getInstance().unmarshall(context)); } else if (name.equals("DeviceLastAuthenticatedDate")) { deviceType.setDeviceLastAuthenticatedDate( DateJsonUnmarshaller.getInstance().unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return deviceType; }
public WorkflowExecutionInfos unmarshall(JsonUnmarshallerContext context) throws Exception { WorkflowExecutionInfos workflowExecutionInfos = new WorkflowExecutionInfos(); 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("executionInfos", targetDepth)) { workflowExecutionInfos.setExecutionInfos( new ListUnmarshaller<WorkflowExecutionInfo>( WorkflowExecutionInfoJsonUnmarshaller.getInstance()) .unmarshall(context)); } if (context.testExpression("nextPageToken", targetDepth)) { context.nextToken(); workflowExecutionInfos.setNextPageToken( StringJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getCurrentDepth() <= originalDepth) break; } token = context.nextToken(); } return workflowExecutionInfos; }