TDiskTrashInfo.java
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.doris.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TDiskTrashInfo implements org.apache.thrift.TBase<TDiskTrashInfo, TDiskTrashInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TDiskTrashInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDiskTrashInfo");
private static final org.apache.thrift.protocol.TField ROOT_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("root_path", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField TRASH_USED_CAPACITY_FIELD_DESC = new org.apache.thrift.protocol.TField("trash_used_capacity", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TDiskTrashInfoStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TDiskTrashInfoTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String root_path; // required
public @org.apache.thrift.annotation.Nullable java.lang.String state; // required
public long trash_used_capacity; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ROOT_PATH((short)1, "root_path"),
STATE((short)2, "state"),
TRASH_USED_CAPACITY((short)3, "trash_used_capacity");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // ROOT_PATH
return ROOT_PATH;
case 2: // STATE
return STATE;
case 3: // TRASH_USED_CAPACITY
return TRASH_USED_CAPACITY;
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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TRASH_USED_CAPACITY_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ROOT_PATH, new org.apache.thrift.meta_data.FieldMetaData("root_path", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TRASH_USED_CAPACITY, new org.apache.thrift.meta_data.FieldMetaData("trash_used_capacity", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDiskTrashInfo.class, metaDataMap);
}
public TDiskTrashInfo() {
}
public TDiskTrashInfo(
java.lang.String root_path,
java.lang.String state,
long trash_used_capacity)
{
this();
this.root_path = root_path;
this.state = state;
this.trash_used_capacity = trash_used_capacity;
setTrashUsedCapacityIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TDiskTrashInfo(TDiskTrashInfo other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetRootPath()) {
this.root_path = other.root_path;
}
if (other.isSetState()) {
this.state = other.state;
}
this.trash_used_capacity = other.trash_used_capacity;
}
public TDiskTrashInfo deepCopy() {
return new TDiskTrashInfo(this);
}
@Override
public void clear() {
this.root_path = null;
this.state = null;
setTrashUsedCapacityIsSet(false);
this.trash_used_capacity = 0;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getRootPath() {
return this.root_path;
}
public TDiskTrashInfo setRootPath(@org.apache.thrift.annotation.Nullable java.lang.String root_path) {
this.root_path = root_path;
return this;
}
public void unsetRootPath() {
this.root_path = null;
}
/** Returns true if field root_path is set (has been assigned a value) and false otherwise */
public boolean isSetRootPath() {
return this.root_path != null;
}
public void setRootPathIsSet(boolean value) {
if (!value) {
this.root_path = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getState() {
return this.state;
}
public TDiskTrashInfo setState(@org.apache.thrift.annotation.Nullable java.lang.String state) {
this.state = state;
return this;
}
public void unsetState() {
this.state = null;
}
/** Returns true if field state is set (has been assigned a value) and false otherwise */
public boolean isSetState() {
return this.state != null;
}
public void setStateIsSet(boolean value) {
if (!value) {
this.state = null;
}
}
public long getTrashUsedCapacity() {
return this.trash_used_capacity;
}
public TDiskTrashInfo setTrashUsedCapacity(long trash_used_capacity) {
this.trash_used_capacity = trash_used_capacity;
setTrashUsedCapacityIsSet(true);
return this;
}
public void unsetTrashUsedCapacity() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRASH_USED_CAPACITY_ISSET_ID);
}
/** Returns true if field trash_used_capacity is set (has been assigned a value) and false otherwise */
public boolean isSetTrashUsedCapacity() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRASH_USED_CAPACITY_ISSET_ID);
}
public void setTrashUsedCapacityIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRASH_USED_CAPACITY_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ROOT_PATH:
if (value == null) {
unsetRootPath();
} else {
setRootPath((java.lang.String)value);
}
break;
case STATE:
if (value == null) {
unsetState();
} else {
setState((java.lang.String)value);
}
break;
case TRASH_USED_CAPACITY:
if (value == null) {
unsetTrashUsedCapacity();
} else {
setTrashUsedCapacity((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ROOT_PATH:
return getRootPath();
case STATE:
return getState();
case TRASH_USED_CAPACITY:
return getTrashUsedCapacity();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case ROOT_PATH:
return isSetRootPath();
case STATE:
return isSetState();
case TRASH_USED_CAPACITY:
return isSetTrashUsedCapacity();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TDiskTrashInfo)
return this.equals((TDiskTrashInfo)that);
return false;
}
public boolean equals(TDiskTrashInfo that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_root_path = true && this.isSetRootPath();
boolean that_present_root_path = true && that.isSetRootPath();
if (this_present_root_path || that_present_root_path) {
if (!(this_present_root_path && that_present_root_path))
return false;
if (!this.root_path.equals(that.root_path))
return false;
}
boolean this_present_state = true && this.isSetState();
boolean that_present_state = true && that.isSetState();
if (this_present_state || that_present_state) {
if (!(this_present_state && that_present_state))
return false;
if (!this.state.equals(that.state))
return false;
}
boolean this_present_trash_used_capacity = true;
boolean that_present_trash_used_capacity = true;
if (this_present_trash_used_capacity || that_present_trash_used_capacity) {
if (!(this_present_trash_used_capacity && that_present_trash_used_capacity))
return false;
if (this.trash_used_capacity != that.trash_used_capacity)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetRootPath()) ? 131071 : 524287);
if (isSetRootPath())
hashCode = hashCode * 8191 + root_path.hashCode();
hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287);
if (isSetState())
hashCode = hashCode * 8191 + state.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(trash_used_capacity);
return hashCode;
}
@Override
public int compareTo(TDiskTrashInfo other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetRootPath(), other.isSetRootPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRootPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.root_path, other.root_path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetState(), other.isSetState());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetState()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTrashUsedCapacity(), other.isSetTrashUsedCapacity());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTrashUsedCapacity()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trash_used_capacity, other.trash_used_capacity);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TDiskTrashInfo(");
boolean first = true;
sb.append("root_path:");
if (this.root_path == null) {
sb.append("null");
} else {
sb.append(this.root_path);
}
first = false;
if (!first) sb.append(", ");
sb.append("state:");
if (this.state == null) {
sb.append("null");
} else {
sb.append(this.state);
}
first = false;
if (!first) sb.append(", ");
sb.append("trash_used_capacity:");
sb.append(this.trash_used_capacity);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (root_path == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'root_path' was not present! Struct: " + toString());
}
if (state == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' was not present! Struct: " + toString());
}
// alas, we cannot check 'trash_used_capacity' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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 org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class TDiskTrashInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDiskTrashInfoStandardScheme getScheme() {
return new TDiskTrashInfoStandardScheme();
}
}
private static class TDiskTrashInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TDiskTrashInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TDiskTrashInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // ROOT_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.root_path = iprot.readString();
struct.setRootPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // STATE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.state = iprot.readString();
struct.setStateIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TRASH_USED_CAPACITY
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.trash_used_capacity = iprot.readI64();
struct.setTrashUsedCapacityIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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
if (!struct.isSetTrashUsedCapacity()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'trash_used_capacity' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TDiskTrashInfo struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.root_path != null) {
oprot.writeFieldBegin(ROOT_PATH_FIELD_DESC);
oprot.writeString(struct.root_path);
oprot.writeFieldEnd();
}
if (struct.state != null) {
oprot.writeFieldBegin(STATE_FIELD_DESC);
oprot.writeString(struct.state);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TRASH_USED_CAPACITY_FIELD_DESC);
oprot.writeI64(struct.trash_used_capacity);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TDiskTrashInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TDiskTrashInfoTupleScheme getScheme() {
return new TDiskTrashInfoTupleScheme();
}
}
private static class TDiskTrashInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TDiskTrashInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TDiskTrashInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.root_path);
oprot.writeString(struct.state);
oprot.writeI64(struct.trash_used_capacity);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TDiskTrashInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.root_path = iprot.readString();
struct.setRootPathIsSet(true);
struct.state = iprot.readString();
struct.setStateIsSet(true);
struct.trash_used_capacity = iprot.readI64();
struct.setTrashUsedCapacityIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}