/**
* 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 QuotaInfo implements libthrift091.TBase<QuotaInfo, QuotaInfo._Fields>, java.io.Serializable, Cloneable, Comparable<QuotaInfo> {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("QuotaInfo");
private static final libthrift091.protocol.TField ACCOUNT_ID_FIELD_DESC = new libthrift091.protocol.TField("accountId", libthrift091.protocol.TType.STRING, (short)1);
private static final libthrift091.protocol.TField TABLE_NUM_FIELD_DESC = new libthrift091.protocol.TField("tableNum", libthrift091.protocol.TType.I32, (short)2);
private static final libthrift091.protocol.TField TABLE_NUM_USED_FIELD_DESC = new libthrift091.protocol.TField("tableNumUsed", libthrift091.protocol.TType.I32, (short)3);
private static final libthrift091.protocol.TField SPACE_FIELD_DESC = new libthrift091.protocol.TField("space", libthrift091.protocol.TType.I64, (short)4);
private static final libthrift091.protocol.TField SPACE_USED_FIELD_DESC = new libthrift091.protocol.TField("spaceUsed", libthrift091.protocol.TType.I64, (short)5);
private static final libthrift091.protocol.TField READ_CAPACITY_FIELD_DESC = new libthrift091.protocol.TField("readCapacity", libthrift091.protocol.TType.I64, (short)6);
private static final libthrift091.protocol.TField READ_CAPACITY_USED_FIELD_DESC = new libthrift091.protocol.TField("readCapacityUsed", libthrift091.protocol.TType.I64, (short)7);
private static final libthrift091.protocol.TField WRITE_CAPACITY_FIELD_DESC = new libthrift091.protocol.TField("writeCapacity", libthrift091.protocol.TType.I64, (short)8);
private static final libthrift091.protocol.TField WRITE_CAPACITY_USED_FIELD_DESC = new libthrift091.protocol.TField("writeCapacityUsed", libthrift091.protocol.TType.I64, (short)9);
private static final libthrift091.protocol.TField SLAVE_READ_CAPACITY_FIELD_DESC = new libthrift091.protocol.TField("slaveReadCapacity", libthrift091.protocol.TType.I64, (short)10);
private static final libthrift091.protocol.TField SLAVE_READ_CAPACITY_USED_FIELD_DESC = new libthrift091.protocol.TField("slaveReadCapacityUsed", libthrift091.protocol.TType.I64, (short)11);
private static final libthrift091.protocol.TField SLAVE_WRITE_CAPACITY_FIELD_DESC = new libthrift091.protocol.TField("slaveWriteCapacity", libthrift091.protocol.TType.I64, (short)12);
private static final libthrift091.protocol.TField SLAVE_WRITE_CAPACITY_USED_FIELD_DESC = new libthrift091.protocol.TField("slaveWriteCapacityUsed", libthrift091.protocol.TType.I64, (short)13);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new QuotaInfoStandardSchemeFactory());
schemes.put(TupleScheme.class, new QuotaInfoTupleSchemeFactory());
}
/**
* 用户AccountId
*/
public String accountId; // optional
/**
* 表数量限制
*/
public int tableNum; // optional
/**
* 已存在表数量
*/
public int tableNumUsed; // optional
/**
* 用户总的空间quota限制
*/
public long space; // optional
/**
* 已使用空间quota
*/
public long spaceUsed; // optional
/**
* 用户总的读quota限制
*/
public long readCapacity; // optional
/**
* 已使用读quota
*/
public long readCapacityUsed; // optional
/**
* 用户总的写quota限制
*/
public long writeCapacity; // optional
/**
* 已使用写quota
*/
public long writeCapacityUsed; // optional
/**
* 用户总的备集群读quota限制
*/
public long slaveReadCapacity; // optional
/**
* 已使用备集群读quota
*/
public long slaveReadCapacityUsed; // optional
/**
* 用户总的备集群写quota限制
*/
public long slaveWriteCapacity; // optional
/**
* 已使用备集群写quota
*/
public long slaveWriteCapacityUsed; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
/**
* 用户AccountId
*/
ACCOUNT_ID((short)1, "accountId"),
/**
* 表数量限制
*/
TABLE_NUM((short)2, "tableNum"),
/**
* 已存在表数量
*/
TABLE_NUM_USED((short)3, "tableNumUsed"),
/**
* 用户总的空间quota限制
*/
SPACE((short)4, "space"),
/**
* 已使用空间quota
*/
SPACE_USED((short)5, "spaceUsed"),
/**
* 用户总的读quota限制
*/
READ_CAPACITY((short)6, "readCapacity"),
/**
* 已使用读quota
*/
READ_CAPACITY_USED((short)7, "readCapacityUsed"),
/**
* 用户总的写quota限制
*/
WRITE_CAPACITY((short)8, "writeCapacity"),
/**
* 已使用写quota
*/
WRITE_CAPACITY_USED((short)9, "writeCapacityUsed"),
/**
* 用户总的备集群读quota限制
*/
SLAVE_READ_CAPACITY((short)10, "slaveReadCapacity"),
/**
* 已使用备集群读quota
*/
SLAVE_READ_CAPACITY_USED((short)11, "slaveReadCapacityUsed"),
/**
* 用户总的备集群写quota限制
*/
SLAVE_WRITE_CAPACITY((short)12, "slaveWriteCapacity"),
/**
* 已使用备集群写quota
*/
SLAVE_WRITE_CAPACITY_USED((short)13, "slaveWriteCapacityUsed");
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: // ACCOUNT_ID
return ACCOUNT_ID;
case 2: // TABLE_NUM
return TABLE_NUM;
case 3: // TABLE_NUM_USED
return TABLE_NUM_USED;
case 4: // SPACE
return SPACE;
case 5: // SPACE_USED
return SPACE_USED;
case 6: // READ_CAPACITY
return READ_CAPACITY;
case 7: // READ_CAPACITY_USED
return READ_CAPACITY_USED;
case 8: // WRITE_CAPACITY
return WRITE_CAPACITY;
case 9: // WRITE_CAPACITY_USED
return WRITE_CAPACITY_USED;
case 10: // SLAVE_READ_CAPACITY
return SLAVE_READ_CAPACITY;
case 11: // SLAVE_READ_CAPACITY_USED
return SLAVE_READ_CAPACITY_USED;
case 12: // SLAVE_WRITE_CAPACITY
return SLAVE_WRITE_CAPACITY;
case 13: // SLAVE_WRITE_CAPACITY_USED
return SLAVE_WRITE_CAPACITY_USED;
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 __TABLENUM_ISSET_ID = 0;
private static final int __TABLENUMUSED_ISSET_ID = 1;
private static final int __SPACE_ISSET_ID = 2;
private static final int __SPACEUSED_ISSET_ID = 3;
private static final int __READCAPACITY_ISSET_ID = 4;
private static final int __READCAPACITYUSED_ISSET_ID = 5;
private static final int __WRITECAPACITY_ISSET_ID = 6;
private static final int __WRITECAPACITYUSED_ISSET_ID = 7;
private static final int __SLAVEREADCAPACITY_ISSET_ID = 8;
private static final int __SLAVEREADCAPACITYUSED_ISSET_ID = 9;
private static final int __SLAVEWRITECAPACITY_ISSET_ID = 10;
private static final int __SLAVEWRITECAPACITYUSED_ISSET_ID = 11;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ACCOUNT_ID,_Fields.TABLE_NUM,_Fields.TABLE_NUM_USED,_Fields.SPACE,_Fields.SPACE_USED,_Fields.READ_CAPACITY,_Fields.READ_CAPACITY_USED,_Fields.WRITE_CAPACITY,_Fields.WRITE_CAPACITY_USED,_Fields.SLAVE_READ_CAPACITY,_Fields.SLAVE_READ_CAPACITY_USED,_Fields.SLAVE_WRITE_CAPACITY,_Fields.SLAVE_WRITE_CAPACITY_USED};
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.ACCOUNT_ID, new libthrift091.meta_data.FieldMetaData("accountId", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLE_NUM, new libthrift091.meta_data.FieldMetaData("tableNum", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
tmpMap.put(_Fields.TABLE_NUM_USED, new libthrift091.meta_data.FieldMetaData("tableNumUsed", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
tmpMap.put(_Fields.SPACE, new libthrift091.meta_data.FieldMetaData("space", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.SPACE_USED, new libthrift091.meta_data.FieldMetaData("spaceUsed", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.READ_CAPACITY, new libthrift091.meta_data.FieldMetaData("readCapacity", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.READ_CAPACITY_USED, new libthrift091.meta_data.FieldMetaData("readCapacityUsed", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.WRITE_CAPACITY, new libthrift091.meta_data.FieldMetaData("writeCapacity", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.WRITE_CAPACITY_USED, new libthrift091.meta_data.FieldMetaData("writeCapacityUsed", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.SLAVE_READ_CAPACITY, new libthrift091.meta_data.FieldMetaData("slaveReadCapacity", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.SLAVE_READ_CAPACITY_USED, new libthrift091.meta_data.FieldMetaData("slaveReadCapacityUsed", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.SLAVE_WRITE_CAPACITY, new libthrift091.meta_data.FieldMetaData("slaveWriteCapacity", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
tmpMap.put(_Fields.SLAVE_WRITE_CAPACITY_USED, new libthrift091.meta_data.FieldMetaData("slaveWriteCapacityUsed", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(QuotaInfo.class, metaDataMap);
}
public QuotaInfo() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public QuotaInfo(QuotaInfo other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetAccountId()) {
this.accountId = other.accountId;
}
this.tableNum = other.tableNum;
this.tableNumUsed = other.tableNumUsed;
this.space = other.space;
this.spaceUsed = other.spaceUsed;
this.readCapacity = other.readCapacity;
this.readCapacityUsed = other.readCapacityUsed;
this.writeCapacity = other.writeCapacity;
this.writeCapacityUsed = other.writeCapacityUsed;
this.slaveReadCapacity = other.slaveReadCapacity;
this.slaveReadCapacityUsed = other.slaveReadCapacityUsed;
this.slaveWriteCapacity = other.slaveWriteCapacity;
this.slaveWriteCapacityUsed = other.slaveWriteCapacityUsed;
}
public QuotaInfo deepCopy() {
return new QuotaInfo(this);
}
@Override
public void clear() {
this.accountId = null;
setTableNumIsSet(false);
this.tableNum = 0;
setTableNumUsedIsSet(false);
this.tableNumUsed = 0;
setSpaceIsSet(false);
this.space = 0;
setSpaceUsedIsSet(false);
this.spaceUsed = 0;
setReadCapacityIsSet(false);
this.readCapacity = 0;
setReadCapacityUsedIsSet(false);
this.readCapacityUsed = 0;
setWriteCapacityIsSet(false);
this.writeCapacity = 0;
setWriteCapacityUsedIsSet(false);
this.writeCapacityUsed = 0;
setSlaveReadCapacityIsSet(false);
this.slaveReadCapacity = 0;
setSlaveReadCapacityUsedIsSet(false);
this.slaveReadCapacityUsed = 0;
setSlaveWriteCapacityIsSet(false);
this.slaveWriteCapacity = 0;
setSlaveWriteCapacityUsedIsSet(false);
this.slaveWriteCapacityUsed = 0;
}
/**
* 用户AccountId
*/
public String getAccountId() {
return this.accountId;
}
/**
* 用户AccountId
*/
public QuotaInfo setAccountId(String accountId) {
this.accountId = accountId;
return this;
}
public void unsetAccountId() {
this.accountId = null;
}
/** Returns true if field accountId is set (has been assigned a value) and false otherwise */
public boolean isSetAccountId() {
return this.accountId != null;
}
public void setAccountIdIsSet(boolean value) {
if (!value) {
this.accountId = null;
}
}
/**
* 表数量限制
*/
public int getTableNum() {
return this.tableNum;
}
/**
* 表数量限制
*/
public QuotaInfo setTableNum(int tableNum) {
this.tableNum = tableNum;
setTableNumIsSet(true);
return this;
}
public void unsetTableNum() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TABLENUM_ISSET_ID);
}
/** Returns true if field tableNum is set (has been assigned a value) and false otherwise */
public boolean isSetTableNum() {
return EncodingUtils.testBit(__isset_bitfield, __TABLENUM_ISSET_ID);
}
public void setTableNumIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TABLENUM_ISSET_ID, value);
}
/**
* 已存在表数量
*/
public int getTableNumUsed() {
return this.tableNumUsed;
}
/**
* 已存在表数量
*/
public QuotaInfo setTableNumUsed(int tableNumUsed) {
this.tableNumUsed = tableNumUsed;
setTableNumUsedIsSet(true);
return this;
}
public void unsetTableNumUsed() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TABLENUMUSED_ISSET_ID);
}
/** Returns true if field tableNumUsed is set (has been assigned a value) and false otherwise */
public boolean isSetTableNumUsed() {
return EncodingUtils.testBit(__isset_bitfield, __TABLENUMUSED_ISSET_ID);
}
public void setTableNumUsedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TABLENUMUSED_ISSET_ID, value);
}
/**
* 用户总的空间quota限制
*/
public long getSpace() {
return this.space;
}
/**
* 用户总的空间quota限制
*/
public QuotaInfo setSpace(long space) {
this.space = space;
setSpaceIsSet(true);
return this;
}
public void unsetSpace() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPACE_ISSET_ID);
}
/** Returns true if field space is set (has been assigned a value) and false otherwise */
public boolean isSetSpace() {
return EncodingUtils.testBit(__isset_bitfield, __SPACE_ISSET_ID);
}
public void setSpaceIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPACE_ISSET_ID, value);
}
/**
* 已使用空间quota
*/
public long getSpaceUsed() {
return this.spaceUsed;
}
/**
* 已使用空间quota
*/
public QuotaInfo setSpaceUsed(long spaceUsed) {
this.spaceUsed = spaceUsed;
setSpaceUsedIsSet(true);
return this;
}
public void unsetSpaceUsed() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPACEUSED_ISSET_ID);
}
/** Returns true if field spaceUsed is set (has been assigned a value) and false otherwise */
public boolean isSetSpaceUsed() {
return EncodingUtils.testBit(__isset_bitfield, __SPACEUSED_ISSET_ID);
}
public void setSpaceUsedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPACEUSED_ISSET_ID, value);
}
/**
* 用户总的读quota限制
*/
public long getReadCapacity() {
return this.readCapacity;
}
/**
* 用户总的读quota限制
*/
public QuotaInfo setReadCapacity(long readCapacity) {
this.readCapacity = readCapacity;
setReadCapacityIsSet(true);
return this;
}
public void unsetReadCapacity() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __READCAPACITY_ISSET_ID);
}
/** Returns true if field readCapacity is set (has been assigned a value) and false otherwise */
public boolean isSetReadCapacity() {
return EncodingUtils.testBit(__isset_bitfield, __READCAPACITY_ISSET_ID);
}
public void setReadCapacityIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __READCAPACITY_ISSET_ID, value);
}
/**
* 已使用读quota
*/
public long getReadCapacityUsed() {
return this.readCapacityUsed;
}
/**
* 已使用读quota
*/
public QuotaInfo setReadCapacityUsed(long readCapacityUsed) {
this.readCapacityUsed = readCapacityUsed;
setReadCapacityUsedIsSet(true);
return this;
}
public void unsetReadCapacityUsed() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __READCAPACITYUSED_ISSET_ID);
}
/** Returns true if field readCapacityUsed is set (has been assigned a value) and false otherwise */
public boolean isSetReadCapacityUsed() {
return EncodingUtils.testBit(__isset_bitfield, __READCAPACITYUSED_ISSET_ID);
}
public void setReadCapacityUsedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __READCAPACITYUSED_ISSET_ID, value);
}
/**
* 用户总的写quota限制
*/
public long getWriteCapacity() {
return this.writeCapacity;
}
/**
* 用户总的写quota限制
*/
public QuotaInfo setWriteCapacity(long writeCapacity) {
this.writeCapacity = writeCapacity;
setWriteCapacityIsSet(true);
return this;
}
public void unsetWriteCapacity() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WRITECAPACITY_ISSET_ID);
}
/** Returns true if field writeCapacity is set (has been assigned a value) and false otherwise */
public boolean isSetWriteCapacity() {
return EncodingUtils.testBit(__isset_bitfield, __WRITECAPACITY_ISSET_ID);
}
public void setWriteCapacityIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITECAPACITY_ISSET_ID, value);
}
/**
* 已使用写quota
*/
public long getWriteCapacityUsed() {
return this.writeCapacityUsed;
}
/**
* 已使用写quota
*/
public QuotaInfo setWriteCapacityUsed(long writeCapacityUsed) {
this.writeCapacityUsed = writeCapacityUsed;
setWriteCapacityUsedIsSet(true);
return this;
}
public void unsetWriteCapacityUsed() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WRITECAPACITYUSED_ISSET_ID);
}
/** Returns true if field writeCapacityUsed is set (has been assigned a value) and false otherwise */
public boolean isSetWriteCapacityUsed() {
return EncodingUtils.testBit(__isset_bitfield, __WRITECAPACITYUSED_ISSET_ID);
}
public void setWriteCapacityUsedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WRITECAPACITYUSED_ISSET_ID, value);
}
/**
* 用户总的备集群读quota限制
*/
public long getSlaveReadCapacity() {
return this.slaveReadCapacity;
}
/**
* 用户总的备集群读quota限制
*/
public QuotaInfo setSlaveReadCapacity(long slaveReadCapacity) {
this.slaveReadCapacity = slaveReadCapacity;
setSlaveReadCapacityIsSet(true);
return this;
}
public void unsetSlaveReadCapacity() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SLAVEREADCAPACITY_ISSET_ID);
}
/** Returns true if field slaveReadCapacity is set (has been assigned a value) and false otherwise */
public boolean isSetSlaveReadCapacity() {
return EncodingUtils.testBit(__isset_bitfield, __SLAVEREADCAPACITY_ISSET_ID);
}
public void setSlaveReadCapacityIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SLAVEREADCAPACITY_ISSET_ID, value);
}
/**
* 已使用备集群读quota
*/
public long getSlaveReadCapacityUsed() {
return this.slaveReadCapacityUsed;
}
/**
* 已使用备集群读quota
*/
public QuotaInfo setSlaveReadCapacityUsed(long slaveReadCapacityUsed) {
this.slaveReadCapacityUsed = slaveReadCapacityUsed;
setSlaveReadCapacityUsedIsSet(true);
return this;
}
public void unsetSlaveReadCapacityUsed() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SLAVEREADCAPACITYUSED_ISSET_ID);
}
/** Returns true if field slaveReadCapacityUsed is set (has been assigned a value) and false otherwise */
public boolean isSetSlaveReadCapacityUsed() {
return EncodingUtils.testBit(__isset_bitfield, __SLAVEREADCAPACITYUSED_ISSET_ID);
}
public void setSlaveReadCapacityUsedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SLAVEREADCAPACITYUSED_ISSET_ID, value);
}
/**
* 用户总的备集群写quota限制
*/
public long getSlaveWriteCapacity() {
return this.slaveWriteCapacity;
}
/**
* 用户总的备集群写quota限制
*/
public QuotaInfo setSlaveWriteCapacity(long slaveWriteCapacity) {
this.slaveWriteCapacity = slaveWriteCapacity;
setSlaveWriteCapacityIsSet(true);
return this;
}
public void unsetSlaveWriteCapacity() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SLAVEWRITECAPACITY_ISSET_ID);
}
/** Returns true if field slaveWriteCapacity is set (has been assigned a value) and false otherwise */
public boolean isSetSlaveWriteCapacity() {
return EncodingUtils.testBit(__isset_bitfield, __SLAVEWRITECAPACITY_ISSET_ID);
}
public void setSlaveWriteCapacityIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SLAVEWRITECAPACITY_ISSET_ID, value);
}
/**
* 已使用备集群写quota
*/
public long getSlaveWriteCapacityUsed() {
return this.slaveWriteCapacityUsed;
}
/**
* 已使用备集群写quota
*/
public QuotaInfo setSlaveWriteCapacityUsed(long slaveWriteCapacityUsed) {
this.slaveWriteCapacityUsed = slaveWriteCapacityUsed;
setSlaveWriteCapacityUsedIsSet(true);
return this;
}
public void unsetSlaveWriteCapacityUsed() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SLAVEWRITECAPACITYUSED_ISSET_ID);
}
/** Returns true if field slaveWriteCapacityUsed is set (has been assigned a value) and false otherwise */
public boolean isSetSlaveWriteCapacityUsed() {
return EncodingUtils.testBit(__isset_bitfield, __SLAVEWRITECAPACITYUSED_ISSET_ID);
}
public void setSlaveWriteCapacityUsedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SLAVEWRITECAPACITYUSED_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ACCOUNT_ID:
if (value == null) {
unsetAccountId();
} else {
setAccountId((String)value);
}
break;
case TABLE_NUM:
if (value == null) {
unsetTableNum();
} else {
setTableNum((Integer)value);
}
break;
case TABLE_NUM_USED:
if (value == null) {
unsetTableNumUsed();
} else {
setTableNumUsed((Integer)value);
}
break;
case SPACE:
if (value == null) {
unsetSpace();
} else {
setSpace((Long)value);
}
break;
case SPACE_USED:
if (value == null) {
unsetSpaceUsed();
} else {
setSpaceUsed((Long)value);
}
break;
case READ_CAPACITY:
if (value == null) {
unsetReadCapacity();
} else {
setReadCapacity((Long)value);
}
break;
case READ_CAPACITY_USED:
if (value == null) {
unsetReadCapacityUsed();
} else {
setReadCapacityUsed((Long)value);
}
break;
case WRITE_CAPACITY:
if (value == null) {
unsetWriteCapacity();
} else {
setWriteCapacity((Long)value);
}
break;
case WRITE_CAPACITY_USED:
if (value == null) {
unsetWriteCapacityUsed();
} else {
setWriteCapacityUsed((Long)value);
}
break;
case SLAVE_READ_CAPACITY:
if (value == null) {
unsetSlaveReadCapacity();
} else {
setSlaveReadCapacity((Long)value);
}
break;
case SLAVE_READ_CAPACITY_USED:
if (value == null) {
unsetSlaveReadCapacityUsed();
} else {
setSlaveReadCapacityUsed((Long)value);
}
break;
case SLAVE_WRITE_CAPACITY:
if (value == null) {
unsetSlaveWriteCapacity();
} else {
setSlaveWriteCapacity((Long)value);
}
break;
case SLAVE_WRITE_CAPACITY_USED:
if (value == null) {
unsetSlaveWriteCapacityUsed();
} else {
setSlaveWriteCapacityUsed((Long)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case ACCOUNT_ID:
return getAccountId();
case TABLE_NUM:
return Integer.valueOf(getTableNum());
case TABLE_NUM_USED:
return Integer.valueOf(getTableNumUsed());
case SPACE:
return Long.valueOf(getSpace());
case SPACE_USED:
return Long.valueOf(getSpaceUsed());
case READ_CAPACITY:
return Long.valueOf(getReadCapacity());
case READ_CAPACITY_USED:
return Long.valueOf(getReadCapacityUsed());
case WRITE_CAPACITY:
return Long.valueOf(getWriteCapacity());
case WRITE_CAPACITY_USED:
return Long.valueOf(getWriteCapacityUsed());
case SLAVE_READ_CAPACITY:
return Long.valueOf(getSlaveReadCapacity());
case SLAVE_READ_CAPACITY_USED:
return Long.valueOf(getSlaveReadCapacityUsed());
case SLAVE_WRITE_CAPACITY:
return Long.valueOf(getSlaveWriteCapacity());
case SLAVE_WRITE_CAPACITY_USED:
return Long.valueOf(getSlaveWriteCapacityUsed());
}
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 ACCOUNT_ID:
return isSetAccountId();
case TABLE_NUM:
return isSetTableNum();
case TABLE_NUM_USED:
return isSetTableNumUsed();
case SPACE:
return isSetSpace();
case SPACE_USED:
return isSetSpaceUsed();
case READ_CAPACITY:
return isSetReadCapacity();
case READ_CAPACITY_USED:
return isSetReadCapacityUsed();
case WRITE_CAPACITY:
return isSetWriteCapacity();
case WRITE_CAPACITY_USED:
return isSetWriteCapacityUsed();
case SLAVE_READ_CAPACITY:
return isSetSlaveReadCapacity();
case SLAVE_READ_CAPACITY_USED:
return isSetSlaveReadCapacityUsed();
case SLAVE_WRITE_CAPACITY:
return isSetSlaveWriteCapacity();
case SLAVE_WRITE_CAPACITY_USED:
return isSetSlaveWriteCapacityUsed();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof QuotaInfo)
return this.equals((QuotaInfo)that);
return false;
}
public boolean equals(QuotaInfo that) {
if (that == null)
return false;
boolean this_present_accountId = true && this.isSetAccountId();
boolean that_present_accountId = true && that.isSetAccountId();
if (this_present_accountId || that_present_accountId) {
if (!(this_present_accountId && that_present_accountId))
return false;
if (!this.accountId.equals(that.accountId))
return false;
}
boolean this_present_tableNum = true && this.isSetTableNum();
boolean that_present_tableNum = true && that.isSetTableNum();
if (this_present_tableNum || that_present_tableNum) {
if (!(this_present_tableNum && that_present_tableNum))
return false;
if (this.tableNum != that.tableNum)
return false;
}
boolean this_present_tableNumUsed = true && this.isSetTableNumUsed();
boolean that_present_tableNumUsed = true && that.isSetTableNumUsed();
if (this_present_tableNumUsed || that_present_tableNumUsed) {
if (!(this_present_tableNumUsed && that_present_tableNumUsed))
return false;
if (this.tableNumUsed != that.tableNumUsed)
return false;
}
boolean this_present_space = true && this.isSetSpace();
boolean that_present_space = true && that.isSetSpace();
if (this_present_space || that_present_space) {
if (!(this_present_space && that_present_space))
return false;
if (this.space != that.space)
return false;
}
boolean this_present_spaceUsed = true && this.isSetSpaceUsed();
boolean that_present_spaceUsed = true && that.isSetSpaceUsed();
if (this_present_spaceUsed || that_present_spaceUsed) {
if (!(this_present_spaceUsed && that_present_spaceUsed))
return false;
if (this.spaceUsed != that.spaceUsed)
return false;
}
boolean this_present_readCapacity = true && this.isSetReadCapacity();
boolean that_present_readCapacity = true && that.isSetReadCapacity();
if (this_present_readCapacity || that_present_readCapacity) {
if (!(this_present_readCapacity && that_present_readCapacity))
return false;
if (this.readCapacity != that.readCapacity)
return false;
}
boolean this_present_readCapacityUsed = true && this.isSetReadCapacityUsed();
boolean that_present_readCapacityUsed = true && that.isSetReadCapacityUsed();
if (this_present_readCapacityUsed || that_present_readCapacityUsed) {
if (!(this_present_readCapacityUsed && that_present_readCapacityUsed))
return false;
if (this.readCapacityUsed != that.readCapacityUsed)
return false;
}
boolean this_present_writeCapacity = true && this.isSetWriteCapacity();
boolean that_present_writeCapacity = true && that.isSetWriteCapacity();
if (this_present_writeCapacity || that_present_writeCapacity) {
if (!(this_present_writeCapacity && that_present_writeCapacity))
return false;
if (this.writeCapacity != that.writeCapacity)
return false;
}
boolean this_present_writeCapacityUsed = true && this.isSetWriteCapacityUsed();
boolean that_present_writeCapacityUsed = true && that.isSetWriteCapacityUsed();
if (this_present_writeCapacityUsed || that_present_writeCapacityUsed) {
if (!(this_present_writeCapacityUsed && that_present_writeCapacityUsed))
return false;
if (this.writeCapacityUsed != that.writeCapacityUsed)
return false;
}
boolean this_present_slaveReadCapacity = true && this.isSetSlaveReadCapacity();
boolean that_present_slaveReadCapacity = true && that.isSetSlaveReadCapacity();
if (this_present_slaveReadCapacity || that_present_slaveReadCapacity) {
if (!(this_present_slaveReadCapacity && that_present_slaveReadCapacity))
return false;
if (this.slaveReadCapacity != that.slaveReadCapacity)
return false;
}
boolean this_present_slaveReadCapacityUsed = true && this.isSetSlaveReadCapacityUsed();
boolean that_present_slaveReadCapacityUsed = true && that.isSetSlaveReadCapacityUsed();
if (this_present_slaveReadCapacityUsed || that_present_slaveReadCapacityUsed) {
if (!(this_present_slaveReadCapacityUsed && that_present_slaveReadCapacityUsed))
return false;
if (this.slaveReadCapacityUsed != that.slaveReadCapacityUsed)
return false;
}
boolean this_present_slaveWriteCapacity = true && this.isSetSlaveWriteCapacity();
boolean that_present_slaveWriteCapacity = true && that.isSetSlaveWriteCapacity();
if (this_present_slaveWriteCapacity || that_present_slaveWriteCapacity) {
if (!(this_present_slaveWriteCapacity && that_present_slaveWriteCapacity))
return false;
if (this.slaveWriteCapacity != that.slaveWriteCapacity)
return false;
}
boolean this_present_slaveWriteCapacityUsed = true && this.isSetSlaveWriteCapacityUsed();
boolean that_present_slaveWriteCapacityUsed = true && that.isSetSlaveWriteCapacityUsed();
if (this_present_slaveWriteCapacityUsed || that_present_slaveWriteCapacityUsed) {
if (!(this_present_slaveWriteCapacityUsed && that_present_slaveWriteCapacityUsed))
return false;
if (this.slaveWriteCapacityUsed != that.slaveWriteCapacityUsed)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_accountId = true && (isSetAccountId());
list.add(present_accountId);
if (present_accountId)
list.add(accountId);
boolean present_tableNum = true && (isSetTableNum());
list.add(present_tableNum);
if (present_tableNum)
list.add(tableNum);
boolean present_tableNumUsed = true && (isSetTableNumUsed());
list.add(present_tableNumUsed);
if (present_tableNumUsed)
list.add(tableNumUsed);
boolean present_space = true && (isSetSpace());
list.add(present_space);
if (present_space)
list.add(space);
boolean present_spaceUsed = true && (isSetSpaceUsed());
list.add(present_spaceUsed);
if (present_spaceUsed)
list.add(spaceUsed);
boolean present_readCapacity = true && (isSetReadCapacity());
list.add(present_readCapacity);
if (present_readCapacity)
list.add(readCapacity);
boolean present_readCapacityUsed = true && (isSetReadCapacityUsed());
list.add(present_readCapacityUsed);
if (present_readCapacityUsed)
list.add(readCapacityUsed);
boolean present_writeCapacity = true && (isSetWriteCapacity());
list.add(present_writeCapacity);
if (present_writeCapacity)
list.add(writeCapacity);
boolean present_writeCapacityUsed = true && (isSetWriteCapacityUsed());
list.add(present_writeCapacityUsed);
if (present_writeCapacityUsed)
list.add(writeCapacityUsed);
boolean present_slaveReadCapacity = true && (isSetSlaveReadCapacity());
list.add(present_slaveReadCapacity);
if (present_slaveReadCapacity)
list.add(slaveReadCapacity);
boolean present_slaveReadCapacityUsed = true && (isSetSlaveReadCapacityUsed());
list.add(present_slaveReadCapacityUsed);
if (present_slaveReadCapacityUsed)
list.add(slaveReadCapacityUsed);
boolean present_slaveWriteCapacity = true && (isSetSlaveWriteCapacity());
list.add(present_slaveWriteCapacity);
if (present_slaveWriteCapacity)
list.add(slaveWriteCapacity);
boolean present_slaveWriteCapacityUsed = true && (isSetSlaveWriteCapacityUsed());
list.add(present_slaveWriteCapacityUsed);
if (present_slaveWriteCapacityUsed)
list.add(slaveWriteCapacityUsed);
return list.hashCode();
}
@Override
public int compareTo(QuotaInfo other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetAccountId()).compareTo(other.isSetAccountId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAccountId()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.accountId, other.accountId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTableNum()).compareTo(other.isSetTableNum());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableNum()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableNum, other.tableNum);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTableNumUsed()).compareTo(other.isSetTableNumUsed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableNumUsed()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.tableNumUsed, other.tableNumUsed);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSpace()).compareTo(other.isSetSpace());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpace()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.space, other.space);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSpaceUsed()).compareTo(other.isSetSpaceUsed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSpaceUsed()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.spaceUsed, other.spaceUsed);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReadCapacity()).compareTo(other.isSetReadCapacity());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReadCapacity()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.readCapacity, other.readCapacity);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetReadCapacityUsed()).compareTo(other.isSetReadCapacityUsed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReadCapacityUsed()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.readCapacityUsed, other.readCapacityUsed);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetWriteCapacity()).compareTo(other.isSetWriteCapacity());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWriteCapacity()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.writeCapacity, other.writeCapacity);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetWriteCapacityUsed()).compareTo(other.isSetWriteCapacityUsed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWriteCapacityUsed()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.writeCapacityUsed, other.writeCapacityUsed);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSlaveReadCapacity()).compareTo(other.isSetSlaveReadCapacity());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSlaveReadCapacity()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.slaveReadCapacity, other.slaveReadCapacity);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSlaveReadCapacityUsed()).compareTo(other.isSetSlaveReadCapacityUsed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSlaveReadCapacityUsed()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.slaveReadCapacityUsed, other.slaveReadCapacityUsed);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSlaveWriteCapacity()).compareTo(other.isSetSlaveWriteCapacity());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSlaveWriteCapacity()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.slaveWriteCapacity, other.slaveWriteCapacity);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSlaveWriteCapacityUsed()).compareTo(other.isSetSlaveWriteCapacityUsed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSlaveWriteCapacityUsed()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.slaveWriteCapacityUsed, other.slaveWriteCapacityUsed);
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("QuotaInfo(");
boolean first = true;
if (isSetAccountId()) {
sb.append("accountId:");
if (this.accountId == null) {
sb.append("null");
} else {
sb.append(this.accountId);
}
first = false;
}
if (isSetTableNum()) {
if (!first) sb.append(", ");
sb.append("tableNum:");
sb.append(this.tableNum);
first = false;
}
if (isSetTableNumUsed()) {
if (!first) sb.append(", ");
sb.append("tableNumUsed:");
sb.append(this.tableNumUsed);
first = false;
}
if (isSetSpace()) {
if (!first) sb.append(", ");
sb.append("space:");
sb.append(this.space);
first = false;
}
if (isSetSpaceUsed()) {
if (!first) sb.append(", ");
sb.append("spaceUsed:");
sb.append(this.spaceUsed);
first = false;
}
if (isSetReadCapacity()) {
if (!first) sb.append(", ");
sb.append("readCapacity:");
sb.append(this.readCapacity);
first = false;
}
if (isSetReadCapacityUsed()) {
if (!first) sb.append(", ");
sb.append("readCapacityUsed:");
sb.append(this.readCapacityUsed);
first = false;
}
if (isSetWriteCapacity()) {
if (!first) sb.append(", ");
sb.append("writeCapacity:");
sb.append(this.writeCapacity);
first = false;
}
if (isSetWriteCapacityUsed()) {
if (!first) sb.append(", ");
sb.append("writeCapacityUsed:");
sb.append(this.writeCapacityUsed);
first = false;
}
if (isSetSlaveReadCapacity()) {
if (!first) sb.append(", ");
sb.append("slaveReadCapacity:");
sb.append(this.slaveReadCapacity);
first = false;
}
if (isSetSlaveReadCapacityUsed()) {
if (!first) sb.append(", ");
sb.append("slaveReadCapacityUsed:");
sb.append(this.slaveReadCapacityUsed);
first = false;
}
if (isSetSlaveWriteCapacity()) {
if (!first) sb.append(", ");
sb.append("slaveWriteCapacity:");
sb.append(this.slaveWriteCapacity);
first = false;
}
if (isSetSlaveWriteCapacityUsed()) {
if (!first) sb.append(", ");
sb.append("slaveWriteCapacityUsed:");
sb.append(this.slaveWriteCapacityUsed);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
}
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 QuotaInfoStandardSchemeFactory implements SchemeFactory {
public QuotaInfoStandardScheme getScheme() {
return new QuotaInfoStandardScheme();
}
}
private static class QuotaInfoStandardScheme extends StandardScheme<QuotaInfo> {
public void read(libthrift091.protocol.TProtocol iprot, QuotaInfo 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: // ACCOUNT_ID
if (schemeField.type == libthrift091.protocol.TType.STRING) {
struct.accountId = iprot.readString();
struct.setAccountIdIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TABLE_NUM
if (schemeField.type == libthrift091.protocol.TType.I32) {
struct.tableNum = iprot.readI32();
struct.setTableNumIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TABLE_NUM_USED
if (schemeField.type == libthrift091.protocol.TType.I32) {
struct.tableNumUsed = iprot.readI32();
struct.setTableNumUsedIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // SPACE
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.space = iprot.readI64();
struct.setSpaceIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // SPACE_USED
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.spaceUsed = iprot.readI64();
struct.setSpaceUsedIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // READ_CAPACITY
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.readCapacity = iprot.readI64();
struct.setReadCapacityIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // READ_CAPACITY_USED
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.readCapacityUsed = iprot.readI64();
struct.setReadCapacityUsedIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // WRITE_CAPACITY
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.writeCapacity = iprot.readI64();
struct.setWriteCapacityIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // WRITE_CAPACITY_USED
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.writeCapacityUsed = iprot.readI64();
struct.setWriteCapacityUsedIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // SLAVE_READ_CAPACITY
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.slaveReadCapacity = iprot.readI64();
struct.setSlaveReadCapacityIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // SLAVE_READ_CAPACITY_USED
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.slaveReadCapacityUsed = iprot.readI64();
struct.setSlaveReadCapacityUsedIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // SLAVE_WRITE_CAPACITY
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.slaveWriteCapacity = iprot.readI64();
struct.setSlaveWriteCapacityIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // SLAVE_WRITE_CAPACITY_USED
if (schemeField.type == libthrift091.protocol.TType.I64) {
struct.slaveWriteCapacityUsed = iprot.readI64();
struct.setSlaveWriteCapacityUsedIsSet(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, QuotaInfo struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.accountId != null) {
if (struct.isSetAccountId()) {
oprot.writeFieldBegin(ACCOUNT_ID_FIELD_DESC);
oprot.writeString(struct.accountId);
oprot.writeFieldEnd();
}
}
if (struct.isSetTableNum()) {
oprot.writeFieldBegin(TABLE_NUM_FIELD_DESC);
oprot.writeI32(struct.tableNum);
oprot.writeFieldEnd();
}
if (struct.isSetTableNumUsed()) {
oprot.writeFieldBegin(TABLE_NUM_USED_FIELD_DESC);
oprot.writeI32(struct.tableNumUsed);
oprot.writeFieldEnd();
}
if (struct.isSetSpace()) {
oprot.writeFieldBegin(SPACE_FIELD_DESC);
oprot.writeI64(struct.space);
oprot.writeFieldEnd();
}
if (struct.isSetSpaceUsed()) {
oprot.writeFieldBegin(SPACE_USED_FIELD_DESC);
oprot.writeI64(struct.spaceUsed);
oprot.writeFieldEnd();
}
if (struct.isSetReadCapacity()) {
oprot.writeFieldBegin(READ_CAPACITY_FIELD_DESC);
oprot.writeI64(struct.readCapacity);
oprot.writeFieldEnd();
}
if (struct.isSetReadCapacityUsed()) {
oprot.writeFieldBegin(READ_CAPACITY_USED_FIELD_DESC);
oprot.writeI64(struct.readCapacityUsed);
oprot.writeFieldEnd();
}
if (struct.isSetWriteCapacity()) {
oprot.writeFieldBegin(WRITE_CAPACITY_FIELD_DESC);
oprot.writeI64(struct.writeCapacity);
oprot.writeFieldEnd();
}
if (struct.isSetWriteCapacityUsed()) {
oprot.writeFieldBegin(WRITE_CAPACITY_USED_FIELD_DESC);
oprot.writeI64(struct.writeCapacityUsed);
oprot.writeFieldEnd();
}
if (struct.isSetSlaveReadCapacity()) {
oprot.writeFieldBegin(SLAVE_READ_CAPACITY_FIELD_DESC);
oprot.writeI64(struct.slaveReadCapacity);
oprot.writeFieldEnd();
}
if (struct.isSetSlaveReadCapacityUsed()) {
oprot.writeFieldBegin(SLAVE_READ_CAPACITY_USED_FIELD_DESC);
oprot.writeI64(struct.slaveReadCapacityUsed);
oprot.writeFieldEnd();
}
if (struct.isSetSlaveWriteCapacity()) {
oprot.writeFieldBegin(SLAVE_WRITE_CAPACITY_FIELD_DESC);
oprot.writeI64(struct.slaveWriteCapacity);
oprot.writeFieldEnd();
}
if (struct.isSetSlaveWriteCapacityUsed()) {
oprot.writeFieldBegin(SLAVE_WRITE_CAPACITY_USED_FIELD_DESC);
oprot.writeI64(struct.slaveWriteCapacityUsed);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class QuotaInfoTupleSchemeFactory implements SchemeFactory {
public QuotaInfoTupleScheme getScheme() {
return new QuotaInfoTupleScheme();
}
}
private static class QuotaInfoTupleScheme extends TupleScheme<QuotaInfo> {
@Override
public void write(libthrift091.protocol.TProtocol prot, QuotaInfo struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetAccountId()) {
optionals.set(0);
}
if (struct.isSetTableNum()) {
optionals.set(1);
}
if (struct.isSetTableNumUsed()) {
optionals.set(2);
}
if (struct.isSetSpace()) {
optionals.set(3);
}
if (struct.isSetSpaceUsed()) {
optionals.set(4);
}
if (struct.isSetReadCapacity()) {
optionals.set(5);
}
if (struct.isSetReadCapacityUsed()) {
optionals.set(6);
}
if (struct.isSetWriteCapacity()) {
optionals.set(7);
}
if (struct.isSetWriteCapacityUsed()) {
optionals.set(8);
}
if (struct.isSetSlaveReadCapacity()) {
optionals.set(9);
}
if (struct.isSetSlaveReadCapacityUsed()) {
optionals.set(10);
}
if (struct.isSetSlaveWriteCapacity()) {
optionals.set(11);
}
if (struct.isSetSlaveWriteCapacityUsed()) {
optionals.set(12);
}
oprot.writeBitSet(optionals, 13);
if (struct.isSetAccountId()) {
oprot.writeString(struct.accountId);
}
if (struct.isSetTableNum()) {
oprot.writeI32(struct.tableNum);
}
if (struct.isSetTableNumUsed()) {
oprot.writeI32(struct.tableNumUsed);
}
if (struct.isSetSpace()) {
oprot.writeI64(struct.space);
}
if (struct.isSetSpaceUsed()) {
oprot.writeI64(struct.spaceUsed);
}
if (struct.isSetReadCapacity()) {
oprot.writeI64(struct.readCapacity);
}
if (struct.isSetReadCapacityUsed()) {
oprot.writeI64(struct.readCapacityUsed);
}
if (struct.isSetWriteCapacity()) {
oprot.writeI64(struct.writeCapacity);
}
if (struct.isSetWriteCapacityUsed()) {
oprot.writeI64(struct.writeCapacityUsed);
}
if (struct.isSetSlaveReadCapacity()) {
oprot.writeI64(struct.slaveReadCapacity);
}
if (struct.isSetSlaveReadCapacityUsed()) {
oprot.writeI64(struct.slaveReadCapacityUsed);
}
if (struct.isSetSlaveWriteCapacity()) {
oprot.writeI64(struct.slaveWriteCapacity);
}
if (struct.isSetSlaveWriteCapacityUsed()) {
oprot.writeI64(struct.slaveWriteCapacityUsed);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, QuotaInfo struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(13);
if (incoming.get(0)) {
struct.accountId = iprot.readString();
struct.setAccountIdIsSet(true);
}
if (incoming.get(1)) {
struct.tableNum = iprot.readI32();
struct.setTableNumIsSet(true);
}
if (incoming.get(2)) {
struct.tableNumUsed = iprot.readI32();
struct.setTableNumUsedIsSet(true);
}
if (incoming.get(3)) {
struct.space = iprot.readI64();
struct.setSpaceIsSet(true);
}
if (incoming.get(4)) {
struct.spaceUsed = iprot.readI64();
struct.setSpaceUsedIsSet(true);
}
if (incoming.get(5)) {
struct.readCapacity = iprot.readI64();
struct.setReadCapacityIsSet(true);
}
if (incoming.get(6)) {
struct.readCapacityUsed = iprot.readI64();
struct.setReadCapacityUsedIsSet(true);
}
if (incoming.get(7)) {
struct.writeCapacity = iprot.readI64();
struct.setWriteCapacityIsSet(true);
}
if (incoming.get(8)) {
struct.writeCapacityUsed = iprot.readI64();
struct.setWriteCapacityUsedIsSet(true);
}
if (incoming.get(9)) {
struct.slaveReadCapacity = iprot.readI64();
struct.setSlaveReadCapacityIsSet(true);
}
if (incoming.get(10)) {
struct.slaveReadCapacityUsed = iprot.readI64();
struct.setSlaveReadCapacityUsedIsSet(true);
}
if (incoming.get(11)) {
struct.slaveWriteCapacity = iprot.readI64();
struct.setSlaveWriteCapacityIsSet(true);
}
if (incoming.get(12)) {
struct.slaveWriteCapacityUsed = iprot.readI64();
struct.setSlaveWriteCapacityUsedIsSet(true);
}
}
}
}