/** * 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 libthrift091.scheme.IScheme; import libthrift091.scheme.SchemeFactory; import libthrift091.scheme.StandardScheme; import libthrift091.scheme.TupleScheme; import libthrift091.protocol.TTupleProtocol; import libthrift091.protocol.TProtocolException; import libthrift091.EncodingUtils; import libthrift091.TException; import libthrift091.async.AsyncMethodCallback; import libthrift091.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) /** * 表元信息 */ @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-12-30") public class TableMetadata implements libthrift091.TBase<TableMetadata, TableMetadata._Fields>, java.io.Serializable, Cloneable, Comparable<TableMetadata> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("TableMetadata"); private static final libthrift091.protocol.TField TABLE_ID_FIELD_DESC = new libthrift091.protocol.TField("tableId", libthrift091.protocol.TType.STRING, (short)1); private static final libthrift091.protocol.TField DEVELOPER_ID_FIELD_DESC = new libthrift091.protocol.TField("developerId", libthrift091.protocol.TType.STRING, (short)2); private static final libthrift091.protocol.TField APP_ACL_FIELD_DESC = new libthrift091.protocol.TField("appAcl", libthrift091.protocol.TType.MAP, (short)3); private static final libthrift091.protocol.TField QUOTA_FIELD_DESC = new libthrift091.protocol.TField("quota", libthrift091.protocol.TType.STRUCT, (short)4); private static final libthrift091.protocol.TField THROUGHPUT_FIELD_DESC = new libthrift091.protocol.TField("throughput", libthrift091.protocol.TType.STRUCT, (short)5); private static final libthrift091.protocol.TField DESCRIPTION_FIELD_DESC = new libthrift091.protocol.TField("description", libthrift091.protocol.TType.STRING, (short)6); private static final libthrift091.protocol.TField STREAM_FIELD_DESC = new libthrift091.protocol.TField("stream", libthrift091.protocol.TType.STRUCT, (short)7); private static final libthrift091.protocol.TField ENABLE_SYS_SNAPSHOT_FIELD_DESC = new libthrift091.protocol.TField("enableSysSnapshot", libthrift091.protocol.TType.BOOL, (short)8); private static final libthrift091.protocol.TField EXCEEDED_THROUGHPUT_FIELD_DESC = new libthrift091.protocol.TField("exceededThroughput", libthrift091.protocol.TType.STRUCT, (short)9); private static final libthrift091.protocol.TField SLAVE_THROUGHPUT_FIELD_DESC = new libthrift091.protocol.TField("slaveThroughput", libthrift091.protocol.TType.STRUCT, (short)10); private static final libthrift091.protocol.TField EXCEEDED_SLAVE_THROUGHPUT_FIELD_DESC = new libthrift091.protocol.TField("exceededSlaveThroughput", libthrift091.protocol.TType.STRUCT, (short)11); private static final libthrift091.protocol.TField ACL_FIELD_DESC = new libthrift091.protocol.TField("acl", libthrift091.protocol.TType.MAP, (short)12); private static final libthrift091.protocol.TField SPACE_ID_FIELD_DESC = new libthrift091.protocol.TField("spaceId", libthrift091.protocol.TType.STRING, (short)13); private static final libthrift091.protocol.TField ENABLE_EG_ACL_FIELD_DESC = new libthrift091.protocol.TField("enableEgAcl", libthrift091.protocol.TType.BOOL, (short)14); private static final libthrift091.protocol.TField PITR_FIELD_DESC = new libthrift091.protocol.TField("pitr", libthrift091.protocol.TType.STRUCT, (short)15); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TableMetadataStandardSchemeFactory()); schemes.put(TupleScheme.class, new TableMetadataTupleSchemeFactory()); } /** * 表ID * 仅作为输出值,作为输入时无需指定 */ public String tableId; // optional /** * 所有者的开发者ID, * 对于CreateTable/AlterTable,值不设置时,默认为当前登录用户。 */ public String developerId; // optional /** * 权限控制设置 */ public Map<String,List<CannedAcl>> appAcl; // optional /** * @Deprecated 空间配额 */ public TableQuota quota; // optional /** * 吞吐量配额 */ public ProvisionThroughput throughput; // optional /** * 表备注信息 */ public String description; // optional /** * stream设置,deprecated */ public StreamSpec stream; // optional /** * 是否支持系统定期做snapshot, 默认为true */ public boolean enableSysSnapshot; // optional /** * 主集群最大超发的读写配额,即系统空闲时可能达到的最大吞吐,设置比throughput大即允许超发 */ public ProvisionThroughput exceededThroughput; // optional /** * 预设备集群读写配额 */ public ProvisionThroughput slaveThroughput; // optional /** * 备集群最大超发的读写配额,即系统空闲时可能达到最大的吞吐,设置比slaveThroughput大即允许超发 */ public ProvisionThroughput exceededSlaveThroughput; // optional /** * 融合云权限模型的acl */ public Map<String,List<Permission>> acl; // optional /** * 表所在的命名空间 */ public String spaceId; // optional /** * entityGroup acl 开关 */ public boolean enableEgAcl; // optional /** * Point-In-Time recovery */ public PointInTimeRecovery pitr; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements libthrift091.TFieldIdEnum { /** * 表ID * 仅作为输出值,作为输入时无需指定 */ TABLE_ID((short)1, "tableId"), /** * 所有者的开发者ID, * 对于CreateTable/AlterTable,值不设置时,默认为当前登录用户。 */ DEVELOPER_ID((short)2, "developerId"), /** * 权限控制设置 */ APP_ACL((short)3, "appAcl"), /** * @Deprecated 空间配额 */ QUOTA((short)4, "quota"), /** * 吞吐量配额 */ THROUGHPUT((short)5, "throughput"), /** * 表备注信息 */ DESCRIPTION((short)6, "description"), /** * stream设置,deprecated */ STREAM((short)7, "stream"), /** * 是否支持系统定期做snapshot, 默认为true */ ENABLE_SYS_SNAPSHOT((short)8, "enableSysSnapshot"), /** * 主集群最大超发的读写配额,即系统空闲时可能达到的最大吞吐,设置比throughput大即允许超发 */ EXCEEDED_THROUGHPUT((short)9, "exceededThroughput"), /** * 预设备集群读写配额 */ SLAVE_THROUGHPUT((short)10, "slaveThroughput"), /** * 备集群最大超发的读写配额,即系统空闲时可能达到最大的吞吐,设置比slaveThroughput大即允许超发 */ EXCEEDED_SLAVE_THROUGHPUT((short)11, "exceededSlaveThroughput"), /** * 融合云权限模型的acl */ ACL((short)12, "acl"), /** * 表所在的命名空间 */ SPACE_ID((short)13, "spaceId"), /** * entityGroup acl 开关 */ ENABLE_EG_ACL((short)14, "enableEgAcl"), /** * Point-In-Time recovery */ PITR((short)15, "pitr"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TABLE_ID return TABLE_ID; case 2: // DEVELOPER_ID return DEVELOPER_ID; case 3: // APP_ACL return APP_ACL; case 4: // QUOTA return QUOTA; case 5: // THROUGHPUT return THROUGHPUT; case 6: // DESCRIPTION return DESCRIPTION; case 7: // STREAM return STREAM; case 8: // ENABLE_SYS_SNAPSHOT return ENABLE_SYS_SNAPSHOT; case 9: // EXCEEDED_THROUGHPUT return EXCEEDED_THROUGHPUT; case 10: // SLAVE_THROUGHPUT return SLAVE_THROUGHPUT; case 11: // EXCEEDED_SLAVE_THROUGHPUT return EXCEEDED_SLAVE_THROUGHPUT; case 12: // ACL return ACL; case 13: // SPACE_ID return SPACE_ID; case 14: // ENABLE_EG_ACL return ENABLE_EG_ACL; case 15: // PITR return PITR; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __ENABLESYSSNAPSHOT_ISSET_ID = 0; private static final int __ENABLEEGACL_ISSET_ID = 1; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.TABLE_ID,_Fields.DEVELOPER_ID,_Fields.APP_ACL,_Fields.QUOTA,_Fields.THROUGHPUT,_Fields.DESCRIPTION,_Fields.STREAM,_Fields.ENABLE_SYS_SNAPSHOT,_Fields.EXCEEDED_THROUGHPUT,_Fields.SLAVE_THROUGHPUT,_Fields.EXCEEDED_SLAVE_THROUGHPUT,_Fields.ACL,_Fields.SPACE_ID,_Fields.ENABLE_EG_ACL,_Fields.PITR}; public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TABLE_ID, new libthrift091.meta_data.FieldMetaData("tableId", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.DEVELOPER_ID, new libthrift091.meta_data.FieldMetaData("developerId", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.APP_ACL, new libthrift091.meta_data.FieldMetaData("appAcl", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.MAP , "AclConf"))); tmpMap.put(_Fields.QUOTA, new libthrift091.meta_data.FieldMetaData("quota", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, TableQuota.class))); tmpMap.put(_Fields.THROUGHPUT, new libthrift091.meta_data.FieldMetaData("throughput", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ProvisionThroughput.class))); tmpMap.put(_Fields.DESCRIPTION, new libthrift091.meta_data.FieldMetaData("description", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.STREAM, new libthrift091.meta_data.FieldMetaData("stream", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, StreamSpec.class))); tmpMap.put(_Fields.ENABLE_SYS_SNAPSHOT, new libthrift091.meta_data.FieldMetaData("enableSysSnapshot", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BOOL))); tmpMap.put(_Fields.EXCEEDED_THROUGHPUT, new libthrift091.meta_data.FieldMetaData("exceededThroughput", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ProvisionThroughput.class))); tmpMap.put(_Fields.SLAVE_THROUGHPUT, new libthrift091.meta_data.FieldMetaData("slaveThroughput", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ProvisionThroughput.class))); tmpMap.put(_Fields.EXCEEDED_SLAVE_THROUGHPUT, new libthrift091.meta_data.FieldMetaData("exceededSlaveThroughput", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ProvisionThroughput.class))); tmpMap.put(_Fields.ACL, new libthrift091.meta_data.FieldMetaData("acl", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING), new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, new libthrift091.meta_data.EnumMetaData(libthrift091.protocol.TType.ENUM, Permission.class))))); tmpMap.put(_Fields.SPACE_ID, new libthrift091.meta_data.FieldMetaData("spaceId", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.ENABLE_EG_ACL, new libthrift091.meta_data.FieldMetaData("enableEgAcl", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BOOL))); tmpMap.put(_Fields.PITR, new libthrift091.meta_data.FieldMetaData("pitr", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, PointInTimeRecovery.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(TableMetadata.class, metaDataMap); } public TableMetadata() { this.enableEgAcl = false; } /** * Performs a deep copy on <i>other</i>. */ public TableMetadata(TableMetadata other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetTableId()) { this.tableId = other.tableId; } if (other.isSetDeveloperId()) { this.developerId = other.developerId; } if (other.isSetAppAcl()) { this.appAcl = other.appAcl; } if (other.isSetQuota()) { this.quota = new TableQuota(other.quota); } if (other.isSetThroughput()) { this.throughput = new ProvisionThroughput(other.throughput); } if (other.isSetDescription()) { this.description = other.description; } if (other.isSetStream()) { this.stream = new StreamSpec(other.stream); } this.enableSysSnapshot = other.enableSysSnapshot; if (other.isSetExceededThroughput()) { this.exceededThroughput = new ProvisionThroughput(other.exceededThroughput); } if (other.isSetSlaveThroughput()) { this.slaveThroughput = new ProvisionThroughput(other.slaveThroughput); } if (other.isSetExceededSlaveThroughput()) { this.exceededSlaveThroughput = new ProvisionThroughput(other.exceededSlaveThroughput); } if (other.isSetAcl()) { Map<String,List<Permission>> __this__acl = new HashMap<String,List<Permission>>(other.acl.size()); for (Map.Entry<String, List<Permission>> other_element : other.acl.entrySet()) { String other_element_key = other_element.getKey(); List<Permission> other_element_value = other_element.getValue(); String __this__acl_copy_key = other_element_key; List<Permission> __this__acl_copy_value = new ArrayList<Permission>(other_element_value.size()); for (Permission other_element_value_element : other_element_value) { __this__acl_copy_value.add(other_element_value_element); } __this__acl.put(__this__acl_copy_key, __this__acl_copy_value); } this.acl = __this__acl; } if (other.isSetSpaceId()) { this.spaceId = other.spaceId; } this.enableEgAcl = other.enableEgAcl; if (other.isSetPitr()) { this.pitr = new PointInTimeRecovery(other.pitr); } } public TableMetadata deepCopy() { return new TableMetadata(this); } @Override public void clear() { this.tableId = null; this.developerId = null; this.appAcl = null; this.quota = null; this.throughput = null; this.description = null; this.stream = null; setEnableSysSnapshotIsSet(false); this.enableSysSnapshot = false; this.exceededThroughput = null; this.slaveThroughput = null; this.exceededSlaveThroughput = null; this.acl = null; this.spaceId = null; this.enableEgAcl = false; this.pitr = null; } /** * 表ID * 仅作为输出值,作为输入时无需指定 */ public String getTableId() { return this.tableId; } /** * 表ID * 仅作为输出值,作为输入时无需指定 */ public TableMetadata setTableId(String tableId) { this.tableId = tableId; return this; } public void unsetTableId() { this.tableId = null; } /** Returns true if field tableId is set (has been assigned a value) and false otherwise */ public boolean isSetTableId() { return this.tableId != null; } public void setTableIdIsSet(boolean value) { if (!value) { this.tableId = null; } } /** * 所有者的开发者ID, * 对于CreateTable/AlterTable,值不设置时,默认为当前登录用户。 */ public String getDeveloperId() { return this.developerId; } /** * 所有者的开发者ID, * 对于CreateTable/AlterTable,值不设置时,默认为当前登录用户。 */ public TableMetadata setDeveloperId(String developerId) { this.developerId = developerId; return this; } public void unsetDeveloperId() { this.developerId = null; } /** Returns true if field developerId is set (has been assigned a value) and false otherwise */ public boolean isSetDeveloperId() { return this.developerId != null; } public void setDeveloperIdIsSet(boolean value) { if (!value) { this.developerId = null; } } public int getAppAclSize() { return (this.appAcl == null) ? 0 : this.appAcl.size(); } public void putToAppAcl(String key, List<CannedAcl> val) { if (this.appAcl == null) { this.appAcl = new HashMap<String,List<CannedAcl>>(); } this.appAcl.put(key, val); } /** * 权限控制设置 */ public Map<String,List<CannedAcl>> getAppAcl() { return this.appAcl; } /** * 权限控制设置 */ public TableMetadata setAppAcl(Map<String,List<CannedAcl>> appAcl) { this.appAcl = appAcl; return this; } public void unsetAppAcl() { this.appAcl = null; } /** Returns true if field appAcl is set (has been assigned a value) and false otherwise */ public boolean isSetAppAcl() { return this.appAcl != null; } public void setAppAclIsSet(boolean value) { if (!value) { this.appAcl = null; } } /** * @Deprecated 空间配额 */ public TableQuota getQuota() { return this.quota; } /** * @Deprecated 空间配额 */ public TableMetadata setQuota(TableQuota quota) { this.quota = quota; return this; } public void unsetQuota() { this.quota = null; } /** Returns true if field quota is set (has been assigned a value) and false otherwise */ public boolean isSetQuota() { return this.quota != null; } public void setQuotaIsSet(boolean value) { if (!value) { this.quota = null; } } /** * 吞吐量配额 */ public ProvisionThroughput getThroughput() { return this.throughput; } /** * 吞吐量配额 */ public TableMetadata setThroughput(ProvisionThroughput throughput) { this.throughput = throughput; return this; } public void unsetThroughput() { this.throughput = null; } /** Returns true if field throughput is set (has been assigned a value) and false otherwise */ public boolean isSetThroughput() { return this.throughput != null; } public void setThroughputIsSet(boolean value) { if (!value) { this.throughput = null; } } /** * 表备注信息 */ public String getDescription() { return this.description; } /** * 表备注信息 */ public TableMetadata setDescription(String description) { this.description = description; return this; } public void unsetDescription() { this.description = null; } /** Returns true if field description is set (has been assigned a value) and false otherwise */ public boolean isSetDescription() { return this.description != null; } public void setDescriptionIsSet(boolean value) { if (!value) { this.description = null; } } /** * stream设置,deprecated */ public StreamSpec getStream() { return this.stream; } /** * stream设置,deprecated */ public TableMetadata setStream(StreamSpec stream) { this.stream = stream; return this; } public void unsetStream() { this.stream = null; } /** Returns true if field stream is set (has been assigned a value) and false otherwise */ public boolean isSetStream() { return this.stream != null; } public void setStreamIsSet(boolean value) { if (!value) { this.stream = null; } } /** * 是否支持系统定期做snapshot, 默认为true */ public boolean isEnableSysSnapshot() { return this.enableSysSnapshot; } /** * 是否支持系统定期做snapshot, 默认为true */ public TableMetadata setEnableSysSnapshot(boolean enableSysSnapshot) { this.enableSysSnapshot = enableSysSnapshot; setEnableSysSnapshotIsSet(true); return this; } public void unsetEnableSysSnapshot() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLESYSSNAPSHOT_ISSET_ID); } /** Returns true if field enableSysSnapshot is set (has been assigned a value) and false otherwise */ public boolean isSetEnableSysSnapshot() { return EncodingUtils.testBit(__isset_bitfield, __ENABLESYSSNAPSHOT_ISSET_ID); } public void setEnableSysSnapshotIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLESYSSNAPSHOT_ISSET_ID, value); } /** * 主集群最大超发的读写配额,即系统空闲时可能达到的最大吞吐,设置比throughput大即允许超发 */ public ProvisionThroughput getExceededThroughput() { return this.exceededThroughput; } /** * 主集群最大超发的读写配额,即系统空闲时可能达到的最大吞吐,设置比throughput大即允许超发 */ public TableMetadata setExceededThroughput(ProvisionThroughput exceededThroughput) { this.exceededThroughput = exceededThroughput; return this; } public void unsetExceededThroughput() { this.exceededThroughput = null; } /** Returns true if field exceededThroughput is set (has been assigned a value) and false otherwise */ public boolean isSetExceededThroughput() { return this.exceededThroughput != null; } public void setExceededThroughputIsSet(boolean value) { if (!value) { this.exceededThroughput = null; } } /** * 预设备集群读写配额 */ public ProvisionThroughput getSlaveThroughput() { return this.slaveThroughput; } /** * 预设备集群读写配额 */ public TableMetadata setSlaveThroughput(ProvisionThroughput slaveThroughput) { this.slaveThroughput = slaveThroughput; return this; } public void unsetSlaveThroughput() { this.slaveThroughput = null; } /** Returns true if field slaveThroughput is set (has been assigned a value) and false otherwise */ public boolean isSetSlaveThroughput() { return this.slaveThroughput != null; } public void setSlaveThroughputIsSet(boolean value) { if (!value) { this.slaveThroughput = null; } } /** * 备集群最大超发的读写配额,即系统空闲时可能达到最大的吞吐,设置比slaveThroughput大即允许超发 */ public ProvisionThroughput getExceededSlaveThroughput() { return this.exceededSlaveThroughput; } /** * 备集群最大超发的读写配额,即系统空闲时可能达到最大的吞吐,设置比slaveThroughput大即允许超发 */ public TableMetadata setExceededSlaveThroughput(ProvisionThroughput exceededSlaveThroughput) { this.exceededSlaveThroughput = exceededSlaveThroughput; return this; } public void unsetExceededSlaveThroughput() { this.exceededSlaveThroughput = null; } /** Returns true if field exceededSlaveThroughput is set (has been assigned a value) and false otherwise */ public boolean isSetExceededSlaveThroughput() { return this.exceededSlaveThroughput != null; } public void setExceededSlaveThroughputIsSet(boolean value) { if (!value) { this.exceededSlaveThroughput = null; } } public int getAclSize() { return (this.acl == null) ? 0 : this.acl.size(); } public void putToAcl(String key, List<Permission> val) { if (this.acl == null) { this.acl = new HashMap<String,List<Permission>>(); } this.acl.put(key, val); } /** * 融合云权限模型的acl */ public Map<String,List<Permission>> getAcl() { return this.acl; } /** * 融合云权限模型的acl */ public TableMetadata setAcl(Map<String,List<Permission>> acl) { this.acl = acl; return this; } public void unsetAcl() { this.acl = null; } /** Returns true if field acl is set (has been assigned a value) and false otherwise */ public boolean isSetAcl() { return this.acl != null; } public void setAclIsSet(boolean value) { if (!value) { this.acl = null; } } /** * 表所在的命名空间 */ public String getSpaceId() { return this.spaceId; } /** * 表所在的命名空间 */ public TableMetadata setSpaceId(String spaceId) { this.spaceId = spaceId; return this; } public void unsetSpaceId() { this.spaceId = null; } /** Returns true if field spaceId is set (has been assigned a value) and false otherwise */ public boolean isSetSpaceId() { return this.spaceId != null; } public void setSpaceIdIsSet(boolean value) { if (!value) { this.spaceId = null; } } /** * entityGroup acl 开关 */ public boolean isEnableEgAcl() { return this.enableEgAcl; } /** * entityGroup acl 开关 */ public TableMetadata setEnableEgAcl(boolean enableEgAcl) { this.enableEgAcl = enableEgAcl; setEnableEgAclIsSet(true); return this; } public void unsetEnableEgAcl() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLEEGACL_ISSET_ID); } /** Returns true if field enableEgAcl is set (has been assigned a value) and false otherwise */ public boolean isSetEnableEgAcl() { return EncodingUtils.testBit(__isset_bitfield, __ENABLEEGACL_ISSET_ID); } public void setEnableEgAclIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLEEGACL_ISSET_ID, value); } /** * Point-In-Time recovery */ public PointInTimeRecovery getPitr() { return this.pitr; } /** * Point-In-Time recovery */ public TableMetadata setPitr(PointInTimeRecovery pitr) { this.pitr = pitr; return this; } public void unsetPitr() { this.pitr = null; } /** Returns true if field pitr is set (has been assigned a value) and false otherwise */ public boolean isSetPitr() { return this.pitr != null; } public void setPitrIsSet(boolean value) { if (!value) { this.pitr = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TABLE_ID: if (value == null) { unsetTableId(); } else { setTableId((String)value); } break; case DEVELOPER_ID: if (value == null) { unsetDeveloperId(); } else { setDeveloperId((String)value); } break; case APP_ACL: if (value == null) { unsetAppAcl(); } else { setAppAcl((Map<String,List<CannedAcl>>)value); } break; case QUOTA: if (value == null) { unsetQuota(); } else { setQuota((TableQuota)value); } break; case THROUGHPUT: if (value == null) { unsetThroughput(); } else { setThroughput((ProvisionThroughput)value); } break; case DESCRIPTION: if (value == null) { unsetDescription(); } else { setDescription((String)value); } break; case STREAM: if (value == null) { unsetStream(); } else { setStream((StreamSpec)value); } break; case ENABLE_SYS_SNAPSHOT: if (value == null) { unsetEnableSysSnapshot(); } else { setEnableSysSnapshot((Boolean)value); } break; case EXCEEDED_THROUGHPUT: if (value == null) { unsetExceededThroughput(); } else { setExceededThroughput((ProvisionThroughput)value); } break; case SLAVE_THROUGHPUT: if (value == null) { unsetSlaveThroughput(); } else { setSlaveThroughput((ProvisionThroughput)value); } break; case EXCEEDED_SLAVE_THROUGHPUT: if (value == null) { unsetExceededSlaveThroughput(); } else { setExceededSlaveThroughput((ProvisionThroughput)value); } break; case ACL: if (value == null) { unsetAcl(); } else { setAcl((Map<String,List<Permission>>)value); } break; case SPACE_ID: if (value == null) { unsetSpaceId(); } else { setSpaceId((String)value); } break; case ENABLE_EG_ACL: if (value == null) { unsetEnableEgAcl(); } else { setEnableEgAcl((Boolean)value); } break; case PITR: if (value == null) { unsetPitr(); } else { setPitr((PointInTimeRecovery)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TABLE_ID: return getTableId(); case DEVELOPER_ID: return getDeveloperId(); case APP_ACL: return getAppAcl(); case QUOTA: return getQuota(); case THROUGHPUT: return getThroughput(); case DESCRIPTION: return getDescription(); case STREAM: return getStream(); case ENABLE_SYS_SNAPSHOT: return Boolean.valueOf(isEnableSysSnapshot()); case EXCEEDED_THROUGHPUT: return getExceededThroughput(); case SLAVE_THROUGHPUT: return getSlaveThroughput(); case EXCEEDED_SLAVE_THROUGHPUT: return getExceededSlaveThroughput(); case ACL: return getAcl(); case SPACE_ID: return getSpaceId(); case ENABLE_EG_ACL: return Boolean.valueOf(isEnableEgAcl()); case PITR: return getPitr(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TABLE_ID: return isSetTableId(); case DEVELOPER_ID: return isSetDeveloperId(); case APP_ACL: return isSetAppAcl(); case QUOTA: return isSetQuota(); case THROUGHPUT: return isSetThroughput(); case DESCRIPTION: return isSetDescription(); case STREAM: return isSetStream(); case ENABLE_SYS_SNAPSHOT: return isSetEnableSysSnapshot(); case EXCEEDED_THROUGHPUT: return isSetExceededThroughput(); case SLAVE_THROUGHPUT: return isSetSlaveThroughput(); case EXCEEDED_SLAVE_THROUGHPUT: return isSetExceededSlaveThroughput(); case ACL: return isSetAcl(); case SPACE_ID: return isSetSpaceId(); case ENABLE_EG_ACL: return isSetEnableEgAcl(); case PITR: return isSetPitr(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TableMetadata) return this.equals((TableMetadata)that); return false; } public boolean equals(TableMetadata that) { if (that == null) return false; boolean this_present_tableId = true && this.isSetTableId(); boolean that_present_tableId = true && that.isSetTableId(); if (this_present_tableId || that_present_tableId) { if (!(this_present_tableId && that_present_tableId)) return false; if (!this.tableId.equals(that.tableId)) return false; } boolean this_present_developerId = true && this.isSetDeveloperId(); boolean that_present_developerId = true && that.isSetDeveloperId(); if (this_present_developerId || that_present_developerId) { if (!(this_present_developerId && that_present_developerId)) return false; if (!this.developerId.equals(that.developerId)) return false; } boolean this_present_appAcl = true && this.isSetAppAcl(); boolean that_present_appAcl = true && that.isSetAppAcl(); if (this_present_appAcl || that_present_appAcl) { if (!(this_present_appAcl && that_present_appAcl)) return false; if (!this.appAcl.equals(that.appAcl)) return false; } boolean this_present_quota = true && this.isSetQuota(); boolean that_present_quota = true && that.isSetQuota(); if (this_present_quota || that_present_quota) { if (!(this_present_quota && that_present_quota)) return false; if (!this.quota.equals(that.quota)) return false; } boolean this_present_throughput = true && this.isSetThroughput(); boolean that_present_throughput = true && that.isSetThroughput(); if (this_present_throughput || that_present_throughput) { if (!(this_present_throughput && that_present_throughput)) return false; if (!this.throughput.equals(that.throughput)) return false; } boolean this_present_description = true && this.isSetDescription(); boolean that_present_description = true && that.isSetDescription(); if (this_present_description || that_present_description) { if (!(this_present_description && that_present_description)) return false; if (!this.description.equals(that.description)) return false; } boolean this_present_stream = true && this.isSetStream(); boolean that_present_stream = true && that.isSetStream(); if (this_present_stream || that_present_stream) { if (!(this_present_stream && that_present_stream)) return false; if (!this.stream.equals(that.stream)) return false; } boolean this_present_enableSysSnapshot = true && this.isSetEnableSysSnapshot(); boolean that_present_enableSysSnapshot = true && that.isSetEnableSysSnapshot(); if (this_present_enableSysSnapshot || that_present_enableSysSnapshot) { if (!(this_present_enableSysSnapshot && that_present_enableSysSnapshot)) return false; if (this.enableSysSnapshot != that.enableSysSnapshot) return false; } boolean this_present_exceededThroughput = true && this.isSetExceededThroughput(); boolean that_present_exceededThroughput = true && that.isSetExceededThroughput(); if (this_present_exceededThroughput || that_present_exceededThroughput) { if (!(this_present_exceededThroughput && that_present_exceededThroughput)) return false; if (!this.exceededThroughput.equals(that.exceededThroughput)) return false; } boolean this_present_slaveThroughput = true && this.isSetSlaveThroughput(); boolean that_present_slaveThroughput = true && that.isSetSlaveThroughput(); if (this_present_slaveThroughput || that_present_slaveThroughput) { if (!(this_present_slaveThroughput && that_present_slaveThroughput)) return false; if (!this.slaveThroughput.equals(that.slaveThroughput)) return false; } boolean this_present_exceededSlaveThroughput = true && this.isSetExceededSlaveThroughput(); boolean that_present_exceededSlaveThroughput = true && that.isSetExceededSlaveThroughput(); if (this_present_exceededSlaveThroughput || that_present_exceededSlaveThroughput) { if (!(this_present_exceededSlaveThroughput && that_present_exceededSlaveThroughput)) return false; if (!this.exceededSlaveThroughput.equals(that.exceededSlaveThroughput)) return false; } boolean this_present_acl = true && this.isSetAcl(); boolean that_present_acl = true && that.isSetAcl(); if (this_present_acl || that_present_acl) { if (!(this_present_acl && that_present_acl)) return false; if (!this.acl.equals(that.acl)) return false; } boolean this_present_spaceId = true && this.isSetSpaceId(); boolean that_present_spaceId = true && that.isSetSpaceId(); if (this_present_spaceId || that_present_spaceId) { if (!(this_present_spaceId && that_present_spaceId)) return false; if (!this.spaceId.equals(that.spaceId)) return false; } boolean this_present_enableEgAcl = true && this.isSetEnableEgAcl(); boolean that_present_enableEgAcl = true && that.isSetEnableEgAcl(); if (this_present_enableEgAcl || that_present_enableEgAcl) { if (!(this_present_enableEgAcl && that_present_enableEgAcl)) return false; if (this.enableEgAcl != that.enableEgAcl) return false; } boolean this_present_pitr = true && this.isSetPitr(); boolean that_present_pitr = true && that.isSetPitr(); if (this_present_pitr || that_present_pitr) { if (!(this_present_pitr && that_present_pitr)) return false; if (!this.pitr.equals(that.pitr)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_tableId = true && (isSetTableId()); list.add(present_tableId); if (present_tableId) list.add(tableId); boolean present_developerId = true && (isSetDeveloperId()); list.add(present_developerId); if (present_developerId) list.add(developerId); boolean present_appAcl = true && (isSetAppAcl()); list.add(present_appAcl); if (present_appAcl) list.add(appAcl); boolean present_quota = true && (isSetQuota()); list.add(present_quota); if (present_quota) list.add(quota); boolean present_throughput = true && (isSetThroughput()); list.add(present_throughput); if (present_throughput) list.add(throughput); boolean present_description = true && (isSetDescription()); list.add(present_description); if (present_description) list.add(description); boolean present_stream = true && (isSetStream()); list.add(present_stream); if (present_stream) list.add(stream); boolean present_enableSysSnapshot = true && (isSetEnableSysSnapshot()); list.add(present_enableSysSnapshot); if (present_enableSysSnapshot) list.add(enableSysSnapshot); boolean present_exceededThroughput = true && (isSetExceededThroughput()); list.add(present_exceededThroughput); if (present_exceededThroughput) list.add(exceededThroughput); boolean present_slaveThroughput = true && (isSetSlaveThroughput()); list.add(present_slaveThroughput); if (present_slaveThroughput) list.add(slaveThroughput); boolean present_exceededSlaveThroughput = true && (isSetExceededSlaveThroughput()); list.add(present_exceededSlaveThroughput); if (present_exceededSlaveThroughput) list.add(exceededSlaveThroughput); boolean present_acl = true && (isSetAcl()); list.add(present_acl); if (present_acl) list.add(acl); boolean present_spaceId = true && (isSetSpaceId()); list.add(present_spaceId); if (present_spaceId) list.add(spaceId); boolean present_enableEgAcl = true && (isSetEnableEgAcl()); list.add(present_enableEgAcl); if (present_enableEgAcl) list.add(enableEgAcl); boolean present_pitr = true && (isSetPitr()); list.add(present_pitr); if (present_pitr) list.add(pitr); return list.hashCode(); } @Override public int compareTo(TableMetadata other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetTableId()).compareTo(other.isSetTableId()); if (lastComparison != 0) { return lastComparison; } if (isSetTableId()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.tableId, other.tableId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDeveloperId()).compareTo(other.isSetDeveloperId()); if (lastComparison != 0) { return lastComparison; } if (isSetDeveloperId()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.developerId, other.developerId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAppAcl()).compareTo(other.isSetAppAcl()); if (lastComparison != 0) { return lastComparison; } if (isSetAppAcl()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.appAcl, other.appAcl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetQuota()).compareTo(other.isSetQuota()); if (lastComparison != 0) { return lastComparison; } if (isSetQuota()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.quota, other.quota); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetThroughput()).compareTo(other.isSetThroughput()); if (lastComparison != 0) { return lastComparison; } if (isSetThroughput()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.throughput, other.throughput); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription()); if (lastComparison != 0) { return lastComparison; } if (isSetDescription()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.description, other.description); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStream()).compareTo(other.isSetStream()); if (lastComparison != 0) { return lastComparison; } if (isSetStream()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.stream, other.stream); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnableSysSnapshot()).compareTo(other.isSetEnableSysSnapshot()); if (lastComparison != 0) { return lastComparison; } if (isSetEnableSysSnapshot()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.enableSysSnapshot, other.enableSysSnapshot); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetExceededThroughput()).compareTo(other.isSetExceededThroughput()); if (lastComparison != 0) { return lastComparison; } if (isSetExceededThroughput()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.exceededThroughput, other.exceededThroughput); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSlaveThroughput()).compareTo(other.isSetSlaveThroughput()); if (lastComparison != 0) { return lastComparison; } if (isSetSlaveThroughput()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.slaveThroughput, other.slaveThroughput); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetExceededSlaveThroughput()).compareTo(other.isSetExceededSlaveThroughput()); if (lastComparison != 0) { return lastComparison; } if (isSetExceededSlaveThroughput()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.exceededSlaveThroughput, other.exceededSlaveThroughput); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAcl()).compareTo(other.isSetAcl()); if (lastComparison != 0) { return lastComparison; } if (isSetAcl()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.acl, other.acl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSpaceId()).compareTo(other.isSetSpaceId()); if (lastComparison != 0) { return lastComparison; } if (isSetSpaceId()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.spaceId, other.spaceId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnableEgAcl()).compareTo(other.isSetEnableEgAcl()); if (lastComparison != 0) { return lastComparison; } if (isSetEnableEgAcl()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.enableEgAcl, other.enableEgAcl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPitr()).compareTo(other.isSetPitr()); if (lastComparison != 0) { return lastComparison; } if (isSetPitr()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.pitr, other.pitr); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TableMetadata("); boolean first = true; if (isSetTableId()) { sb.append("tableId:"); if (this.tableId == null) { sb.append("null"); } else { sb.append(this.tableId); } first = false; } if (isSetDeveloperId()) { if (!first) sb.append(", "); sb.append("developerId:"); if (this.developerId == null) { sb.append("null"); } else { sb.append(this.developerId); } first = false; } if (isSetAppAcl()) { if (!first) sb.append(", "); sb.append("appAcl:"); if (this.appAcl == null) { sb.append("null"); } else { sb.append(this.appAcl); } first = false; } if (isSetQuota()) { if (!first) sb.append(", "); sb.append("quota:"); if (this.quota == null) { sb.append("null"); } else { sb.append(this.quota); } first = false; } if (isSetThroughput()) { if (!first) sb.append(", "); sb.append("throughput:"); if (this.throughput == null) { sb.append("null"); } else { sb.append(this.throughput); } first = false; } if (isSetDescription()) { if (!first) sb.append(", "); sb.append("description:"); if (this.description == null) { sb.append("null"); } else { sb.append(this.description); } first = false; } if (isSetStream()) { if (!first) sb.append(", "); sb.append("stream:"); if (this.stream == null) { sb.append("null"); } else { sb.append(this.stream); } first = false; } if (isSetEnableSysSnapshot()) { if (!first) sb.append(", "); sb.append("enableSysSnapshot:"); sb.append(this.enableSysSnapshot); first = false; } if (isSetExceededThroughput()) { if (!first) sb.append(", "); sb.append("exceededThroughput:"); if (this.exceededThroughput == null) { sb.append("null"); } else { sb.append(this.exceededThroughput); } first = false; } if (isSetSlaveThroughput()) { if (!first) sb.append(", "); sb.append("slaveThroughput:"); if (this.slaveThroughput == null) { sb.append("null"); } else { sb.append(this.slaveThroughput); } first = false; } if (isSetExceededSlaveThroughput()) { if (!first) sb.append(", "); sb.append("exceededSlaveThroughput:"); if (this.exceededSlaveThroughput == null) { sb.append("null"); } else { sb.append(this.exceededSlaveThroughput); } first = false; } if (isSetAcl()) { if (!first) sb.append(", "); sb.append("acl:"); if (this.acl == null) { sb.append("null"); } else { sb.append(this.acl); } first = false; } if (isSetSpaceId()) { if (!first) sb.append(", "); sb.append("spaceId:"); if (this.spaceId == null) { sb.append("null"); } else { sb.append(this.spaceId); } first = false; } if (isSetEnableEgAcl()) { if (!first) sb.append(", "); sb.append("enableEgAcl:"); sb.append(this.enableEgAcl); first = false; } if (isSetPitr()) { if (!first) sb.append(", "); sb.append("pitr:"); if (this.pitr == null) { sb.append("null"); } else { sb.append(this.pitr); } first = false; } sb.append(")"); return sb.toString(); } public void validate() throws libthrift091.TException { // check for required fields // check for sub-struct validity if (quota != null) { quota.validate(); } if (throughput != null) { throughput.validate(); } if (stream != null) { stream.validate(); } if (exceededThroughput != null) { exceededThroughput.validate(); } if (slaveThroughput != null) { slaveThroughput.validate(); } if (exceededSlaveThroughput != null) { exceededSlaveThroughput.validate(); } if (pitr != null) { pitr.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private static class TableMetadataStandardSchemeFactory implements SchemeFactory { public TableMetadataStandardScheme getScheme() { return new TableMetadataStandardScheme(); } } private static class TableMetadataStandardScheme extends StandardScheme<TableMetadata> { public void read(libthrift091.protocol.TProtocol iprot, TableMetadata struct) throws libthrift091.TException { libthrift091.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == libthrift091.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TABLE_ID if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.tableId = iprot.readString(); struct.setTableIdIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // DEVELOPER_ID if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.developerId = iprot.readString(); struct.setDeveloperIdIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // APP_ACL if (schemeField.type == libthrift091.protocol.TType.MAP) { { libthrift091.protocol.TMap _map160 = iprot.readMapBegin(); struct.appAcl = new HashMap<String,List<CannedAcl>>(2*_map160.size); String _key161; List<CannedAcl> _val162; for (int _i163 = 0; _i163 < _map160.size; ++_i163) { _key161 = iprot.readString(); { libthrift091.protocol.TList _list164 = iprot.readListBegin(); _val162 = new ArrayList<CannedAcl>(_list164.size); CannedAcl _elem165; for (int _i166 = 0; _i166 < _list164.size; ++_i166) { _elem165 = com.xiaomi.infra.galaxy.sds.thrift.CannedAcl.findByValue(iprot.readI32()); _val162.add(_elem165); } iprot.readListEnd(); } struct.appAcl.put(_key161, _val162); } iprot.readMapEnd(); } struct.setAppAclIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // QUOTA if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.quota = new TableQuota(); struct.quota.read(iprot); struct.setQuotaIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // THROUGHPUT if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.throughput = new ProvisionThroughput(); struct.throughput.read(iprot); struct.setThroughputIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // DESCRIPTION if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.description = iprot.readString(); struct.setDescriptionIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // STREAM if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.stream = new StreamSpec(); struct.stream.read(iprot); struct.setStreamIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // ENABLE_SYS_SNAPSHOT if (schemeField.type == libthrift091.protocol.TType.BOOL) { struct.enableSysSnapshot = iprot.readBool(); struct.setEnableSysSnapshotIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // EXCEEDED_THROUGHPUT if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.exceededThroughput = new ProvisionThroughput(); struct.exceededThroughput.read(iprot); struct.setExceededThroughputIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 10: // SLAVE_THROUGHPUT if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.slaveThroughput = new ProvisionThroughput(); struct.slaveThroughput.read(iprot); struct.setSlaveThroughputIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 11: // EXCEEDED_SLAVE_THROUGHPUT if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.exceededSlaveThroughput = new ProvisionThroughput(); struct.exceededSlaveThroughput.read(iprot); struct.setExceededSlaveThroughputIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 12: // ACL if (schemeField.type == libthrift091.protocol.TType.MAP) { { libthrift091.protocol.TMap _map167 = iprot.readMapBegin(); struct.acl = new HashMap<String,List<Permission>>(2*_map167.size); String _key168; List<Permission> _val169; for (int _i170 = 0; _i170 < _map167.size; ++_i170) { _key168 = iprot.readString(); { libthrift091.protocol.TList _list171 = iprot.readListBegin(); _val169 = new ArrayList<Permission>(_list171.size); Permission _elem172; for (int _i173 = 0; _i173 < _list171.size; ++_i173) { _elem172 = com.xiaomi.infra.galaxy.sds.thrift.Permission.findByValue(iprot.readI32()); _val169.add(_elem172); } iprot.readListEnd(); } struct.acl.put(_key168, _val169); } iprot.readMapEnd(); } struct.setAclIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 13: // SPACE_ID if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.spaceId = iprot.readString(); struct.setSpaceIdIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 14: // ENABLE_EG_ACL if (schemeField.type == libthrift091.protocol.TType.BOOL) { struct.enableEgAcl = iprot.readBool(); struct.setEnableEgAclIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 15: // PITR if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.pitr = new PointInTimeRecovery(); struct.pitr.read(iprot); struct.setPitrIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(libthrift091.protocol.TProtocol oprot, TableMetadata struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.tableId != null) { if (struct.isSetTableId()) { oprot.writeFieldBegin(TABLE_ID_FIELD_DESC); oprot.writeString(struct.tableId); oprot.writeFieldEnd(); } } if (struct.developerId != null) { if (struct.isSetDeveloperId()) { oprot.writeFieldBegin(DEVELOPER_ID_FIELD_DESC); oprot.writeString(struct.developerId); oprot.writeFieldEnd(); } } if (struct.appAcl != null) { if (struct.isSetAppAcl()) { oprot.writeFieldBegin(APP_ACL_FIELD_DESC); { oprot.writeMapBegin(new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.LIST, struct.appAcl.size())); for (Map.Entry<String, List<CannedAcl>> _iter174 : struct.appAcl.entrySet()) { oprot.writeString(_iter174.getKey()); { oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.I32, _iter174.getValue().size())); for (CannedAcl _iter175 : _iter174.getValue()) { oprot.writeI32(_iter175.getValue()); } oprot.writeListEnd(); } } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } } if (struct.quota != null) { if (struct.isSetQuota()) { oprot.writeFieldBegin(QUOTA_FIELD_DESC); struct.quota.write(oprot); oprot.writeFieldEnd(); } } if (struct.throughput != null) { if (struct.isSetThroughput()) { oprot.writeFieldBegin(THROUGHPUT_FIELD_DESC); struct.throughput.write(oprot); oprot.writeFieldEnd(); } } if (struct.description != null) { if (struct.isSetDescription()) { oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); oprot.writeString(struct.description); oprot.writeFieldEnd(); } } if (struct.stream != null) { if (struct.isSetStream()) { oprot.writeFieldBegin(STREAM_FIELD_DESC); struct.stream.write(oprot); oprot.writeFieldEnd(); } } if (struct.isSetEnableSysSnapshot()) { oprot.writeFieldBegin(ENABLE_SYS_SNAPSHOT_FIELD_DESC); oprot.writeBool(struct.enableSysSnapshot); oprot.writeFieldEnd(); } if (struct.exceededThroughput != null) { if (struct.isSetExceededThroughput()) { oprot.writeFieldBegin(EXCEEDED_THROUGHPUT_FIELD_DESC); struct.exceededThroughput.write(oprot); oprot.writeFieldEnd(); } } if (struct.slaveThroughput != null) { if (struct.isSetSlaveThroughput()) { oprot.writeFieldBegin(SLAVE_THROUGHPUT_FIELD_DESC); struct.slaveThroughput.write(oprot); oprot.writeFieldEnd(); } } if (struct.exceededSlaveThroughput != null) { if (struct.isSetExceededSlaveThroughput()) { oprot.writeFieldBegin(EXCEEDED_SLAVE_THROUGHPUT_FIELD_DESC); struct.exceededSlaveThroughput.write(oprot); oprot.writeFieldEnd(); } } if (struct.acl != null) { if (struct.isSetAcl()) { oprot.writeFieldBegin(ACL_FIELD_DESC); { oprot.writeMapBegin(new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.LIST, struct.acl.size())); for (Map.Entry<String, List<Permission>> _iter176 : struct.acl.entrySet()) { oprot.writeString(_iter176.getKey()); { oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.I32, _iter176.getValue().size())); for (Permission _iter177 : _iter176.getValue()) { oprot.writeI32(_iter177.getValue()); } oprot.writeListEnd(); } } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } } if (struct.spaceId != null) { if (struct.isSetSpaceId()) { oprot.writeFieldBegin(SPACE_ID_FIELD_DESC); oprot.writeString(struct.spaceId); oprot.writeFieldEnd(); } } if (struct.isSetEnableEgAcl()) { oprot.writeFieldBegin(ENABLE_EG_ACL_FIELD_DESC); oprot.writeBool(struct.enableEgAcl); oprot.writeFieldEnd(); } if (struct.pitr != null) { if (struct.isSetPitr()) { oprot.writeFieldBegin(PITR_FIELD_DESC); struct.pitr.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TableMetadataTupleSchemeFactory implements SchemeFactory { public TableMetadataTupleScheme getScheme() { return new TableMetadataTupleScheme(); } } private static class TableMetadataTupleScheme extends TupleScheme<TableMetadata> { @Override public void write(libthrift091.protocol.TProtocol prot, TableMetadata struct) throws libthrift091.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTableId()) { optionals.set(0); } if (struct.isSetDeveloperId()) { optionals.set(1); } if (struct.isSetAppAcl()) { optionals.set(2); } if (struct.isSetQuota()) { optionals.set(3); } if (struct.isSetThroughput()) { optionals.set(4); } if (struct.isSetDescription()) { optionals.set(5); } if (struct.isSetStream()) { optionals.set(6); } if (struct.isSetEnableSysSnapshot()) { optionals.set(7); } if (struct.isSetExceededThroughput()) { optionals.set(8); } if (struct.isSetSlaveThroughput()) { optionals.set(9); } if (struct.isSetExceededSlaveThroughput()) { optionals.set(10); } if (struct.isSetAcl()) { optionals.set(11); } if (struct.isSetSpaceId()) { optionals.set(12); } if (struct.isSetEnableEgAcl()) { optionals.set(13); } if (struct.isSetPitr()) { optionals.set(14); } oprot.writeBitSet(optionals, 15); if (struct.isSetTableId()) { oprot.writeString(struct.tableId); } if (struct.isSetDeveloperId()) { oprot.writeString(struct.developerId); } if (struct.isSetAppAcl()) { { oprot.writeI32(struct.appAcl.size()); for (Map.Entry<String, List<CannedAcl>> _iter178 : struct.appAcl.entrySet()) { oprot.writeString(_iter178.getKey()); { oprot.writeI32(_iter178.getValue().size()); for (CannedAcl _iter179 : _iter178.getValue()) { oprot.writeI32(_iter179.getValue()); } } } } } if (struct.isSetQuota()) { struct.quota.write(oprot); } if (struct.isSetThroughput()) { struct.throughput.write(oprot); } if (struct.isSetDescription()) { oprot.writeString(struct.description); } if (struct.isSetStream()) { struct.stream.write(oprot); } if (struct.isSetEnableSysSnapshot()) { oprot.writeBool(struct.enableSysSnapshot); } if (struct.isSetExceededThroughput()) { struct.exceededThroughput.write(oprot); } if (struct.isSetSlaveThroughput()) { struct.slaveThroughput.write(oprot); } if (struct.isSetExceededSlaveThroughput()) { struct.exceededSlaveThroughput.write(oprot); } if (struct.isSetAcl()) { { oprot.writeI32(struct.acl.size()); for (Map.Entry<String, List<Permission>> _iter180 : struct.acl.entrySet()) { oprot.writeString(_iter180.getKey()); { oprot.writeI32(_iter180.getValue().size()); for (Permission _iter181 : _iter180.getValue()) { oprot.writeI32(_iter181.getValue()); } } } } } if (struct.isSetSpaceId()) { oprot.writeString(struct.spaceId); } if (struct.isSetEnableEgAcl()) { oprot.writeBool(struct.enableEgAcl); } if (struct.isSetPitr()) { struct.pitr.write(oprot); } } @Override public void read(libthrift091.protocol.TProtocol prot, TableMetadata struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(15); if (incoming.get(0)) { struct.tableId = iprot.readString(); struct.setTableIdIsSet(true); } if (incoming.get(1)) { struct.developerId = iprot.readString(); struct.setDeveloperIdIsSet(true); } if (incoming.get(2)) { { libthrift091.protocol.TMap _map182 = new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.LIST, iprot.readI32()); struct.appAcl = new HashMap<String,List<CannedAcl>>(2*_map182.size); String _key183; List<CannedAcl> _val184; for (int _i185 = 0; _i185 < _map182.size; ++_i185) { _key183 = iprot.readString(); { libthrift091.protocol.TList _list186 = new libthrift091.protocol.TList(libthrift091.protocol.TType.I32, iprot.readI32()); _val184 = new ArrayList<CannedAcl>(_list186.size); CannedAcl _elem187; for (int _i188 = 0; _i188 < _list186.size; ++_i188) { _elem187 = com.xiaomi.infra.galaxy.sds.thrift.CannedAcl.findByValue(iprot.readI32()); _val184.add(_elem187); } } struct.appAcl.put(_key183, _val184); } } struct.setAppAclIsSet(true); } if (incoming.get(3)) { struct.quota = new TableQuota(); struct.quota.read(iprot); struct.setQuotaIsSet(true); } if (incoming.get(4)) { struct.throughput = new ProvisionThroughput(); struct.throughput.read(iprot); struct.setThroughputIsSet(true); } if (incoming.get(5)) { struct.description = iprot.readString(); struct.setDescriptionIsSet(true); } if (incoming.get(6)) { struct.stream = new StreamSpec(); struct.stream.read(iprot); struct.setStreamIsSet(true); } if (incoming.get(7)) { struct.enableSysSnapshot = iprot.readBool(); struct.setEnableSysSnapshotIsSet(true); } if (incoming.get(8)) { struct.exceededThroughput = new ProvisionThroughput(); struct.exceededThroughput.read(iprot); struct.setExceededThroughputIsSet(true); } if (incoming.get(9)) { struct.slaveThroughput = new ProvisionThroughput(); struct.slaveThroughput.read(iprot); struct.setSlaveThroughputIsSet(true); } if (incoming.get(10)) { struct.exceededSlaveThroughput = new ProvisionThroughput(); struct.exceededSlaveThroughput.read(iprot); struct.setExceededSlaveThroughputIsSet(true); } if (incoming.get(11)) { { libthrift091.protocol.TMap _map189 = new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.LIST, iprot.readI32()); struct.acl = new HashMap<String,List<Permission>>(2*_map189.size); String _key190; List<Permission> _val191; for (int _i192 = 0; _i192 < _map189.size; ++_i192) { _key190 = iprot.readString(); { libthrift091.protocol.TList _list193 = new libthrift091.protocol.TList(libthrift091.protocol.TType.I32, iprot.readI32()); _val191 = new ArrayList<Permission>(_list193.size); Permission _elem194; for (int _i195 = 0; _i195 < _list193.size; ++_i195) { _elem194 = com.xiaomi.infra.galaxy.sds.thrift.Permission.findByValue(iprot.readI32()); _val191.add(_elem194); } } struct.acl.put(_key190, _val191); } } struct.setAclIsSet(true); } if (incoming.get(12)) { struct.spaceId = iprot.readString(); struct.setSpaceIdIsSet(true); } if (incoming.get(13)) { struct.enableEgAcl = iprot.readBool(); struct.setEnableEgAclIsSet(true); } if (incoming.get(14)) { struct.pitr = new PointInTimeRecovery(); struct.pitr.read(iprot); struct.setPitrIsSet(true); } } } }