TCheckStorageFormatResult.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 TCheckStorageFormatResult implements org.apache.thrift.TBase<TCheckStorageFormatResult, TCheckStorageFormatResult._Fields>, java.io.Serializable, Cloneable, Comparable<TCheckStorageFormatResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCheckStorageFormatResult");
private static final org.apache.thrift.protocol.TField V1_TABLETS_FIELD_DESC = new org.apache.thrift.protocol.TField("v1_tablets", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField V2_TABLETS_FIELD_DESC = new org.apache.thrift.protocol.TField("v2_tablets", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCheckStorageFormatResultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCheckStorageFormatResultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> v1_tablets; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> v2_tablets; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
V1_TABLETS((short)1, "v1_tablets"),
V2_TABLETS((short)2, "v2_tablets");
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: // V1_TABLETS
return V1_TABLETS;
case 2: // V2_TABLETS
return V2_TABLETS;
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 _Fields optionals[] = {_Fields.V1_TABLETS,_Fields.V2_TABLETS};
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.V1_TABLETS, new org.apache.thrift.meta_data.FieldMetaData("v1_tablets", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
tmpMap.put(_Fields.V2_TABLETS, new org.apache.thrift.meta_data.FieldMetaData("v2_tablets", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
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(TCheckStorageFormatResult.class, metaDataMap);
}
public TCheckStorageFormatResult() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TCheckStorageFormatResult(TCheckStorageFormatResult other) {
if (other.isSetV1Tablets()) {
java.util.List<java.lang.Long> __this__v1_tablets = new java.util.ArrayList<java.lang.Long>(other.v1_tablets);
this.v1_tablets = __this__v1_tablets;
}
if (other.isSetV2Tablets()) {
java.util.List<java.lang.Long> __this__v2_tablets = new java.util.ArrayList<java.lang.Long>(other.v2_tablets);
this.v2_tablets = __this__v2_tablets;
}
}
public TCheckStorageFormatResult deepCopy() {
return new TCheckStorageFormatResult(this);
}
@Override
public void clear() {
this.v1_tablets = null;
this.v2_tablets = null;
}
public int getV1TabletsSize() {
return (this.v1_tablets == null) ? 0 : this.v1_tablets.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getV1TabletsIterator() {
return (this.v1_tablets == null) ? null : this.v1_tablets.iterator();
}
public void addToV1Tablets(long elem) {
if (this.v1_tablets == null) {
this.v1_tablets = new java.util.ArrayList<java.lang.Long>();
}
this.v1_tablets.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getV1Tablets() {
return this.v1_tablets;
}
public TCheckStorageFormatResult setV1Tablets(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> v1_tablets) {
this.v1_tablets = v1_tablets;
return this;
}
public void unsetV1Tablets() {
this.v1_tablets = null;
}
/** Returns true if field v1_tablets is set (has been assigned a value) and false otherwise */
public boolean isSetV1Tablets() {
return this.v1_tablets != null;
}
public void setV1TabletsIsSet(boolean value) {
if (!value) {
this.v1_tablets = null;
}
}
public int getV2TabletsSize() {
return (this.v2_tablets == null) ? 0 : this.v2_tablets.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getV2TabletsIterator() {
return (this.v2_tablets == null) ? null : this.v2_tablets.iterator();
}
public void addToV2Tablets(long elem) {
if (this.v2_tablets == null) {
this.v2_tablets = new java.util.ArrayList<java.lang.Long>();
}
this.v2_tablets.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getV2Tablets() {
return this.v2_tablets;
}
public TCheckStorageFormatResult setV2Tablets(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> v2_tablets) {
this.v2_tablets = v2_tablets;
return this;
}
public void unsetV2Tablets() {
this.v2_tablets = null;
}
/** Returns true if field v2_tablets is set (has been assigned a value) and false otherwise */
public boolean isSetV2Tablets() {
return this.v2_tablets != null;
}
public void setV2TabletsIsSet(boolean value) {
if (!value) {
this.v2_tablets = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case V1_TABLETS:
if (value == null) {
unsetV1Tablets();
} else {
setV1Tablets((java.util.List<java.lang.Long>)value);
}
break;
case V2_TABLETS:
if (value == null) {
unsetV2Tablets();
} else {
setV2Tablets((java.util.List<java.lang.Long>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case V1_TABLETS:
return getV1Tablets();
case V2_TABLETS:
return getV2Tablets();
}
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 V1_TABLETS:
return isSetV1Tablets();
case V2_TABLETS:
return isSetV2Tablets();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TCheckStorageFormatResult)
return this.equals((TCheckStorageFormatResult)that);
return false;
}
public boolean equals(TCheckStorageFormatResult that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_v1_tablets = true && this.isSetV1Tablets();
boolean that_present_v1_tablets = true && that.isSetV1Tablets();
if (this_present_v1_tablets || that_present_v1_tablets) {
if (!(this_present_v1_tablets && that_present_v1_tablets))
return false;
if (!this.v1_tablets.equals(that.v1_tablets))
return false;
}
boolean this_present_v2_tablets = true && this.isSetV2Tablets();
boolean that_present_v2_tablets = true && that.isSetV2Tablets();
if (this_present_v2_tablets || that_present_v2_tablets) {
if (!(this_present_v2_tablets && that_present_v2_tablets))
return false;
if (!this.v2_tablets.equals(that.v2_tablets))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetV1Tablets()) ? 131071 : 524287);
if (isSetV1Tablets())
hashCode = hashCode * 8191 + v1_tablets.hashCode();
hashCode = hashCode * 8191 + ((isSetV2Tablets()) ? 131071 : 524287);
if (isSetV2Tablets())
hashCode = hashCode * 8191 + v2_tablets.hashCode();
return hashCode;
}
@Override
public int compareTo(TCheckStorageFormatResult other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetV1Tablets(), other.isSetV1Tablets());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetV1Tablets()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.v1_tablets, other.v1_tablets);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetV2Tablets(), other.isSetV2Tablets());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetV2Tablets()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.v2_tablets, other.v2_tablets);
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("TCheckStorageFormatResult(");
boolean first = true;
if (isSetV1Tablets()) {
sb.append("v1_tablets:");
if (this.v1_tablets == null) {
sb.append("null");
} else {
sb.append(this.v1_tablets);
}
first = false;
}
if (isSetV2Tablets()) {
if (!first) sb.append(", ");
sb.append("v2_tablets:");
if (this.v2_tablets == null) {
sb.append("null");
} else {
sb.append(this.v2_tablets);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// 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 {
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 TCheckStorageFormatResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCheckStorageFormatResultStandardScheme getScheme() {
return new TCheckStorageFormatResultStandardScheme();
}
}
private static class TCheckStorageFormatResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCheckStorageFormatResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TCheckStorageFormatResult 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: // V1_TABLETS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
struct.v1_tablets = new java.util.ArrayList<java.lang.Long>(_list56.size);
long _elem57;
for (int _i58 = 0; _i58 < _list56.size; ++_i58)
{
_elem57 = iprot.readI64();
struct.v1_tablets.add(_elem57);
}
iprot.readListEnd();
}
struct.setV1TabletsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // V2_TABLETS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list59 = iprot.readListBegin();
struct.v2_tablets = new java.util.ArrayList<java.lang.Long>(_list59.size);
long _elem60;
for (int _i61 = 0; _i61 < _list59.size; ++_i61)
{
_elem60 = iprot.readI64();
struct.v2_tablets.add(_elem60);
}
iprot.readListEnd();
}
struct.setV2TabletsIsSet(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
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TCheckStorageFormatResult struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.v1_tablets != null) {
if (struct.isSetV1Tablets()) {
oprot.writeFieldBegin(V1_TABLETS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.v1_tablets.size()));
for (long _iter62 : struct.v1_tablets)
{
oprot.writeI64(_iter62);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.v2_tablets != null) {
if (struct.isSetV2Tablets()) {
oprot.writeFieldBegin(V2_TABLETS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.v2_tablets.size()));
for (long _iter63 : struct.v2_tablets)
{
oprot.writeI64(_iter63);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TCheckStorageFormatResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCheckStorageFormatResultTupleScheme getScheme() {
return new TCheckStorageFormatResultTupleScheme();
}
}
private static class TCheckStorageFormatResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCheckStorageFormatResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TCheckStorageFormatResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetV1Tablets()) {
optionals.set(0);
}
if (struct.isSetV2Tablets()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetV1Tablets()) {
{
oprot.writeI32(struct.v1_tablets.size());
for (long _iter64 : struct.v1_tablets)
{
oprot.writeI64(_iter64);
}
}
}
if (struct.isSetV2Tablets()) {
{
oprot.writeI32(struct.v2_tablets.size());
for (long _iter65 : struct.v2_tablets)
{
oprot.writeI64(_iter65);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TCheckStorageFormatResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list66 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.v1_tablets = new java.util.ArrayList<java.lang.Long>(_list66.size);
long _elem67;
for (int _i68 = 0; _i68 < _list66.size; ++_i68)
{
_elem67 = iprot.readI64();
struct.v1_tablets.add(_elem67);
}
}
struct.setV1TabletsIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list69 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.v2_tablets = new java.util.ArrayList<java.lang.Long>(_list69.size);
long _elem70;
for (int _i71 = 0; _i71 < _list69.size; ++_i71)
{
_elem70 = iprot.readI64();
struct.v2_tablets.add(_elem70);
}
}
struct.setV2TabletsIsSet(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();
}
}