TGetSnapshotRequest.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 TGetSnapshotRequest implements org.apache.thrift.TBase<TGetSnapshotRequest, TGetSnapshotRequest._Fields>, java.io.Serializable, Cloneable, Comparable<TGetSnapshotRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetSnapshotRequest");
private static final org.apache.thrift.protocol.TField CLUSTER_FIELD_DESC = new org.apache.thrift.protocol.TField("cluster", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField PASSWD_FIELD_DESC = new org.apache.thrift.protocol.TField("passwd", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField LABEL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("label_name", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField SNAPSHOT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("snapshot_name", org.apache.thrift.protocol.TType.STRING, (short)8);
private static final org.apache.thrift.protocol.TField SNAPSHOT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("snapshot_type", org.apache.thrift.protocol.TType.I32, (short)9);
private static final org.apache.thrift.protocol.TField ENABLE_COMPRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_compress", org.apache.thrift.protocol.TType.BOOL, (short)10);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TGetSnapshotRequestStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TGetSnapshotRequestTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String cluster; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String user; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String passwd; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String db; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String table; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String token; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String label_name; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String snapshot_name; // optional
/**
*
* @see TSnapshotType
*/
public @org.apache.thrift.annotation.Nullable TSnapshotType snapshot_type; // optional
public boolean enable_compress; // 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 {
CLUSTER((short)1, "cluster"),
USER((short)2, "user"),
PASSWD((short)3, "passwd"),
DB((short)4, "db"),
TABLE((short)5, "table"),
TOKEN((short)6, "token"),
LABEL_NAME((short)7, "label_name"),
SNAPSHOT_NAME((short)8, "snapshot_name"),
/**
*
* @see TSnapshotType
*/
SNAPSHOT_TYPE((short)9, "snapshot_type"),
ENABLE_COMPRESS((short)10, "enable_compress");
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: // CLUSTER
return CLUSTER;
case 2: // USER
return USER;
case 3: // PASSWD
return PASSWD;
case 4: // DB
return DB;
case 5: // TABLE
return TABLE;
case 6: // TOKEN
return TOKEN;
case 7: // LABEL_NAME
return LABEL_NAME;
case 8: // SNAPSHOT_NAME
return SNAPSHOT_NAME;
case 9: // SNAPSHOT_TYPE
return SNAPSHOT_TYPE;
case 10: // ENABLE_COMPRESS
return ENABLE_COMPRESS;
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 __ENABLE_COMPRESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.CLUSTER,_Fields.USER,_Fields.PASSWD,_Fields.DB,_Fields.TABLE,_Fields.TOKEN,_Fields.LABEL_NAME,_Fields.SNAPSHOT_NAME,_Fields.SNAPSHOT_TYPE,_Fields.ENABLE_COMPRESS};
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.CLUSTER, new org.apache.thrift.meta_data.FieldMetaData("cluster", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PASSWD, new org.apache.thrift.meta_data.FieldMetaData("passwd", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.LABEL_NAME, new org.apache.thrift.meta_data.FieldMetaData("label_name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SNAPSHOT_NAME, new org.apache.thrift.meta_data.FieldMetaData("snapshot_name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SNAPSHOT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("snapshot_type", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TSnapshotType.class)));
tmpMap.put(_Fields.ENABLE_COMPRESS, new org.apache.thrift.meta_data.FieldMetaData("enable_compress", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetSnapshotRequest.class, metaDataMap);
}
public TGetSnapshotRequest() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TGetSnapshotRequest(TGetSnapshotRequest other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetCluster()) {
this.cluster = other.cluster;
}
if (other.isSetUser()) {
this.user = other.user;
}
if (other.isSetPasswd()) {
this.passwd = other.passwd;
}
if (other.isSetDb()) {
this.db = other.db;
}
if (other.isSetTable()) {
this.table = other.table;
}
if (other.isSetToken()) {
this.token = other.token;
}
if (other.isSetLabelName()) {
this.label_name = other.label_name;
}
if (other.isSetSnapshotName()) {
this.snapshot_name = other.snapshot_name;
}
if (other.isSetSnapshotType()) {
this.snapshot_type = other.snapshot_type;
}
this.enable_compress = other.enable_compress;
}
public TGetSnapshotRequest deepCopy() {
return new TGetSnapshotRequest(this);
}
@Override
public void clear() {
this.cluster = null;
this.user = null;
this.passwd = null;
this.db = null;
this.table = null;
this.token = null;
this.label_name = null;
this.snapshot_name = null;
this.snapshot_type = null;
setEnableCompressIsSet(false);
this.enable_compress = false;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getCluster() {
return this.cluster;
}
public TGetSnapshotRequest setCluster(@org.apache.thrift.annotation.Nullable java.lang.String cluster) {
this.cluster = cluster;
return this;
}
public void unsetCluster() {
this.cluster = null;
}
/** Returns true if field cluster is set (has been assigned a value) and false otherwise */
public boolean isSetCluster() {
return this.cluster != null;
}
public void setClusterIsSet(boolean value) {
if (!value) {
this.cluster = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getUser() {
return this.user;
}
public TGetSnapshotRequest setUser(@org.apache.thrift.annotation.Nullable java.lang.String user) {
this.user = user;
return this;
}
public void unsetUser() {
this.user = null;
}
/** Returns true if field user is set (has been assigned a value) and false otherwise */
public boolean isSetUser() {
return this.user != null;
}
public void setUserIsSet(boolean value) {
if (!value) {
this.user = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getPasswd() {
return this.passwd;
}
public TGetSnapshotRequest setPasswd(@org.apache.thrift.annotation.Nullable java.lang.String passwd) {
this.passwd = passwd;
return this;
}
public void unsetPasswd() {
this.passwd = null;
}
/** Returns true if field passwd is set (has been assigned a value) and false otherwise */
public boolean isSetPasswd() {
return this.passwd != null;
}
public void setPasswdIsSet(boolean value) {
if (!value) {
this.passwd = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public TGetSnapshotRequest setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTable() {
return this.table;
}
public TGetSnapshotRequest setTable(@org.apache.thrift.annotation.Nullable java.lang.String table) {
this.table = table;
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getToken() {
return this.token;
}
public TGetSnapshotRequest setToken(@org.apache.thrift.annotation.Nullable java.lang.String token) {
this.token = token;
return this;
}
public void unsetToken() {
this.token = null;
}
/** Returns true if field token is set (has been assigned a value) and false otherwise */
public boolean isSetToken() {
return this.token != null;
}
public void setTokenIsSet(boolean value) {
if (!value) {
this.token = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getLabelName() {
return this.label_name;
}
public TGetSnapshotRequest setLabelName(@org.apache.thrift.annotation.Nullable java.lang.String label_name) {
this.label_name = label_name;
return this;
}
public void unsetLabelName() {
this.label_name = null;
}
/** Returns true if field label_name is set (has been assigned a value) and false otherwise */
public boolean isSetLabelName() {
return this.label_name != null;
}
public void setLabelNameIsSet(boolean value) {
if (!value) {
this.label_name = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getSnapshotName() {
return this.snapshot_name;
}
public TGetSnapshotRequest setSnapshotName(@org.apache.thrift.annotation.Nullable java.lang.String snapshot_name) {
this.snapshot_name = snapshot_name;
return this;
}
public void unsetSnapshotName() {
this.snapshot_name = null;
}
/** Returns true if field snapshot_name is set (has been assigned a value) and false otherwise */
public boolean isSetSnapshotName() {
return this.snapshot_name != null;
}
public void setSnapshotNameIsSet(boolean value) {
if (!value) {
this.snapshot_name = null;
}
}
/**
*
* @see TSnapshotType
*/
@org.apache.thrift.annotation.Nullable
public TSnapshotType getSnapshotType() {
return this.snapshot_type;
}
/**
*
* @see TSnapshotType
*/
public TGetSnapshotRequest setSnapshotType(@org.apache.thrift.annotation.Nullable TSnapshotType snapshot_type) {
this.snapshot_type = snapshot_type;
return this;
}
public void unsetSnapshotType() {
this.snapshot_type = null;
}
/** Returns true if field snapshot_type is set (has been assigned a value) and false otherwise */
public boolean isSetSnapshotType() {
return this.snapshot_type != null;
}
public void setSnapshotTypeIsSet(boolean value) {
if (!value) {
this.snapshot_type = null;
}
}
public boolean isEnableCompress() {
return this.enable_compress;
}
public TGetSnapshotRequest setEnableCompress(boolean enable_compress) {
this.enable_compress = enable_compress;
setEnableCompressIsSet(true);
return this;
}
public void unsetEnableCompress() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLE_COMPRESS_ISSET_ID);
}
/** Returns true if field enable_compress is set (has been assigned a value) and false otherwise */
public boolean isSetEnableCompress() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLE_COMPRESS_ISSET_ID);
}
public void setEnableCompressIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLE_COMPRESS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case CLUSTER:
if (value == null) {
unsetCluster();
} else {
setCluster((java.lang.String)value);
}
break;
case USER:
if (value == null) {
unsetUser();
} else {
setUser((java.lang.String)value);
}
break;
case PASSWD:
if (value == null) {
unsetPasswd();
} else {
setPasswd((java.lang.String)value);
}
break;
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((java.lang.String)value);
}
break;
case TOKEN:
if (value == null) {
unsetToken();
} else {
setToken((java.lang.String)value);
}
break;
case LABEL_NAME:
if (value == null) {
unsetLabelName();
} else {
setLabelName((java.lang.String)value);
}
break;
case SNAPSHOT_NAME:
if (value == null) {
unsetSnapshotName();
} else {
setSnapshotName((java.lang.String)value);
}
break;
case SNAPSHOT_TYPE:
if (value == null) {
unsetSnapshotType();
} else {
setSnapshotType((TSnapshotType)value);
}
break;
case ENABLE_COMPRESS:
if (value == null) {
unsetEnableCompress();
} else {
setEnableCompress((java.lang.Boolean)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CLUSTER:
return getCluster();
case USER:
return getUser();
case PASSWD:
return getPasswd();
case DB:
return getDb();
case TABLE:
return getTable();
case TOKEN:
return getToken();
case LABEL_NAME:
return getLabelName();
case SNAPSHOT_NAME:
return getSnapshotName();
case SNAPSHOT_TYPE:
return getSnapshotType();
case ENABLE_COMPRESS:
return isEnableCompress();
}
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 CLUSTER:
return isSetCluster();
case USER:
return isSetUser();
case PASSWD:
return isSetPasswd();
case DB:
return isSetDb();
case TABLE:
return isSetTable();
case TOKEN:
return isSetToken();
case LABEL_NAME:
return isSetLabelName();
case SNAPSHOT_NAME:
return isSetSnapshotName();
case SNAPSHOT_TYPE:
return isSetSnapshotType();
case ENABLE_COMPRESS:
return isSetEnableCompress();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TGetSnapshotRequest)
return this.equals((TGetSnapshotRequest)that);
return false;
}
public boolean equals(TGetSnapshotRequest that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_cluster = true && this.isSetCluster();
boolean that_present_cluster = true && that.isSetCluster();
if (this_present_cluster || that_present_cluster) {
if (!(this_present_cluster && that_present_cluster))
return false;
if (!this.cluster.equals(that.cluster))
return false;
}
boolean this_present_user = true && this.isSetUser();
boolean that_present_user = true && that.isSetUser();
if (this_present_user || that_present_user) {
if (!(this_present_user && that_present_user))
return false;
if (!this.user.equals(that.user))
return false;
}
boolean this_present_passwd = true && this.isSetPasswd();
boolean that_present_passwd = true && that.isSetPasswd();
if (this_present_passwd || that_present_passwd) {
if (!(this_present_passwd && that_present_passwd))
return false;
if (!this.passwd.equals(that.passwd))
return false;
}
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
return false;
}
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_token = true && this.isSetToken();
boolean that_present_token = true && that.isSetToken();
if (this_present_token || that_present_token) {
if (!(this_present_token && that_present_token))
return false;
if (!this.token.equals(that.token))
return false;
}
boolean this_present_label_name = true && this.isSetLabelName();
boolean that_present_label_name = true && that.isSetLabelName();
if (this_present_label_name || that_present_label_name) {
if (!(this_present_label_name && that_present_label_name))
return false;
if (!this.label_name.equals(that.label_name))
return false;
}
boolean this_present_snapshot_name = true && this.isSetSnapshotName();
boolean that_present_snapshot_name = true && that.isSetSnapshotName();
if (this_present_snapshot_name || that_present_snapshot_name) {
if (!(this_present_snapshot_name && that_present_snapshot_name))
return false;
if (!this.snapshot_name.equals(that.snapshot_name))
return false;
}
boolean this_present_snapshot_type = true && this.isSetSnapshotType();
boolean that_present_snapshot_type = true && that.isSetSnapshotType();
if (this_present_snapshot_type || that_present_snapshot_type) {
if (!(this_present_snapshot_type && that_present_snapshot_type))
return false;
if (!this.snapshot_type.equals(that.snapshot_type))
return false;
}
boolean this_present_enable_compress = true && this.isSetEnableCompress();
boolean that_present_enable_compress = true && that.isSetEnableCompress();
if (this_present_enable_compress || that_present_enable_compress) {
if (!(this_present_enable_compress && that_present_enable_compress))
return false;
if (this.enable_compress != that.enable_compress)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetCluster()) ? 131071 : 524287);
if (isSetCluster())
hashCode = hashCode * 8191 + cluster.hashCode();
hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287);
if (isSetUser())
hashCode = hashCode * 8191 + user.hashCode();
hashCode = hashCode * 8191 + ((isSetPasswd()) ? 131071 : 524287);
if (isSetPasswd())
hashCode = hashCode * 8191 + passwd.hashCode();
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
if (isSetTable())
hashCode = hashCode * 8191 + table.hashCode();
hashCode = hashCode * 8191 + ((isSetToken()) ? 131071 : 524287);
if (isSetToken())
hashCode = hashCode * 8191 + token.hashCode();
hashCode = hashCode * 8191 + ((isSetLabelName()) ? 131071 : 524287);
if (isSetLabelName())
hashCode = hashCode * 8191 + label_name.hashCode();
hashCode = hashCode * 8191 + ((isSetSnapshotName()) ? 131071 : 524287);
if (isSetSnapshotName())
hashCode = hashCode * 8191 + snapshot_name.hashCode();
hashCode = hashCode * 8191 + ((isSetSnapshotType()) ? 131071 : 524287);
if (isSetSnapshotType())
hashCode = hashCode * 8191 + snapshot_type.getValue();
hashCode = hashCode * 8191 + ((isSetEnableCompress()) ? 131071 : 524287);
if (isSetEnableCompress())
hashCode = hashCode * 8191 + ((enable_compress) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(TGetSnapshotRequest other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetCluster(), other.isSetCluster());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCluster()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cluster, other.cluster);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetUser(), other.isSetUser());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUser()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPasswd(), other.isSetPasswd());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPasswd()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwd, other.passwd);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDb(), other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTable(), other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetToken(), other.isSetToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetLabelName(), other.isSetLabelName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLabelName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label_name, other.label_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSnapshotName(), other.isSetSnapshotName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSnapshotName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.snapshot_name, other.snapshot_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSnapshotType(), other.isSetSnapshotType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSnapshotType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.snapshot_type, other.snapshot_type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetEnableCompress(), other.isSetEnableCompress());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEnableCompress()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_compress, other.enable_compress);
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("TGetSnapshotRequest(");
boolean first = true;
if (isSetCluster()) {
sb.append("cluster:");
if (this.cluster == null) {
sb.append("null");
} else {
sb.append(this.cluster);
}
first = false;
}
if (isSetUser()) {
if (!first) sb.append(", ");
sb.append("user:");
if (this.user == null) {
sb.append("null");
} else {
sb.append(this.user);
}
first = false;
}
if (isSetPasswd()) {
if (!first) sb.append(", ");
sb.append("passwd:");
if (this.passwd == null) {
sb.append("null");
} else {
sb.append(this.passwd);
}
first = false;
}
if (isSetDb()) {
if (!first) sb.append(", ");
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
first = false;
}
if (isSetTable()) {
if (!first) sb.append(", ");
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
sb.append(this.table);
}
first = false;
}
if (isSetToken()) {
if (!first) sb.append(", ");
sb.append("token:");
if (this.token == null) {
sb.append("null");
} else {
sb.append(this.token);
}
first = false;
}
if (isSetLabelName()) {
if (!first) sb.append(", ");
sb.append("label_name:");
if (this.label_name == null) {
sb.append("null");
} else {
sb.append(this.label_name);
}
first = false;
}
if (isSetSnapshotName()) {
if (!first) sb.append(", ");
sb.append("snapshot_name:");
if (this.snapshot_name == null) {
sb.append("null");
} else {
sb.append(this.snapshot_name);
}
first = false;
}
if (isSetSnapshotType()) {
if (!first) sb.append(", ");
sb.append("snapshot_type:");
if (this.snapshot_type == null) {
sb.append("null");
} else {
sb.append(this.snapshot_type);
}
first = false;
}
if (isSetEnableCompress()) {
if (!first) sb.append(", ");
sb.append("enable_compress:");
sb.append(this.enable_compress);
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 {
// 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 TGetSnapshotRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TGetSnapshotRequestStandardScheme getScheme() {
return new TGetSnapshotRequestStandardScheme();
}
}
private static class TGetSnapshotRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<TGetSnapshotRequest> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TGetSnapshotRequest 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: // CLUSTER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.cluster = iprot.readString();
struct.setClusterIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // USER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.user = iprot.readString();
struct.setUserIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // PASSWD
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.passwd = iprot.readString();
struct.setPasswdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readString();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.token = iprot.readString();
struct.setTokenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // LABEL_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.label_name = iprot.readString();
struct.setLabelNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // SNAPSHOT_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.snapshot_name = iprot.readString();
struct.setSnapshotNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // SNAPSHOT_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.snapshot_type = org.apache.doris.thrift.TSnapshotType.findByValue(iprot.readI32());
struct.setSnapshotTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // ENABLE_COMPRESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.enable_compress = iprot.readBool();
struct.setEnableCompressIsSet(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, TGetSnapshotRequest struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.cluster != null) {
if (struct.isSetCluster()) {
oprot.writeFieldBegin(CLUSTER_FIELD_DESC);
oprot.writeString(struct.cluster);
oprot.writeFieldEnd();
}
}
if (struct.user != null) {
if (struct.isSetUser()) {
oprot.writeFieldBegin(USER_FIELD_DESC);
oprot.writeString(struct.user);
oprot.writeFieldEnd();
}
}
if (struct.passwd != null) {
if (struct.isSetPasswd()) {
oprot.writeFieldBegin(PASSWD_FIELD_DESC);
oprot.writeString(struct.passwd);
oprot.writeFieldEnd();
}
}
if (struct.db != null) {
if (struct.isSetDb()) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
}
if (struct.table != null) {
if (struct.isSetTable()) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeString(struct.table);
oprot.writeFieldEnd();
}
}
if (struct.token != null) {
if (struct.isSetToken()) {
oprot.writeFieldBegin(TOKEN_FIELD_DESC);
oprot.writeString(struct.token);
oprot.writeFieldEnd();
}
}
if (struct.label_name != null) {
if (struct.isSetLabelName()) {
oprot.writeFieldBegin(LABEL_NAME_FIELD_DESC);
oprot.writeString(struct.label_name);
oprot.writeFieldEnd();
}
}
if (struct.snapshot_name != null) {
if (struct.isSetSnapshotName()) {
oprot.writeFieldBegin(SNAPSHOT_NAME_FIELD_DESC);
oprot.writeString(struct.snapshot_name);
oprot.writeFieldEnd();
}
}
if (struct.snapshot_type != null) {
if (struct.isSetSnapshotType()) {
oprot.writeFieldBegin(SNAPSHOT_TYPE_FIELD_DESC);
oprot.writeI32(struct.snapshot_type.getValue());
oprot.writeFieldEnd();
}
}
if (struct.isSetEnableCompress()) {
oprot.writeFieldBegin(ENABLE_COMPRESS_FIELD_DESC);
oprot.writeBool(struct.enable_compress);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TGetSnapshotRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TGetSnapshotRequestTupleScheme getScheme() {
return new TGetSnapshotRequestTupleScheme();
}
}
private static class TGetSnapshotRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<TGetSnapshotRequest> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TGetSnapshotRequest 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.isSetCluster()) {
optionals.set(0);
}
if (struct.isSetUser()) {
optionals.set(1);
}
if (struct.isSetPasswd()) {
optionals.set(2);
}
if (struct.isSetDb()) {
optionals.set(3);
}
if (struct.isSetTable()) {
optionals.set(4);
}
if (struct.isSetToken()) {
optionals.set(5);
}
if (struct.isSetLabelName()) {
optionals.set(6);
}
if (struct.isSetSnapshotName()) {
optionals.set(7);
}
if (struct.isSetSnapshotType()) {
optionals.set(8);
}
if (struct.isSetEnableCompress()) {
optionals.set(9);
}
oprot.writeBitSet(optionals, 10);
if (struct.isSetCluster()) {
oprot.writeString(struct.cluster);
}
if (struct.isSetUser()) {
oprot.writeString(struct.user);
}
if (struct.isSetPasswd()) {
oprot.writeString(struct.passwd);
}
if (struct.isSetDb()) {
oprot.writeString(struct.db);
}
if (struct.isSetTable()) {
oprot.writeString(struct.table);
}
if (struct.isSetToken()) {
oprot.writeString(struct.token);
}
if (struct.isSetLabelName()) {
oprot.writeString(struct.label_name);
}
if (struct.isSetSnapshotName()) {
oprot.writeString(struct.snapshot_name);
}
if (struct.isSetSnapshotType()) {
oprot.writeI32(struct.snapshot_type.getValue());
}
if (struct.isSetEnableCompress()) {
oprot.writeBool(struct.enable_compress);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TGetSnapshotRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(10);
if (incoming.get(0)) {
struct.cluster = iprot.readString();
struct.setClusterIsSet(true);
}
if (incoming.get(1)) {
struct.user = iprot.readString();
struct.setUserIsSet(true);
}
if (incoming.get(2)) {
struct.passwd = iprot.readString();
struct.setPasswdIsSet(true);
}
if (incoming.get(3)) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
}
if (incoming.get(4)) {
struct.table = iprot.readString();
struct.setTableIsSet(true);
}
if (incoming.get(5)) {
struct.token = iprot.readString();
struct.setTokenIsSet(true);
}
if (incoming.get(6)) {
struct.label_name = iprot.readString();
struct.setLabelNameIsSet(true);
}
if (incoming.get(7)) {
struct.snapshot_name = iprot.readString();
struct.setSnapshotNameIsSet(true);
}
if (incoming.get(8)) {
struct.snapshot_type = org.apache.doris.thrift.TSnapshotType.findByValue(iprot.readI32());
struct.setSnapshotTypeIsSet(true);
}
if (incoming.get(9)) {
struct.enable_compress = iprot.readBool();
struct.setEnableCompressIsSet(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();
}
}