/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.spi;

public enum NodeState
{
    ACTIVE,
    INACTIVE,
    SHUTTING_DOWN
}

@@ -619,24 +619,27 @@
 %7B%0A    ACTIVE
+(1)
 ,%0A    INACTI
@@ -640,16 +640,19 @@
 INACTIVE
+(2)
 ,%0A    SH
@@ -662,11 +662,708 @@
 ING_DOWN
+(3);%0A%0A    private final int value;%0A%0A    NodeState(int value)%0A    %7B%0A        this.value = value;%0A    %7D%0A%0A    /**%0A     * Recover NodeState from the ordinal.%0A     * In general, ThriftEnum is the right annotation to use.%0A     * But given the class is in SPI, use the following workaround.%0A     */%0A    public static NodeState valueOf(int value)%0A    %7B%0A        for (NodeState nodeState : values()) %7B%0A            if (nodeState.getValue() == value) %7B%0A                return nodeState;%0A            %7D%0A        %7D%0A        throw new IllegalArgumentException(%22Invalid NodeState value: %22 + value);%0A    %7D%0A%0A    // the value will be used for SerDe like thrift%0A    public int getValue()%0A    %7B%0A        return value;%0A    %7D
 %0A%7D%0A

Update NodeState with enum values