public LookupDeveloperIdentityResult unmarshall(JsonUnmarshallerContext context) throws Exception { LookupDeveloperIdentityResult lookupDeveloperIdentityResult = new LookupDeveloperIdentityResult(); 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("IdentityId", targetDepth)) { context.nextToken(); lookupDeveloperIdentityResult.setIdentityId( context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("DeveloperUserIdentifierList", targetDepth)) { context.nextToken(); lookupDeveloperIdentityResult.setDeveloperUserIdentifierList( new ListUnmarshaller<String>(context.getUnmarshaller(String.class)) .unmarshall(context)); } if (context.testExpression("NextToken", targetDepth)) { context.nextToken(); lookupDeveloperIdentityResult.setNextToken( 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 lookupDeveloperIdentityResult; }
public GetCredentialsForIdentityResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetCredentialsForIdentityResult getCredentialsForIdentityResult = new GetCredentialsForIdentityResult(); 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("IdentityId", targetDepth)) { context.nextToken(); getCredentialsForIdentityResult.setIdentityId( context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("Credentials", targetDepth)) { context.nextToken(); getCredentialsForIdentityResult.setCredentials( CredentialsJsonUnmarshaller.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 getCredentialsForIdentityResult; }