org.apache.iotdb.service.rpc.thrift.TSGroupByQueryIntervalReq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timechodb-thrift Show documentation
Show all versions of timechodb-thrift Show documentation
RPC (Thrift) framework for client and DataNodes.
The newest version!
/**
* 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.service.rpc.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.14.1)", date = "2024-09-12")
public class TSGroupByQueryIntervalReq 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("TSGroupByQueryIntervalReq");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField STATEMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("statementId", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField DEVICE_FIELD_DESC = new org.apache.thrift.protocol.TField("device", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField MEASUREMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("measurement", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField DATA_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("dataType", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField AGGREGATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregationType", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)8);
private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)9);
private static final org.apache.thrift.protocol.TField INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("interval", org.apache.thrift.protocol.TType.I64, (short)10);
private static final org.apache.thrift.protocol.TField FETCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchSize", org.apache.thrift.protocol.TType.I32, (short)11);
private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)12);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSGroupByQueryIntervalReqStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSGroupByQueryIntervalReqTupleSchemeFactory();
public long sessionId; // required
public long statementId; // required
public @org.apache.thrift.annotation.Nullable java.lang.String device; // required
public @org.apache.thrift.annotation.Nullable java.lang.String measurement; // required
public int dataType; // required
/**
*
* @see org.apache.iotdb.common.rpc.thrift.TAggregationType
*/
public @org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TAggregationType aggregationType; // required
public @org.apache.thrift.annotation.Nullable java.lang.String database; // optional
public long startTime; // optional
public long endTime; // optional
public long interval; // optional
public int fetchSize; // optional
public long timeout; // 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 {
SESSION_ID((short)1, "sessionId"),
STATEMENT_ID((short)2, "statementId"),
DEVICE((short)3, "device"),
MEASUREMENT((short)4, "measurement"),
DATA_TYPE((short)5, "dataType"),
/**
*
* @see org.apache.iotdb.common.rpc.thrift.TAggregationType
*/
AGGREGATION_TYPE((short)6, "aggregationType"),
DATABASE((short)7, "database"),
START_TIME((short)8, "startTime"),
END_TIME((short)9, "endTime"),
INTERVAL((short)10, "interval"),
FETCH_SIZE((short)11, "fetchSize"),
TIMEOUT((short)12, "timeout");
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: // SESSION_ID
return SESSION_ID;
case 2: // STATEMENT_ID
return STATEMENT_ID;
case 3: // DEVICE
return DEVICE;
case 4: // MEASUREMENT
return MEASUREMENT;
case 5: // DATA_TYPE
return DATA_TYPE;
case 6: // AGGREGATION_TYPE
return AGGREGATION_TYPE;
case 7: // DATABASE
return DATABASE;
case 8: // START_TIME
return START_TIME;
case 9: // END_TIME
return END_TIME;
case 10: // INTERVAL
return INTERVAL;
case 11: // FETCH_SIZE
return FETCH_SIZE;
case 12: // TIMEOUT
return TIMEOUT;
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 __SESSIONID_ISSET_ID = 0;
private static final int __STATEMENTID_ISSET_ID = 1;
private static final int __DATATYPE_ISSET_ID = 2;
private static final int __STARTTIME_ISSET_ID = 3;
private static final int __ENDTIME_ISSET_ID = 4;
private static final int __INTERVAL_ISSET_ID = 5;
private static final int __FETCHSIZE_ISSET_ID = 6;
private static final int __TIMEOUT_ISSET_ID = 7;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.DATABASE,_Fields.START_TIME,_Fields.END_TIME,_Fields.INTERVAL,_Fields.FETCH_SIZE,_Fields.TIMEOUT};
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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.STATEMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("statementId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.DEVICE, new org.apache.thrift.meta_data.FieldMetaData("device", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.MEASUREMENT, new org.apache.thrift.meta_data.FieldMetaData("measurement", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DATA_TYPE, new org.apache.thrift.meta_data.FieldMetaData("dataType", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.AGGREGATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("aggregationType", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.iotdb.common.rpc.thrift.TAggregationType.class)));
tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.INTERVAL, new org.apache.thrift.meta_data.FieldMetaData("interval", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.FETCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fetchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TSGroupByQueryIntervalReq.class, metaDataMap);
}
public TSGroupByQueryIntervalReq() {
}
public TSGroupByQueryIntervalReq(
long sessionId,
long statementId,
java.lang.String device,
java.lang.String measurement,
int dataType,
org.apache.iotdb.common.rpc.thrift.TAggregationType aggregationType)
{
this();
this.sessionId = sessionId;
setSessionIdIsSet(true);
this.statementId = statementId;
setStatementIdIsSet(true);
this.device = device;
this.measurement = measurement;
this.dataType = dataType;
setDataTypeIsSet(true);
this.aggregationType = aggregationType;
}
/**
* Performs a deep copy on other.
*/
public TSGroupByQueryIntervalReq(TSGroupByQueryIntervalReq other) {
__isset_bitfield = other.__isset_bitfield;
this.sessionId = other.sessionId;
this.statementId = other.statementId;
if (other.isSetDevice()) {
this.device = other.device;
}
if (other.isSetMeasurement()) {
this.measurement = other.measurement;
}
this.dataType = other.dataType;
if (other.isSetAggregationType()) {
this.aggregationType = other.aggregationType;
}
if (other.isSetDatabase()) {
this.database = other.database;
}
this.startTime = other.startTime;
this.endTime = other.endTime;
this.interval = other.interval;
this.fetchSize = other.fetchSize;
this.timeout = other.timeout;
}
public TSGroupByQueryIntervalReq deepCopy() {
return new TSGroupByQueryIntervalReq(this);
}
@Override
public void clear() {
setSessionIdIsSet(false);
this.sessionId = 0;
setStatementIdIsSet(false);
this.statementId = 0;
this.device = null;
this.measurement = null;
setDataTypeIsSet(false);
this.dataType = 0;
this.aggregationType = null;
this.database = null;
setStartTimeIsSet(false);
this.startTime = 0;
setEndTimeIsSet(false);
this.endTime = 0;
setIntervalIsSet(false);
this.interval = 0;
setFetchSizeIsSet(false);
this.fetchSize = 0;
setTimeoutIsSet(false);
this.timeout = 0;
}
public long getSessionId() {
return this.sessionId;
}
public TSGroupByQueryIntervalReq setSessionId(long sessionId) {
this.sessionId = sessionId;
setSessionIdIsSet(true);
return this;
}
public void unsetSessionId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SESSIONID_ISSET_ID);
}
/** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
public boolean isSetSessionId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SESSIONID_ISSET_ID);
}
public void setSessionIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SESSIONID_ISSET_ID, value);
}
public long getStatementId() {
return this.statementId;
}
public TSGroupByQueryIntervalReq setStatementId(long statementId) {
this.statementId = statementId;
setStatementIdIsSet(true);
return this;
}
public void unsetStatementId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATEMENTID_ISSET_ID);
}
/** Returns true if field statementId is set (has been assigned a value) and false otherwise */
public boolean isSetStatementId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATEMENTID_ISSET_ID);
}
public void setStatementIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATEMENTID_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDevice() {
return this.device;
}
public TSGroupByQueryIntervalReq setDevice(@org.apache.thrift.annotation.Nullable java.lang.String device) {
this.device = device;
return this;
}
public void unsetDevice() {
this.device = null;
}
/** Returns true if field device is set (has been assigned a value) and false otherwise */
public boolean isSetDevice() {
return this.device != null;
}
public void setDeviceIsSet(boolean value) {
if (!value) {
this.device = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getMeasurement() {
return this.measurement;
}
public TSGroupByQueryIntervalReq setMeasurement(@org.apache.thrift.annotation.Nullable java.lang.String measurement) {
this.measurement = measurement;
return this;
}
public void unsetMeasurement() {
this.measurement = null;
}
/** Returns true if field measurement is set (has been assigned a value) and false otherwise */
public boolean isSetMeasurement() {
return this.measurement != null;
}
public void setMeasurementIsSet(boolean value) {
if (!value) {
this.measurement = null;
}
}
public int getDataType() {
return this.dataType;
}
public TSGroupByQueryIntervalReq setDataType(int dataType) {
this.dataType = dataType;
setDataTypeIsSet(true);
return this;
}
public void unsetDataType() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATATYPE_ISSET_ID);
}
/** Returns true if field dataType is set (has been assigned a value) and false otherwise */
public boolean isSetDataType() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATATYPE_ISSET_ID);
}
public void setDataTypeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATATYPE_ISSET_ID, value);
}
/**
*
* @see org.apache.iotdb.common.rpc.thrift.TAggregationType
*/
@org.apache.thrift.annotation.Nullable
public org.apache.iotdb.common.rpc.thrift.TAggregationType getAggregationType() {
return this.aggregationType;
}
/**
*
* @see org.apache.iotdb.common.rpc.thrift.TAggregationType
*/
public TSGroupByQueryIntervalReq setAggregationType(@org.apache.thrift.annotation.Nullable org.apache.iotdb.common.rpc.thrift.TAggregationType aggregationType) {
this.aggregationType = aggregationType;
return this;
}
public void unsetAggregationType() {
this.aggregationType = null;
}
/** Returns true if field aggregationType is set (has been assigned a value) and false otherwise */
public boolean isSetAggregationType() {
return this.aggregationType != null;
}
public void setAggregationTypeIsSet(boolean value) {
if (!value) {
this.aggregationType = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDatabase() {
return this.database;
}
public TSGroupByQueryIntervalReq setDatabase(@org.apache.thrift.annotation.Nullable java.lang.String database) {
this.database = database;
return this;
}
public void unsetDatabase() {
this.database = null;
}
/** Returns true if field database is set (has been assigned a value) and false otherwise */
public boolean isSetDatabase() {
return this.database != null;
}
public void setDatabaseIsSet(boolean value) {
if (!value) {
this.database = null;
}
}
public long getStartTime() {
return this.startTime;
}
public TSGroupByQueryIntervalReq setStartTime(long startTime) {
this.startTime = startTime;
setStartTimeIsSet(true);
return this;
}
public void unsetStartTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
/** Returns true if field startTime is set (has been assigned a value) and false otherwise */
public boolean isSetStartTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
public void setStartTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
}
public long getEndTime() {
return this.endTime;
}
public TSGroupByQueryIntervalReq setEndTime(long endTime) {
this.endTime = endTime;
setEndTimeIsSet(true);
return this;
}
public void unsetEndTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
/** Returns true if field endTime is set (has been assigned a value) and false otherwise */
public boolean isSetEndTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
public void setEndTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
}
public long getInterval() {
return this.interval;
}
public TSGroupByQueryIntervalReq setInterval(long interval) {
this.interval = interval;
setIntervalIsSet(true);
return this;
}
public void unsetInterval() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INTERVAL_ISSET_ID);
}
/** Returns true if field interval is set (has been assigned a value) and false otherwise */
public boolean isSetInterval() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INTERVAL_ISSET_ID);
}
public void setIntervalIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INTERVAL_ISSET_ID, value);
}
public int getFetchSize() {
return this.fetchSize;
}
public TSGroupByQueryIntervalReq setFetchSize(int fetchSize) {
this.fetchSize = fetchSize;
setFetchSizeIsSet(true);
return this;
}
public void unsetFetchSize() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FETCHSIZE_ISSET_ID);
}
/** Returns true if field fetchSize is set (has been assigned a value) and false otherwise */
public boolean isSetFetchSize() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FETCHSIZE_ISSET_ID);
}
public void setFetchSizeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FETCHSIZE_ISSET_ID, value);
}
public long getTimeout() {
return this.timeout;
}
public TSGroupByQueryIntervalReq setTimeout(long timeout) {
this.timeout = timeout;
setTimeoutIsSet(true);
return this;
}
public void unsetTimeout() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMEOUT_ISSET_ID);
}
/** Returns true if field timeout is set (has been assigned a value) and false otherwise */
public boolean isSetTimeout() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEOUT_ISSET_ID);
}
public void setTimeoutIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMEOUT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
setSessionId((java.lang.Long)value);
}
break;
case STATEMENT_ID:
if (value == null) {
unsetStatementId();
} else {
setStatementId((java.lang.Long)value);
}
break;
case DEVICE:
if (value == null) {
unsetDevice();
} else {
setDevice((java.lang.String)value);
}
break;
case MEASUREMENT:
if (value == null) {
unsetMeasurement();
} else {
setMeasurement((java.lang.String)value);
}
break;
case DATA_TYPE:
if (value == null) {
unsetDataType();
} else {
setDataType((java.lang.Integer)value);
}
break;
case AGGREGATION_TYPE:
if (value == null) {
unsetAggregationType();
} else {
setAggregationType((org.apache.iotdb.common.rpc.thrift.TAggregationType)value);
}
break;
case DATABASE:
if (value == null) {
unsetDatabase();
} else {
setDatabase((java.lang.String)value);
}
break;
case START_TIME:
if (value == null) {
unsetStartTime();
} else {
setStartTime((java.lang.Long)value);
}
break;
case END_TIME:
if (value == null) {
unsetEndTime();
} else {
setEndTime((java.lang.Long)value);
}
break;
case INTERVAL:
if (value == null) {
unsetInterval();
} else {
setInterval((java.lang.Long)value);
}
break;
case FETCH_SIZE:
if (value == null) {
unsetFetchSize();
} else {
setFetchSize((java.lang.Integer)value);
}
break;
case TIMEOUT:
if (value == null) {
unsetTimeout();
} else {
setTimeout((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
case STATEMENT_ID:
return getStatementId();
case DEVICE:
return getDevice();
case MEASUREMENT:
return getMeasurement();
case DATA_TYPE:
return getDataType();
case AGGREGATION_TYPE:
return getAggregationType();
case DATABASE:
return getDatabase();
case START_TIME:
return getStartTime();
case END_TIME:
return getEndTime();
case INTERVAL:
return getInterval();
case FETCH_SIZE:
return getFetchSize();
case TIMEOUT:
return getTimeout();
}
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 SESSION_ID:
return isSetSessionId();
case STATEMENT_ID:
return isSetStatementId();
case DEVICE:
return isSetDevice();
case MEASUREMENT:
return isSetMeasurement();
case DATA_TYPE:
return isSetDataType();
case AGGREGATION_TYPE:
return isSetAggregationType();
case DATABASE:
return isSetDatabase();
case START_TIME:
return isSetStartTime();
case END_TIME:
return isSetEndTime();
case INTERVAL:
return isSetInterval();
case FETCH_SIZE:
return isSetFetchSize();
case TIMEOUT:
return isSetTimeout();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TSGroupByQueryIntervalReq)
return this.equals((TSGroupByQueryIntervalReq)that);
return false;
}
public boolean equals(TSGroupByQueryIntervalReq that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_sessionId = true;
boolean that_present_sessionId = true;
if (this_present_sessionId || that_present_sessionId) {
if (!(this_present_sessionId && that_present_sessionId))
return false;
if (this.sessionId != that.sessionId)
return false;
}
boolean this_present_statementId = true;
boolean that_present_statementId = true;
if (this_present_statementId || that_present_statementId) {
if (!(this_present_statementId && that_present_statementId))
return false;
if (this.statementId != that.statementId)
return false;
}
boolean this_present_device = true && this.isSetDevice();
boolean that_present_device = true && that.isSetDevice();
if (this_present_device || that_present_device) {
if (!(this_present_device && that_present_device))
return false;
if (!this.device.equals(that.device))
return false;
}
boolean this_present_measurement = true && this.isSetMeasurement();
boolean that_present_measurement = true && that.isSetMeasurement();
if (this_present_measurement || that_present_measurement) {
if (!(this_present_measurement && that_present_measurement))
return false;
if (!this.measurement.equals(that.measurement))
return false;
}
boolean this_present_dataType = true;
boolean that_present_dataType = true;
if (this_present_dataType || that_present_dataType) {
if (!(this_present_dataType && that_present_dataType))
return false;
if (this.dataType != that.dataType)
return false;
}
boolean this_present_aggregationType = true && this.isSetAggregationType();
boolean that_present_aggregationType = true && that.isSetAggregationType();
if (this_present_aggregationType || that_present_aggregationType) {
if (!(this_present_aggregationType && that_present_aggregationType))
return false;
if (!this.aggregationType.equals(that.aggregationType))
return false;
}
boolean this_present_database = true && this.isSetDatabase();
boolean that_present_database = true && that.isSetDatabase();
if (this_present_database || that_present_database) {
if (!(this_present_database && that_present_database))
return false;
if (!this.database.equals(that.database))
return false;
}
boolean this_present_startTime = true && this.isSetStartTime();
boolean that_present_startTime = true && that.isSetStartTime();
if (this_present_startTime || that_present_startTime) {
if (!(this_present_startTime && that_present_startTime))
return false;
if (this.startTime != that.startTime)
return false;
}
boolean this_present_endTime = true && this.isSetEndTime();
boolean that_present_endTime = true && that.isSetEndTime();
if (this_present_endTime || that_present_endTime) {
if (!(this_present_endTime && that_present_endTime))
return false;
if (this.endTime != that.endTime)
return false;
}
boolean this_present_interval = true && this.isSetInterval();
boolean that_present_interval = true && that.isSetInterval();
if (this_present_interval || that_present_interval) {
if (!(this_present_interval && that_present_interval))
return false;
if (this.interval != that.interval)
return false;
}
boolean this_present_fetchSize = true && this.isSetFetchSize();
boolean that_present_fetchSize = true && that.isSetFetchSize();
if (this_present_fetchSize || that_present_fetchSize) {
if (!(this_present_fetchSize && that_present_fetchSize))
return false;
if (this.fetchSize != that.fetchSize)
return false;
}
boolean this_present_timeout = true && this.isSetTimeout();
boolean that_present_timeout = true && that.isSetTimeout();
if (this_present_timeout || that_present_timeout) {
if (!(this_present_timeout && that_present_timeout))
return false;
if (this.timeout != that.timeout)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(statementId);
hashCode = hashCode * 8191 + ((isSetDevice()) ? 131071 : 524287);
if (isSetDevice())
hashCode = hashCode * 8191 + device.hashCode();
hashCode = hashCode * 8191 + ((isSetMeasurement()) ? 131071 : 524287);
if (isSetMeasurement())
hashCode = hashCode * 8191 + measurement.hashCode();
hashCode = hashCode * 8191 + dataType;
hashCode = hashCode * 8191 + ((isSetAggregationType()) ? 131071 : 524287);
if (isSetAggregationType())
hashCode = hashCode * 8191 + aggregationType.getValue();
hashCode = hashCode * 8191 + ((isSetDatabase()) ? 131071 : 524287);
if (isSetDatabase())
hashCode = hashCode * 8191 + database.hashCode();
hashCode = hashCode * 8191 + ((isSetStartTime()) ? 131071 : 524287);
if (isSetStartTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime);
hashCode = hashCode * 8191 + ((isSetEndTime()) ? 131071 : 524287);
if (isSetEndTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime);
hashCode = hashCode * 8191 + ((isSetInterval()) ? 131071 : 524287);
if (isSetInterval())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(interval);
hashCode = hashCode * 8191 + ((isSetFetchSize()) ? 131071 : 524287);
if (isSetFetchSize())
hashCode = hashCode * 8191 + fetchSize;
hashCode = hashCode * 8191 + ((isSetTimeout()) ? 131071 : 524287);
if (isSetTimeout())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timeout);
return hashCode;
}
@Override
public int compareTo(TSGroupByQueryIntervalReq other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSessionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStatementId(), other.isSetStatementId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatementId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statementId, other.statementId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDevice(), other.isSetDevice());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDevice()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.device, other.device);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMeasurement(), other.isSetMeasurement());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMeasurement()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurement, other.measurement);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDataType(), other.isSetDataType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDataType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataType, other.dataType);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAggregationType(), other.isSetAggregationType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAggregationType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregationType, other.aggregationType);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDatabase(), other.isSetDatabase());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDatabase()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEndTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetInterval(), other.isSetInterval());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInterval()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.interval, other.interval);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetFetchSize(), other.isSetFetchSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFetchSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchSize, other.fetchSize);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTimeout()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout);
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("TSGroupByQueryIntervalReq(");
boolean first = true;
sb.append("sessionId:");
sb.append(this.sessionId);
first = false;
if (!first) sb.append(", ");
sb.append("statementId:");
sb.append(this.statementId);
first = false;
if (!first) sb.append(", ");
sb.append("device:");
if (this.device == null) {
sb.append("null");
} else {
sb.append(this.device);
}
first = false;
if (!first) sb.append(", ");
sb.append("measurement:");
if (this.measurement == null) {
sb.append("null");
} else {
sb.append(this.measurement);
}
first = false;
if (!first) sb.append(", ");
sb.append("dataType:");
sb.append(this.dataType);
first = false;
if (!first) sb.append(", ");
sb.append("aggregationType:");
if (this.aggregationType == null) {
sb.append("null");
} else {
sb.append(this.aggregationType);
}
first = false;
if (isSetDatabase()) {
if (!first) sb.append(", ");
sb.append("database:");
if (this.database == null) {
sb.append("null");
} else {
sb.append(this.database);
}
first = false;
}
if (isSetStartTime()) {
if (!first) sb.append(", ");
sb.append("startTime:");
sb.append(this.startTime);
first = false;
}
if (isSetEndTime()) {
if (!first) sb.append(", ");
sb.append("endTime:");
sb.append(this.endTime);
first = false;
}
if (isSetInterval()) {
if (!first) sb.append(", ");
sb.append("interval:");
sb.append(this.interval);
first = false;
}
if (isSetFetchSize()) {
if (!first) sb.append(", ");
sb.append("fetchSize:");
sb.append(this.fetchSize);
first = false;
}
if (isSetTimeout()) {
if (!first) sb.append(", ");
sb.append("timeout:");
sb.append(this.timeout);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'sessionId' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'statementId' because it's a primitive and you chose the non-beans generator.
if (device == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'device' was not present! Struct: " + toString());
}
if (measurement == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'measurement' was not present! Struct: " + toString());
}
// alas, we cannot check 'dataType' because it's a primitive and you chose the non-beans generator.
if (aggregationType == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'aggregationType' was not present! Struct: " + toString());
}
// 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 TSGroupByQueryIntervalReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSGroupByQueryIntervalReqStandardScheme getScheme() {
return new TSGroupByQueryIntervalReqStandardScheme();
}
}
private static class TSGroupByQueryIntervalReqStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, TSGroupByQueryIntervalReq 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: // SESSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.sessionId = iprot.readI64();
struct.setSessionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // STATEMENT_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.statementId = iprot.readI64();
struct.setStatementIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // DEVICE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.device = iprot.readString();
struct.setDeviceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // MEASUREMENT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.measurement = iprot.readString();
struct.setMeasurementIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // DATA_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.dataType = iprot.readI32();
struct.setDataTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // AGGREGATION_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.aggregationType = org.apache.iotdb.common.rpc.thrift.TAggregationType.findByValue(iprot.readI32());
struct.setAggregationTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // DATABASE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.database = iprot.readString();
struct.setDatabaseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // START_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.startTime = iprot.readI64();
struct.setStartTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // END_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.endTime = iprot.readI64();
struct.setEndTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // INTERVAL
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.interval = iprot.readI64();
struct.setIntervalIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // FETCH_SIZE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.fetchSize = iprot.readI32();
struct.setFetchSizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // TIMEOUT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.timeout = iprot.readI64();
struct.setTimeoutIsSet(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.isSetSessionId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetStatementId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'statementId' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetDataType()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataType' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
oprot.writeI64(struct.sessionId);
oprot.writeFieldEnd();
oprot.writeFieldBegin(STATEMENT_ID_FIELD_DESC);
oprot.writeI64(struct.statementId);
oprot.writeFieldEnd();
if (struct.device != null) {
oprot.writeFieldBegin(DEVICE_FIELD_DESC);
oprot.writeString(struct.device);
oprot.writeFieldEnd();
}
if (struct.measurement != null) {
oprot.writeFieldBegin(MEASUREMENT_FIELD_DESC);
oprot.writeString(struct.measurement);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC);
oprot.writeI32(struct.dataType);
oprot.writeFieldEnd();
if (struct.aggregationType != null) {
oprot.writeFieldBegin(AGGREGATION_TYPE_FIELD_DESC);
oprot.writeI32(struct.aggregationType.getValue());
oprot.writeFieldEnd();
}
if (struct.database != null) {
if (struct.isSetDatabase()) {
oprot.writeFieldBegin(DATABASE_FIELD_DESC);
oprot.writeString(struct.database);
oprot.writeFieldEnd();
}
}
if (struct.isSetStartTime()) {
oprot.writeFieldBegin(START_TIME_FIELD_DESC);
oprot.writeI64(struct.startTime);
oprot.writeFieldEnd();
}
if (struct.isSetEndTime()) {
oprot.writeFieldBegin(END_TIME_FIELD_DESC);
oprot.writeI64(struct.endTime);
oprot.writeFieldEnd();
}
if (struct.isSetInterval()) {
oprot.writeFieldBegin(INTERVAL_FIELD_DESC);
oprot.writeI64(struct.interval);
oprot.writeFieldEnd();
}
if (struct.isSetFetchSize()) {
oprot.writeFieldBegin(FETCH_SIZE_FIELD_DESC);
oprot.writeI32(struct.fetchSize);
oprot.writeFieldEnd();
}
if (struct.isSetTimeout()) {
oprot.writeFieldBegin(TIMEOUT_FIELD_DESC);
oprot.writeI64(struct.timeout);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TSGroupByQueryIntervalReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSGroupByQueryIntervalReqTupleScheme getScheme() {
return new TSGroupByQueryIntervalReqTupleScheme();
}
}
private static class TSGroupByQueryIntervalReqTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.sessionId);
oprot.writeI64(struct.statementId);
oprot.writeString(struct.device);
oprot.writeString(struct.measurement);
oprot.writeI32(struct.dataType);
oprot.writeI32(struct.aggregationType.getValue());
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDatabase()) {
optionals.set(0);
}
if (struct.isSetStartTime()) {
optionals.set(1);
}
if (struct.isSetEndTime()) {
optionals.set(2);
}
if (struct.isSetInterval()) {
optionals.set(3);
}
if (struct.isSetFetchSize()) {
optionals.set(4);
}
if (struct.isSetTimeout()) {
optionals.set(5);
}
oprot.writeBitSet(optionals, 6);
if (struct.isSetDatabase()) {
oprot.writeString(struct.database);
}
if (struct.isSetStartTime()) {
oprot.writeI64(struct.startTime);
}
if (struct.isSetEndTime()) {
oprot.writeI64(struct.endTime);
}
if (struct.isSetInterval()) {
oprot.writeI64(struct.interval);
}
if (struct.isSetFetchSize()) {
oprot.writeI32(struct.fetchSize);
}
if (struct.isSetTimeout()) {
oprot.writeI64(struct.timeout);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TSGroupByQueryIntervalReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.sessionId = iprot.readI64();
struct.setSessionIdIsSet(true);
struct.statementId = iprot.readI64();
struct.setStatementIdIsSet(true);
struct.device = iprot.readString();
struct.setDeviceIsSet(true);
struct.measurement = iprot.readString();
struct.setMeasurementIsSet(true);
struct.dataType = iprot.readI32();
struct.setDataTypeIsSet(true);
struct.aggregationType = org.apache.iotdb.common.rpc.thrift.TAggregationType.findByValue(iprot.readI32());
struct.setAggregationTypeIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.database = iprot.readString();
struct.setDatabaseIsSet(true);
}
if (incoming.get(1)) {
struct.startTime = iprot.readI64();
struct.setStartTimeIsSet(true);
}
if (incoming.get(2)) {
struct.endTime = iprot.readI64();
struct.setEndTimeIsSet(true);
}
if (incoming.get(3)) {
struct.interval = iprot.readI64();
struct.setIntervalIsSet(true);
}
if (incoming.get(4)) {
struct.fetchSize = iprot.readI32();
struct.setFetchSizeIsSet(true);
}
if (incoming.get(5)) {
struct.timeout = iprot.readI64();
struct.setTimeoutIsSet(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();
}
}