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

com.xiaomi.infra.galaxy.emr.thrift.StateCode Maven / Gradle / Ivy

/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.xiaomi.infra.galaxy.emr.thrift;


import java.util.Map;
import java.util.HashMap;
import libthrift091.TEnum;

public enum StateCode implements libthrift091.TEnum {
  C_INITED(0),
  C_PROCESSING(1),
  C_STARTING(2),
  C_BOOSTRAPPING(3),
  C_RUNNING(4),
  C_WAITING(5),
  C_TERMINATING(6),
  C_COMPLETED(7),
  C_TERMINATED(8),
  C_FAILED(9),
  C_DELETED(10),
  G_INITED(100),
  G_PROCESSING(101),
  G_STARTING(102),
  G_RUNNING(103),
  G_RESIZING(104),
  G_TERMINATING(105),
  G_TERMINATED(106),
  G_DELETED(107),
  G_ARRESTED(108),
  I_INITED(200),
  I_PROCESSING(201),
  I_STARTING(202),
  I_RUNNING(203),
  I_TERMINATING(204),
  I_TERMINATED(205),
  I_DELETED(206),
  J_INITED(300),
  J_PROCESSING(301),
  J_SUBMITTED(302),
  J_RUNNGIN(303),
  J_FINISHED(304),
  J_KILLED(305),
  J_FAILED(306),
  T_WAIT(400),
  T_PROCESSING(401),
  T_FINISHED(402),
  T_FAILED(403),
  T_CANCELLED(404),
  T_FAILOVER(405);

  private final int value;

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

  /**
   * Get the integer value of this enum value, as defined in the Thrift IDL.
   */
  public int getValue() {
    return value;
  }

  /**
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
   * @return null if the value is not found.
   */
  public static StateCode findByValue(int value) { 
    switch (value) {
      case 0:
        return C_INITED;
      case 1:
        return C_PROCESSING;
      case 2:
        return C_STARTING;
      case 3:
        return C_BOOSTRAPPING;
      case 4:
        return C_RUNNING;
      case 5:
        return C_WAITING;
      case 6:
        return C_TERMINATING;
      case 7:
        return C_COMPLETED;
      case 8:
        return C_TERMINATED;
      case 9:
        return C_FAILED;
      case 10:
        return C_DELETED;
      case 100:
        return G_INITED;
      case 101:
        return G_PROCESSING;
      case 102:
        return G_STARTING;
      case 103:
        return G_RUNNING;
      case 104:
        return G_RESIZING;
      case 105:
        return G_TERMINATING;
      case 106:
        return G_TERMINATED;
      case 107:
        return G_DELETED;
      case 108:
        return G_ARRESTED;
      case 200:
        return I_INITED;
      case 201:
        return I_PROCESSING;
      case 202:
        return I_STARTING;
      case 203:
        return I_RUNNING;
      case 204:
        return I_TERMINATING;
      case 205:
        return I_TERMINATED;
      case 206:
        return I_DELETED;
      case 300:
        return J_INITED;
      case 301:
        return J_PROCESSING;
      case 302:
        return J_SUBMITTED;
      case 303:
        return J_RUNNGIN;
      case 304:
        return J_FINISHED;
      case 305:
        return J_KILLED;
      case 306:
        return J_FAILED;
      case 400:
        return T_WAIT;
      case 401:
        return T_PROCESSING;
      case 402:
        return T_FINISHED;
      case 403:
        return T_FAILED;
      case 404:
        return T_CANCELLED;
      case 405:
        return T_FAILOVER;
      default:
        return null;
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy