org.apache.iotdb.service.rpc.thrift.TSQueryDataSet 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 server.
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 = "2023-04-20")
public class TSQueryDataSet 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("TSQueryDataSet");
private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField VALUE_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("valueList", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField BITMAP_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("bitmapList", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSQueryDataSetStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSQueryDataSetTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer time; // required
public @org.apache.thrift.annotation.Nullable java.util.List valueList; // required
public @org.apache.thrift.annotation.Nullable java.util.List bitmapList; // 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 {
TIME((short)1, "time"),
VALUE_LIST((short)2, "valueList"),
BITMAP_LIST((short)3, "bitmapList");
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: // TIME
return TIME;
case 2: // VALUE_LIST
return VALUE_LIST;
case 3: // BITMAP_LIST
return BITMAP_LIST;
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
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.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.VALUE_LIST, new org.apache.thrift.meta_data.FieldMetaData("valueList", 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.STRING , true))));
tmpMap.put(_Fields.BITMAP_LIST, new org.apache.thrift.meta_data.FieldMetaData("bitmapList", 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.STRING , true))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSQueryDataSet.class, metaDataMap);
}
public TSQueryDataSet() {
}
public TSQueryDataSet(
java.nio.ByteBuffer time,
java.util.List valueList,
java.util.List bitmapList)
{
this();
this.time = org.apache.thrift.TBaseHelper.copyBinary(time);
this.valueList = valueList;
this.bitmapList = bitmapList;
}
/**
* Performs a deep copy on other.
*/
public TSQueryDataSet(TSQueryDataSet other) {
if (other.isSetTime()) {
this.time = org.apache.thrift.TBaseHelper.copyBinary(other.time);
}
if (other.isSetValueList()) {
java.util.List __this__valueList = new java.util.ArrayList(other.valueList);
this.valueList = __this__valueList;
}
if (other.isSetBitmapList()) {
java.util.List __this__bitmapList = new java.util.ArrayList(other.bitmapList);
this.bitmapList = __this__bitmapList;
}
}
public TSQueryDataSet deepCopy() {
return new TSQueryDataSet(this);
}
@Override
public void clear() {
this.time = null;
this.valueList = null;
this.bitmapList = null;
}
public byte[] getTime() {
setTime(org.apache.thrift.TBaseHelper.rightSize(time));
return time == null ? null : time.array();
}
public java.nio.ByteBuffer bufferForTime() {
return org.apache.thrift.TBaseHelper.copyBinary(time);
}
public TSQueryDataSet setTime(byte[] time) {
this.time = time == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(time.clone());
return this;
}
public TSQueryDataSet setTime(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer time) {
this.time = org.apache.thrift.TBaseHelper.copyBinary(time);
return this;
}
public void unsetTime() {
this.time = null;
}
/** Returns true if field time is set (has been assigned a value) and false otherwise */
public boolean isSetTime() {
return this.time != null;
}
public void setTimeIsSet(boolean value) {
if (!value) {
this.time = null;
}
}
public int getValueListSize() {
return (this.valueList == null) ? 0 : this.valueList.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getValueListIterator() {
return (this.valueList == null) ? null : this.valueList.iterator();
}
public void addToValueList(java.nio.ByteBuffer elem) {
if (this.valueList == null) {
this.valueList = new java.util.ArrayList();
}
this.valueList.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getValueList() {
return this.valueList;
}
public TSQueryDataSet setValueList(@org.apache.thrift.annotation.Nullable java.util.List valueList) {
this.valueList = valueList;
return this;
}
public void unsetValueList() {
this.valueList = null;
}
/** Returns true if field valueList is set (has been assigned a value) and false otherwise */
public boolean isSetValueList() {
return this.valueList != null;
}
public void setValueListIsSet(boolean value) {
if (!value) {
this.valueList = null;
}
}
public int getBitmapListSize() {
return (this.bitmapList == null) ? 0 : this.bitmapList.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getBitmapListIterator() {
return (this.bitmapList == null) ? null : this.bitmapList.iterator();
}
public void addToBitmapList(java.nio.ByteBuffer elem) {
if (this.bitmapList == null) {
this.bitmapList = new java.util.ArrayList();
}
this.bitmapList.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getBitmapList() {
return this.bitmapList;
}
public TSQueryDataSet setBitmapList(@org.apache.thrift.annotation.Nullable java.util.List bitmapList) {
this.bitmapList = bitmapList;
return this;
}
public void unsetBitmapList() {
this.bitmapList = null;
}
/** Returns true if field bitmapList is set (has been assigned a value) and false otherwise */
public boolean isSetBitmapList() {
return this.bitmapList != null;
}
public void setBitmapListIsSet(boolean value) {
if (!value) {
this.bitmapList = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TIME:
if (value == null) {
unsetTime();
} else {
if (value instanceof byte[]) {
setTime((byte[])value);
} else {
setTime((java.nio.ByteBuffer)value);
}
}
break;
case VALUE_LIST:
if (value == null) {
unsetValueList();
} else {
setValueList((java.util.List)value);
}
break;
case BITMAP_LIST:
if (value == null) {
unsetBitmapList();
} else {
setBitmapList((java.util.List)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TIME:
return getTime();
case VALUE_LIST:
return getValueList();
case BITMAP_LIST:
return getBitmapList();
}
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 TIME:
return isSetTime();
case VALUE_LIST:
return isSetValueList();
case BITMAP_LIST:
return isSetBitmapList();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TSQueryDataSet)
return this.equals((TSQueryDataSet)that);
return false;
}
public boolean equals(TSQueryDataSet that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_time = true && this.isSetTime();
boolean that_present_time = true && that.isSetTime();
if (this_present_time || that_present_time) {
if (!(this_present_time && that_present_time))
return false;
if (!this.time.equals(that.time))
return false;
}
boolean this_present_valueList = true && this.isSetValueList();
boolean that_present_valueList = true && that.isSetValueList();
if (this_present_valueList || that_present_valueList) {
if (!(this_present_valueList && that_present_valueList))
return false;
if (!this.valueList.equals(that.valueList))
return false;
}
boolean this_present_bitmapList = true && this.isSetBitmapList();
boolean that_present_bitmapList = true && that.isSetBitmapList();
if (this_present_bitmapList || that_present_bitmapList) {
if (!(this_present_bitmapList && that_present_bitmapList))
return false;
if (!this.bitmapList.equals(that.bitmapList))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetTime()) ? 131071 : 524287);
if (isSetTime())
hashCode = hashCode * 8191 + time.hashCode();
hashCode = hashCode * 8191 + ((isSetValueList()) ? 131071 : 524287);
if (isSetValueList())
hashCode = hashCode * 8191 + valueList.hashCode();
hashCode = hashCode * 8191 + ((isSetBitmapList()) ? 131071 : 524287);
if (isSetBitmapList())
hashCode = hashCode * 8191 + bitmapList.hashCode();
return hashCode;
}
@Override
public int compareTo(TSQueryDataSet other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTime(), other.isSetTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time, other.time);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetValueList(), other.isSetValueList());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValueList()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueList, other.valueList);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBitmapList(), other.isSetBitmapList());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBitmapList()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bitmapList, other.bitmapList);
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("TSQueryDataSet(");
boolean first = true;
sb.append("time:");
if (this.time == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.time, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("valueList:");
if (this.valueList == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.valueList, sb);
}
first = false;
if (!first) sb.append(", ");
sb.append("bitmapList:");
if (this.bitmapList == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.bitmapList, sb);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (time == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'time' was not present! Struct: " + toString());
}
if (valueList == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'valueList' was not present! Struct: " + toString());
}
if (bitmapList == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'bitmapList' 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 {
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 TSQueryDataSetStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSQueryDataSetStandardScheme getScheme() {
return new TSQueryDataSetStandardScheme();
}
}
private static class TSQueryDataSetStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, TSQueryDataSet 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: // TIME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.time = iprot.readBinary();
struct.setTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // VALUE_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.valueList = new java.util.ArrayList(_list0.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readBinary();
struct.valueList.add(_elem1);
}
iprot.readListEnd();
}
struct.setValueListIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // BITMAP_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
struct.bitmapList = new java.util.ArrayList(_list3.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem4;
for (int _i5 = 0; _i5 < _list3.size; ++_i5)
{
_elem4 = iprot.readBinary();
struct.bitmapList.add(_elem4);
}
iprot.readListEnd();
}
struct.setBitmapListIsSet(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, TSQueryDataSet struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.time != null) {
oprot.writeFieldBegin(TIME_FIELD_DESC);
oprot.writeBinary(struct.time);
oprot.writeFieldEnd();
}
if (struct.valueList != null) {
oprot.writeFieldBegin(VALUE_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.valueList.size()));
for (java.nio.ByteBuffer _iter6 : struct.valueList)
{
oprot.writeBinary(_iter6);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.bitmapList != null) {
oprot.writeFieldBegin(BITMAP_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.bitmapList.size()));
for (java.nio.ByteBuffer _iter7 : struct.bitmapList)
{
oprot.writeBinary(_iter7);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TSQueryDataSetTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSQueryDataSetTupleScheme getScheme() {
return new TSQueryDataSetTupleScheme();
}
}
private static class TSQueryDataSetTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSQueryDataSet struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeBinary(struct.time);
{
oprot.writeI32(struct.valueList.size());
for (java.nio.ByteBuffer _iter8 : struct.valueList)
{
oprot.writeBinary(_iter8);
}
}
{
oprot.writeI32(struct.bitmapList.size());
for (java.nio.ByteBuffer _iter9 : struct.bitmapList)
{
oprot.writeBinary(_iter9);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TSQueryDataSet struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.time = iprot.readBinary();
struct.setTimeIsSet(true);
{
org.apache.thrift.protocol.TList _list10 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.valueList = new java.util.ArrayList(_list10.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem11;
for (int _i12 = 0; _i12 < _list10.size; ++_i12)
{
_elem11 = iprot.readBinary();
struct.valueList.add(_elem11);
}
}
struct.setValueListIsSet(true);
{
org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.bitmapList = new java.util.ArrayList(_list13.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
_elem14 = iprot.readBinary();
struct.bitmapList.add(_elem14);
}
}
struct.setBitmapListIsSet(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();
}
}