TUnit.java

/**
 * Autogenerated by Thrift Compiler (0.16.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.doris.thrift;


@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public enum TUnit implements org.apache.thrift.TEnum {
  UNIT(0),
  UNIT_PER_SECOND(1),
  CPU_TICKS(2),
  BYTES(3),
  BYTES_PER_SECOND(4),
  TIME_NS(5),
  DOUBLE_VALUE(6),
  NONE(7),
  TIME_MS(8),
  TIME_S(9);

  private final int value;

  private TUnit(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.
   */
  @org.apache.thrift.annotation.Nullable
  public static TUnit findByValue(int value) { 
    switch (value) {
      case 0:
        return UNIT;
      case 1:
        return UNIT_PER_SECOND;
      case 2:
        return CPU_TICKS;
      case 3:
        return BYTES;
      case 4:
        return BYTES_PER_SECOND;
      case 5:
        return TIME_NS;
      case 6:
        return DOUBLE_VALUE;
      case 7:
        return NONE;
      case 8:
        return TIME_MS;
      case 9:
        return TIME_S;
      default:
        return null;
    }
  }
}