com.xiaomi.infra.galaxy.sds.thrift.CannedAcl 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.sds.thrift;
import java.util.Map;
import java.util.HashMap;
import libthrift091.TEnum;
/**
* ACL模板,针对每个应用进行设置,
* 开发者登录可以访问所拥有的表数据,无需额外设置
*/
public enum CannedAcl implements libthrift091.TEnum {
/**
* App Secret登录读整表权限
*/
APP_SECRET_READ(1),
/**
* App Secret登录写整表权限
*/
APP_SECRET_WRITE(2),
/**
* 应用登录用户对Entity Group等于用户ID的记录的读权限,
* 如果表没有设置Entity Group支持,此设置无效,
* 授权后,不自动授予App Secret登录对应权限,必须单独设置
*/
APP_USER_ENTITY_GROUP_READ(3),
/**
* 应用登录用户对Entity Group等于用户ID的记录的写权限,
* 如果表没有设置Entity Group支持,此设置无效,
* 授权后,不自动授予App Secret登录对应权限,必须单独设置
*/
APP_USER_ENTITY_GROUP_WRITE(4),
/**
* 应用登录用户读整表权限(授权后,App Secret登录会自动拥有对应权限)
*/
APP_USER_READ(5),
/**
* 应用登录用户写整表权限(授权后,App Secret登录会自动拥有对应权限)
*/
APP_USER_WRITE(6),
/**
* 匿名用户读整表权限(授权后,App登录用户和App Secret登录用户会自动拥有对应权限)
*/
PUBLIC_READ(7),
/**
* 匿名用户写整表权限(授权后,App登录用户和App Secret登录用户会自动拥有对应权限)
*/
PUBLIC_WRITE(8);
private final int value;
private CannedAcl(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 CannedAcl findByValue(int value) {
switch (value) {
case 1:
return APP_SECRET_READ;
case 2:
return APP_SECRET_WRITE;
case 3:
return APP_USER_ENTITY_GROUP_READ;
case 4:
return APP_USER_ENTITY_GROUP_WRITE;
case 5:
return APP_USER_READ;
case 6:
return APP_USER_WRITE;
case 7:
return PUBLIC_READ;
case 8:
return PUBLIC_WRITE;
default:
return null;
}
}
}