/** * <p> * The identifier for the celebrity recognition analysis job. Use <code>JobId</code> to identify the job in a * subsequent call to <code>GetCelebrityRecognition</code>. * </p> * * @param jobId * The identifier for the celebrity recognition analysis job. Use <code>JobId</code> to identify the job in a * subsequent call to <code>GetCelebrityRecognition</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public StartCelebrityRecognitionResult withJobId(String jobId) { setJobId(jobId); return this; }
public StartCelebrityRecognitionResult unmarshall(JsonUnmarshallerContext context) throws Exception { StartCelebrityRecognitionResult startCelebrityRecognitionResult = new StartCelebrityRecognitionResult(); 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 startCelebrityRecognitionResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("JobId", targetDepth)) { context.nextToken(); startCelebrityRecognitionResult.setJobId(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 startCelebrityRecognitionResult; }
public StartCelebrityRecognitionResult unmarshall(JsonUnmarshallerContext context) throws Exception { StartCelebrityRecognitionResult startCelebrityRecognitionResult = new StartCelebrityRecognitionResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("JobId")) { startCelebrityRecognitionResult.setJobId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return startCelebrityRecognitionResult; }