public GlobalSecondaryIndexUpdate unmarshall(JsonUnmarshallerContext context) throws Exception { GlobalSecondaryIndexUpdate globalSecondaryIndexUpdate = new GlobalSecondaryIndexUpdate(); 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("Update", targetDepth)) { context.nextToken(); globalSecondaryIndexUpdate.setUpdate( UpdateGlobalSecondaryIndexActionJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Create", targetDepth)) { context.nextToken(); globalSecondaryIndexUpdate.setCreate( CreateGlobalSecondaryIndexActionJsonUnmarshaller.getInstance().unmarshall(context)); } if (context.testExpression("Delete", targetDepth)) { context.nextToken(); globalSecondaryIndexUpdate.setDelete( DeleteGlobalSecondaryIndexActionJsonUnmarshaller.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 globalSecondaryIndexUpdate; }
/** * The name of an existing global secondary index to be removed. * * @param delete The name of an existing global secondary index to be removed. * @return Returns a reference to this object so that method calls can be chained together. */ public GlobalSecondaryIndexUpdate withDelete(DeleteGlobalSecondaryIndexAction delete) { setDelete(delete); return this; }