Refine search
public MaintenanceWindowAutomationParameters unmarshall(JsonUnmarshallerContext context) throws Exception { MaintenanceWindowAutomationParameters maintenanceWindowAutomationParameters = new MaintenanceWindowAutomationParameters(); 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; if (context.testExpression("DocumentVersion", targetDepth)) { context.nextToken(); maintenanceWindowAutomationParameters.setDocumentVersion(context.getUnmarshaller(String.class).unmarshall(context)); if (context.testExpression("Parameters", targetDepth)) { context.nextToken(); maintenanceWindowAutomationParameters.setParameters(new MapUnmarshaller<String, java.util.List<String>>(context .getUnmarshaller(String.class), new ListUnmarshaller<String>(context.getUnmarshaller(String.class))).unmarshall(context)); if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; token = context.nextToken();
public InitiateVaultLockResult unmarshall(JsonUnmarshallerContext context) throws Exception { InitiateVaultLockResult initiateVaultLockResult = new InitiateVaultLockResult(); if (context.isStartOfDocument()) { if (context.getHeader("x-amz-lock-id") != null) { context.setCurrentHeader("x-amz-lock-id"); initiateVaultLockResult.setLockId(context.getUnmarshaller(String.class).unmarshall(context)); } } return initiateVaultLockResult; }
public Map<K, V> unmarshall(JsonUnmarshallerContext context) throws Exception { Map<K, V> map = new HashMap<K, V>(); int originalDepth = context.getCurrentDepth(); if (context.getCurrentToken() == JsonToken.VALUE_NULL) { return null; } while (true) { JsonToken token = context.nextToken(); if (token == null) return map; if (token == FIELD_NAME) { K k = keyUnmarshaller.unmarshall(context); token = context.nextToken(); V v = valueUnmarshaller.unmarshall(context); map.put(k, v); } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getCurrentDepth() <= originalDepth) return map; } } }
public CreateAppResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateAppResult createAppResult = new CreateAppResult(); 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 createAppResult; } while (true) { if (token == null) break; createAppResult.setApplicationResponse(ApplicationResponseJsonUnmarshaller.getInstance().unmarshall(context)); token = context.nextToken(); } return createAppResult; }
/** * Unmarshalls the current token in the Json document to list. */ private List<T> unmarshallJsonToList(JsonUnmarshallerContext context) throws Exception { List<T> list = new ArrayList<T>(); if (context.getCurrentToken() == JsonToken.VALUE_NULL) { return null; } while (true) { JsonToken token = context.nextToken(); if (token == null) { return list; } if (token == END_ARRAY) { return list; } else { list.add(itemUnmarshaller.unmarshall(context)); } } } }
public BigDecimal unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { JsonParser parser = unmarshallerContext.getJsonParser(); Unmarshaller<BigInteger, JsonUnmarshallerContext> bigIntegerUnmarshaller = unmarshallerContext.getUnmarshaller(BigInteger.class); JsonToken current = parser.getCurrentToken(); if (current != JsonToken.START_ARRAY) { throw new SdkClientException("Invalid BigDecimal Format."); } parser.nextToken(); int exponent = parser.getIntValue(); parser.nextToken(); BigInteger mantissa = bigIntegerUnmarshaller.unmarshall(unmarshallerContext); return new BigDecimal(mantissa, exponent); }
public Date unmarshall(JsonUnmarshallerContext unmarshallerContext) throws Exception { // If value is string, assume ISO8601. Otherwise parse as epoch seconds. if (unmarshallerContext.getCurrentToken() == JsonToken.VALUE_STRING) { return DateUtils.parseISO8601Date(unmarshallerContext.readText()); } else { return DateUtils.parseServiceSpecificDate(unmarshallerContext.readText()); } }
public GetAppResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetAppResult getAppResult = new GetAppResult(); 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 getAppResult; } while (true) { if (token == null) break; getAppResult.setApplicationResponse(ApplicationResponseJsonUnmarshaller.getInstance().unmarshall(context)); token = context.nextToken(); } return getAppResult; }
public PurchaseProvisionedCapacityResult unmarshall(JsonUnmarshallerContext context) throws Exception { PurchaseProvisionedCapacityResult purchaseProvisionedCapacityResult = new PurchaseProvisionedCapacityResult(); if (context.isStartOfDocument()) { if (context.getHeader("x-amz-capacity-id") != null) { context.setCurrentHeader("x-amz-capacity-id"); purchaseProvisionedCapacityResult.setCapacityId(context.getUnmarshaller(String.class).unmarshall(context)); } } return purchaseProvisionedCapacityResult; }
public DefaultMessage unmarshall(JsonUnmarshallerContext context) throws Exception { DefaultMessage defaultMessage = new DefaultMessage(); 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; if (context.testExpression("Body", targetDepth)) { context.nextToken(); defaultMessage.setBody(context.getUnmarshaller(String.class).unmarshall(context)); if (context.testExpression("Substitutions", targetDepth)) { context.nextToken(); defaultMessage.setSubstitutions(new MapUnmarshaller<String, java.util.List<String>>(context.getUnmarshaller(String.class), new ListUnmarshaller<String>(context.getUnmarshaller(String.class))).unmarshall(context)); if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; token = context.nextToken();
public DeleteAppResult unmarshall(JsonUnmarshallerContext context) throws Exception { DeleteAppResult deleteAppResult = new DeleteAppResult(); 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 deleteAppResult; } while (true) { if (token == null) break; deleteAppResult.setApplicationResponse(ApplicationResponseJsonUnmarshaller.getInstance().unmarshall(context)); token = context.nextToken(); } return deleteAppResult; }
public CreateVaultResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreateVaultResult createVaultResult = new CreateVaultResult(); if (context.isStartOfDocument()) { if (context.getHeader("Location") != null) { context.setCurrentHeader("Location"); createVaultResult.setLocation(context.getUnmarshaller(String.class).unmarshall(context)); } } return createVaultResult; }
public DeploymentCommand unmarshall(JsonUnmarshallerContext context) throws Exception { DeploymentCommand deploymentCommand = new DeploymentCommand(); 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; if (context.testExpression("Name", targetDepth)) { context.nextToken(); deploymentCommand.setName(context.getUnmarshaller(String.class).unmarshall(context)); if (context.testExpression("Args", targetDepth)) { context.nextToken(); deploymentCommand.setArgs(new MapUnmarshaller<String, java.util.List<String>>(context.getUnmarshaller(String.class), new ListUnmarshaller<String>(context.getUnmarshaller(String.class))).unmarshall(context)); if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; token = context.nextToken();
public DeleteAdmChannelResult unmarshall(JsonUnmarshallerContext context) throws Exception { DeleteAdmChannelResult deleteAdmChannelResult = new DeleteAdmChannelResult(); 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 deleteAdmChannelResult; } while (true) { if (token == null) break; deleteAdmChannelResult.setADMChannelResponse(ADMChannelResponseJsonUnmarshaller.getInstance().unmarshall(context)); token = context.nextToken(); } return deleteAdmChannelResult; }
public UploadMultipartPartResult unmarshall(JsonUnmarshallerContext context) throws Exception { UploadMultipartPartResult uploadMultipartPartResult = new UploadMultipartPartResult(); if (context.isStartOfDocument()) { if (context.getHeader("x-amz-sha256-tree-hash") != null) { context.setCurrentHeader("x-amz-sha256-tree-hash"); uploadMultipartPartResult.setChecksum(context.getUnmarshaller(String.class).unmarshall(context)); } } return uploadMultipartPartResult; }
public EndpointUser unmarshall(JsonUnmarshallerContext context) throws Exception { EndpointUser endpointUser = new EndpointUser(); 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; if (context.testExpression("UserAttributes", targetDepth)) { context.nextToken(); endpointUser.setUserAttributes(new MapUnmarshaller<String, java.util.List<String>>(context.getUnmarshaller(String.class), new ListUnmarshaller<String>(context.getUnmarshaller(String.class))).unmarshall(context)); if (context.testExpression("UserId", targetDepth)) { context.nextToken(); endpointUser.setUserId(context.getUnmarshaller(String.class).unmarshall(context)); if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; token = context.nextToken();
public SendUsersMessagesResult unmarshall(JsonUnmarshallerContext context) throws Exception { SendUsersMessagesResult sendUsersMessagesResult = new SendUsersMessagesResult(); 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 sendUsersMessagesResult; } while (true) { if (token == null) break; sendUsersMessagesResult.setSendUsersMessageResponse(SendUsersMessageResponseJsonUnmarshaller.getInstance().unmarshall(context)); token = context.nextToken(); } return sendUsersMessagesResult; }
public InitiateMultipartUploadResult unmarshall(JsonUnmarshallerContext context) throws Exception { InitiateMultipartUploadResult initiateMultipartUploadResult = new InitiateMultipartUploadResult(); if (context.isStartOfDocument()) { if (context.getHeader("Location") != null) { context.setCurrentHeader("Location"); initiateMultipartUploadResult.setLocation(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.getHeader("x-amz-multipart-upload-id") != null) { context.setCurrentHeader("x-amz-multipart-upload-id"); initiateMultipartUploadResult.setUploadId(context.getUnmarshaller(String.class).unmarshall(context)); } } return initiateMultipartUploadResult; }
public DescribeConfigurationsResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeConfigurationsResult describeConfigurationsResult = new DescribeConfigurationsResult(); 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 describeConfigurationsResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("configurations", targetDepth)) { context.nextToken(); describeConfigurationsResult.setConfigurations(new ListUnmarshaller<java.util.Map<String, String>>(new MapUnmarshaller<String, String>( context.getUnmarshaller(String.class), 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 describeConfigurationsResult; }
public UpdateEndpointResult unmarshall(JsonUnmarshallerContext context) throws Exception { UpdateEndpointResult updateEndpointResult = new UpdateEndpointResult(); 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 updateEndpointResult; } while (true) { if (token == null) break; updateEndpointResult.setMessageBody(MessageBodyJsonUnmarshaller.getInstance().unmarshall(context)); token = context.nextToken(); } return updateEndpointResult; }