
org.apache.iotdb.cluster.rpc.thrift.GroupByRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotdb-thrift-cluster
Show all versions of iotdb-thrift-cluster
RPC (Thrift) framework among servers.
/**
* Autogenerated by Thrift Compiler (0.14.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.iotdb.cluster.rpc.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.14.1)", date = "2022-07-31")
public class GroupByRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupByRequest");
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField DATA_TYPE_ORDINAL_FIELD_DESC = new org.apache.thrift.protocol.TField("dataTypeOrdinal", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField TIME_FILTER_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("timeFilterBytes", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField AGGREGATION_TYPE_ORDINALS_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregationTypeOrdinals", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.protocol.TField HEADER_FIELD_DESC = new org.apache.thrift.protocol.TField("header", org.apache.thrift.protocol.TType.STRUCT, (short)6);
private static final org.apache.thrift.protocol.TField REQUESTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("requestor", org.apache.thrift.protocol.TType.STRUCT, (short)7);
private static final org.apache.thrift.protocol.TField DEVICE_MEASUREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("deviceMeasurements", org.apache.thrift.protocol.TType.SET, (short)8);
private static final org.apache.thrift.protocol.TField ASCENDING_FIELD_DESC = new org.apache.thrift.protocol.TField("ascending", org.apache.thrift.protocol.TType.BOOL, (short)9);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GroupByRequestStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GroupByRequestTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String path; // required
public int dataTypeOrdinal; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer timeFilterBytes; // optional
public long queryId; // required
public @org.apache.thrift.annotation.Nullable java.util.List aggregationTypeOrdinals; // required
public @org.apache.thrift.annotation.Nullable RaftNode header; // required
public @org.apache.thrift.annotation.Nullable Node requestor; // required
public @org.apache.thrift.annotation.Nullable java.util.Set deviceMeasurements; // required
public boolean ascending; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PATH((short)1, "path"),
DATA_TYPE_ORDINAL((short)2, "dataTypeOrdinal"),
TIME_FILTER_BYTES((short)3, "timeFilterBytes"),
QUERY_ID((short)4, "queryId"),
AGGREGATION_TYPE_ORDINALS((short)5, "aggregationTypeOrdinals"),
HEADER((short)6, "header"),
REQUESTOR((short)7, "requestor"),
DEVICE_MEASUREMENTS((short)8, "deviceMeasurements"),
ASCENDING((short)9, "ascending");
private static final java.util.Map byName = new java.util.HashMap();
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: // PATH
return PATH;
case 2: // DATA_TYPE_ORDINAL
return DATA_TYPE_ORDINAL;
case 3: // TIME_FILTER_BYTES
return TIME_FILTER_BYTES;
case 4: // QUERY_ID
return QUERY_ID;
case 5: // AGGREGATION_TYPE_ORDINALS
return AGGREGATION_TYPE_ORDINALS;
case 6: // HEADER
return HEADER;
case 7: // REQUESTOR
return REQUESTOR;
case 8: // DEVICE_MEASUREMENTS
return DEVICE_MEASUREMENTS;
case 9: // ASCENDING
return ASCENDING;
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 __DATATYPEORDINAL_ISSET_ID = 0;
private static final int __QUERYID_ISSET_ID = 1;
private static final int __ASCENDING_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TIME_FILTER_BYTES};
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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DATA_TYPE_ORDINAL, new org.apache.thrift.meta_data.FieldMetaData("dataTypeOrdinal", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "int")));
tmpMap.put(_Fields.TIME_FILTER_BYTES, new org.apache.thrift.meta_data.FieldMetaData("timeFilterBytes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "long")));
tmpMap.put(_Fields.AGGREGATION_TYPE_ORDINALS, new org.apache.thrift.meta_data.FieldMetaData("aggregationTypeOrdinals", org.apache.thrift.TFieldRequirementType.REQUIRED,
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.I32 , "int"))));
tmpMap.put(_Fields.HEADER, new org.apache.thrift.meta_data.FieldMetaData("header", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RaftNode.class)));
tmpMap.put(_Fields.REQUESTOR, new org.apache.thrift.meta_data.FieldMetaData("requestor", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Node.class)));
tmpMap.put(_Fields.DEVICE_MEASUREMENTS, new org.apache.thrift.meta_data.FieldMetaData("deviceMeasurements", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.ASCENDING, new org.apache.thrift.meta_data.FieldMetaData("ascending", org.apache.thrift.TFieldRequirementType.REQUIRED,
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(GroupByRequest.class, metaDataMap);
}
public GroupByRequest() {
}
public GroupByRequest(
java.lang.String path,
int dataTypeOrdinal,
long queryId,
java.util.List aggregationTypeOrdinals,
RaftNode header,
Node requestor,
java.util.Set deviceMeasurements,
boolean ascending)
{
this();
this.path = path;
this.dataTypeOrdinal = dataTypeOrdinal;
setDataTypeOrdinalIsSet(true);
this.queryId = queryId;
setQueryIdIsSet(true);
this.aggregationTypeOrdinals = aggregationTypeOrdinals;
this.header = header;
this.requestor = requestor;
this.deviceMeasurements = deviceMeasurements;
this.ascending = ascending;
setAscendingIsSet(true);
}
/**
* Performs a deep copy on other.
*/
public GroupByRequest(GroupByRequest other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetPath()) {
this.path = other.path;
}
this.dataTypeOrdinal = other.dataTypeOrdinal;
if (other.isSetTimeFilterBytes()) {
this.timeFilterBytes = org.apache.thrift.TBaseHelper.copyBinary(other.timeFilterBytes);
}
this.queryId = other.queryId;
if (other.isSetAggregationTypeOrdinals()) {
java.util.List __this__aggregationTypeOrdinals = new java.util.ArrayList(other.aggregationTypeOrdinals.size());
for (java.lang.Integer other_element : other.aggregationTypeOrdinals) {
__this__aggregationTypeOrdinals.add(other_element);
}
this.aggregationTypeOrdinals = __this__aggregationTypeOrdinals;
}
if (other.isSetHeader()) {
this.header = new RaftNode(other.header);
}
if (other.isSetRequestor()) {
this.requestor = new Node(other.requestor);
}
if (other.isSetDeviceMeasurements()) {
java.util.Set __this__deviceMeasurements = new java.util.HashSet(other.deviceMeasurements);
this.deviceMeasurements = __this__deviceMeasurements;
}
this.ascending = other.ascending;
}
public GroupByRequest deepCopy() {
return new GroupByRequest(this);
}
@Override
public void clear() {
this.path = null;
setDataTypeOrdinalIsSet(false);
this.dataTypeOrdinal = 0;
this.timeFilterBytes = null;
setQueryIdIsSet(false);
this.queryId = 0;
this.aggregationTypeOrdinals = null;
this.header = null;
this.requestor = null;
this.deviceMeasurements = null;
setAscendingIsSet(false);
this.ascending = false;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getPath() {
return this.path;
}
public GroupByRequest setPath(@org.apache.thrift.annotation.Nullable java.lang.String path) {
this.path = path;
return this;
}
public void unsetPath() {
this.path = null;
}
/** Returns true if field path is set (has been assigned a value) and false otherwise */
public boolean isSetPath() {
return this.path != null;
}
public void setPathIsSet(boolean value) {
if (!value) {
this.path = null;
}
}
public int getDataTypeOrdinal() {
return this.dataTypeOrdinal;
}
public GroupByRequest setDataTypeOrdinal(int dataTypeOrdinal) {
this.dataTypeOrdinal = dataTypeOrdinal;
setDataTypeOrdinalIsSet(true);
return this;
}
public void unsetDataTypeOrdinal() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATATYPEORDINAL_ISSET_ID);
}
/** Returns true if field dataTypeOrdinal is set (has been assigned a value) and false otherwise */
public boolean isSetDataTypeOrdinal() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATATYPEORDINAL_ISSET_ID);
}
public void setDataTypeOrdinalIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATATYPEORDINAL_ISSET_ID, value);
}
public byte[] getTimeFilterBytes() {
setTimeFilterBytes(org.apache.thrift.TBaseHelper.rightSize(timeFilterBytes));
return timeFilterBytes == null ? null : timeFilterBytes.array();
}
public java.nio.ByteBuffer bufferForTimeFilterBytes() {
return org.apache.thrift.TBaseHelper.copyBinary(timeFilterBytes);
}
public GroupByRequest setTimeFilterBytes(byte[] timeFilterBytes) {
this.timeFilterBytes = timeFilterBytes == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(timeFilterBytes.clone());
return this;
}
public GroupByRequest setTimeFilterBytes(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer timeFilterBytes) {
this.timeFilterBytes = org.apache.thrift.TBaseHelper.copyBinary(timeFilterBytes);
return this;
}
public void unsetTimeFilterBytes() {
this.timeFilterBytes = null;
}
/** Returns true if field timeFilterBytes is set (has been assigned a value) and false otherwise */
public boolean isSetTimeFilterBytes() {
return this.timeFilterBytes != null;
}
public void setTimeFilterBytesIsSet(boolean value) {
if (!value) {
this.timeFilterBytes = null;
}
}
public long getQueryId() {
return this.queryId;
}
public GroupByRequest setQueryId(long queryId) {
this.queryId = queryId;
setQueryIdIsSet(true);
return this;
}
public void unsetQueryId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYID_ISSET_ID);
}
/** Returns true if field queryId is set (has been assigned a value) and false otherwise */
public boolean isSetQueryId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYID_ISSET_ID);
}
public void setQueryIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYID_ISSET_ID, value);
}
public int getAggregationTypeOrdinalsSize() {
return (this.aggregationTypeOrdinals == null) ? 0 : this.aggregationTypeOrdinals.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getAggregationTypeOrdinalsIterator() {
return (this.aggregationTypeOrdinals == null) ? null : this.aggregationTypeOrdinals.iterator();
}
public void addToAggregationTypeOrdinals(int elem) {
if (this.aggregationTypeOrdinals == null) {
this.aggregationTypeOrdinals = new java.util.ArrayList();
}
this.aggregationTypeOrdinals.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getAggregationTypeOrdinals() {
return this.aggregationTypeOrdinals;
}
public GroupByRequest setAggregationTypeOrdinals(@org.apache.thrift.annotation.Nullable java.util.List aggregationTypeOrdinals) {
this.aggregationTypeOrdinals = aggregationTypeOrdinals;
return this;
}
public void unsetAggregationTypeOrdinals() {
this.aggregationTypeOrdinals = null;
}
/** Returns true if field aggregationTypeOrdinals is set (has been assigned a value) and false otherwise */
public boolean isSetAggregationTypeOrdinals() {
return this.aggregationTypeOrdinals != null;
}
public void setAggregationTypeOrdinalsIsSet(boolean value) {
if (!value) {
this.aggregationTypeOrdinals = null;
}
}
@org.apache.thrift.annotation.Nullable
public RaftNode getHeader() {
return this.header;
}
public GroupByRequest setHeader(@org.apache.thrift.annotation.Nullable RaftNode header) {
this.header = header;
return this;
}
public void unsetHeader() {
this.header = null;
}
/** Returns true if field header is set (has been assigned a value) and false otherwise */
public boolean isSetHeader() {
return this.header != null;
}
public void setHeaderIsSet(boolean value) {
if (!value) {
this.header = null;
}
}
@org.apache.thrift.annotation.Nullable
public Node getRequestor() {
return this.requestor;
}
public GroupByRequest setRequestor(@org.apache.thrift.annotation.Nullable Node requestor) {
this.requestor = requestor;
return this;
}
public void unsetRequestor() {
this.requestor = null;
}
/** Returns true if field requestor is set (has been assigned a value) and false otherwise */
public boolean isSetRequestor() {
return this.requestor != null;
}
public void setRequestorIsSet(boolean value) {
if (!value) {
this.requestor = null;
}
}
public int getDeviceMeasurementsSize() {
return (this.deviceMeasurements == null) ? 0 : this.deviceMeasurements.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getDeviceMeasurementsIterator() {
return (this.deviceMeasurements == null) ? null : this.deviceMeasurements.iterator();
}
public void addToDeviceMeasurements(java.lang.String elem) {
if (this.deviceMeasurements == null) {
this.deviceMeasurements = new java.util.HashSet();
}
this.deviceMeasurements.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.Set getDeviceMeasurements() {
return this.deviceMeasurements;
}
public GroupByRequest setDeviceMeasurements(@org.apache.thrift.annotation.Nullable java.util.Set deviceMeasurements) {
this.deviceMeasurements = deviceMeasurements;
return this;
}
public void unsetDeviceMeasurements() {
this.deviceMeasurements = null;
}
/** Returns true if field deviceMeasurements is set (has been assigned a value) and false otherwise */
public boolean isSetDeviceMeasurements() {
return this.deviceMeasurements != null;
}
public void setDeviceMeasurementsIsSet(boolean value) {
if (!value) {
this.deviceMeasurements = null;
}
}
public boolean isAscending() {
return this.ascending;
}
public GroupByRequest setAscending(boolean ascending) {
this.ascending = ascending;
setAscendingIsSet(true);
return this;
}
public void unsetAscending() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ASCENDING_ISSET_ID);
}
/** Returns true if field ascending is set (has been assigned a value) and false otherwise */
public boolean isSetAscending() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ASCENDING_ISSET_ID);
}
public void setAscendingIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ASCENDING_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case PATH:
if (value == null) {
unsetPath();
} else {
setPath((java.lang.String)value);
}
break;
case DATA_TYPE_ORDINAL:
if (value == null) {
unsetDataTypeOrdinal();
} else {
setDataTypeOrdinal((java.lang.Integer)value);
}
break;
case TIME_FILTER_BYTES:
if (value == null) {
unsetTimeFilterBytes();
} else {
if (value instanceof byte[]) {
setTimeFilterBytes((byte[])value);
} else {
setTimeFilterBytes((java.nio.ByteBuffer)value);
}
}
break;
case QUERY_ID:
if (value == null) {
unsetQueryId();
} else {
setQueryId((java.lang.Long)value);
}
break;
case AGGREGATION_TYPE_ORDINALS:
if (value == null) {
unsetAggregationTypeOrdinals();
} else {
setAggregationTypeOrdinals((java.util.List)value);
}
break;
case HEADER:
if (value == null) {
unsetHeader();
} else {
setHeader((RaftNode)value);
}
break;
case REQUESTOR:
if (value == null) {
unsetRequestor();
} else {
setRequestor((Node)value);
}
break;
case DEVICE_MEASUREMENTS:
if (value == null) {
unsetDeviceMeasurements();
} else {
setDeviceMeasurements((java.util.Set)value);
}
break;
case ASCENDING:
if (value == null) {
unsetAscending();
} else {
setAscending((java.lang.Boolean)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PATH:
return getPath();
case DATA_TYPE_ORDINAL:
return getDataTypeOrdinal();
case TIME_FILTER_BYTES:
return getTimeFilterBytes();
case QUERY_ID:
return getQueryId();
case AGGREGATION_TYPE_ORDINALS:
return getAggregationTypeOrdinals();
case HEADER:
return getHeader();
case REQUESTOR:
return getRequestor();
case DEVICE_MEASUREMENTS:
return getDeviceMeasurements();
case ASCENDING:
return isAscending();
}
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 PATH:
return isSetPath();
case DATA_TYPE_ORDINAL:
return isSetDataTypeOrdinal();
case TIME_FILTER_BYTES:
return isSetTimeFilterBytes();
case QUERY_ID:
return isSetQueryId();
case AGGREGATION_TYPE_ORDINALS:
return isSetAggregationTypeOrdinals();
case HEADER:
return isSetHeader();
case REQUESTOR:
return isSetRequestor();
case DEVICE_MEASUREMENTS:
return isSetDeviceMeasurements();
case ASCENDING:
return isSetAscending();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof GroupByRequest)
return this.equals((GroupByRequest)that);
return false;
}
public boolean equals(GroupByRequest that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_path = true && this.isSetPath();
boolean that_present_path = true && that.isSetPath();
if (this_present_path || that_present_path) {
if (!(this_present_path && that_present_path))
return false;
if (!this.path.equals(that.path))
return false;
}
boolean this_present_dataTypeOrdinal = true;
boolean that_present_dataTypeOrdinal = true;
if (this_present_dataTypeOrdinal || that_present_dataTypeOrdinal) {
if (!(this_present_dataTypeOrdinal && that_present_dataTypeOrdinal))
return false;
if (this.dataTypeOrdinal != that.dataTypeOrdinal)
return false;
}
boolean this_present_timeFilterBytes = true && this.isSetTimeFilterBytes();
boolean that_present_timeFilterBytes = true && that.isSetTimeFilterBytes();
if (this_present_timeFilterBytes || that_present_timeFilterBytes) {
if (!(this_present_timeFilterBytes && that_present_timeFilterBytes))
return false;
if (!this.timeFilterBytes.equals(that.timeFilterBytes))
return false;
}
boolean this_present_queryId = true;
boolean that_present_queryId = true;
if (this_present_queryId || that_present_queryId) {
if (!(this_present_queryId && that_present_queryId))
return false;
if (this.queryId != that.queryId)
return false;
}
boolean this_present_aggregationTypeOrdinals = true && this.isSetAggregationTypeOrdinals();
boolean that_present_aggregationTypeOrdinals = true && that.isSetAggregationTypeOrdinals();
if (this_present_aggregationTypeOrdinals || that_present_aggregationTypeOrdinals) {
if (!(this_present_aggregationTypeOrdinals && that_present_aggregationTypeOrdinals))
return false;
if (!this.aggregationTypeOrdinals.equals(that.aggregationTypeOrdinals))
return false;
}
boolean this_present_header = true && this.isSetHeader();
boolean that_present_header = true && that.isSetHeader();
if (this_present_header || that_present_header) {
if (!(this_present_header && that_present_header))
return false;
if (!this.header.equals(that.header))
return false;
}
boolean this_present_requestor = true && this.isSetRequestor();
boolean that_present_requestor = true && that.isSetRequestor();
if (this_present_requestor || that_present_requestor) {
if (!(this_present_requestor && that_present_requestor))
return false;
if (!this.requestor.equals(that.requestor))
return false;
}
boolean this_present_deviceMeasurements = true && this.isSetDeviceMeasurements();
boolean that_present_deviceMeasurements = true && that.isSetDeviceMeasurements();
if (this_present_deviceMeasurements || that_present_deviceMeasurements) {
if (!(this_present_deviceMeasurements && that_present_deviceMeasurements))
return false;
if (!this.deviceMeasurements.equals(that.deviceMeasurements))
return false;
}
boolean this_present_ascending = true;
boolean that_present_ascending = true;
if (this_present_ascending || that_present_ascending) {
if (!(this_present_ascending && that_present_ascending))
return false;
if (this.ascending != that.ascending)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287);
if (isSetPath())
hashCode = hashCode * 8191 + path.hashCode();
hashCode = hashCode * 8191 + dataTypeOrdinal;
hashCode = hashCode * 8191 + ((isSetTimeFilterBytes()) ? 131071 : 524287);
if (isSetTimeFilterBytes())
hashCode = hashCode * 8191 + timeFilterBytes.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryId);
hashCode = hashCode * 8191 + ((isSetAggregationTypeOrdinals()) ? 131071 : 524287);
if (isSetAggregationTypeOrdinals())
hashCode = hashCode * 8191 + aggregationTypeOrdinals.hashCode();
hashCode = hashCode * 8191 + ((isSetHeader()) ? 131071 : 524287);
if (isSetHeader())
hashCode = hashCode * 8191 + header.hashCode();
hashCode = hashCode * 8191 + ((isSetRequestor()) ? 131071 : 524287);
if (isSetRequestor())
hashCode = hashCode * 8191 + requestor.hashCode();
hashCode = hashCode * 8191 + ((isSetDeviceMeasurements()) ? 131071 : 524287);
if (isSetDeviceMeasurements())
hashCode = hashCode * 8191 + deviceMeasurements.hashCode();
hashCode = hashCode * 8191 + ((ascending) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(GroupByRequest other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetPath(), other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDataTypeOrdinal(), other.isSetDataTypeOrdinal());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDataTypeOrdinal()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataTypeOrdinal, other.dataTypeOrdinal);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTimeFilterBytes(), other.isSetTimeFilterBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimeFilterBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeFilterBytes, other.timeFilterBytes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueryId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAggregationTypeOrdinals(), other.isSetAggregationTypeOrdinals());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAggregationTypeOrdinals()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregationTypeOrdinals, other.aggregationTypeOrdinals);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetHeader(), other.isSetHeader());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHeader()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.header, other.header);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRequestor(), other.isSetRequestor());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRequestor()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestor, other.requestor);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDeviceMeasurements(), other.isSetDeviceMeasurements());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDeviceMeasurements()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deviceMeasurements, other.deviceMeasurements);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAscending(), other.isSetAscending());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAscending()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ascending, other.ascending);
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("GroupByRequest(");
boolean first = true;
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("dataTypeOrdinal:");
sb.append(this.dataTypeOrdinal);
first = false;
if (isSetTimeFilterBytes()) {
if (!first) sb.append(", ");
sb.append("timeFilterBytes:");
if (this.timeFilterBytes == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.timeFilterBytes, sb);
}
first = false;
}
if (!first) sb.append(", ");
sb.append("queryId:");
sb.append(this.queryId);
first = false;
if (!first) sb.append(", ");
sb.append("aggregationTypeOrdinals:");
if (this.aggregationTypeOrdinals == null) {
sb.append("null");
} else {
sb.append(this.aggregationTypeOrdinals);
}
first = false;
if (!first) sb.append(", ");
sb.append("header:");
if (this.header == null) {
sb.append("null");
} else {
sb.append(this.header);
}
first = false;
if (!first) sb.append(", ");
sb.append("requestor:");
if (this.requestor == null) {
sb.append("null");
} else {
sb.append(this.requestor);
}
first = false;
if (!first) sb.append(", ");
sb.append("deviceMeasurements:");
if (this.deviceMeasurements == null) {
sb.append("null");
} else {
sb.append(this.deviceMeasurements);
}
first = false;
if (!first) sb.append(", ");
sb.append("ascending:");
sb.append(this.ascending);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (path == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'path' was not present! Struct: " + toString());
}
// alas, we cannot check 'dataTypeOrdinal' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'queryId' because it's a primitive and you chose the non-beans generator.
if (aggregationTypeOrdinals == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'aggregationTypeOrdinals' was not present! Struct: " + toString());
}
if (header == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'header' was not present! Struct: " + toString());
}
if (requestor == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestor' was not present! Struct: " + toString());
}
if (deviceMeasurements == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'deviceMeasurements' was not present! Struct: " + toString());
}
// alas, we cannot check 'ascending' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
if (header != null) {
header.validate();
}
if (requestor != null) {
requestor.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 GroupByRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GroupByRequestStandardScheme getScheme() {
return new GroupByRequestStandardScheme();
}
}
private static class GroupByRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, GroupByRequest 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: // PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.path = iprot.readString();
struct.setPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DATA_TYPE_ORDINAL
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.dataTypeOrdinal = iprot.readI32();
struct.setDataTypeOrdinalIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TIME_FILTER_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.timeFilterBytes = iprot.readBinary();
struct.setTimeFilterBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // QUERY_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.queryId = iprot.readI64();
struct.setQueryIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // AGGREGATION_TYPE_ORDINALS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list116 = iprot.readListBegin();
struct.aggregationTypeOrdinals = new java.util.ArrayList(_list116.size);
int _elem117;
for (int _i118 = 0; _i118 < _list116.size; ++_i118)
{
_elem117 = iprot.readI32();
struct.aggregationTypeOrdinals.add(_elem117);
}
iprot.readListEnd();
}
struct.setAggregationTypeOrdinalsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // HEADER
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.header = new RaftNode();
struct.header.read(iprot);
struct.setHeaderIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // REQUESTOR
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.requestor = new Node();
struct.requestor.read(iprot);
struct.setRequestorIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // DEVICE_MEASUREMENTS
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set119 = iprot.readSetBegin();
struct.deviceMeasurements = new java.util.HashSet(2*_set119.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem120;
for (int _i121 = 0; _i121 < _set119.size; ++_i121)
{
_elem120 = iprot.readString();
struct.deviceMeasurements.add(_elem120);
}
iprot.readSetEnd();
}
struct.setDeviceMeasurementsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // ASCENDING
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.ascending = iprot.readBool();
struct.setAscendingIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
if (!struct.isSetDataTypeOrdinal()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataTypeOrdinal' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetQueryId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetAscending()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'ascending' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, GroupByRequest struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(DATA_TYPE_ORDINAL_FIELD_DESC);
oprot.writeI32(struct.dataTypeOrdinal);
oprot.writeFieldEnd();
if (struct.timeFilterBytes != null) {
if (struct.isSetTimeFilterBytes()) {
oprot.writeFieldBegin(TIME_FILTER_BYTES_FIELD_DESC);
oprot.writeBinary(struct.timeFilterBytes);
oprot.writeFieldEnd();
}
}
oprot.writeFieldBegin(QUERY_ID_FIELD_DESC);
oprot.writeI64(struct.queryId);
oprot.writeFieldEnd();
if (struct.aggregationTypeOrdinals != null) {
oprot.writeFieldBegin(AGGREGATION_TYPE_ORDINALS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.aggregationTypeOrdinals.size()));
for (int _iter122 : struct.aggregationTypeOrdinals)
{
oprot.writeI32(_iter122);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.header != null) {
oprot.writeFieldBegin(HEADER_FIELD_DESC);
struct.header.write(oprot);
oprot.writeFieldEnd();
}
if (struct.requestor != null) {
oprot.writeFieldBegin(REQUESTOR_FIELD_DESC);
struct.requestor.write(oprot);
oprot.writeFieldEnd();
}
if (struct.deviceMeasurements != null) {
oprot.writeFieldBegin(DEVICE_MEASUREMENTS_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.deviceMeasurements.size()));
for (java.lang.String _iter123 : struct.deviceMeasurements)
{
oprot.writeString(_iter123);
}
oprot.writeSetEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(ASCENDING_FIELD_DESC);
oprot.writeBool(struct.ascending);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class GroupByRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GroupByRequestTupleScheme getScheme() {
return new GroupByRequestTupleScheme();
}
}
private static class GroupByRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GroupByRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.path);
oprot.writeI32(struct.dataTypeOrdinal);
oprot.writeI64(struct.queryId);
{
oprot.writeI32(struct.aggregationTypeOrdinals.size());
for (int _iter124 : struct.aggregationTypeOrdinals)
{
oprot.writeI32(_iter124);
}
}
struct.header.write(oprot);
struct.requestor.write(oprot);
{
oprot.writeI32(struct.deviceMeasurements.size());
for (java.lang.String _iter125 : struct.deviceMeasurements)
{
oprot.writeString(_iter125);
}
}
oprot.writeBool(struct.ascending);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTimeFilterBytes()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetTimeFilterBytes()) {
oprot.writeBinary(struct.timeFilterBytes);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GroupByRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.path = iprot.readString();
struct.setPathIsSet(true);
struct.dataTypeOrdinal = iprot.readI32();
struct.setDataTypeOrdinalIsSet(true);
struct.queryId = iprot.readI64();
struct.setQueryIdIsSet(true);
{
org.apache.thrift.protocol.TList _list126 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
struct.aggregationTypeOrdinals = new java.util.ArrayList(_list126.size);
int _elem127;
for (int _i128 = 0; _i128 < _list126.size; ++_i128)
{
_elem127 = iprot.readI32();
struct.aggregationTypeOrdinals.add(_elem127);
}
}
struct.setAggregationTypeOrdinalsIsSet(true);
struct.header = new RaftNode();
struct.header.read(iprot);
struct.setHeaderIsSet(true);
struct.requestor = new Node();
struct.requestor.read(iprot);
struct.setRequestorIsSet(true);
{
org.apache.thrift.protocol.TSet _set129 = iprot.readSetBegin(org.apache.thrift.protocol.TType.STRING);
struct.deviceMeasurements = new java.util.HashSet(2*_set129.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem130;
for (int _i131 = 0; _i131 < _set129.size; ++_i131)
{
_elem130 = iprot.readString();
struct.deviceMeasurements.add(_elem130);
}
}
struct.setDeviceMeasurementsIsSet(true);
struct.ascending = iprot.readBool();
struct.setAscendingIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.timeFilterBytes = iprot.readBinary();
struct.setTimeFilterBytesIsSet(true);
}
}
}
private static 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();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy