TPushIndexPolicyReq.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 TPushIndexPolicyReq implements org.apache.thrift.TBase<TPushIndexPolicyReq, TPushIndexPolicyReq._Fields>, java.io.Serializable, Cloneable, Comparable<TPushIndexPolicyReq> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPushIndexPolicyReq");
private static final org.apache.thrift.protocol.TField INDEX_POLICYS_FIELD_DESC = new org.apache.thrift.protocol.TField("index_policys", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField DROPPED_INDEX_POLICYS_FIELD_DESC = new org.apache.thrift.protocol.TField("dropped_index_policys", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPushIndexPolicyReqStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPushIndexPolicyReqTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.util.List<TIndexPolicy> index_policys; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> dropped_index_policys; // 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 {
INDEX_POLICYS((short)1, "index_policys"),
DROPPED_INDEX_POLICYS((short)2, "dropped_index_policys");
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: // INDEX_POLICYS
return INDEX_POLICYS;
case 2: // DROPPED_INDEX_POLICYS
return DROPPED_INDEX_POLICYS;
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.INDEX_POLICYS,_Fields.DROPPED_INDEX_POLICYS};
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.INDEX_POLICYS, new org.apache.thrift.meta_data.FieldMetaData("index_policys", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIndexPolicy.class))));
tmpMap.put(_Fields.DROPPED_INDEX_POLICYS, new org.apache.thrift.meta_data.FieldMetaData("dropped_index_policys", 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(TPushIndexPolicyReq.class, metaDataMap);
}
public TPushIndexPolicyReq() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TPushIndexPolicyReq(TPushIndexPolicyReq other) {
if (other.isSetIndexPolicys()) {
java.util.List<TIndexPolicy> __this__index_policys = new java.util.ArrayList<TIndexPolicy>(other.index_policys.size());
for (TIndexPolicy other_element : other.index_policys) {
__this__index_policys.add(new TIndexPolicy(other_element));
}
this.index_policys = __this__index_policys;
}
if (other.isSetDroppedIndexPolicys()) {
java.util.List<java.lang.Long> __this__dropped_index_policys = new java.util.ArrayList<java.lang.Long>(other.dropped_index_policys);
this.dropped_index_policys = __this__dropped_index_policys;
}
}
public TPushIndexPolicyReq deepCopy() {
return new TPushIndexPolicyReq(this);
}
@Override
public void clear() {
this.index_policys = null;
this.dropped_index_policys = null;
}
public int getIndexPolicysSize() {
return (this.index_policys == null) ? 0 : this.index_policys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TIndexPolicy> getIndexPolicysIterator() {
return (this.index_policys == null) ? null : this.index_policys.iterator();
}
public void addToIndexPolicys(TIndexPolicy elem) {
if (this.index_policys == null) {
this.index_policys = new java.util.ArrayList<TIndexPolicy>();
}
this.index_policys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TIndexPolicy> getIndexPolicys() {
return this.index_policys;
}
public TPushIndexPolicyReq setIndexPolicys(@org.apache.thrift.annotation.Nullable java.util.List<TIndexPolicy> index_policys) {
this.index_policys = index_policys;
return this;
}
public void unsetIndexPolicys() {
this.index_policys = null;
}
/** Returns true if field index_policys is set (has been assigned a value) and false otherwise */
public boolean isSetIndexPolicys() {
return this.index_policys != null;
}
public void setIndexPolicysIsSet(boolean value) {
if (!value) {
this.index_policys = null;
}
}
public int getDroppedIndexPolicysSize() {
return (this.dropped_index_policys == null) ? 0 : this.dropped_index_policys.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getDroppedIndexPolicysIterator() {
return (this.dropped_index_policys == null) ? null : this.dropped_index_policys.iterator();
}
public void addToDroppedIndexPolicys(long elem) {
if (this.dropped_index_policys == null) {
this.dropped_index_policys = new java.util.ArrayList<java.lang.Long>();
}
this.dropped_index_policys.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getDroppedIndexPolicys() {
return this.dropped_index_policys;
}
public TPushIndexPolicyReq setDroppedIndexPolicys(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> dropped_index_policys) {
this.dropped_index_policys = dropped_index_policys;
return this;
}
public void unsetDroppedIndexPolicys() {
this.dropped_index_policys = null;
}
/** Returns true if field dropped_index_policys is set (has been assigned a value) and false otherwise */
public boolean isSetDroppedIndexPolicys() {
return this.dropped_index_policys != null;
}
public void setDroppedIndexPolicysIsSet(boolean value) {
if (!value) {
this.dropped_index_policys = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case INDEX_POLICYS:
if (value == null) {
unsetIndexPolicys();
} else {
setIndexPolicys((java.util.List<TIndexPolicy>)value);
}
break;
case DROPPED_INDEX_POLICYS:
if (value == null) {
unsetDroppedIndexPolicys();
} else {
setDroppedIndexPolicys((java.util.List<java.lang.Long>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case INDEX_POLICYS:
return getIndexPolicys();
case DROPPED_INDEX_POLICYS:
return getDroppedIndexPolicys();
}
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 INDEX_POLICYS:
return isSetIndexPolicys();
case DROPPED_INDEX_POLICYS:
return isSetDroppedIndexPolicys();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TPushIndexPolicyReq)
return this.equals((TPushIndexPolicyReq)that);
return false;
}
public boolean equals(TPushIndexPolicyReq that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_index_policys = true && this.isSetIndexPolicys();
boolean that_present_index_policys = true && that.isSetIndexPolicys();
if (this_present_index_policys || that_present_index_policys) {
if (!(this_present_index_policys && that_present_index_policys))
return false;
if (!this.index_policys.equals(that.index_policys))
return false;
}
boolean this_present_dropped_index_policys = true && this.isSetDroppedIndexPolicys();
boolean that_present_dropped_index_policys = true && that.isSetDroppedIndexPolicys();
if (this_present_dropped_index_policys || that_present_dropped_index_policys) {
if (!(this_present_dropped_index_policys && that_present_dropped_index_policys))
return false;
if (!this.dropped_index_policys.equals(that.dropped_index_policys))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetIndexPolicys()) ? 131071 : 524287);
if (isSetIndexPolicys())
hashCode = hashCode * 8191 + index_policys.hashCode();
hashCode = hashCode * 8191 + ((isSetDroppedIndexPolicys()) ? 131071 : 524287);
if (isSetDroppedIndexPolicys())
hashCode = hashCode * 8191 + dropped_index_policys.hashCode();
return hashCode;
}
@Override
public int compareTo(TPushIndexPolicyReq other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetIndexPolicys(), other.isSetIndexPolicys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndexPolicys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_policys, other.index_policys);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDroppedIndexPolicys(), other.isSetDroppedIndexPolicys());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDroppedIndexPolicys()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dropped_index_policys, other.dropped_index_policys);
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("TPushIndexPolicyReq(");
boolean first = true;
if (isSetIndexPolicys()) {
sb.append("index_policys:");
if (this.index_policys == null) {
sb.append("null");
} else {
sb.append(this.index_policys);
}
first = false;
}
if (isSetDroppedIndexPolicys()) {
if (!first) sb.append(", ");
sb.append("dropped_index_policys:");
if (this.dropped_index_policys == null) {
sb.append("null");
} else {
sb.append(this.dropped_index_policys);
}
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 TPushIndexPolicyReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPushIndexPolicyReqStandardScheme getScheme() {
return new TPushIndexPolicyReqStandardScheme();
}
}
private static class TPushIndexPolicyReqStandardScheme extends org.apache.thrift.scheme.StandardScheme<TPushIndexPolicyReq> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TPushIndexPolicyReq 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: // INDEX_POLICYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list66 = iprot.readListBegin();
struct.index_policys = new java.util.ArrayList<TIndexPolicy>(_list66.size);
@org.apache.thrift.annotation.Nullable TIndexPolicy _elem67;
for (int _i68 = 0; _i68 < _list66.size; ++_i68)
{
_elem67 = new TIndexPolicy();
_elem67.read(iprot);
struct.index_policys.add(_elem67);
}
iprot.readListEnd();
}
struct.setIndexPolicysIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DROPPED_INDEX_POLICYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list69 = iprot.readListBegin();
struct.dropped_index_policys = new java.util.ArrayList<java.lang.Long>(_list69.size);
long _elem70;
for (int _i71 = 0; _i71 < _list69.size; ++_i71)
{
_elem70 = iprot.readI64();
struct.dropped_index_policys.add(_elem70);
}
iprot.readListEnd();
}
struct.setDroppedIndexPolicysIsSet(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, TPushIndexPolicyReq struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.index_policys != null) {
if (struct.isSetIndexPolicys()) {
oprot.writeFieldBegin(INDEX_POLICYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.index_policys.size()));
for (TIndexPolicy _iter72 : struct.index_policys)
{
_iter72.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.dropped_index_policys != null) {
if (struct.isSetDroppedIndexPolicys()) {
oprot.writeFieldBegin(DROPPED_INDEX_POLICYS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.dropped_index_policys.size()));
for (long _iter73 : struct.dropped_index_policys)
{
oprot.writeI64(_iter73);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TPushIndexPolicyReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPushIndexPolicyReqTupleScheme getScheme() {
return new TPushIndexPolicyReqTupleScheme();
}
}
private static class TPushIndexPolicyReqTupleScheme extends org.apache.thrift.scheme.TupleScheme<TPushIndexPolicyReq> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TPushIndexPolicyReq 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.isSetIndexPolicys()) {
optionals.set(0);
}
if (struct.isSetDroppedIndexPolicys()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetIndexPolicys()) {
{
oprot.writeI32(struct.index_policys.size());
for (TIndexPolicy _iter74 : struct.index_policys)
{
_iter74.write(oprot);
}
}
}
if (struct.isSetDroppedIndexPolicys()) {
{
oprot.writeI32(struct.dropped_index_policys.size());
for (long _iter75 : struct.dropped_index_policys)
{
oprot.writeI64(_iter75);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TPushIndexPolicyReq 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 _list76 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.index_policys = new java.util.ArrayList<TIndexPolicy>(_list76.size);
@org.apache.thrift.annotation.Nullable TIndexPolicy _elem77;
for (int _i78 = 0; _i78 < _list76.size; ++_i78)
{
_elem77 = new TIndexPolicy();
_elem77.read(iprot);
struct.index_policys.add(_elem77);
}
}
struct.setIndexPolicysIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list79 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.dropped_index_policys = new java.util.ArrayList<java.lang.Long>(_list79.size);
long _elem80;
for (int _i81 = 0; _i81 < _list79.size; ++_i81)
{
_elem80 = iprot.readI64();
struct.dropped_index_policys.add(_elem80);
}
}
struct.setDroppedIndexPolicysIsSet(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();
}
}