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. 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());
        }
    }
}

2. 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>>() {
    });
}

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. JsonUtils#fromReader()

Project: jsonld-java
Source File: JsonUtils.java
View license
/**
     * Parses a JSON-LD document from the given [email protected] Reader} to an object that
     * can be used as input for the [email protected] JsonLdApi} and
     * [email protected] 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;
}

33. 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());
    }
}

34. JsonUtils#fromReader()

Project: Web-Karma
Source File: JsonUtils.java
View license
/**
     * Parses a JSON-LD document from the given [email protected] Reader} to an object that
     * can be used as input for the [email protected] JsonLdApi} and
     * [email protected] 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. AbstractJsonReader#nextToken()

Project: apiman
Source File: AbstractJsonReader.java
View license
protected JsonToken nextToken() throws JsonParseException, IOException {
    JsonToken token = jsonParser().nextToken();
    return token;
}

36. JsonDataMigratorReader#readArrayStart()

Project: apiman
Source File: JsonDataMigratorReader.java
View license
private void readArrayStart() throws IOException, JsonParseException {
    JsonToken token = jp.getCurrentToken();
    if (token != JsonToken.START_ARRAY) {
        //$NON-NLS-1$
        throw new IOException("Unexpected token (array start expected).");
    }
    jp.nextToken();
}

37. CertificateDetailJsonUnmarshaller#unmarshall()

View license
public CertificateDetail unmarshall(JsonUnmarshallerContext context) throws Exception {
    CertificateDetail certificateDetail = new CertificateDetail();
    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("CertificateArn", targetDepth)) {
                context.nextToken();
                certificateDetail.setCertificateArn(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("DomainName", targetDepth)) {
                context.nextToken();
                certificateDetail.setDomainName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SubjectAlternativeNames", targetDepth)) {
                context.nextToken();
                certificateDetail.setSubjectAlternativeNames(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("DomainValidationOptions", targetDepth)) {
                context.nextToken();
                certificateDetail.setDomainValidationOptions(new ListUnmarshaller<DomainValidation>(DomainValidationJsonUnmarshaller.getInstance()).unmarshall(context));
            }
            if (context.testExpression("Serial", targetDepth)) {
                context.nextToken();
                certificateDetail.setSerial(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Subject", targetDepth)) {
                context.nextToken();
                certificateDetail.setSubject(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Issuer", targetDepth)) {
                context.nextToken();
                certificateDetail.setIssuer(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("CreatedAt", targetDepth)) {
                context.nextToken();
                certificateDetail.setCreatedAt(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("IssuedAt", targetDepth)) {
                context.nextToken();
                certificateDetail.setIssuedAt(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("Status", targetDepth)) {
                context.nextToken();
                certificateDetail.setStatus(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("RevokedAt", targetDepth)) {
                context.nextToken();
                certificateDetail.setRevokedAt(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("RevocationReason", targetDepth)) {
                context.nextToken();
                certificateDetail.setRevocationReason(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("NotBefore", targetDepth)) {
                context.nextToken();
                certificateDetail.setNotBefore(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("NotAfter", targetDepth)) {
                context.nextToken();
                certificateDetail.setNotAfter(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("KeyAlgorithm", targetDepth)) {
                context.nextToken();
                certificateDetail.setKeyAlgorithm(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SignatureAlgorithm", targetDepth)) {
                context.nextToken();
                certificateDetail.setSignatureAlgorithm(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("InUseBy", targetDepth)) {
                context.nextToken();
                certificateDetail.setInUseBy(new ListUnmarshaller<String>(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 certificateDetail;
}

38. CertificateDetailJsonUnmarshaller#unmarshall()

View license
public CertificateDetail unmarshall(JsonUnmarshallerContext context) throws Exception {
    CertificateDetail certificateDetail = new CertificateDetail();
    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("CertificateArn", targetDepth)) {
                context.nextToken();
                certificateDetail.setCertificateArn(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("DomainName", targetDepth)) {
                context.nextToken();
                certificateDetail.setDomainName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SubjectAlternativeNames", targetDepth)) {
                context.nextToken();
                certificateDetail.setSubjectAlternativeNames(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("DomainValidationOptions", targetDepth)) {
                context.nextToken();
                certificateDetail.setDomainValidationOptions(new ListUnmarshaller<DomainValidation>(DomainValidationJsonUnmarshaller.getInstance()).unmarshall(context));
            }
            if (context.testExpression("Serial", targetDepth)) {
                context.nextToken();
                certificateDetail.setSerial(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Subject", targetDepth)) {
                context.nextToken();
                certificateDetail.setSubject(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Issuer", targetDepth)) {
                context.nextToken();
                certificateDetail.setIssuer(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("CreatedAt", targetDepth)) {
                context.nextToken();
                certificateDetail.setCreatedAt(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("IssuedAt", targetDepth)) {
                context.nextToken();
                certificateDetail.setIssuedAt(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("Status", targetDepth)) {
                context.nextToken();
                certificateDetail.setStatus(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("RevokedAt", targetDepth)) {
                context.nextToken();
                certificateDetail.setRevokedAt(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("RevocationReason", targetDepth)) {
                context.nextToken();
                certificateDetail.setRevocationReason(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("NotBefore", targetDepth)) {
                context.nextToken();
                certificateDetail.setNotBefore(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("NotAfter", targetDepth)) {
                context.nextToken();
                certificateDetail.setNotAfter(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("KeyAlgorithm", targetDepth)) {
                context.nextToken();
                certificateDetail.setKeyAlgorithm(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("SignatureAlgorithm", targetDepth)) {
                context.nextToken();
                certificateDetail.setSignatureAlgorithm(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("InUseBy", targetDepth)) {
                context.nextToken();
                certificateDetail.setInUseBy(new ListUnmarshaller<String>(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 certificateDetail;
}

39. CertificateSummaryJsonUnmarshaller#unmarshall()

View license
public CertificateSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    CertificateSummary certificateSummary = new CertificateSummary();
    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("CertificateArn", targetDepth)) {
                context.nextToken();
                certificateSummary.setCertificateArn(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("DomainName", targetDepth)) {
                context.nextToken();
                certificateSummary.setDomainName(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 certificateSummary;
}

40. CertificateSummaryJsonUnmarshaller#unmarshall()

View license
public CertificateSummary unmarshall(JsonUnmarshallerContext context) throws Exception {
    CertificateSummary certificateSummary = new CertificateSummary();
    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("CertificateArn", targetDepth)) {
                context.nextToken();
                certificateSummary.setCertificateArn(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("DomainName", targetDepth)) {
                context.nextToken();
                certificateSummary.setDomainName(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 certificateSummary;
}

41. DescribeCertificateResultJsonUnmarshaller#unmarshall()

View license
public DescribeCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    DescribeCertificateResult describeCertificateResult = new DescribeCertificateResult();
    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("Certificate", targetDepth)) {
                context.nextToken();
                describeCertificateResult.setCertificate(CertificateDetailJsonUnmarshaller.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 describeCertificateResult;
}

42. DescribeCertificateResultJsonUnmarshaller#unmarshall()

View license
public DescribeCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    DescribeCertificateResult describeCertificateResult = new DescribeCertificateResult();
    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("Certificate", targetDepth)) {
                context.nextToken();
                describeCertificateResult.setCertificate(CertificateDetailJsonUnmarshaller.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 describeCertificateResult;
}

43. DomainValidationJsonUnmarshaller#unmarshall()

View license
public DomainValidation unmarshall(JsonUnmarshallerContext context) throws Exception {
    DomainValidation domainValidation = new DomainValidation();
    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("DomainName", targetDepth)) {
                context.nextToken();
                domainValidation.setDomainName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("ValidationEmails", targetDepth)) {
                context.nextToken();
                domainValidation.setValidationEmails(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("ValidationDomain", targetDepth)) {
                context.nextToken();
                domainValidation.setValidationDomain(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 domainValidation;
}

44. DomainValidationJsonUnmarshaller#unmarshall()

View license
public DomainValidation unmarshall(JsonUnmarshallerContext context) throws Exception {
    DomainValidation domainValidation = new DomainValidation();
    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("DomainName", targetDepth)) {
                context.nextToken();
                domainValidation.setDomainName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("ValidationEmails", targetDepth)) {
                context.nextToken();
                domainValidation.setValidationEmails(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("ValidationDomain", targetDepth)) {
                context.nextToken();
                domainValidation.setValidationDomain(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 domainValidation;
}

45. DomainValidationOptionJsonUnmarshaller#unmarshall()

View license
public DomainValidationOption unmarshall(JsonUnmarshallerContext context) throws Exception {
    DomainValidationOption domainValidationOption = new DomainValidationOption();
    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("DomainName", targetDepth)) {
                context.nextToken();
                domainValidationOption.setDomainName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("ValidationDomain", targetDepth)) {
                context.nextToken();
                domainValidationOption.setValidationDomain(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 domainValidationOption;
}

46. DomainValidationOptionJsonUnmarshaller#unmarshall()

View license
public DomainValidationOption unmarshall(JsonUnmarshallerContext context) throws Exception {
    DomainValidationOption domainValidationOption = new DomainValidationOption();
    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("DomainName", targetDepth)) {
                context.nextToken();
                domainValidationOption.setDomainName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("ValidationDomain", targetDepth)) {
                context.nextToken();
                domainValidationOption.setValidationDomain(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 domainValidationOption;
}

47. GetCertificateResultJsonUnmarshaller#unmarshall()

View license
public GetCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetCertificateResult getCertificateResult = new GetCertificateResult();
    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("Certificate", targetDepth)) {
                context.nextToken();
                getCertificateResult.setCertificate(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("CertificateChain", targetDepth)) {
                context.nextToken();
                getCertificateResult.setCertificateChain(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 getCertificateResult;
}

48. GetCertificateResultJsonUnmarshaller#unmarshall()

View license
public GetCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetCertificateResult getCertificateResult = new GetCertificateResult();
    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("Certificate", targetDepth)) {
                context.nextToken();
                getCertificateResult.setCertificate(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("CertificateChain", targetDepth)) {
                context.nextToken();
                getCertificateResult.setCertificateChain(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 getCertificateResult;
}

49. ListCertificatesResultJsonUnmarshaller#unmarshall()

View license
public ListCertificatesResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListCertificatesResult listCertificatesResult = new ListCertificatesResult();
    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("NextToken", targetDepth)) {
                context.nextToken();
                listCertificatesResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("CertificateSummaryList", targetDepth)) {
                context.nextToken();
                listCertificatesResult.setCertificateSummaryList(new ListUnmarshaller<CertificateSummary>(CertificateSummaryJsonUnmarshaller.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 listCertificatesResult;
}

50. ListCertificatesResultJsonUnmarshaller#unmarshall()

View license
public ListCertificatesResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListCertificatesResult listCertificatesResult = new ListCertificatesResult();
    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("NextToken", targetDepth)) {
                context.nextToken();
                listCertificatesResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("CertificateSummaryList", targetDepth)) {
                context.nextToken();
                listCertificatesResult.setCertificateSummaryList(new ListUnmarshaller<CertificateSummary>(CertificateSummaryJsonUnmarshaller.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 listCertificatesResult;
}

51. ListTagsForCertificateResultJsonUnmarshaller#unmarshall()

View license
public ListTagsForCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListTagsForCertificateResult listTagsForCertificateResult = new ListTagsForCertificateResult();
    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("Tags", targetDepth)) {
                context.nextToken();
                listTagsForCertificateResult.setTags(new ListUnmarshaller<Tag>(TagJsonUnmarshaller.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 listTagsForCertificateResult;
}

52. ListTagsForCertificateResultJsonUnmarshaller#unmarshall()

View license
public ListTagsForCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    ListTagsForCertificateResult listTagsForCertificateResult = new ListTagsForCertificateResult();
    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("Tags", targetDepth)) {
                context.nextToken();
                listTagsForCertificateResult.setTags(new ListUnmarshaller<Tag>(TagJsonUnmarshaller.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 listTagsForCertificateResult;
}

53. RequestCertificateResultJsonUnmarshaller#unmarshall()

View license
public RequestCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    RequestCertificateResult requestCertificateResult = new RequestCertificateResult();
    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("CertificateArn", targetDepth)) {
                context.nextToken();
                requestCertificateResult.setCertificateArn(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 requestCertificateResult;
}

54. RequestCertificateResultJsonUnmarshaller#unmarshall()

View license
public RequestCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    RequestCertificateResult requestCertificateResult = new RequestCertificateResult();
    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("CertificateArn", targetDepth)) {
                context.nextToken();
                requestCertificateResult.setCertificateArn(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 requestCertificateResult;
}

55. TagJsonUnmarshaller#unmarshall()

View license
public Tag unmarshall(JsonUnmarshallerContext context) throws Exception {
    Tag tag = new Tag();
    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("Key", targetDepth)) {
                context.nextToken();
                tag.setKey(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Value", targetDepth)) {
                context.nextToken();
                tag.setValue(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 tag;
}

56. TagJsonUnmarshaller#unmarshall()

View license
public Tag unmarshall(JsonUnmarshallerContext context) throws Exception {
    Tag tag = new Tag();
    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("Key", targetDepth)) {
                context.nextToken();
                tag.setKey(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("Value", targetDepth)) {
                context.nextToken();
                tag.setValue(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 tag;
}

57. ApiKeyJsonUnmarshaller#unmarshall()

View license
public ApiKey unmarshall(JsonUnmarshallerContext context) throws Exception {
    ApiKey apiKey = new ApiKey();
    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("id", targetDepth)) {
                context.nextToken();
                apiKey.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                apiKey.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                apiKey.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("enabled", targetDepth)) {
                context.nextToken();
                apiKey.setEnabled(context.getUnmarshaller(Boolean.class).unmarshall(context));
            }
            if (context.testExpression("stageKeys", targetDepth)) {
                context.nextToken();
                apiKey.setStageKeys(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                apiKey.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("lastUpdatedDate", targetDepth)) {
                context.nextToken();
                apiKey.setLastUpdatedDate(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 apiKey;
}

58. ApiKeyJsonUnmarshaller#unmarshall()

View license
public ApiKey unmarshall(JsonUnmarshallerContext context) throws Exception {
    ApiKey apiKey = new ApiKey();
    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("id", targetDepth)) {
                context.nextToken();
                apiKey.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                apiKey.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                apiKey.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("enabled", targetDepth)) {
                context.nextToken();
                apiKey.setEnabled(context.getUnmarshaller(Boolean.class).unmarshall(context));
            }
            if (context.testExpression("stageKeys", targetDepth)) {
                context.nextToken();
                apiKey.setStageKeys(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                apiKey.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("lastUpdatedDate", targetDepth)) {
                context.nextToken();
                apiKey.setLastUpdatedDate(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 apiKey;
}

59. AuthorizerJsonUnmarshaller#unmarshall()

View license
public Authorizer unmarshall(JsonUnmarshallerContext context) throws Exception {
    Authorizer authorizer = new Authorizer();
    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("id", targetDepth)) {
                context.nextToken();
                authorizer.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                authorizer.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("type", targetDepth)) {
                context.nextToken();
                authorizer.setType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authType", targetDepth)) {
                context.nextToken();
                authorizer.setAuthType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerUri", targetDepth)) {
                context.nextToken();
                authorizer.setAuthorizerUri(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerCredentials", targetDepth)) {
                context.nextToken();
                authorizer.setAuthorizerCredentials(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identitySource", targetDepth)) {
                context.nextToken();
                authorizer.setIdentitySource(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identityValidationExpression", targetDepth)) {
                context.nextToken();
                authorizer.setIdentityValidationExpression(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerResultTtlInSeconds", targetDepth)) {
                context.nextToken();
                authorizer.setAuthorizerResultTtlInSeconds(context.getUnmarshaller(Integer.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 authorizer;
}

60. AuthorizerJsonUnmarshaller#unmarshall()

View license
public Authorizer unmarshall(JsonUnmarshallerContext context) throws Exception {
    Authorizer authorizer = new Authorizer();
    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("id", targetDepth)) {
                context.nextToken();
                authorizer.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                authorizer.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("type", targetDepth)) {
                context.nextToken();
                authorizer.setType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authType", targetDepth)) {
                context.nextToken();
                authorizer.setAuthType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerUri", targetDepth)) {
                context.nextToken();
                authorizer.setAuthorizerUri(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerCredentials", targetDepth)) {
                context.nextToken();
                authorizer.setAuthorizerCredentials(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identitySource", targetDepth)) {
                context.nextToken();
                authorizer.setIdentitySource(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identityValidationExpression", targetDepth)) {
                context.nextToken();
                authorizer.setIdentityValidationExpression(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerResultTtlInSeconds", targetDepth)) {
                context.nextToken();
                authorizer.setAuthorizerResultTtlInSeconds(context.getUnmarshaller(Integer.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 authorizer;
}

61. BasePathMappingJsonUnmarshaller#unmarshall()

View license
public BasePathMapping unmarshall(JsonUnmarshallerContext context) throws Exception {
    BasePathMapping basePathMapping = new BasePathMapping();
    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("basePath", targetDepth)) {
                context.nextToken();
                basePathMapping.setBasePath(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("restApiId", targetDepth)) {
                context.nextToken();
                basePathMapping.setRestApiId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("stage", targetDepth)) {
                context.nextToken();
                basePathMapping.setStage(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 basePathMapping;
}

62. BasePathMappingJsonUnmarshaller#unmarshall()

View license
public BasePathMapping unmarshall(JsonUnmarshallerContext context) throws Exception {
    BasePathMapping basePathMapping = new BasePathMapping();
    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("basePath", targetDepth)) {
                context.nextToken();
                basePathMapping.setBasePath(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("restApiId", targetDepth)) {
                context.nextToken();
                basePathMapping.setRestApiId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("stage", targetDepth)) {
                context.nextToken();
                basePathMapping.setStage(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 basePathMapping;
}

63. ClientCertificateJsonUnmarshaller#unmarshall()

View license
public ClientCertificate unmarshall(JsonUnmarshallerContext context) throws Exception {
    ClientCertificate clientCertificate = new ClientCertificate();
    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("clientCertificateId", targetDepth)) {
                context.nextToken();
                clientCertificate.setClientCertificateId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                clientCertificate.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("pemEncodedCertificate", targetDepth)) {
                context.nextToken();
                clientCertificate.setPemEncodedCertificate(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                clientCertificate.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("expirationDate", targetDepth)) {
                context.nextToken();
                clientCertificate.setExpirationDate(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 clientCertificate;
}

64. ClientCertificateJsonUnmarshaller#unmarshall()

View license
public ClientCertificate unmarshall(JsonUnmarshallerContext context) throws Exception {
    ClientCertificate clientCertificate = new ClientCertificate();
    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("clientCertificateId", targetDepth)) {
                context.nextToken();
                clientCertificate.setClientCertificateId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                clientCertificate.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("pemEncodedCertificate", targetDepth)) {
                context.nextToken();
                clientCertificate.setPemEncodedCertificate(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                clientCertificate.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("expirationDate", targetDepth)) {
                context.nextToken();
                clientCertificate.setExpirationDate(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 clientCertificate;
}

65. CreateApiKeyResultJsonUnmarshaller#unmarshall()

View license
public CreateApiKeyResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateApiKeyResult createApiKeyResult = new CreateApiKeyResult();
    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("id", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("enabled", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setEnabled(context.getUnmarshaller(Boolean.class).unmarshall(context));
            }
            if (context.testExpression("stageKeys", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setStageKeys(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("lastUpdatedDate", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setLastUpdatedDate(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 createApiKeyResult;
}

66. CreateApiKeyResultJsonUnmarshaller#unmarshall()

View license
public CreateApiKeyResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateApiKeyResult createApiKeyResult = new CreateApiKeyResult();
    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("id", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("enabled", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setEnabled(context.getUnmarshaller(Boolean.class).unmarshall(context));
            }
            if (context.testExpression("stageKeys", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setStageKeys(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("lastUpdatedDate", targetDepth)) {
                context.nextToken();
                createApiKeyResult.setLastUpdatedDate(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 createApiKeyResult;
}

67. CreateAuthorizerResultJsonUnmarshaller#unmarshall()

View license
public CreateAuthorizerResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateAuthorizerResult createAuthorizerResult = new CreateAuthorizerResult();
    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("id", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("type", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authType", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setAuthType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerUri", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setAuthorizerUri(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerCredentials", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setAuthorizerCredentials(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identitySource", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setIdentitySource(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identityValidationExpression", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setIdentityValidationExpression(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerResultTtlInSeconds", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setAuthorizerResultTtlInSeconds(context.getUnmarshaller(Integer.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 createAuthorizerResult;
}

68. CreateAuthorizerResultJsonUnmarshaller#unmarshall()

View license
public CreateAuthorizerResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateAuthorizerResult createAuthorizerResult = new CreateAuthorizerResult();
    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("id", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("type", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authType", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setAuthType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerUri", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setAuthorizerUri(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerCredentials", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setAuthorizerCredentials(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identitySource", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setIdentitySource(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identityValidationExpression", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setIdentityValidationExpression(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerResultTtlInSeconds", targetDepth)) {
                context.nextToken();
                createAuthorizerResult.setAuthorizerResultTtlInSeconds(context.getUnmarshaller(Integer.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 createAuthorizerResult;
}

69. CreateBasePathMappingResultJsonUnmarshaller#unmarshall()

View license
public CreateBasePathMappingResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateBasePathMappingResult createBasePathMappingResult = new CreateBasePathMappingResult();
    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("basePath", targetDepth)) {
                context.nextToken();
                createBasePathMappingResult.setBasePath(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("restApiId", targetDepth)) {
                context.nextToken();
                createBasePathMappingResult.setRestApiId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("stage", targetDepth)) {
                context.nextToken();
                createBasePathMappingResult.setStage(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 createBasePathMappingResult;
}

70. CreateBasePathMappingResultJsonUnmarshaller#unmarshall()

View license
public CreateBasePathMappingResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateBasePathMappingResult createBasePathMappingResult = new CreateBasePathMappingResult();
    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("basePath", targetDepth)) {
                context.nextToken();
                createBasePathMappingResult.setBasePath(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("restApiId", targetDepth)) {
                context.nextToken();
                createBasePathMappingResult.setRestApiId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("stage", targetDepth)) {
                context.nextToken();
                createBasePathMappingResult.setStage(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 createBasePathMappingResult;
}

71. CreateDeploymentResultJsonUnmarshaller#unmarshall()

View license
public CreateDeploymentResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateDeploymentResult createDeploymentResult = new CreateDeploymentResult();
    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("id", targetDepth)) {
                context.nextToken();
                createDeploymentResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                createDeploymentResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                createDeploymentResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("apiSummary", targetDepth)) {
                context.nextToken();
                createDeploymentResult.setApiSummary(new MapUnmarshaller<String, java.util.Map<String, MethodSnapshot>>(context.getUnmarshaller(String.class), new MapUnmarshaller<String, MethodSnapshot>(context.getUnmarshaller(String.class), MethodSnapshotJsonUnmarshaller.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 createDeploymentResult;
}

72. CreateDeploymentResultJsonUnmarshaller#unmarshall()

View license
public CreateDeploymentResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateDeploymentResult createDeploymentResult = new CreateDeploymentResult();
    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("id", targetDepth)) {
                context.nextToken();
                createDeploymentResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                createDeploymentResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                createDeploymentResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("apiSummary", targetDepth)) {
                context.nextToken();
                createDeploymentResult.setApiSummary(new MapUnmarshaller<String, java.util.Map<String, MethodSnapshot>>(context.getUnmarshaller(String.class), new MapUnmarshaller<String, MethodSnapshot>(context.getUnmarshaller(String.class), MethodSnapshotJsonUnmarshaller.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 createDeploymentResult;
}

73. CreateDomainNameResultJsonUnmarshaller#unmarshall()

View license
public CreateDomainNameResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateDomainNameResult createDomainNameResult = new CreateDomainNameResult();
    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("domainName", targetDepth)) {
                context.nextToken();
                createDomainNameResult.setDomainName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("certificateName", targetDepth)) {
                context.nextToken();
                createDomainNameResult.setCertificateName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("certificateUploadDate", targetDepth)) {
                context.nextToken();
                createDomainNameResult.setCertificateUploadDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("distributionDomainName", targetDepth)) {
                context.nextToken();
                createDomainNameResult.setDistributionDomainName(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 createDomainNameResult;
}

74. CreateDomainNameResultJsonUnmarshaller#unmarshall()

View license
public CreateDomainNameResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateDomainNameResult createDomainNameResult = new CreateDomainNameResult();
    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("domainName", targetDepth)) {
                context.nextToken();
                createDomainNameResult.setDomainName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("certificateName", targetDepth)) {
                context.nextToken();
                createDomainNameResult.setCertificateName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("certificateUploadDate", targetDepth)) {
                context.nextToken();
                createDomainNameResult.setCertificateUploadDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("distributionDomainName", targetDepth)) {
                context.nextToken();
                createDomainNameResult.setDistributionDomainName(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 createDomainNameResult;
}

75. CreateModelResultJsonUnmarshaller#unmarshall()

View license
public CreateModelResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateModelResult createModelResult = new CreateModelResult();
    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("id", targetDepth)) {
                context.nextToken();
                createModelResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                createModelResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                createModelResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("schema", targetDepth)) {
                context.nextToken();
                createModelResult.setSchema(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("contentType", targetDepth)) {
                context.nextToken();
                createModelResult.setContentType(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 createModelResult;
}

76. CreateModelResultJsonUnmarshaller#unmarshall()

View license
public CreateModelResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateModelResult createModelResult = new CreateModelResult();
    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("id", targetDepth)) {
                context.nextToken();
                createModelResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                createModelResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                createModelResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("schema", targetDepth)) {
                context.nextToken();
                createModelResult.setSchema(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("contentType", targetDepth)) {
                context.nextToken();
                createModelResult.setContentType(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 createModelResult;
}

77. CreateResourceResultJsonUnmarshaller#unmarshall()

View license
public CreateResourceResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateResourceResult createResourceResult = new CreateResourceResult();
    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("id", targetDepth)) {
                context.nextToken();
                createResourceResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("parentId", targetDepth)) {
                context.nextToken();
                createResourceResult.setParentId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("pathPart", targetDepth)) {
                context.nextToken();
                createResourceResult.setPathPart(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("path", targetDepth)) {
                context.nextToken();
                createResourceResult.setPath(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("resourceMethods", targetDepth)) {
                context.nextToken();
                createResourceResult.setResourceMethods(new MapUnmarshaller<String, Method>(context.getUnmarshaller(String.class), MethodJsonUnmarshaller.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 createResourceResult;
}

78. CreateResourceResultJsonUnmarshaller#unmarshall()

View license
public CreateResourceResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateResourceResult createResourceResult = new CreateResourceResult();
    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("id", targetDepth)) {
                context.nextToken();
                createResourceResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("parentId", targetDepth)) {
                context.nextToken();
                createResourceResult.setParentId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("pathPart", targetDepth)) {
                context.nextToken();
                createResourceResult.setPathPart(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("path", targetDepth)) {
                context.nextToken();
                createResourceResult.setPath(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("resourceMethods", targetDepth)) {
                context.nextToken();
                createResourceResult.setResourceMethods(new MapUnmarshaller<String, Method>(context.getUnmarshaller(String.class), MethodJsonUnmarshaller.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 createResourceResult;
}

79. CreateRestApiResultJsonUnmarshaller#unmarshall()

View license
public CreateRestApiResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateRestApiResult createRestApiResult = new CreateRestApiResult();
    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("id", targetDepth)) {
                context.nextToken();
                createRestApiResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                createRestApiResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                createRestApiResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                createRestApiResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("warnings", targetDepth)) {
                context.nextToken();
                createRestApiResult.setWarnings(new ListUnmarshaller<String>(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 createRestApiResult;
}

80. CreateRestApiResultJsonUnmarshaller#unmarshall()

View license
public CreateRestApiResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateRestApiResult createRestApiResult = new CreateRestApiResult();
    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("id", targetDepth)) {
                context.nextToken();
                createRestApiResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                createRestApiResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                createRestApiResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                createRestApiResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("warnings", targetDepth)) {
                context.nextToken();
                createRestApiResult.setWarnings(new ListUnmarshaller<String>(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 createRestApiResult;
}

81. CreateStageResultJsonUnmarshaller#unmarshall()

View license
public CreateStageResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateStageResult createStageResult = new CreateStageResult();
    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("deploymentId", targetDepth)) {
                context.nextToken();
                createStageResult.setDeploymentId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("clientCertificateId", targetDepth)) {
                context.nextToken();
                createStageResult.setClientCertificateId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("stageName", targetDepth)) {
                context.nextToken();
                createStageResult.setStageName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                createStageResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("cacheClusterEnabled", targetDepth)) {
                context.nextToken();
                createStageResult.setCacheClusterEnabled(context.getUnmarshaller(Boolean.class).unmarshall(context));
            }
            if (context.testExpression("cacheClusterSize", targetDepth)) {
                context.nextToken();
                createStageResult.setCacheClusterSize(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("cacheClusterStatus", targetDepth)) {
                context.nextToken();
                createStageResult.setCacheClusterStatus(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("methodSettings", targetDepth)) {
                context.nextToken();
                createStageResult.setMethodSettings(new MapUnmarshaller<String, MethodSetting>(context.getUnmarshaller(String.class), MethodSettingJsonUnmarshaller.getInstance()).unmarshall(context));
            }
            if (context.testExpression("variables", targetDepth)) {
                context.nextToken();
                createStageResult.setVariables(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                createStageResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("lastUpdatedDate", targetDepth)) {
                context.nextToken();
                createStageResult.setLastUpdatedDate(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 createStageResult;
}

82. CreateStageResultJsonUnmarshaller#unmarshall()

View license
public CreateStageResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    CreateStageResult createStageResult = new CreateStageResult();
    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("deploymentId", targetDepth)) {
                context.nextToken();
                createStageResult.setDeploymentId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("clientCertificateId", targetDepth)) {
                context.nextToken();
                createStageResult.setClientCertificateId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("stageName", targetDepth)) {
                context.nextToken();
                createStageResult.setStageName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                createStageResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("cacheClusterEnabled", targetDepth)) {
                context.nextToken();
                createStageResult.setCacheClusterEnabled(context.getUnmarshaller(Boolean.class).unmarshall(context));
            }
            if (context.testExpression("cacheClusterSize", targetDepth)) {
                context.nextToken();
                createStageResult.setCacheClusterSize(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("cacheClusterStatus", targetDepth)) {
                context.nextToken();
                createStageResult.setCacheClusterStatus(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("methodSettings", targetDepth)) {
                context.nextToken();
                createStageResult.setMethodSettings(new MapUnmarshaller<String, MethodSetting>(context.getUnmarshaller(String.class), MethodSettingJsonUnmarshaller.getInstance()).unmarshall(context));
            }
            if (context.testExpression("variables", targetDepth)) {
                context.nextToken();
                createStageResult.setVariables(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                createStageResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("lastUpdatedDate", targetDepth)) {
                context.nextToken();
                createStageResult.setLastUpdatedDate(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 createStageResult;
}

83. DeploymentJsonUnmarshaller#unmarshall()

View license
public Deployment unmarshall(JsonUnmarshallerContext context) throws Exception {
    Deployment deployment = new Deployment();
    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("id", targetDepth)) {
                context.nextToken();
                deployment.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                deployment.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                deployment.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("apiSummary", targetDepth)) {
                context.nextToken();
                deployment.setApiSummary(new MapUnmarshaller<String, java.util.Map<String, MethodSnapshot>>(context.getUnmarshaller(String.class), new MapUnmarshaller<String, MethodSnapshot>(context.getUnmarshaller(String.class), MethodSnapshotJsonUnmarshaller.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 deployment;
}

84. DeploymentJsonUnmarshaller#unmarshall()

View license
public Deployment unmarshall(JsonUnmarshallerContext context) throws Exception {
    Deployment deployment = new Deployment();
    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("id", targetDepth)) {
                context.nextToken();
                deployment.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                deployment.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                deployment.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("apiSummary", targetDepth)) {
                context.nextToken();
                deployment.setApiSummary(new MapUnmarshaller<String, java.util.Map<String, MethodSnapshot>>(context.getUnmarshaller(String.class), new MapUnmarshaller<String, MethodSnapshot>(context.getUnmarshaller(String.class), MethodSnapshotJsonUnmarshaller.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 deployment;
}

85. DomainNameJsonUnmarshaller#unmarshall()

View license
public DomainName unmarshall(JsonUnmarshallerContext context) throws Exception {
    DomainName domainName = new DomainName();
    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("domainName", targetDepth)) {
                context.nextToken();
                domainName.setDomainName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("certificateName", targetDepth)) {
                context.nextToken();
                domainName.setCertificateName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("certificateUploadDate", targetDepth)) {
                context.nextToken();
                domainName.setCertificateUploadDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("distributionDomainName", targetDepth)) {
                context.nextToken();
                domainName.setDistributionDomainName(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 domainName;
}

86. DomainNameJsonUnmarshaller#unmarshall()

View license
public DomainName unmarshall(JsonUnmarshallerContext context) throws Exception {
    DomainName domainName = new DomainName();
    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("domainName", targetDepth)) {
                context.nextToken();
                domainName.setDomainName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("certificateName", targetDepth)) {
                context.nextToken();
                domainName.setCertificateName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("certificateUploadDate", targetDepth)) {
                context.nextToken();
                domainName.setCertificateUploadDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("distributionDomainName", targetDepth)) {
                context.nextToken();
                domainName.setDistributionDomainName(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 domainName;
}

87. GenerateClientCertificateResultJsonUnmarshaller#unmarshall()

View license
public GenerateClientCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GenerateClientCertificateResult generateClientCertificateResult = new GenerateClientCertificateResult();
    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("clientCertificateId", targetDepth)) {
                context.nextToken();
                generateClientCertificateResult.setClientCertificateId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                generateClientCertificateResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("pemEncodedCertificate", targetDepth)) {
                context.nextToken();
                generateClientCertificateResult.setPemEncodedCertificate(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                generateClientCertificateResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("expirationDate", targetDepth)) {
                context.nextToken();
                generateClientCertificateResult.setExpirationDate(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 generateClientCertificateResult;
}

88. GenerateClientCertificateResultJsonUnmarshaller#unmarshall()

View license
public GenerateClientCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GenerateClientCertificateResult generateClientCertificateResult = new GenerateClientCertificateResult();
    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("clientCertificateId", targetDepth)) {
                context.nextToken();
                generateClientCertificateResult.setClientCertificateId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                generateClientCertificateResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("pemEncodedCertificate", targetDepth)) {
                context.nextToken();
                generateClientCertificateResult.setPemEncodedCertificate(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                generateClientCertificateResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("expirationDate", targetDepth)) {
                context.nextToken();
                generateClientCertificateResult.setExpirationDate(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 generateClientCertificateResult;
}

89. GetAccountResultJsonUnmarshaller#unmarshall()

View license
public GetAccountResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetAccountResult getAccountResult = new GetAccountResult();
    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("cloudwatchRoleArn", targetDepth)) {
                context.nextToken();
                getAccountResult.setCloudwatchRoleArn(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("throttleSettings", targetDepth)) {
                context.nextToken();
                getAccountResult.setThrottleSettings(ThrottleSettingsJsonUnmarshaller.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 getAccountResult;
}

90. GetAccountResultJsonUnmarshaller#unmarshall()

View license
public GetAccountResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetAccountResult getAccountResult = new GetAccountResult();
    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("cloudwatchRoleArn", targetDepth)) {
                context.nextToken();
                getAccountResult.setCloudwatchRoleArn(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("throttleSettings", targetDepth)) {
                context.nextToken();
                getAccountResult.setThrottleSettings(ThrottleSettingsJsonUnmarshaller.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 getAccountResult;
}

91. GetApiKeyResultJsonUnmarshaller#unmarshall()

View license
public GetApiKeyResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetApiKeyResult getApiKeyResult = new GetApiKeyResult();
    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("id", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("enabled", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setEnabled(context.getUnmarshaller(Boolean.class).unmarshall(context));
            }
            if (context.testExpression("stageKeys", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setStageKeys(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("lastUpdatedDate", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setLastUpdatedDate(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 getApiKeyResult;
}

92. GetApiKeyResultJsonUnmarshaller#unmarshall()

View license
public GetApiKeyResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetApiKeyResult getApiKeyResult = new GetApiKeyResult();
    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("id", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("description", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setDescription(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("enabled", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setEnabled(context.getUnmarshaller(Boolean.class).unmarshall(context));
            }
            if (context.testExpression("stageKeys", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setStageKeys(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));
            }
            if (context.testExpression("createdDate", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setCreatedDate(context.getUnmarshaller(java.util.Date.class).unmarshall(context));
            }
            if (context.testExpression("lastUpdatedDate", targetDepth)) {
                context.nextToken();
                getApiKeyResult.setLastUpdatedDate(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 getApiKeyResult;
}

93. GetApiKeysResultJsonUnmarshaller#unmarshall()

View license
public GetApiKeysResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetApiKeysResult getApiKeysResult = new GetApiKeysResult();
    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("position", targetDepth)) {
                context.nextToken();
                getApiKeysResult.setPosition(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("item", targetDepth)) {
                context.nextToken();
                getApiKeysResult.setItems(new ListUnmarshaller<ApiKey>(ApiKeyJsonUnmarshaller.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 getApiKeysResult;
}

94. GetApiKeysResultJsonUnmarshaller#unmarshall()

View license
public GetApiKeysResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetApiKeysResult getApiKeysResult = new GetApiKeysResult();
    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("position", targetDepth)) {
                context.nextToken();
                getApiKeysResult.setPosition(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("item", targetDepth)) {
                context.nextToken();
                getApiKeysResult.setItems(new ListUnmarshaller<ApiKey>(ApiKeyJsonUnmarshaller.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 getApiKeysResult;
}

95. GetAuthorizerResultJsonUnmarshaller#unmarshall()

View license
public GetAuthorizerResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetAuthorizerResult getAuthorizerResult = new GetAuthorizerResult();
    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("id", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("type", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authType", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setAuthType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerUri", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setAuthorizerUri(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerCredentials", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setAuthorizerCredentials(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identitySource", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setIdentitySource(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identityValidationExpression", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setIdentityValidationExpression(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerResultTtlInSeconds", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setAuthorizerResultTtlInSeconds(context.getUnmarshaller(Integer.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 getAuthorizerResult;
}

96. GetAuthorizerResultJsonUnmarshaller#unmarshall()

View license
public GetAuthorizerResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetAuthorizerResult getAuthorizerResult = new GetAuthorizerResult();
    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("id", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("name", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setName(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("type", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authType", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setAuthType(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerUri", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setAuthorizerUri(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerCredentials", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setAuthorizerCredentials(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identitySource", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setIdentitySource(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("identityValidationExpression", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setIdentityValidationExpression(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("authorizerResultTtlInSeconds", targetDepth)) {
                context.nextToken();
                getAuthorizerResult.setAuthorizerResultTtlInSeconds(context.getUnmarshaller(Integer.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 getAuthorizerResult;
}

97. GetAuthorizersResultJsonUnmarshaller#unmarshall()

View license
public GetAuthorizersResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetAuthorizersResult getAuthorizersResult = new GetAuthorizersResult();
    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("position", targetDepth)) {
                context.nextToken();
                getAuthorizersResult.setPosition(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("item", targetDepth)) {
                context.nextToken();
                getAuthorizersResult.setItems(new ListUnmarshaller<Authorizer>(AuthorizerJsonUnmarshaller.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 getAuthorizersResult;
}

98. GetAuthorizersResultJsonUnmarshaller#unmarshall()

View license
public GetAuthorizersResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetAuthorizersResult getAuthorizersResult = new GetAuthorizersResult();
    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("position", targetDepth)) {
                context.nextToken();
                getAuthorizersResult.setPosition(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("item", targetDepth)) {
                context.nextToken();
                getAuthorizersResult.setItems(new ListUnmarshaller<Authorizer>(AuthorizerJsonUnmarshaller.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 getAuthorizersResult;
}

99. GetBasePathMappingResultJsonUnmarshaller#unmarshall()

View license
public GetBasePathMappingResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetBasePathMappingResult getBasePathMappingResult = new GetBasePathMappingResult();
    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("basePath", targetDepth)) {
                context.nextToken();
                getBasePathMappingResult.setBasePath(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("restApiId", targetDepth)) {
                context.nextToken();
                getBasePathMappingResult.setRestApiId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("stage", targetDepth)) {
                context.nextToken();
                getBasePathMappingResult.setStage(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 getBasePathMappingResult;
}

100. GetBasePathMappingResultJsonUnmarshaller#unmarshall()

View license
public GetBasePathMappingResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    GetBasePathMappingResult getBasePathMappingResult = new GetBasePathMappingResult();
    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("basePath", targetDepth)) {
                context.nextToken();
                getBasePathMappingResult.setBasePath(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("restApiId", targetDepth)) {
                context.nextToken();
                getBasePathMappingResult.setRestApiId(context.getUnmarshaller(String.class).unmarshall(context));
            }
            if (context.testExpression("stage", targetDepth)) {
                context.nextToken();
                getBasePathMappingResult.setStage(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 getBasePathMappingResult;
}