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