com.fasterxml.jackson.core.JsonToken

Here are the examples of the java api class com.fasterxml.jackson.core.JsonToken taken from open source projects.

1. Jackson2ArrayOrStringDeserializer#deserialize()

View license
@Override
public Set<String> deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
    JsonToken token = jp.getCurrentToken();
    if (token.isScalarValue()) {
        String list = jp.getText();
        list = list.replaceAll("\\s+", ",");
        return new LinkedHashSet<String>(Arrays.asList(StringUtils.commaDelimitedListToStringArray(list)));
    }
    return jp.readValueAs(new TypeReference<Set<String>>() {
    });
}

2. JsonWeatherParser#handleToken()

Project: openhab
Source File: JsonWeatherParser.java
View license
/**
     * Iterates through the JSON structure and collects weather data.
     */
private void handleToken(JsonParser jp, String property, Weather weather) throws Exception {
    JsonToken token = jp.getCurrentToken();
    String prop = PropertyResolver.add(property, jp.getCurrentName());
    if (token.isStructStart()) {
        boolean isObject = token == JsonToken.START_OBJECT || token == JsonToken.END_OBJECT;
        Weather forecast = !isObject ? weather : startIfForecast(weather, prop);
        while (!jp.nextValue().isStructEnd()) {
            handleToken(jp, prop, forecast);
        }
        if (isObject) {
            endIfForecast(weather, forecast, prop);
        }
    } else if (token != null) {
        try {
            setValue(weather, prop, jp.getValueAsString());
        } catch (Exception ex) {
            logger.error("Error setting property '{}' with value '{}' ({})", prop, jp.getValueAsString(), ex.getMessage());
        }
    }
}

3. RangeTokenDeserializer#deserialize()

Project: atlasdb
Source File: RangeTokenDeserializer.java
View license
@Override
public RangeToken deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
    JsonToken t = jp.getCurrentToken();
    if (t == JsonToken.START_OBJECT) {
        t = jp.nextToken();
    }
    TableRowResult results = null;
    TableRange nextRange = null;
    for (; t == JsonToken.FIELD_NAME; t = jp.nextToken()) {
        String fieldName = jp.getCurrentName();
        t = jp.nextToken();
        if (fieldName.equals("data")) {
            results = jp.readValueAs(TableRowResult.class);
        } else if (fieldName.equals("next")) {
            nextRange = jp.readValueAs(TableRange.class);
        }
    }
    return new RangeToken(results, nextRange);
}

4. JsonUnmarshallerContextImpl#nextToken()

View license
@Override
public JsonToken nextToken() throws IOException {
    // Use the value from the nextToken field if
    // we've already populated it to peek ahead.
    JsonToken token = (nextToken != null) ? nextToken : jsonParser.nextToken();
    this.currentToken = token;
    nextToken = null;
    updateContext();
    return token;
}

5. DruidConnectionImpl#expectScalarField()

Project: calcite
Source File: DruidConnectionImpl.java
View license
private void expectScalarField(JsonParser parser, String name) throws IOException {
    expect(parser, JsonToken.FIELD_NAME);
    if (!parser.getCurrentName().equals(name)) {
        throw new RuntimeException("expected field " + name + ", got " + parser.getCurrentName());
    }
    final JsonToken t = parser.nextToken();
    switch(t) {
        case VALUE_NULL:
        case VALUE_FALSE:
        case VALUE_TRUE:
        case VALUE_NUMBER_INT:
        case VALUE_NUMBER_FLOAT:
        case VALUE_STRING:
            break;
        default:
            throw new RuntimeException("expected scalar field, got  " + t);
    }
}

6. StreamingJsonParser#readObjectFromArray()

View license
@SuppressWarnings("unchecked")
protected Object readObjectFromArray() throws IOException {
    Object value = null;
    if (starting) {
        starting = false;
        JsonToken token = jsonParser.nextToken();
        rootContext = jsonParser.getParsingContext();
        if (token != JsonToken.START_ARRAY) {
            throw new JsonParseException(Utils.format("JSON array expected but stream starts with '{}'", token), jsonParser.getTokenLocation());
        }
    }
    JsonToken token = jsonParser.nextToken();
    if (token != null) {
        if (token != JsonToken.END_ARRAY) {
            value = jsonParser.readValueAs(Object.class);
        }
    }
    return value;
}

7. StreamingJsonParser#fastForwardToNextRootObject()

View license
protected void fastForwardToNextRootObject() throws IOException {
    Preconditions.checkState(mode == Mode.MULTIPLE_OBJECTS, "Parser must be in MULTIPLE_OBJECT mode");
    JsonToken token = jsonParser.getCurrentToken();
    try {
        if (token == null) {
            token = jsonParser.nextToken();
        }
        while (token != null && !jsonParser.getParsingContext().inRoot()) {
            token = jsonParser.nextToken();
        }
        nextToken = jsonParser.nextToken();
    } catch (OverrunException e) {
        if (firstNonSpaceChar == null || firstNonSpaceChar.byteValue() != '[') {
            throw e;
        } else {
            String msg = Utils.format("Overrun exception occurred on a file starting with '[', which may " + "indicate the incorrect processor mode '{}' is being used: {}", mode.name(), e);
            throw new OverrunException(msg, e.getStreamOffset(), e);
        }
    }
}

8. UnixTimestampDeserializer#deserialize()

View license
@Override
public Date deserialize(final JsonParser p, final DeserializationContext ctxt) throws IOException, JsonProcessingException {
    final JsonToken token = p.getCurrentToken();
    if (token == JsonToken.VALUE_STRING) {
        final String str = p.getText().trim();
        return toDate(Long.parseLong(str));
    } else if (token == JsonToken.VALUE_NUMBER_INT) {
        return toDate(p.getLongValue());
    }
    throw ctxt.wrongTokenException(p, JsonToken.VALUE_STRING, "Expected a string or numeric value");
}

9. CountingJsonReader#write()

Project: drill
Source File: CountingJsonReader.java
View license
@Override
public ReadState write(BaseWriter.ComplexWriter writer) throws IOException {
    final JsonToken token = parser.nextToken();
    if (!parser.hasCurrentToken()) {
        return ReadState.END_OF_STREAM;
    } else if (token != JsonToken.START_OBJECT) {
        throw new IllegalStateException(String.format("Cannot read from the middle of a record. Current token was %s", token));
    }
    writer.rootAsMap().bit("count").writeBit(1);
    parser.skipChildren();
    return ReadState.WRITE_SUCCEED;
}

10. AttachmentsInOrderParser#parseAttachmentNames()

View license
/**
     * Parses a CouchDB document in the form of a JsonParser to get the
     * attachments order. It is important that the JsonParser come straight
     * from the source document and not from an object, or the order will
     * be incorrect.
     * @param documentJsonParser a JsonParser which is at the very root of a JSON CouchDB document
     * @return the list of attachment names in the order provided in the document
     * @throws IOException
     */
public static List<String> parseAttachmentNames(JsonParser documentJsonParser) throws IOException {
    documentJsonParser.nextToken();
    JsonToken jsonToken;
    while ((jsonToken = documentJsonParser.nextToken()) != JsonToken.END_OBJECT) {
        if (CouchDbDocument.ATTACHMENTS_NAME.equals(documentJsonParser.getCurrentName())) {
            return readAttachments(documentJsonParser);
        } else if (jsonToken == JsonToken.START_OBJECT) {
            readIgnoreObject(documentJsonParser);
        }
    }
    return null;
}

11. JsonXContentParser#objectText()

Project: elassandra
Source File: JsonXContentParser.java
View license
@Override
public Object objectText() throws IOException {
    JsonToken currentToken = parser.getCurrentToken();
    if (currentToken == JsonToken.VALUE_STRING) {
        return text();
    } else if (currentToken == JsonToken.VALUE_NUMBER_INT || currentToken == JsonToken.VALUE_NUMBER_FLOAT) {
        return parser.getNumberValue();
    } else if (currentToken == JsonToken.VALUE_TRUE) {
        return Boolean.TRUE;
    } else if (currentToken == JsonToken.VALUE_FALSE) {
        return Boolean.FALSE;
    } else if (currentToken == JsonToken.VALUE_NULL) {
        return null;
    } else {
        return text();
    }
}

12. JsonXContentParser#objectBytes()

Project: elassandra
Source File: JsonXContentParser.java
View license
@Override
public Object objectBytes() throws IOException {
    JsonToken currentToken = parser.getCurrentToken();
    if (currentToken == JsonToken.VALUE_STRING) {
        return utf8Bytes();
    } else if (currentToken == JsonToken.VALUE_NUMBER_INT || currentToken == JsonToken.VALUE_NUMBER_FLOAT) {
        return parser.getNumberValue();
    } else if (currentToken == JsonToken.VALUE_TRUE) {
        return Boolean.TRUE;
    } else if (currentToken == JsonToken.VALUE_FALSE) {
        return Boolean.FALSE;
    } else if (currentToken == JsonToken.VALUE_NULL) {
        return null;
    } else {
        //TODO should this really do UTF-8 conversion?
        return utf8Bytes();
    }
}

13. JsonXContentParser#objectText()

View license
@Override
public Object objectText() throws IOException {
    JsonToken currentToken = parser.getCurrentToken();
    if (currentToken == JsonToken.VALUE_STRING) {
        return text();
    } else if (currentToken == JsonToken.VALUE_NUMBER_INT || currentToken == JsonToken.VALUE_NUMBER_FLOAT) {
        return parser.getNumberValue();
    } else if (currentToken == JsonToken.VALUE_TRUE) {
        return Boolean.TRUE;
    } else if (currentToken == JsonToken.VALUE_FALSE) {
        return Boolean.FALSE;
    } else if (currentToken == JsonToken.VALUE_NULL) {
        return null;
    } else {
        return text();
    }
}

14. JsonXContentParser#objectBytes()

View license
@Override
public Object objectBytes() throws IOException {
    JsonToken currentToken = parser.getCurrentToken();
    if (currentToken == JsonToken.VALUE_STRING) {
        return utf8Bytes();
    } else if (currentToken == JsonToken.VALUE_NUMBER_INT || currentToken == JsonToken.VALUE_NUMBER_FLOAT) {
        return parser.getNumberValue();
    } else if (currentToken == JsonToken.VALUE_TRUE) {
        return Boolean.TRUE;
    } else if (currentToken == JsonToken.VALUE_FALSE) {
        return Boolean.FALSE;
    } else if (currentToken == JsonToken.VALUE_NULL) {
        return null;
    } else {
        //TODO should this really do UTF-8 conversion?
        return utf8Bytes();
    }
}

15. AbstractTextContainerDeserializer#textContainer()

View license
protected TextContainer textContainer(final JsonParser jp, final DeserializationContext ctxt) throws IOException {
    JsonToken currentToken = jp.getCurrentToken();
    if (currentToken == JsonToken.FIELD_NAME) {
        TextContainer.Builder builder = builder();
        String operation = jp.getText().trim();
        builder.withOperation(operation);
        JsonToken token = jp.nextToken();
        if (token == JsonToken.VALUE_STRING) {
            String text = jp.getText().trim();
            jp.nextToken();
            return builder.withText(text).build();
        }
        if (isForTemplate(operation) && token == JsonToken.START_OBJECT) {
            return template(jp, builder);
        }
    }
    throw ctxt.mappingException(TextContainer.class, jp.getCurrentToken());
}

16. FileContainerDeserializer#deserialize()

Project: moco
Source File: FileContainerDeserializer.java
View license
@Override
public FileContainer deserialize(final JsonParser jp, final DeserializationContext ctxt) throws IOException {
    JsonToken currentToken = jp.getCurrentToken();
    if (currentToken == JsonToken.VALUE_STRING) {
        return asFileContainer(text(jp));
    }
    if (currentToken == JsonToken.START_OBJECT) {
        jp.nextToken();
        String target = jp.getText().trim();
        if (isForFileContainer(target)) {
            return toFileContainer(jp);
        }
        return asFileContainer(textContainer(jp, ctxt));
    }
    throw ctxt.mappingException(TextContainer.class, currentToken);
}

17. LatencyContainerDeserializer#deserialize()

View license
@Override
public LatencyContainer deserialize(final JsonParser jp, final DeserializationContext ctxt) throws IOException {
    JsonToken currentToken = jp.getCurrentToken();
    if (currentToken == JsonToken.VALUE_NUMBER_INT) {
        return LatencyContainer.latency(jp.getLongValue());
    }
    if (currentToken == JsonToken.START_OBJECT) {
        jp.nextToken();
        InternalLatencyContainer container = get(jp.readValuesAs(InternalLatencyContainer.class), 0);
        return LatencyContainer.latencyWithUnit(container.duration, TimeUnit.valueOf(container.unit.toUpperCase() + 'S'));
    }
    throw ctxt.mappingException(LatencyContainer.class, currentToken);
}

18. ProxyContainerDeserializer#deserialize()

View license
@Override
public ProxyContainer deserialize(final JsonParser jp, final DeserializationContext ctxt) throws IOException {
    JsonToken currentToken = jp.getCurrentToken();
    if (currentToken == JsonToken.VALUE_STRING) {
        return builder().withUrl(jp.getText().trim()).build();
    }
    if (currentToken == JsonToken.START_OBJECT) {
        InternalProxyContainer container = get(jp.readValuesAs(InternalProxyContainer.class), 0);
        return container.toProxyContainer();
    }
    throw ctxt.mappingException(ProxyContainer.class, currentToken);
}

19. TextContainerDeserializer#deserialize()

Project: moco
Source File: TextContainerDeserializer.java
View license
@Override
public TextContainer deserialize(final JsonParser jp, final DeserializationContext ctxt) throws IOException {
    JsonToken currentToken = jp.getCurrentToken();
    if (currentToken == JsonToken.VALUE_STRING) {
        return text(jp);
    }
    if (currentToken == JsonToken.START_OBJECT) {
        jp.nextToken();
        return textContainer(jp, ctxt);
    }
    throw ctxt.mappingException(TextContainer.class, currentToken);
}

20. OpenRtbJsonExtComplexReader#readRepeated()

View license
@SuppressWarnings("unchecked")
private void readRepeated(EB msg, JsonParser par) throws IOException {
    par.nextToken();
    JsonToken tokLast = par.getCurrentToken();
    JsonLocation locLast = par.getCurrentLocation();
    for (startArray(par); endArray(par); par.nextToken()) {
        boolean objRead = false;
        XB ext = (XB) key.getMessageDefaultInstance().toBuilder();
        for (startObject(par); endObject(par); par.nextToken()) {
            read(ext, par);
            JsonToken tokNew = par.getCurrentToken();
            JsonLocation locNew = par.getCurrentLocation();
            if (tokNew != tokLast || !locNew.equals(locLast)) {
                objRead = true;
            }
            tokLast = tokNew;
            locLast = locNew;
        }
        if (objRead) {
            msg.addExtension(key, ext.build());
        }
    }
}

21. OpenRtbJsonUtils#readCsvString()

Project: openrtb
Source File: OpenRtbJsonUtils.java
View license
/**
   * Reads from either a JSON Value String (containing CSV) or a JSON Array.
   * The dual input format is needed because some fields (e.g. keywords) were allowed
   * to be of either type in OpenRTB 2.2; now in 2.3 they are all CSV strings only.
   * TODO: Simplify this to only accept CSV strings after 2.2 compatibility is dropped.
   */
public static String readCsvString(JsonParser par) throws IOException {
    JsonToken currentToken = par.getCurrentToken();
    if (currentToken == JsonToken.START_ARRAY) {
        StringBuilder keywords = new StringBuilder();
        for (startArray(par); endArray(par); par.nextToken()) {
            if (keywords.length() != 0) {
                keywords.append(',');
            }
            keywords.append(par.getText());
        }
        return keywords.toString();
    } else if (currentToken == JsonToken.VALUE_STRING) {
        return par.getText();
    } else {
        throw new JsonParseException("Expected string or array", par.getCurrentLocation());
    }
}

22. TimeZoneAwareDateTimeDeserializer#deserialize()

View license
@Override
public DateTime deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
    JsonToken t = jp.getCurrentToken();
    if (t == JsonToken.VALUE_NUMBER_INT) {
        return new DateTime(jp.getLongValue(), DateTimeZone.UTC);
    }
    if (t == JsonToken.VALUE_STRING) {
        String str = jp.getText().trim();
        if (str.length() == 0) {
            // [JACKSON-360]
            return null;
        }
        // Take TimeZone portion from str
        return new DateTime(str, DateTimeZone.UTC);
    }
    throw ctxt.mappingException(handledType());
}

23. FilterHintListJsonDeserializer#deserialize()

View license
@Override
public FilterHint deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
    if (!jp.getCurrentToken().isStructStart()) {
        throw ctxt.mappingException(RpcHint.class, jp.getCurrentToken());
    }
    // skip json start
    final JsonToken jsonToken = jp.nextToken();
    if (jsonToken == JsonToken.END_OBJECT) {
        return new FilterHint(Collections.<RpcHint>emptyList());
    }
    List<RpcHint> rpcHintList = new ArrayList<>();
    while (true) {
        final RpcHint rpcHint = jp.readValueAs(RpcHint.class);
        rpcHintList.add(rpcHint);
        if (jp.nextToken() == JsonToken.END_OBJECT) {
            break;
        }
    }
    return new FilterHint(rpcHintList);
}

24. RpcHintJsonDeserializer#deserialize()

View license
@Override
public RpcHint deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
    final String applicationName = jp.getText();
    if (jp.nextToken() != JsonToken.START_ARRAY) {
        throw ctxt.mappingException(RpcHint.class, jp.getCurrentToken());
    }
    // skip start array
    final JsonToken token = jp.nextToken();
    // [] empty array
    if (token == JsonToken.END_ARRAY) {
        return new RpcHint(applicationName, Collections.<RpcType>emptyList());
    }
    final List<RpcType> rpcHintList = new ArrayList<>();
    while (true) {
        RpcType rpcType = jp.readValueAs(RpcType.class);
        rpcHintList.add(rpcType);
        if (jp.nextToken() == JsonToken.END_ARRAY) {
            break;
        }
    }
    return new RpcHint(applicationName, rpcHintList);
}

25. JsonInput#readBool()

Project: protostuff
Source File: JsonInput.java
View license
@Override
public boolean readBool() throws IOException {
    final JsonToken jt = parser.getCurrentToken();
    if (lastRepeated && parser.nextToken() == END_ARRAY)
        lastRepeated = false;
    if (jt == VALUE_TRUE)
        return true;
    if (jt == VALUE_FALSE)
        return false;
    throw new JsonInputException("Expected token: true/false but was " + jt);
}

26. JsonBufferedArray#buildBuffered()

Project: RedReader
Source File: JsonBufferedArray.java
View license
@Override
protected void buildBuffered(final JsonParser jp) throws IOException {
    JsonToken jt;
    while ((jt = jp.nextToken()) != JsonToken.END_ARRAY) {
        final JsonValue value = new JsonValue(jp, jt);
        synchronized (this) {
            contents.add(value);
            items++;
            notifyAll();
        }
        value.buildInThisThread();
    }
}

27. JsonBufferedObject#buildBuffered()

Project: RedReader
Source File: JsonBufferedObject.java
View license
@Override
protected void buildBuffered(final JsonParser jp) throws IOException {
    JsonToken jt;
    while ((jt = jp.nextToken()) != JsonToken.END_OBJECT) {
        if (jt != JsonToken.FIELD_NAME)
            throw new JsonParseException("Expecting field name, got " + jt.name(), jp.getCurrentLocation());
        final String fieldName = jp.getCurrentName();
        final JsonValue value = new JsonValue(jp);
        synchronized (this) {
            properties.put(fieldName, value);
            notifyAll();
        }
        value.buildInThisThread();
    }
}

28. GeoJsonTileDecoder#parseProperties()

Project: vtm
Source File: GeoJsonTileDecoder.java
View license
private void parseProperties(JsonParser jp) throws JsonParseException, IOException {
    for (JsonToken t; (t = jp.nextToken()) != null; ) {
        if (t == FIELD_NAME) {
            String text = jp.getCurrentName();
            t = jp.nextToken();
            if (t == VALUE_STRING) {
                mTagMap.put(text, jp.getText());
            } else if (t == VALUE_NUMBER_INT) {
                mTagMap.put(text, jp.getNumberValue());
            }
            continue;
        }
        if (t == END_OBJECT)
            break;
    }
}

29. GeoJsonTileDecoder#parseMulti()

Project: vtm
Source File: GeoJsonTileDecoder.java
View license
private void parseMulti(JsonParser jp, GeometryType type) throws JsonParseException, IOException {
    for (JsonToken t; (t = jp.nextToken()) != null; ) {
        if (t == END_ARRAY)
            break;
        if (t == START_ARRAY) {
            if (type == GeometryType.POLY)
                parsePolygon(jp);
            else if (type == GeometryType.LINE)
                parseLineString(jp);
            else if (type == GeometryType.POINT)
                parseCoordinate(jp);
            ;
        } else {
        //....
        }
    }
}

30. GeoJsonTileDecoder#parsePolygon()

Project: vtm
Source File: GeoJsonTileDecoder.java
View license
private void parsePolygon(JsonParser jp) throws JsonParseException, IOException {
    int ring = 0;
    for (JsonToken t; (t = jp.nextToken()) != null; ) {
        if (t == START_ARRAY) {
            if (ring == 0)
                mMapElement.startPolygon();
            else
                mMapElement.startHole();
            ring++;
            parseCoordSequence(jp);
            removeLastPoint();
            continue;
        }
        if (t == END_ARRAY)
            break;
    }
}

31. GeoJsonTileDecoder#parseCoordSequence()

Project: vtm
Source File: GeoJsonTileDecoder.java
View license
private void parseCoordSequence(JsonParser jp) throws JsonParseException, IOException {
    for (JsonToken t; (t = jp.nextToken()) != null; ) {
        if (t == START_ARRAY) {
            parseCoordinate(jp);
            continue;
        }
        if (t == END_ARRAY)
            break;
    }
}

32. OpenRtbJsonUtils#peekStructStart()

Project: openrtb
Source File: OpenRtbJsonUtils.java
View license
/**
   * Skips a field name if necessary, returning the current token then, which must be
   * the start of an Array or Object: '{' or '['.
   */
public static JsonToken peekStructStart(JsonParser par) throws IOException {
    JsonToken token = peekToken(par);
    if (token.isStructStart()) {
        return token;
    } else {
        throw new JsonParseException("Expected start of array or object", par.getCurrentLocation());
    }
}

33. JsonUtils#fromReader()

Project: Web-Karma
Source File: JsonUtils.java
View license
/**
     * Parses a JSON-LD document from the given {@link Reader} to an object that
     * can be used as input for the {@link JsonLdApi} and
     * {@link JsonLdProcessor} methods.
     *
     * @param reader
     *            The JSON-LD document in a Reader.
     * @return A JSON Object.
     * @throws JsonParseException
     *             If there was a JSON related error during parsing.
     * @throws IOException
     *             If there was an IO error during parsing.
     */
public static Object fromReader(Reader reader) throws IOException {
    final JsonParser jp = JSON_FACTORY.createParser(reader);
    Object rval;
    final JsonToken initialToken = jp.nextToken();
    if (initialToken == JsonToken.START_ARRAY) {
        rval = jp.readValueAs(List.class);
    } else if (initialToken == JsonToken.START_OBJECT) {
        rval = jp.readValueAs(Map.class);
    } else if (initialToken == JsonToken.VALUE_STRING) {
        rval = jp.readValueAs(String.class);
    } else if (initialToken == JsonToken.VALUE_FALSE || initialToken == JsonToken.VALUE_TRUE) {
        rval = jp.readValueAs(Boolean.class);
    } else if (initialToken == JsonToken.VALUE_NUMBER_FLOAT || initialToken == JsonToken.VALUE_NUMBER_INT) {
        rval = jp.readValueAs(Number.class);
    } else if (initialToken == JsonToken.VALUE_NULL) {
        rval = null;
    } else {
        throw new JsonParseException("document doesn't start with a valid json element : " + initialToken, jp.getCurrentLocation());
    }
    JsonToken t;
    try {
        t = jp.nextToken();
    } catch (JsonParseException ex) {
        throw new JsonParseException("Document contains more content after json-ld element - (possible mismatched {}?)", jp.getCurrentLocation());
    }
    if (t != null)
        throw new JsonParseException("Document contains possible json content after the json-ld element - (possible mismatched {}?)", jp.getCurrentLocation());
    return rval;
}

34. JsonUtils#fromReader()

Project: jsonld-java
Source File: JsonUtils.java
View license
/**
     * Parses a JSON-LD document from the given {@link Reader} to an object that
     * can be used as input for the {@link JsonLdApi} and
     * {@link JsonLdProcessor} methods.
     *
     * @param reader
     *            The JSON-LD document in a Reader.
     * @return A JSON Object.
     * @throws JsonParseException
     *             If there was a JSON related error during parsing.
     * @throws IOException
     *             If there was an IO error during parsing.
     */
public static Object fromReader(Reader reader) throws IOException {
    final JsonParser jp = JSON_FACTORY.createParser(reader);
    Object rval;
    final JsonToken initialToken = jp.nextToken();
    if (initialToken == JsonToken.START_ARRAY) {
        rval = jp.readValueAs(List.class);
    } else if (initialToken == JsonToken.START_OBJECT) {
        rval = jp.readValueAs(Map.class);
    } else if (initialToken == JsonToken.VALUE_STRING) {
        rval = jp.readValueAs(String.class);
    } else if (initialToken == JsonToken.VALUE_FALSE || initialToken == JsonToken.VALUE_TRUE) {
        rval = jp.readValueAs(Boolean.class);
    } else if (initialToken == JsonToken.VALUE_NUMBER_FLOAT || initialToken == JsonToken.VALUE_NUMBER_INT) {
        rval = jp.readValueAs(Number.class);
    } else if (initialToken == JsonToken.VALUE_NULL) {
        rval = null;
    } else {
        throw new JsonParseException("document doesn't start with a valid json element : " + initialToken, jp.getCurrentLocation());
    }
    JsonToken t;
    try {
        t = jp.nextToken();
    } catch (JsonParseException ex) {
        throw new JsonParseException("Document contains more content after json-ld element - (possible mismatched {}?)", jp.getCurrentLocation());
    }
    if (t != null)
        throw new JsonParseException("Document contains possible json content after the json-ld element - (possible mismatched {}?)", jp.getCurrentLocation());
    return rval;
}

35. ListIPSetsResultJsonUnmarshaller#unmarshall()

View license
public ListIPSetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListIPSetsResult listIPSetsResult = new ListIPSetsResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listIPSetsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("IPSets", targetDepth)) {
                context.nextToken();
                listIPSetsResult.setIPSets(new ListUnmarshaller<IPSetSummary>(IPSetSummaryJsonUnmarshaller.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 listIPSetsResult;
}

36. ListIPSetsResultJsonUnmarshaller#unmarshall()

View license
public ListIPSetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListIPSetsResult listIPSetsResult = new ListIPSetsResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listIPSetsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("IPSets", targetDepth)) {
                context.nextToken();
                listIPSetsResult.setIPSets(new ListUnmarshaller<IPSetSummary>(IPSetSummaryJsonUnmarshaller.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 listIPSetsResult;
}

37. ListRulesResultJsonUnmarshaller#unmarshall()

View license
public ListRulesResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListRulesResult listRulesResult = new ListRulesResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listRulesResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Rules", targetDepth)) {
                context.nextToken();
                listRulesResult.setRules(new ListUnmarshaller<RuleSummary>(RuleSummaryJsonUnmarshaller.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 listRulesResult;
}

38. ListRulesResultJsonUnmarshaller#unmarshall()

View license
public ListRulesResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListRulesResult listRulesResult = new ListRulesResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listRulesResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Rules", targetDepth)) {
                context.nextToken();
                listRulesResult.setRules(new ListUnmarshaller<RuleSummary>(RuleSummaryJsonUnmarshaller.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 listRulesResult;
}

39. ListSizeConstraintSetsResultJsonUnmarshaller#unmarshall()

View license
public ListSizeConstraintSetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListSizeConstraintSetsResult listSizeConstraintSetsResult = new ListSizeConstraintSetsResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listSizeConstraintSetsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SizeConstraintSets", targetDepth)) {
                context.nextToken();
                listSizeConstraintSetsResult.setSizeConstraintSets(new ListUnmarshaller<SizeConstraintSetSummary>(SizeConstraintSetSummaryJsonUnmarshaller.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 listSizeConstraintSetsResult;
}

40. ListSizeConstraintSetsResultJsonUnmarshaller#unmarshall()

View license
public ListSizeConstraintSetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListSizeConstraintSetsResult listSizeConstraintSetsResult = new ListSizeConstraintSetsResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listSizeConstraintSetsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SizeConstraintSets", targetDepth)) {
                context.nextToken();
                listSizeConstraintSetsResult.setSizeConstraintSets(new ListUnmarshaller<SizeConstraintSetSummary>(SizeConstraintSetSummaryJsonUnmarshaller.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 listSizeConstraintSetsResult;
}

41. ListSqlInjectionMatchSetsResultJsonUnmarshaller#unmarshall()

View license
public ListSqlInjectionMatchSetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListSqlInjectionMatchSetsResult listSqlInjectionMatchSetsResult = new ListSqlInjectionMatchSetsResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listSqlInjectionMatchSetsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SqlInjectionMatchSets", targetDepth)) {
                context.nextToken();
                listSqlInjectionMatchSetsResult.setSqlInjectionMatchSets(new ListUnmarshaller<SqlInjectionMatchSetSummary>(SqlInjectionMatchSetSummaryJsonUnmarshaller.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 listSqlInjectionMatchSetsResult;
}

42. ListSqlInjectionMatchSetsResultJsonUnmarshaller#unmarshall()

View license
public ListSqlInjectionMatchSetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListSqlInjectionMatchSetsResult listSqlInjectionMatchSetsResult = new ListSqlInjectionMatchSetsResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listSqlInjectionMatchSetsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SqlInjectionMatchSets", targetDepth)) {
                context.nextToken();
                listSqlInjectionMatchSetsResult.setSqlInjectionMatchSets(new ListUnmarshaller<SqlInjectionMatchSetSummary>(SqlInjectionMatchSetSummaryJsonUnmarshaller.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 listSqlInjectionMatchSetsResult;
}

43. ListWebACLsResultJsonUnmarshaller#unmarshall()

View license
public ListWebACLsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListWebACLsResult listWebACLsResult = new ListWebACLsResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listWebACLsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("WebACLs", targetDepth)) {
                context.nextToken();
                listWebACLsResult.setWebACLs(new ListUnmarshaller<WebACLSummary>(WebACLSummaryJsonUnmarshaller.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 listWebACLsResult;
}

44. ListWebACLsResultJsonUnmarshaller#unmarshall()

View license
public ListWebACLsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListWebACLsResult listWebACLsResult = new ListWebACLsResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listWebACLsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("WebACLs", targetDepth)) {
                context.nextToken();
                listWebACLsResult.setWebACLs(new ListUnmarshaller<WebACLSummary>(WebACLSummaryJsonUnmarshaller.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 listWebACLsResult;
}

45. ListXssMatchSetsResultJsonUnmarshaller#unmarshall()

View license
public ListXssMatchSetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListXssMatchSetsResult listXssMatchSetsResult = new ListXssMatchSetsResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listXssMatchSetsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("XssMatchSets", targetDepth)) {
                context.nextToken();
                listXssMatchSetsResult.setXssMatchSets(new ListUnmarshaller<XssMatchSetSummary>(XssMatchSetSummaryJsonUnmarshaller.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 listXssMatchSetsResult;
}

46. ListXssMatchSetsResultJsonUnmarshaller#unmarshall()

View license
public ListXssMatchSetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListXssMatchSetsResult listXssMatchSetsResult = new ListXssMatchSetsResult();
    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("NextMarker", targetDepth)) {
                context.nextToken();
                listXssMatchSetsResult.setNextMarker(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("XssMatchSets", targetDepth)) {
                context.nextToken();
                listXssMatchSetsResult.setXssMatchSets(new ListUnmarshaller<XssMatchSetSummary>(XssMatchSetSummaryJsonUnmarshaller.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 listXssMatchSetsResult;
}

47. PredicateJsonUnmarshaller#unmarshall()

View license
public Predicate unmarshall(JsonUnmarshallerContext context) throws Exception {
    Predicate predicate = new Predicate();
    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("Negated", targetDepth)) {
                context.nextToken();
                predicate.setNegated(context.getUnmarshaller(Boolean.class).unmarshall(context));
            }
            if (context.testExpression("Type", targetDepth)) {
                context.nextToken();
                predicate.setType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("DataId", targetDepth)) {
                context.nextToken();
                predicate.setDataId(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 predicate;
}

48. PredicateJsonUnmarshaller#unmarshall()

View license
public Predicate unmarshall(JsonUnmarshallerContext context) throws Exception {
    Predicate predicate = new Predicate();
    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("Negated", targetDepth)) {
                context.nextToken();
                predicate.setNegated(context.getUnmarshaller(Boolean.class).unmarshall(context));
            }
            if (context.testExpression("Type", targetDepth)) {
                context.nextToken();
                predicate.setType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("DataId", targetDepth)) {
                context.nextToken();
                predicate.setDataId(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 predicate;
}

49. RuleJsonUnmarshaller#unmarshall()

View license
public Rule unmarshall(JsonUnmarshallerContext context) throws Exception {
    Rule rule = new Rule();
    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("RuleId", targetDepth)) {
                context.nextToken();
                rule.setRuleId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                rule.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("MetricName", targetDepth)) {
                context.nextToken();
                rule.setMetricName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Predicates", targetDepth)) {
                context.nextToken();
                rule.setPredicates(new ListUnmarshaller<Predicate>(PredicateJsonUnmarshaller.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 rule;
}

50. RuleJsonUnmarshaller#unmarshall()

View license
public Rule unmarshall(JsonUnmarshallerContext context) throws Exception {
    Rule rule = new Rule();
    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("RuleId", targetDepth)) {
                context.nextToken();
                rule.setRuleId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                rule.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("MetricName", targetDepth)) {
                context.nextToken();
                rule.setMetricName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Predicates", targetDepth)) {
                context.nextToken();
                rule.setPredicates(new ListUnmarshaller<Predicate>(PredicateJsonUnmarshaller.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 rule;
}

51. RuleSummaryJsonUnmarshaller#unmarshall()

View license
public RuleSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    RuleSummary ruleSummary = new RuleSummary();
    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("RuleId", targetDepth)) {
                context.nextToken();
                ruleSummary.setRuleId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                ruleSummary.setName(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 ruleSummary;
}

52. RuleSummaryJsonUnmarshaller#unmarshall()

View license
public RuleSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    RuleSummary ruleSummary = new RuleSummary();
    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("RuleId", targetDepth)) {
                context.nextToken();
                ruleSummary.setRuleId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                ruleSummary.setName(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 ruleSummary;
}

53. RuleUpdateJsonUnmarshaller#unmarshall()

View license
public RuleUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {
    RuleUpdate ruleUpdate = new RuleUpdate();
    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("Action", targetDepth)) {
                context.nextToken();
                ruleUpdate.setAction(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Predicate", targetDepth)) {
                context.nextToken();
                ruleUpdate.setPredicate(PredicateJsonUnmarshaller.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 ruleUpdate;
}

54. RuleUpdateJsonUnmarshaller#unmarshall()

View license
public RuleUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {
    RuleUpdate ruleUpdate = new RuleUpdate();
    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("Action", targetDepth)) {
                context.nextToken();
                ruleUpdate.setAction(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Predicate", targetDepth)) {
                context.nextToken();
                ruleUpdate.setPredicate(PredicateJsonUnmarshaller.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 ruleUpdate;
}

55. SampledHTTPRequestJsonUnmarshaller#unmarshall()

View license
public SampledHTTPRequest unmarshall(JsonUnmarshallerContext context) throws Exception {
    SampledHTTPRequest sampledHTTPRequest = new SampledHTTPRequest();
    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("Request", targetDepth)) {
                context.nextToken();
                sampledHTTPRequest.setRequest(HTTPRequestJsonUnmarshaller.getInstance().unmarshall(context));
            }
            if (context.testExpression("Weight", targetDepth)) {
                context.nextToken();
                sampledHTTPRequest.setWeight(context.getUnmarshaller(Long.class).unmarshall(context));
            }
            if (context.testExpression("Timestamp", targetDepth)) {
                context.nextToken();
                sampledHTTPRequest.setTimestamp(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("Action", targetDepth)) {
                context.nextToken();
                sampledHTTPRequest.setAction(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 sampledHTTPRequest;
}

56. SampledHTTPRequestJsonUnmarshaller#unmarshall()

View license
public SampledHTTPRequest unmarshall(JsonUnmarshallerContext context) throws Exception {
    SampledHTTPRequest sampledHTTPRequest = new SampledHTTPRequest();
    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("Request", targetDepth)) {
                context.nextToken();
                sampledHTTPRequest.setRequest(HTTPRequestJsonUnmarshaller.getInstance().unmarshall(context));
            }
            if (context.testExpression("Weight", targetDepth)) {
                context.nextToken();
                sampledHTTPRequest.setWeight(context.getUnmarshaller(Long.class).unmarshall(context));
            }
            if (context.testExpression("Timestamp", targetDepth)) {
                context.nextToken();
                sampledHTTPRequest.setTimestamp(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("Action", targetDepth)) {
                context.nextToken();
                sampledHTTPRequest.setAction(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 sampledHTTPRequest;
}

57. SizeConstraintJsonUnmarshaller#unmarshall()

View license
public SizeConstraint unmarshall(JsonUnmarshallerContext context) throws Exception {
    SizeConstraint sizeConstraint = new SizeConstraint();
    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("FieldToMatch", targetDepth)) {
                context.nextToken();
                sizeConstraint.setFieldToMatch(FieldToMatchJsonUnmarshaller.getInstance().unmarshall(context));
            }
            if (context.testExpression("TextTransformation", targetDepth)) {
                context.nextToken();
                sizeConstraint.setTextTransformation(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("ComparisonOperator", targetDepth)) {
                context.nextToken();
                sizeConstraint.setComparisonOperator(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Size", targetDepth)) {
                context.nextToken();
                sizeConstraint.setSize(context.getUnmarshaller(Long.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 sizeConstraint;
}

58. SizeConstraintJsonUnmarshaller#unmarshall()

View license
public SizeConstraint unmarshall(JsonUnmarshallerContext context) throws Exception {
    SizeConstraint sizeConstraint = new SizeConstraint();
    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("FieldToMatch", targetDepth)) {
                context.nextToken();
                sizeConstraint.setFieldToMatch(FieldToMatchJsonUnmarshaller.getInstance().unmarshall(context));
            }
            if (context.testExpression("TextTransformation", targetDepth)) {
                context.nextToken();
                sizeConstraint.setTextTransformation(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("ComparisonOperator", targetDepth)) {
                context.nextToken();
                sizeConstraint.setComparisonOperator(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Size", targetDepth)) {
                context.nextToken();
                sizeConstraint.setSize(context.getUnmarshaller(Long.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 sizeConstraint;
}

59. SizeConstraintSetJsonUnmarshaller#unmarshall()

View license
public SizeConstraintSet unmarshall(JsonUnmarshallerContext context) throws Exception {
    SizeConstraintSet sizeConstraintSet = new SizeConstraintSet();
    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("SizeConstraintSetId", targetDepth)) {
                context.nextToken();
                sizeConstraintSet.setSizeConstraintSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                sizeConstraintSet.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SizeConstraints", targetDepth)) {
                context.nextToken();
                sizeConstraintSet.setSizeConstraints(new ListUnmarshaller<SizeConstraint>(SizeConstraintJsonUnmarshaller.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 sizeConstraintSet;
}

60. SizeConstraintSetJsonUnmarshaller#unmarshall()

View license
public SizeConstraintSet unmarshall(JsonUnmarshallerContext context) throws Exception {
    SizeConstraintSet sizeConstraintSet = new SizeConstraintSet();
    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("SizeConstraintSetId", targetDepth)) {
                context.nextToken();
                sizeConstraintSet.setSizeConstraintSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                sizeConstraintSet.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SizeConstraints", targetDepth)) {
                context.nextToken();
                sizeConstraintSet.setSizeConstraints(new ListUnmarshaller<SizeConstraint>(SizeConstraintJsonUnmarshaller.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 sizeConstraintSet;
}

61. SizeConstraintSetSummaryJsonUnmarshaller#unmarshall()

View license
public SizeConstraintSetSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    SizeConstraintSetSummary sizeConstraintSetSummary = new SizeConstraintSetSummary();
    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("SizeConstraintSetId", targetDepth)) {
                context.nextToken();
                sizeConstraintSetSummary.setSizeConstraintSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                sizeConstraintSetSummary.setName(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 sizeConstraintSetSummary;
}

62. SizeConstraintSetSummaryJsonUnmarshaller#unmarshall()

View license
public SizeConstraintSetSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    SizeConstraintSetSummary sizeConstraintSetSummary = new SizeConstraintSetSummary();
    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("SizeConstraintSetId", targetDepth)) {
                context.nextToken();
                sizeConstraintSetSummary.setSizeConstraintSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                sizeConstraintSetSummary.setName(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 sizeConstraintSetSummary;
}

63. SizeConstraintSetUpdateJsonUnmarshaller#unmarshall()

View license
public SizeConstraintSetUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {
    SizeConstraintSetUpdate sizeConstraintSetUpdate = new SizeConstraintSetUpdate();
    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("Action", targetDepth)) {
                context.nextToken();
                sizeConstraintSetUpdate.setAction(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SizeConstraint", targetDepth)) {
                context.nextToken();
                sizeConstraintSetUpdate.setSizeConstraint(SizeConstraintJsonUnmarshaller.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 sizeConstraintSetUpdate;
}

64. SizeConstraintSetUpdateJsonUnmarshaller#unmarshall()

View license
public SizeConstraintSetUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {
    SizeConstraintSetUpdate sizeConstraintSetUpdate = new SizeConstraintSetUpdate();
    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("Action", targetDepth)) {
                context.nextToken();
                sizeConstraintSetUpdate.setAction(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SizeConstraint", targetDepth)) {
                context.nextToken();
                sizeConstraintSetUpdate.setSizeConstraint(SizeConstraintJsonUnmarshaller.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 sizeConstraintSetUpdate;
}

65. SqlInjectionMatchSetJsonUnmarshaller#unmarshall()

View license
public SqlInjectionMatchSet unmarshall(JsonUnmarshallerContext context) throws Exception {
    SqlInjectionMatchSet sqlInjectionMatchSet = new SqlInjectionMatchSet();
    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("SqlInjectionMatchSetId", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSet.setSqlInjectionMatchSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSet.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SqlInjectionMatchTuples", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSet.setSqlInjectionMatchTuples(new ListUnmarshaller<SqlInjectionMatchTuple>(SqlInjectionMatchTupleJsonUnmarshaller.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 sqlInjectionMatchSet;
}

66. SqlInjectionMatchSetJsonUnmarshaller#unmarshall()

View license
public SqlInjectionMatchSet unmarshall(JsonUnmarshallerContext context) throws Exception {
    SqlInjectionMatchSet sqlInjectionMatchSet = new SqlInjectionMatchSet();
    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("SqlInjectionMatchSetId", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSet.setSqlInjectionMatchSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSet.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SqlInjectionMatchTuples", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSet.setSqlInjectionMatchTuples(new ListUnmarshaller<SqlInjectionMatchTuple>(SqlInjectionMatchTupleJsonUnmarshaller.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 sqlInjectionMatchSet;
}

67. SqlInjectionMatchSetSummaryJsonUnmarshaller#unmarshall()

View license
public SqlInjectionMatchSetSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    SqlInjectionMatchSetSummary sqlInjectionMatchSetSummary = new SqlInjectionMatchSetSummary();
    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("SqlInjectionMatchSetId", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSetSummary.setSqlInjectionMatchSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSetSummary.setName(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 sqlInjectionMatchSetSummary;
}

68. SqlInjectionMatchSetSummaryJsonUnmarshaller#unmarshall()

View license
public SqlInjectionMatchSetSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    SqlInjectionMatchSetSummary sqlInjectionMatchSetSummary = new SqlInjectionMatchSetSummary();
    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("SqlInjectionMatchSetId", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSetSummary.setSqlInjectionMatchSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSetSummary.setName(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 sqlInjectionMatchSetSummary;
}

69. SqlInjectionMatchSetUpdateJsonUnmarshaller#unmarshall()

View license
public SqlInjectionMatchSetUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {
    SqlInjectionMatchSetUpdate sqlInjectionMatchSetUpdate = new SqlInjectionMatchSetUpdate();
    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("Action", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSetUpdate.setAction(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SqlInjectionMatchTuple", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSetUpdate.setSqlInjectionMatchTuple(SqlInjectionMatchTupleJsonUnmarshaller.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 sqlInjectionMatchSetUpdate;
}

70. SqlInjectionMatchSetUpdateJsonUnmarshaller#unmarshall()

View license
public SqlInjectionMatchSetUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {
    SqlInjectionMatchSetUpdate sqlInjectionMatchSetUpdate = new SqlInjectionMatchSetUpdate();
    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("Action", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSetUpdate.setAction(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SqlInjectionMatchTuple", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchSetUpdate.setSqlInjectionMatchTuple(SqlInjectionMatchTupleJsonUnmarshaller.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 sqlInjectionMatchSetUpdate;
}

71. SqlInjectionMatchTupleJsonUnmarshaller#unmarshall()

View license
public SqlInjectionMatchTuple unmarshall(JsonUnmarshallerContext context) throws Exception {
    SqlInjectionMatchTuple sqlInjectionMatchTuple = new SqlInjectionMatchTuple();
    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("FieldToMatch", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchTuple.setFieldToMatch(FieldToMatchJsonUnmarshaller.getInstance().unmarshall(context));
            }
            if (context.testExpression("TextTransformation", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchTuple.setTextTransformation(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 sqlInjectionMatchTuple;
}

72. SqlInjectionMatchTupleJsonUnmarshaller#unmarshall()

View license
public SqlInjectionMatchTuple unmarshall(JsonUnmarshallerContext context) throws Exception {
    SqlInjectionMatchTuple sqlInjectionMatchTuple = new SqlInjectionMatchTuple();
    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("FieldToMatch", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchTuple.setFieldToMatch(FieldToMatchJsonUnmarshaller.getInstance().unmarshall(context));
            }
            if (context.testExpression("TextTransformation", targetDepth)) {
                context.nextToken();
                sqlInjectionMatchTuple.setTextTransformation(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 sqlInjectionMatchTuple;
}

73. TimeWindowJsonUnmarshaller#unmarshall()

View license
public TimeWindow unmarshall(JsonUnmarshallerContext context) throws Exception {
    TimeWindow timeWindow = new TimeWindow();
    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("StartTime", targetDepth)) {
                context.nextToken();
                timeWindow.setStartTime(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("EndTime", targetDepth)) {
                context.nextToken();
                timeWindow.setEndTime(context.getUnmarshaller(java.util.Date.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 timeWindow;
}

74. TimeWindowJsonUnmarshaller#unmarshall()

View license
public TimeWindow unmarshall(JsonUnmarshallerContext context) throws Exception {
    TimeWindow timeWindow = new TimeWindow();
    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("StartTime", targetDepth)) {
                context.nextToken();
                timeWindow.setStartTime(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("EndTime", targetDepth)) {
                context.nextToken();
                timeWindow.setEndTime(context.getUnmarshaller(java.util.Date.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 timeWindow;
}

75. UpdateByteMatchSetResultJsonUnmarshaller#unmarshall()

View license
public UpdateByteMatchSetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateByteMatchSetResult updateByteMatchSetResult = new UpdateByteMatchSetResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateByteMatchSetResult.setChangeToken(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 updateByteMatchSetResult;
}

76. UpdateByteMatchSetResultJsonUnmarshaller#unmarshall()

View license
public UpdateByteMatchSetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateByteMatchSetResult updateByteMatchSetResult = new UpdateByteMatchSetResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateByteMatchSetResult.setChangeToken(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 updateByteMatchSetResult;
}

77. UpdateIPSetResultJsonUnmarshaller#unmarshall()

View license
public UpdateIPSetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateIPSetResult updateIPSetResult = new UpdateIPSetResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateIPSetResult.setChangeToken(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 updateIPSetResult;
}

78. UpdateIPSetResultJsonUnmarshaller#unmarshall()

View license
public UpdateIPSetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateIPSetResult updateIPSetResult = new UpdateIPSetResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateIPSetResult.setChangeToken(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 updateIPSetResult;
}

79. UpdateRuleResultJsonUnmarshaller#unmarshall()

View license
public UpdateRuleResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateRuleResult updateRuleResult = new UpdateRuleResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateRuleResult.setChangeToken(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 updateRuleResult;
}

80. UpdateRuleResultJsonUnmarshaller#unmarshall()

View license
public UpdateRuleResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateRuleResult updateRuleResult = new UpdateRuleResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateRuleResult.setChangeToken(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 updateRuleResult;
}

81. UpdateSizeConstraintSetResultJsonUnmarshaller#unmarshall()

View license
public UpdateSizeConstraintSetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateSizeConstraintSetResult updateSizeConstraintSetResult = new UpdateSizeConstraintSetResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateSizeConstraintSetResult.setChangeToken(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 updateSizeConstraintSetResult;
}

82. UpdateSizeConstraintSetResultJsonUnmarshaller#unmarshall()

View license
public UpdateSizeConstraintSetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateSizeConstraintSetResult updateSizeConstraintSetResult = new UpdateSizeConstraintSetResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateSizeConstraintSetResult.setChangeToken(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 updateSizeConstraintSetResult;
}

83. UpdateSqlInjectionMatchSetResultJsonUnmarshaller#unmarshall()

View license
public UpdateSqlInjectionMatchSetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateSqlInjectionMatchSetResult updateSqlInjectionMatchSetResult = new UpdateSqlInjectionMatchSetResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateSqlInjectionMatchSetResult.setChangeToken(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 updateSqlInjectionMatchSetResult;
}

84. UpdateSqlInjectionMatchSetResultJsonUnmarshaller#unmarshall()

View license
public UpdateSqlInjectionMatchSetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateSqlInjectionMatchSetResult updateSqlInjectionMatchSetResult = new UpdateSqlInjectionMatchSetResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateSqlInjectionMatchSetResult.setChangeToken(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 updateSqlInjectionMatchSetResult;
}

85. UpdateWebACLResultJsonUnmarshaller#unmarshall()

View license
public UpdateWebACLResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateWebACLResult updateWebACLResult = new UpdateWebACLResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateWebACLResult.setChangeToken(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 updateWebACLResult;
}

86. UpdateWebACLResultJsonUnmarshaller#unmarshall()

View license
public UpdateWebACLResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateWebACLResult updateWebACLResult = new UpdateWebACLResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateWebACLResult.setChangeToken(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 updateWebACLResult;
}

87. UpdateXssMatchSetResultJsonUnmarshaller#unmarshall()

View license
public UpdateXssMatchSetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateXssMatchSetResult updateXssMatchSetResult = new UpdateXssMatchSetResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateXssMatchSetResult.setChangeToken(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 updateXssMatchSetResult;
}

88. UpdateXssMatchSetResultJsonUnmarshaller#unmarshall()

View license
public UpdateXssMatchSetResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    UpdateXssMatchSetResult updateXssMatchSetResult = new UpdateXssMatchSetResult();
    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("ChangeToken", targetDepth)) {
                context.nextToken();
                updateXssMatchSetResult.setChangeToken(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 updateXssMatchSetResult;
}

89. WafActionJsonUnmarshaller#unmarshall()

View license
public WafAction unmarshall(JsonUnmarshallerContext context) throws Exception {
    WafAction wafAction = new WafAction();
    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("Type", targetDepth)) {
                context.nextToken();
                wafAction.setType(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 wafAction;
}

90. WafActionJsonUnmarshaller#unmarshall()

View license
public WafAction unmarshall(JsonUnmarshallerContext context) throws Exception {
    WafAction wafAction = new WafAction();
    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("Type", targetDepth)) {
                context.nextToken();
                wafAction.setType(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 wafAction;
}

91. WebACLJsonUnmarshaller#unmarshall()

View license
public WebACL unmarshall(JsonUnmarshallerContext context) throws Exception {
    WebACL webACL = new WebACL();
    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("WebACLId", targetDepth)) {
                context.nextToken();
                webACL.setWebACLId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                webACL.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("MetricName", targetDepth)) {
                context.nextToken();
                webACL.setMetricName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("DefaultAction", targetDepth)) {
                context.nextToken();
                webACL.setDefaultAction(WafActionJsonUnmarshaller.getInstance().unmarshall(context));
            }
            if (context.testExpression("Rules", targetDepth)) {
                context.nextToken();
                webACL.setRules(new ListUnmarshaller<ActivatedRule>(ActivatedRuleJsonUnmarshaller.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 webACL;
}

92. WebACLJsonUnmarshaller#unmarshall()

View license
public WebACL unmarshall(JsonUnmarshallerContext context) throws Exception {
    WebACL webACL = new WebACL();
    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("WebACLId", targetDepth)) {
                context.nextToken();
                webACL.setWebACLId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                webACL.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("MetricName", targetDepth)) {
                context.nextToken();
                webACL.setMetricName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("DefaultAction", targetDepth)) {
                context.nextToken();
                webACL.setDefaultAction(WafActionJsonUnmarshaller.getInstance().unmarshall(context));
            }
            if (context.testExpression("Rules", targetDepth)) {
                context.nextToken();
                webACL.setRules(new ListUnmarshaller<ActivatedRule>(ActivatedRuleJsonUnmarshaller.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 webACL;
}

93. WebACLSummaryJsonUnmarshaller#unmarshall()

View license
public WebACLSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    WebACLSummary webACLSummary = new WebACLSummary();
    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("WebACLId", targetDepth)) {
                context.nextToken();
                webACLSummary.setWebACLId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                webACLSummary.setName(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 webACLSummary;
}

94. WebACLSummaryJsonUnmarshaller#unmarshall()

View license
public WebACLSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    WebACLSummary webACLSummary = new WebACLSummary();
    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("WebACLId", targetDepth)) {
                context.nextToken();
                webACLSummary.setWebACLId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                webACLSummary.setName(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 webACLSummary;
}

95. WebACLUpdateJsonUnmarshaller#unmarshall()

View license
public WebACLUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {
    WebACLUpdate webACLUpdate = new WebACLUpdate();
    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("Action", targetDepth)) {
                context.nextToken();
                webACLUpdate.setAction(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("ActivatedRule", targetDepth)) {
                context.nextToken();
                webACLUpdate.setActivatedRule(ActivatedRuleJsonUnmarshaller.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 webACLUpdate;
}

96. WebACLUpdateJsonUnmarshaller#unmarshall()

View license
public WebACLUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {
    WebACLUpdate webACLUpdate = new WebACLUpdate();
    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("Action", targetDepth)) {
                context.nextToken();
                webACLUpdate.setAction(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("ActivatedRule", targetDepth)) {
                context.nextToken();
                webACLUpdate.setActivatedRule(ActivatedRuleJsonUnmarshaller.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 webACLUpdate;
}

97. XssMatchSetJsonUnmarshaller#unmarshall()

View license
public XssMatchSet unmarshall(JsonUnmarshallerContext context) throws Exception {
    XssMatchSet xssMatchSet = new XssMatchSet();
    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("XssMatchSetId", targetDepth)) {
                context.nextToken();
                xssMatchSet.setXssMatchSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                xssMatchSet.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("XssMatchTuples", targetDepth)) {
                context.nextToken();
                xssMatchSet.setXssMatchTuples(new ListUnmarshaller<XssMatchTuple>(XssMatchTupleJsonUnmarshaller.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 xssMatchSet;
}

98. XssMatchSetJsonUnmarshaller#unmarshall()

View license
public XssMatchSet unmarshall(JsonUnmarshallerContext context) throws Exception {
    XssMatchSet xssMatchSet = new XssMatchSet();
    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("XssMatchSetId", targetDepth)) {
                context.nextToken();
                xssMatchSet.setXssMatchSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                xssMatchSet.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("XssMatchTuples", targetDepth)) {
                context.nextToken();
                xssMatchSet.setXssMatchTuples(new ListUnmarshaller<XssMatchTuple>(XssMatchTupleJsonUnmarshaller.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 xssMatchSet;
}

99. XssMatchSetSummaryJsonUnmarshaller#unmarshall()

View license
public XssMatchSetSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    XssMatchSetSummary xssMatchSetSummary = new XssMatchSetSummary();
    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("XssMatchSetId", targetDepth)) {
                context.nextToken();
                xssMatchSetSummary.setXssMatchSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                xssMatchSetSummary.setName(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 xssMatchSetSummary;
}

100. XssMatchSetSummaryJsonUnmarshaller#unmarshall()

View license
public XssMatchSetSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    XssMatchSetSummary xssMatchSetSummary = new XssMatchSetSummary();
    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("XssMatchSetId", targetDepth)) {
                context.nextToken();
                xssMatchSetSummary.setXssMatchSetId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Name", targetDepth)) {
                context.nextToken();
                xssMatchSetSummary.setName(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 xssMatchSetSummary;
}