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