/** * 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.rpc.thrift; import java.util.Map; import java.util.HashMap; import libthrift091.TEnum; public enum GrantType implements libthrift091.TEnum { /** * 开发者,DEV_XIAOMI或DEV_XIAOMI_SSO登录用户 */ DEVELOPER(1), /** * APP_SECRET登录用户 */ APP_ROOT(2), /** * Oauth或xiaomi sso, APP_ACCESS_TOKEN和APP_XIAOMI_SSO登录用户 */ APP_USER(3), /** * 匿名,APP_ANONYMOUS, 登录用户 */ GUEST(4); private final int value; private GrantType(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 GrantType findByValue(int value) { switch (value) { case 1: return DEVELOPER; case 2: return APP_ROOT; case 3: return APP_USER; case 4: return GUEST; default: return null; } } }