TSearchParam.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 TSearchParam implements org.apache.thrift.TBase<TSearchParam, TSearchParam._Fields>, java.io.Serializable, Cloneable, Comparable<TSearchParam> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSearchParam");
private static final org.apache.thrift.protocol.TField ORIGINAL_DSL_FIELD_DESC = new org.apache.thrift.protocol.TField("original_dsl", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ROOT_FIELD_DESC = new org.apache.thrift.protocol.TField("root", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField FIELD_BINDINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("field_bindings", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField DEFAULT_OPERATOR_FIELD_DESC = new org.apache.thrift.protocol.TField("default_operator", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField MINIMUM_SHOULD_MATCH_FIELD_DESC = new org.apache.thrift.protocol.TField("minimum_should_match", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSearchParamStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSearchParamTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String original_dsl; // required
public @org.apache.thrift.annotation.Nullable TSearchClause root; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TSearchFieldBinding> field_bindings; // required
public @org.apache.thrift.annotation.Nullable java.lang.String default_operator; // optional
public int minimum_should_match; // 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 {
ORIGINAL_DSL((short)1, "original_dsl"),
ROOT((short)2, "root"),
FIELD_BINDINGS((short)3, "field_bindings"),
DEFAULT_OPERATOR((short)4, "default_operator"),
MINIMUM_SHOULD_MATCH((short)5, "minimum_should_match");
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: // ORIGINAL_DSL
return ORIGINAL_DSL;
case 2: // ROOT
return ROOT;
case 3: // FIELD_BINDINGS
return FIELD_BINDINGS;
case 4: // DEFAULT_OPERATOR
return DEFAULT_OPERATOR;
case 5: // MINIMUM_SHOULD_MATCH
return MINIMUM_SHOULD_MATCH;
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 __MINIMUM_SHOULD_MATCH_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.DEFAULT_OPERATOR,_Fields.MINIMUM_SHOULD_MATCH};
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.ORIGINAL_DSL, new org.apache.thrift.meta_data.FieldMetaData("original_dsl", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ROOT, new org.apache.thrift.meta_data.FieldMetaData("root", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSearchClause.class)));
tmpMap.put(_Fields.FIELD_BINDINGS, new org.apache.thrift.meta_data.FieldMetaData("field_bindings", org.apache.thrift.TFieldRequirementType.REQUIRED,
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, TSearchFieldBinding.class))));
tmpMap.put(_Fields.DEFAULT_OPERATOR, new org.apache.thrift.meta_data.FieldMetaData("default_operator", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.MINIMUM_SHOULD_MATCH, new org.apache.thrift.meta_data.FieldMetaData("minimum_should_match", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSearchParam.class, metaDataMap);
}
public TSearchParam() {
}
public TSearchParam(
java.lang.String original_dsl,
TSearchClause root,
java.util.List<TSearchFieldBinding> field_bindings)
{
this();
this.original_dsl = original_dsl;
this.root = root;
this.field_bindings = field_bindings;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TSearchParam(TSearchParam other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetOriginalDsl()) {
this.original_dsl = other.original_dsl;
}
if (other.isSetRoot()) {
this.root = new TSearchClause(other.root);
}
if (other.isSetFieldBindings()) {
java.util.List<TSearchFieldBinding> __this__field_bindings = new java.util.ArrayList<TSearchFieldBinding>(other.field_bindings.size());
for (TSearchFieldBinding other_element : other.field_bindings) {
__this__field_bindings.add(new TSearchFieldBinding(other_element));
}
this.field_bindings = __this__field_bindings;
}
if (other.isSetDefaultOperator()) {
this.default_operator = other.default_operator;
}
this.minimum_should_match = other.minimum_should_match;
}
public TSearchParam deepCopy() {
return new TSearchParam(this);
}
@Override
public void clear() {
this.original_dsl = null;
this.root = null;
this.field_bindings = null;
this.default_operator = null;
setMinimumShouldMatchIsSet(false);
this.minimum_should_match = 0;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getOriginalDsl() {
return this.original_dsl;
}
public TSearchParam setOriginalDsl(@org.apache.thrift.annotation.Nullable java.lang.String original_dsl) {
this.original_dsl = original_dsl;
return this;
}
public void unsetOriginalDsl() {
this.original_dsl = null;
}
/** Returns true if field original_dsl is set (has been assigned a value) and false otherwise */
public boolean isSetOriginalDsl() {
return this.original_dsl != null;
}
public void setOriginalDslIsSet(boolean value) {
if (!value) {
this.original_dsl = null;
}
}
@org.apache.thrift.annotation.Nullable
public TSearchClause getRoot() {
return this.root;
}
public TSearchParam setRoot(@org.apache.thrift.annotation.Nullable TSearchClause root) {
this.root = root;
return this;
}
public void unsetRoot() {
this.root = null;
}
/** Returns true if field root is set (has been assigned a value) and false otherwise */
public boolean isSetRoot() {
return this.root != null;
}
public void setRootIsSet(boolean value) {
if (!value) {
this.root = null;
}
}
public int getFieldBindingsSize() {
return (this.field_bindings == null) ? 0 : this.field_bindings.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TSearchFieldBinding> getFieldBindingsIterator() {
return (this.field_bindings == null) ? null : this.field_bindings.iterator();
}
public void addToFieldBindings(TSearchFieldBinding elem) {
if (this.field_bindings == null) {
this.field_bindings = new java.util.ArrayList<TSearchFieldBinding>();
}
this.field_bindings.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TSearchFieldBinding> getFieldBindings() {
return this.field_bindings;
}
public TSearchParam setFieldBindings(@org.apache.thrift.annotation.Nullable java.util.List<TSearchFieldBinding> field_bindings) {
this.field_bindings = field_bindings;
return this;
}
public void unsetFieldBindings() {
this.field_bindings = null;
}
/** Returns true if field field_bindings is set (has been assigned a value) and false otherwise */
public boolean isSetFieldBindings() {
return this.field_bindings != null;
}
public void setFieldBindingsIsSet(boolean value) {
if (!value) {
this.field_bindings = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDefaultOperator() {
return this.default_operator;
}
public TSearchParam setDefaultOperator(@org.apache.thrift.annotation.Nullable java.lang.String default_operator) {
this.default_operator = default_operator;
return this;
}
public void unsetDefaultOperator() {
this.default_operator = null;
}
/** Returns true if field default_operator is set (has been assigned a value) and false otherwise */
public boolean isSetDefaultOperator() {
return this.default_operator != null;
}
public void setDefaultOperatorIsSet(boolean value) {
if (!value) {
this.default_operator = null;
}
}
public int getMinimumShouldMatch() {
return this.minimum_should_match;
}
public TSearchParam setMinimumShouldMatch(int minimum_should_match) {
this.minimum_should_match = minimum_should_match;
setMinimumShouldMatchIsSet(true);
return this;
}
public void unsetMinimumShouldMatch() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MINIMUM_SHOULD_MATCH_ISSET_ID);
}
/** Returns true if field minimum_should_match is set (has been assigned a value) and false otherwise */
public boolean isSetMinimumShouldMatch() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MINIMUM_SHOULD_MATCH_ISSET_ID);
}
public void setMinimumShouldMatchIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MINIMUM_SHOULD_MATCH_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ORIGINAL_DSL:
if (value == null) {
unsetOriginalDsl();
} else {
setOriginalDsl((java.lang.String)value);
}
break;
case ROOT:
if (value == null) {
unsetRoot();
} else {
setRoot((TSearchClause)value);
}
break;
case FIELD_BINDINGS:
if (value == null) {
unsetFieldBindings();
} else {
setFieldBindings((java.util.List<TSearchFieldBinding>)value);
}
break;
case DEFAULT_OPERATOR:
if (value == null) {
unsetDefaultOperator();
} else {
setDefaultOperator((java.lang.String)value);
}
break;
case MINIMUM_SHOULD_MATCH:
if (value == null) {
unsetMinimumShouldMatch();
} else {
setMinimumShouldMatch((java.lang.Integer)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ORIGINAL_DSL:
return getOriginalDsl();
case ROOT:
return getRoot();
case FIELD_BINDINGS:
return getFieldBindings();
case DEFAULT_OPERATOR:
return getDefaultOperator();
case MINIMUM_SHOULD_MATCH:
return getMinimumShouldMatch();
}
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 ORIGINAL_DSL:
return isSetOriginalDsl();
case ROOT:
return isSetRoot();
case FIELD_BINDINGS:
return isSetFieldBindings();
case DEFAULT_OPERATOR:
return isSetDefaultOperator();
case MINIMUM_SHOULD_MATCH:
return isSetMinimumShouldMatch();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TSearchParam)
return this.equals((TSearchParam)that);
return false;
}
public boolean equals(TSearchParam that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_original_dsl = true && this.isSetOriginalDsl();
boolean that_present_original_dsl = true && that.isSetOriginalDsl();
if (this_present_original_dsl || that_present_original_dsl) {
if (!(this_present_original_dsl && that_present_original_dsl))
return false;
if (!this.original_dsl.equals(that.original_dsl))
return false;
}
boolean this_present_root = true && this.isSetRoot();
boolean that_present_root = true && that.isSetRoot();
if (this_present_root || that_present_root) {
if (!(this_present_root && that_present_root))
return false;
if (!this.root.equals(that.root))
return false;
}
boolean this_present_field_bindings = true && this.isSetFieldBindings();
boolean that_present_field_bindings = true && that.isSetFieldBindings();
if (this_present_field_bindings || that_present_field_bindings) {
if (!(this_present_field_bindings && that_present_field_bindings))
return false;
if (!this.field_bindings.equals(that.field_bindings))
return false;
}
boolean this_present_default_operator = true && this.isSetDefaultOperator();
boolean that_present_default_operator = true && that.isSetDefaultOperator();
if (this_present_default_operator || that_present_default_operator) {
if (!(this_present_default_operator && that_present_default_operator))
return false;
if (!this.default_operator.equals(that.default_operator))
return false;
}
boolean this_present_minimum_should_match = true && this.isSetMinimumShouldMatch();
boolean that_present_minimum_should_match = true && that.isSetMinimumShouldMatch();
if (this_present_minimum_should_match || that_present_minimum_should_match) {
if (!(this_present_minimum_should_match && that_present_minimum_should_match))
return false;
if (this.minimum_should_match != that.minimum_should_match)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetOriginalDsl()) ? 131071 : 524287);
if (isSetOriginalDsl())
hashCode = hashCode * 8191 + original_dsl.hashCode();
hashCode = hashCode * 8191 + ((isSetRoot()) ? 131071 : 524287);
if (isSetRoot())
hashCode = hashCode * 8191 + root.hashCode();
hashCode = hashCode * 8191 + ((isSetFieldBindings()) ? 131071 : 524287);
if (isSetFieldBindings())
hashCode = hashCode * 8191 + field_bindings.hashCode();
hashCode = hashCode * 8191 + ((isSetDefaultOperator()) ? 131071 : 524287);
if (isSetDefaultOperator())
hashCode = hashCode * 8191 + default_operator.hashCode();
hashCode = hashCode * 8191 + ((isSetMinimumShouldMatch()) ? 131071 : 524287);
if (isSetMinimumShouldMatch())
hashCode = hashCode * 8191 + minimum_should_match;
return hashCode;
}
@Override
public int compareTo(TSearchParam other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetOriginalDsl(), other.isSetOriginalDsl());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOriginalDsl()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.original_dsl, other.original_dsl);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRoot(), other.isSetRoot());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRoot()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.root, other.root);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetFieldBindings(), other.isSetFieldBindings());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFieldBindings()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field_bindings, other.field_bindings);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDefaultOperator(), other.isSetDefaultOperator());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDefaultOperator()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.default_operator, other.default_operator);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMinimumShouldMatch(), other.isSetMinimumShouldMatch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMinimumShouldMatch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minimum_should_match, other.minimum_should_match);
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("TSearchParam(");
boolean first = true;
sb.append("original_dsl:");
if (this.original_dsl == null) {
sb.append("null");
} else {
sb.append(this.original_dsl);
}
first = false;
if (!first) sb.append(", ");
sb.append("root:");
if (this.root == null) {
sb.append("null");
} else {
sb.append(this.root);
}
first = false;
if (!first) sb.append(", ");
sb.append("field_bindings:");
if (this.field_bindings == null) {
sb.append("null");
} else {
sb.append(this.field_bindings);
}
first = false;
if (isSetDefaultOperator()) {
if (!first) sb.append(", ");
sb.append("default_operator:");
if (this.default_operator == null) {
sb.append("null");
} else {
sb.append(this.default_operator);
}
first = false;
}
if (isSetMinimumShouldMatch()) {
if (!first) sb.append(", ");
sb.append("minimum_should_match:");
sb.append(this.minimum_should_match);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (original_dsl == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'original_dsl' was not present! Struct: " + toString());
}
if (root == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'root' was not present! Struct: " + toString());
}
if (field_bindings == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'field_bindings' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (root != null) {
root.validate();
}
}
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 TSearchParamStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSearchParamStandardScheme getScheme() {
return new TSearchParamStandardScheme();
}
}
private static class TSearchParamStandardScheme extends org.apache.thrift.scheme.StandardScheme<TSearchParam> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TSearchParam 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: // ORIGINAL_DSL
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.original_dsl = iprot.readString();
struct.setOriginalDslIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // ROOT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.root = new TSearchClause();
struct.root.read(iprot);
struct.setRootIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // FIELD_BINDINGS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
struct.field_bindings = new java.util.ArrayList<TSearchFieldBinding>(_list44.size);
@org.apache.thrift.annotation.Nullable TSearchFieldBinding _elem45;
for (int _i46 = 0; _i46 < _list44.size; ++_i46)
{
_elem45 = new TSearchFieldBinding();
_elem45.read(iprot);
struct.field_bindings.add(_elem45);
}
iprot.readListEnd();
}
struct.setFieldBindingsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // DEFAULT_OPERATOR
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.default_operator = iprot.readString();
struct.setDefaultOperatorIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // MINIMUM_SHOULD_MATCH
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.minimum_should_match = iprot.readI32();
struct.setMinimumShouldMatchIsSet(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, TSearchParam struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.original_dsl != null) {
oprot.writeFieldBegin(ORIGINAL_DSL_FIELD_DESC);
oprot.writeString(struct.original_dsl);
oprot.writeFieldEnd();
}
if (struct.root != null) {
oprot.writeFieldBegin(ROOT_FIELD_DESC);
struct.root.write(oprot);
oprot.writeFieldEnd();
}
if (struct.field_bindings != null) {
oprot.writeFieldBegin(FIELD_BINDINGS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.field_bindings.size()));
for (TSearchFieldBinding _iter47 : struct.field_bindings)
{
_iter47.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.default_operator != null) {
if (struct.isSetDefaultOperator()) {
oprot.writeFieldBegin(DEFAULT_OPERATOR_FIELD_DESC);
oprot.writeString(struct.default_operator);
oprot.writeFieldEnd();
}
}
if (struct.isSetMinimumShouldMatch()) {
oprot.writeFieldBegin(MINIMUM_SHOULD_MATCH_FIELD_DESC);
oprot.writeI32(struct.minimum_should_match);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TSearchParamTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSearchParamTupleScheme getScheme() {
return new TSearchParamTupleScheme();
}
}
private static class TSearchParamTupleScheme extends org.apache.thrift.scheme.TupleScheme<TSearchParam> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSearchParam struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.original_dsl);
struct.root.write(oprot);
{
oprot.writeI32(struct.field_bindings.size());
for (TSearchFieldBinding _iter48 : struct.field_bindings)
{
_iter48.write(oprot);
}
}
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDefaultOperator()) {
optionals.set(0);
}
if (struct.isSetMinimumShouldMatch()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetDefaultOperator()) {
oprot.writeString(struct.default_operator);
}
if (struct.isSetMinimumShouldMatch()) {
oprot.writeI32(struct.minimum_should_match);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TSearchParam struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.original_dsl = iprot.readString();
struct.setOriginalDslIsSet(true);
struct.root = new TSearchClause();
struct.root.read(iprot);
struct.setRootIsSet(true);
{
org.apache.thrift.protocol.TList _list49 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.field_bindings = new java.util.ArrayList<TSearchFieldBinding>(_list49.size);
@org.apache.thrift.annotation.Nullable TSearchFieldBinding _elem50;
for (int _i51 = 0; _i51 < _list49.size; ++_i51)
{
_elem50 = new TSearchFieldBinding();
_elem50.read(iprot);
struct.field_bindings.add(_elem50);
}
}
struct.setFieldBindingsIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.default_operator = iprot.readString();
struct.setDefaultOperatorIsSet(true);
}
if (incoming.get(1)) {
struct.minimum_should_match = iprot.readI32();
struct.setMinimumShouldMatchIsSet(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();
}
}