/** * The name of the SSM document. * * @param name The name of the SSM document. * @return Returns a reference to this object so that method calls can be chained together. */ public DocumentDescription withName(String name) { setName(name); return this; }
public DocumentDescription unmarshall(JsonUnmarshallerContext context) throws Exception { DocumentDescription documentDescription = new DocumentDescription(); 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("Sha1", targetDepth)) { context.nextToken(); documentDescription.setSha1(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("Hash", targetDepth)) { context.nextToken(); documentDescription.setHash(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("HashType", targetDepth)) { context.nextToken(); documentDescription.setHashType( context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("Name", targetDepth)) { context.nextToken(); documentDescription.setName(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("Owner", targetDepth)) { context.nextToken(); documentDescription.setOwner(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("CreatedDate", targetDepth)) { context.nextToken(); documentDescription.setCreatedDate( context.getUnmarshaller(java.util.Date.class).unmarshall(context)); } if (context.testExpression("Status", targetDepth)) { context.nextToken(); documentDescription.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("Description", targetDepth)) { context.nextToken(); documentDescription.setDescription( context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("Parameters", targetDepth)) { context.nextToken(); documentDescription.setParameters( new ListUnmarshaller<DocumentParameter>( DocumentParameterJsonUnmarshaller.getInstance()) .unmarshall(context)); } if (context.testExpression("PlatformTypes", targetDepth)) { context.nextToken(); documentDescription.setPlatformTypes( new ListUnmarshaller<String>(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 documentDescription; }