public PutPipelineDefinitionResult unmarshall(JsonUnmarshallerContext context) throws Exception { PutPipelineDefinitionResult putPipelineDefinitionResult = new PutPipelineDefinitionResult(); 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("validationErrors", targetDepth)) { putPipelineDefinitionResult.setValidationErrors( new ListUnmarshaller<ValidationError>(ValidationErrorJsonUnmarshaller.getInstance()) .unmarshall(context)); } if (context.testExpression("errored", targetDepth)) { context.nextToken(); putPipelineDefinitionResult.setErrored( BooleanJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getCurrentDepth() <= originalDepth) break; } token = context.nextToken(); } return putPipelineDefinitionResult; }
public PipelineIdName unmarshall(JsonUnmarshallerContext context) throws Exception { PipelineIdName pipelineIdName = new PipelineIdName(); 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("id", targetDepth)) { context.nextToken(); pipelineIdName.setId(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("name", targetDepth)) { context.nextToken(); pipelineIdName.setName(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 pipelineIdName; }
public PipelineDescription unmarshall(JsonUnmarshallerContext context) throws Exception { PipelineDescription pipelineDescription = new PipelineDescription(); 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("pipelineId", targetDepth)) { context.nextToken(); pipelineDescription.setPipelineId( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("name", targetDepth)) { context.nextToken(); pipelineDescription.setName(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("fields", targetDepth)) { context.nextToken(); pipelineDescription.setFields( new ListUnmarshaller<Field>(FieldJsonUnmarshaller.getInstance()).unmarshall(context)); } if (context.testExpression("description", targetDepth)) { context.nextToken(); pipelineDescription.setDescription( StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("tags", targetDepth)) { context.nextToken(); pipelineDescription.setTags( new ListUnmarshaller<Tag>(TagJsonUnmarshaller.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 pipelineDescription; }
public DescribePipelinesResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribePipelinesResult describePipelinesResult = new DescribePipelinesResult(); 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("pipelineDescriptionList", targetDepth)) { context.nextToken(); describePipelinesResult.setPipelineDescriptionList( new ListUnmarshaller<PipelineDescription>( PipelineDescriptionJsonUnmarshaller.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 describePipelinesResult; }
public TaskObject unmarshall(JsonUnmarshallerContext context) throws Exception { TaskObject taskObject = new TaskObject(); 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("taskId", targetDepth)) { context.nextToken(); taskObject.setTaskId(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("pipelineId", targetDepth)) { context.nextToken(); taskObject.setPipelineId(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("attemptId", targetDepth)) { context.nextToken(); taskObject.setAttemptId(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("objects", targetDepth)) { context.nextToken(); taskObject.setObjects( new MapUnmarshaller<String, PipelineObject>( context.getUnmarshaller(String.class), PipelineObjectJsonUnmarshaller.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 taskObject; }
public QueryObjectsResult unmarshall(JsonUnmarshallerContext context) throws Exception { QueryObjectsResult queryObjectsResult = new QueryObjectsResult(); 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("ids", targetDepth)) { context.nextToken(); queryObjectsResult.setIds( new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance()) .unmarshall(context)); } if (context.testExpression("marker", targetDepth)) { context.nextToken(); queryObjectsResult.setMarker(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("hasMoreResults", targetDepth)) { context.nextToken(); queryObjectsResult.setHasMoreResults( 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 queryObjectsResult; }
public Field unmarshall(JsonUnmarshallerContext context) throws Exception { Field field = new Field(); 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("key", targetDepth)) { context.nextToken(); field.setKey(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("stringValue", targetDepth)) { context.nextToken(); field.setStringValue(StringJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("refValue", targetDepth)) { context.nextToken(); field.setRefValue(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 field; }