public QueryOperator deserialize()

in aws-api-appsync/src/main/java/com/amplifyframework/core/model/query/predicate/GsonPredicateAdapters.java [56:89]


        public QueryOperator<?> deserialize(JsonElement json, Type type, JsonDeserializationContext context)
                throws JsonParseException {
            if (json == null || json.isJsonNull()) {
                return null;
            }

            JsonObject jsonObject = json.getAsJsonObject();
            String operatorType = jsonObject.get(TYPE).getAsString();
            switch (QueryOperator.Type.valueOf(operatorType)) {
                case CONTAINS:
                    return context.deserialize(json, ContainsQueryOperator.class);
                case NOT_CONTAINS:
                    return context.deserialize(json, NotContainsQueryOperator.class);
                case GREATER_OR_EQUAL:
                    return context.deserialize(json, GreaterOrEqualQueryOperator.class);
                case LESS_OR_EQUAL:
                    return context.deserialize(json, LessOrEqualQueryOperator.class);
                case GREATER_THAN:
                    return context.deserialize(json, GreaterThanQueryOperator.class);
                case LESS_THAN:
                    return context.deserialize(json, LessThanQueryOperator.class);
                case BETWEEN:
                    return context.deserialize(json, BetweenQueryOperator.class);
                case EQUAL:
                    return context.deserialize(json, EqualQueryOperator.class);
                case NOT_EQUAL:
                    return context.deserialize(json, NotEqualQueryOperator.class);
                case BEGINS_WITH:
                    return context.deserialize(json, BeginsWithQueryOperator.class);
                default:
                    throw new JsonParseException("Unable to deserialize " +
                            json.toString() + " to QueryOperator instance.");
            }
        }