All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rethinkdb.gen.proto.ResponseNote Maven / Gradle / Ivy

The newest version!
// Autogenerated by metajava.py.
// Do not edit this file directly.
// The template for this file is located at:
// ../../../../../../../../templates/proto/ResponseNote.java

package com.rethinkdb.gen.proto;

import org.jetbrains.annotations.Nullable;

public enum ResponseNote {

    SEQUENCE_FEED(1),
    ATOM_FEED(2),
    ORDER_BY_LIMIT_FEED(3),
    UNIONED_FEED(4),
    INCLUDES_STATES(5);

    public final int value;

    private ResponseNote(int value) {
        this.value = value;
    }

    public static ResponseNote fromValue(int value) {
        switch (value) {
            case 1: return ResponseNote.SEQUENCE_FEED;
            case 2: return ResponseNote.ATOM_FEED;
            case 3: return ResponseNote.ORDER_BY_LIMIT_FEED;
            case 4: return ResponseNote.UNIONED_FEED;
            case 5: return ResponseNote.INCLUDES_STATES;
            default:
                throw new IllegalArgumentException(String.format("%s is not a legal value for ResponseNote", value));
        }
    }

    public static @Nullable ResponseNote maybeFromValue(int value) {
        try {
            return fromValue(value);
        } catch (IllegalArgumentException iae) {
            return null;
        }
    }

    public boolean isFeed() {
        switch (this) {
            case SEQUENCE_FEED:
            case ATOM_FEED:
            case ORDER_BY_LIMIT_FEED:
            case UNIONED_FEED:
                return true;
        }
        return false;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy