org.apache.iotdb.service.rpc.thrift.TSCreateTimeseriesReq 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 TSCreateTimeseriesReq 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("TSCreateTimeseriesReq");
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 PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2);
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)3);
private static final org.apache.thrift.protocol.TField ENCODING_FIELD_DESC = new org.apache.thrift.protocol.TField("encoding", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField COMPRESSOR_FIELD_DESC = new org.apache.thrift.protocol.TField("compressor", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField PROPS_FIELD_DESC = new org.apache.thrift.protocol.TField("props", org.apache.thrift.protocol.TType.MAP, (short)6);
private static final org.apache.thrift.protocol.TField TAGS_FIELD_DESC = new org.apache.thrift.protocol.TField("tags", org.apache.thrift.protocol.TType.MAP, (short)7);
private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)8);
private static final org.apache.thrift.protocol.TField MEASUREMENT_ALIAS_FIELD_DESC = new org.apache.thrift.protocol.TField("measurementAlias", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSCreateTimeseriesReqStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSCreateTimeseriesReqTupleSchemeFactory();
public long sessionId; // required
public @org.apache.thrift.annotation.Nullable java.lang.String path; // required
public int dataType; // required
public int encoding; // required
public int compressor; // required
public @org.apache.thrift.annotation.Nullable java.util.Map props; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map tags; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map attributes; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String measurementAlias; // 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"),
PATH((short)2, "path"),
DATA_TYPE((short)3, "dataType"),
ENCODING((short)4, "encoding"),
COMPRESSOR((short)5, "compressor"),
PROPS((short)6, "props"),
TAGS((short)7, "tags"),
ATTRIBUTES((short)8, "attributes"),
MEASUREMENT_ALIAS((short)9, "measurementAlias");
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: // PATH
return PATH;
case 3: // DATA_TYPE
return DATA_TYPE;
case 4: // ENCODING
return ENCODING;
case 5: // COMPRESSOR
return COMPRESSOR;
case 6: // PROPS
return PROPS;
case 7: // TAGS
return TAGS;
case 8: // ATTRIBUTES
return ATTRIBUTES;
case 9: // MEASUREMENT_ALIAS
return MEASUREMENT_ALIAS;
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 __DATATYPE_ISSET_ID = 1;
private static final int __ENCODING_ISSET_ID = 2;
private static final int __COMPRESSOR_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.PROPS,_Fields.TAGS,_Fields.ATTRIBUTES,_Fields.MEASUREMENT_ALIAS};
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.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, 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.ENCODING, new org.apache.thrift.meta_data.FieldMetaData("encoding", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.COMPRESSOR, new org.apache.thrift.meta_data.FieldMetaData("compressor", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.PROPS, new org.apache.thrift.meta_data.FieldMetaData("props", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.TAGS, new org.apache.thrift.meta_data.FieldMetaData("tags", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.MEASUREMENT_ALIAS, new org.apache.thrift.meta_data.FieldMetaData("measurementAlias", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSCreateTimeseriesReq.class, metaDataMap);
}
public TSCreateTimeseriesReq() {
}
public TSCreateTimeseriesReq(
long sessionId,
java.lang.String path,
int dataType,
int encoding,
int compressor)
{
this();
this.sessionId = sessionId;
setSessionIdIsSet(true);
this.path = path;
this.dataType = dataType;
setDataTypeIsSet(true);
this.encoding = encoding;
setEncodingIsSet(true);
this.compressor = compressor;
setCompressorIsSet(true);
}
/**
* Performs a deep copy on other.
*/
public TSCreateTimeseriesReq(TSCreateTimeseriesReq other) {
__isset_bitfield = other.__isset_bitfield;
this.sessionId = other.sessionId;
if (other.isSetPath()) {
this.path = other.path;
}
this.dataType = other.dataType;
this.encoding = other.encoding;
this.compressor = other.compressor;
if (other.isSetProps()) {
java.util.Map __this__props = new java.util.HashMap(other.props);
this.props = __this__props;
}
if (other.isSetTags()) {
java.util.Map __this__tags = new java.util.HashMap(other.tags);
this.tags = __this__tags;
}
if (other.isSetAttributes()) {
java.util.Map __this__attributes = new java.util.HashMap(other.attributes);
this.attributes = __this__attributes;
}
if (other.isSetMeasurementAlias()) {
this.measurementAlias = other.measurementAlias;
}
}
public TSCreateTimeseriesReq deepCopy() {
return new TSCreateTimeseriesReq(this);
}
@Override
public void clear() {
setSessionIdIsSet(false);
this.sessionId = 0;
this.path = null;
setDataTypeIsSet(false);
this.dataType = 0;
setEncodingIsSet(false);
this.encoding = 0;
setCompressorIsSet(false);
this.compressor = 0;
this.props = null;
this.tags = null;
this.attributes = null;
this.measurementAlias = null;
}
public long getSessionId() {
return this.sessionId;
}
public TSCreateTimeseriesReq 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);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getPath() {
return this.path;
}
public TSCreateTimeseriesReq 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 getDataType() {
return this.dataType;
}
public TSCreateTimeseriesReq 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);
}
public int getEncoding() {
return this.encoding;
}
public TSCreateTimeseriesReq setEncoding(int encoding) {
this.encoding = encoding;
setEncodingIsSet(true);
return this;
}
public void unsetEncoding() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENCODING_ISSET_ID);
}
/** Returns true if field encoding is set (has been assigned a value) and false otherwise */
public boolean isSetEncoding() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENCODING_ISSET_ID);
}
public void setEncodingIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENCODING_ISSET_ID, value);
}
public int getCompressor() {
return this.compressor;
}
public TSCreateTimeseriesReq setCompressor(int compressor) {
this.compressor = compressor;
setCompressorIsSet(true);
return this;
}
public void unsetCompressor() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPRESSOR_ISSET_ID);
}
/** Returns true if field compressor is set (has been assigned a value) and false otherwise */
public boolean isSetCompressor() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPRESSOR_ISSET_ID);
}
public void setCompressorIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPRESSOR_ISSET_ID, value);
}
public int getPropsSize() {
return (this.props == null) ? 0 : this.props.size();
}
public void putToProps(java.lang.String key, java.lang.String val) {
if (this.props == null) {
this.props = new java.util.HashMap();
}
this.props.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map getProps() {
return this.props;
}
public TSCreateTimeseriesReq setProps(@org.apache.thrift.annotation.Nullable java.util.Map props) {
this.props = props;
return this;
}
public void unsetProps() {
this.props = null;
}
/** Returns true if field props is set (has been assigned a value) and false otherwise */
public boolean isSetProps() {
return this.props != null;
}
public void setPropsIsSet(boolean value) {
if (!value) {
this.props = null;
}
}
public int getTagsSize() {
return (this.tags == null) ? 0 : this.tags.size();
}
public void putToTags(java.lang.String key, java.lang.String val) {
if (this.tags == null) {
this.tags = new java.util.HashMap();
}
this.tags.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map getTags() {
return this.tags;
}
public TSCreateTimeseriesReq setTags(@org.apache.thrift.annotation.Nullable java.util.Map tags) {
this.tags = tags;
return this;
}
public void unsetTags() {
this.tags = null;
}
/** Returns true if field tags is set (has been assigned a value) and false otherwise */
public boolean isSetTags() {
return this.tags != null;
}
public void setTagsIsSet(boolean value) {
if (!value) {
this.tags = null;
}
}
public int getAttributesSize() {
return (this.attributes == null) ? 0 : this.attributes.size();
}
public void putToAttributes(java.lang.String key, java.lang.String val) {
if (this.attributes == null) {
this.attributes = new java.util.HashMap();
}
this.attributes.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map getAttributes() {
return this.attributes;
}
public TSCreateTimeseriesReq setAttributes(@org.apache.thrift.annotation.Nullable java.util.Map attributes) {
this.attributes = attributes;
return this;
}
public void unsetAttributes() {
this.attributes = null;
}
/** Returns true if field attributes is set (has been assigned a value) and false otherwise */
public boolean isSetAttributes() {
return this.attributes != null;
}
public void setAttributesIsSet(boolean value) {
if (!value) {
this.attributes = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getMeasurementAlias() {
return this.measurementAlias;
}
public TSCreateTimeseriesReq setMeasurementAlias(@org.apache.thrift.annotation.Nullable java.lang.String measurementAlias) {
this.measurementAlias = measurementAlias;
return this;
}
public void unsetMeasurementAlias() {
this.measurementAlias = null;
}
/** Returns true if field measurementAlias is set (has been assigned a value) and false otherwise */
public boolean isSetMeasurementAlias() {
return this.measurementAlias != null;
}
public void setMeasurementAliasIsSet(boolean value) {
if (!value) {
this.measurementAlias = null;
}
}
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 PATH:
if (value == null) {
unsetPath();
} else {
setPath((java.lang.String)value);
}
break;
case DATA_TYPE:
if (value == null) {
unsetDataType();
} else {
setDataType((java.lang.Integer)value);
}
break;
case ENCODING:
if (value == null) {
unsetEncoding();
} else {
setEncoding((java.lang.Integer)value);
}
break;
case COMPRESSOR:
if (value == null) {
unsetCompressor();
} else {
setCompressor((java.lang.Integer)value);
}
break;
case PROPS:
if (value == null) {
unsetProps();
} else {
setProps((java.util.Map)value);
}
break;
case TAGS:
if (value == null) {
unsetTags();
} else {
setTags((java.util.Map)value);
}
break;
case ATTRIBUTES:
if (value == null) {
unsetAttributes();
} else {
setAttributes((java.util.Map)value);
}
break;
case MEASUREMENT_ALIAS:
if (value == null) {
unsetMeasurementAlias();
} else {
setMeasurementAlias((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
case PATH:
return getPath();
case DATA_TYPE:
return getDataType();
case ENCODING:
return getEncoding();
case COMPRESSOR:
return getCompressor();
case PROPS:
return getProps();
case TAGS:
return getTags();
case ATTRIBUTES:
return getAttributes();
case MEASUREMENT_ALIAS:
return getMeasurementAlias();
}
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 PATH:
return isSetPath();
case DATA_TYPE:
return isSetDataType();
case ENCODING:
return isSetEncoding();
case COMPRESSOR:
return isSetCompressor();
case PROPS:
return isSetProps();
case TAGS:
return isSetTags();
case ATTRIBUTES:
return isSetAttributes();
case MEASUREMENT_ALIAS:
return isSetMeasurementAlias();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TSCreateTimeseriesReq)
return this.equals((TSCreateTimeseriesReq)that);
return false;
}
public boolean equals(TSCreateTimeseriesReq 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_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_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_encoding = true;
boolean that_present_encoding = true;
if (this_present_encoding || that_present_encoding) {
if (!(this_present_encoding && that_present_encoding))
return false;
if (this.encoding != that.encoding)
return false;
}
boolean this_present_compressor = true;
boolean that_present_compressor = true;
if (this_present_compressor || that_present_compressor) {
if (!(this_present_compressor && that_present_compressor))
return false;
if (this.compressor != that.compressor)
return false;
}
boolean this_present_props = true && this.isSetProps();
boolean that_present_props = true && that.isSetProps();
if (this_present_props || that_present_props) {
if (!(this_present_props && that_present_props))
return false;
if (!this.props.equals(that.props))
return false;
}
boolean this_present_tags = true && this.isSetTags();
boolean that_present_tags = true && that.isSetTags();
if (this_present_tags || that_present_tags) {
if (!(this_present_tags && that_present_tags))
return false;
if (!this.tags.equals(that.tags))
return false;
}
boolean this_present_attributes = true && this.isSetAttributes();
boolean that_present_attributes = true && that.isSetAttributes();
if (this_present_attributes || that_present_attributes) {
if (!(this_present_attributes && that_present_attributes))
return false;
if (!this.attributes.equals(that.attributes))
return false;
}
boolean this_present_measurementAlias = true && this.isSetMeasurementAlias();
boolean that_present_measurementAlias = true && that.isSetMeasurementAlias();
if (this_present_measurementAlias || that_present_measurementAlias) {
if (!(this_present_measurementAlias && that_present_measurementAlias))
return false;
if (!this.measurementAlias.equals(that.measurementAlias))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(sessionId);
hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287);
if (isSetPath())
hashCode = hashCode * 8191 + path.hashCode();
hashCode = hashCode * 8191 + dataType;
hashCode = hashCode * 8191 + encoding;
hashCode = hashCode * 8191 + compressor;
hashCode = hashCode * 8191 + ((isSetProps()) ? 131071 : 524287);
if (isSetProps())
hashCode = hashCode * 8191 + props.hashCode();
hashCode = hashCode * 8191 + ((isSetTags()) ? 131071 : 524287);
if (isSetTags())
hashCode = hashCode * 8191 + tags.hashCode();
hashCode = hashCode * 8191 + ((isSetAttributes()) ? 131071 : 524287);
if (isSetAttributes())
hashCode = hashCode * 8191 + attributes.hashCode();
hashCode = hashCode * 8191 + ((isSetMeasurementAlias()) ? 131071 : 524287);
if (isSetMeasurementAlias())
hashCode = hashCode * 8191 + measurementAlias.hashCode();
return hashCode;
}
@Override
public int compareTo(TSCreateTimeseriesReq 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(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(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(isSetEncoding(), other.isSetEncoding());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEncoding()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.encoding, other.encoding);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCompressor(), other.isSetCompressor());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCompressor()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressor, other.compressor);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetProps(), other.isSetProps());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProps()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.props, other.props);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTags(), other.isSetTags());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTags()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tags, other.tags);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAttributes(), other.isSetAttributes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAttributes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMeasurementAlias(), other.isSetMeasurementAlias());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMeasurementAlias()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.measurementAlias, other.measurementAlias);
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("TSCreateTimeseriesReq(");
boolean first = true;
sb.append("sessionId:");
sb.append(this.sessionId);
first = false;
if (!first) sb.append(", ");
sb.append("path:");
if (this.path == null) {
sb.append("null");
} else {
sb.append(this.path);
}
first = false;
if (!first) sb.append(", ");
sb.append("dataType:");
sb.append(this.dataType);
first = false;
if (!first) sb.append(", ");
sb.append("encoding:");
sb.append(this.encoding);
first = false;
if (!first) sb.append(", ");
sb.append("compressor:");
sb.append(this.compressor);
first = false;
if (isSetProps()) {
if (!first) sb.append(", ");
sb.append("props:");
if (this.props == null) {
sb.append("null");
} else {
sb.append(this.props);
}
first = false;
}
if (isSetTags()) {
if (!first) sb.append(", ");
sb.append("tags:");
if (this.tags == null) {
sb.append("null");
} else {
sb.append(this.tags);
}
first = false;
}
if (isSetAttributes()) {
if (!first) sb.append(", ");
sb.append("attributes:");
if (this.attributes == null) {
sb.append("null");
} else {
sb.append(this.attributes);
}
first = false;
}
if (isSetMeasurementAlias()) {
if (!first) sb.append(", ");
sb.append("measurementAlias:");
if (this.measurementAlias == null) {
sb.append("null");
} else {
sb.append(this.measurementAlias);
}
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.
if (path == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'path' was not present! Struct: " + toString());
}
// alas, we cannot check 'dataType' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'encoding' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'compressor' because it's a primitive and you chose the non-beans generator.
// 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 TSCreateTimeseriesReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSCreateTimeseriesReqStandardScheme getScheme() {
return new TSCreateTimeseriesReqStandardScheme();
}
}
private static class TSCreateTimeseriesReqStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, TSCreateTimeseriesReq 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: // 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 3: // 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 4: // ENCODING
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.encoding = iprot.readI32();
struct.setEncodingIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // COMPRESSOR
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.compressor = iprot.readI32();
struct.setCompressorIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // PROPS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map414 = iprot.readMapBegin();
struct.props = new java.util.HashMap(2*_map414.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key415;
@org.apache.thrift.annotation.Nullable java.lang.String _val416;
for (int _i417 = 0; _i417 < _map414.size; ++_i417)
{
_key415 = iprot.readString();
_val416 = iprot.readString();
struct.props.put(_key415, _val416);
}
iprot.readMapEnd();
}
struct.setPropsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // TAGS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map418 = iprot.readMapBegin();
struct.tags = new java.util.HashMap(2*_map418.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key419;
@org.apache.thrift.annotation.Nullable java.lang.String _val420;
for (int _i421 = 0; _i421 < _map418.size; ++_i421)
{
_key419 = iprot.readString();
_val420 = iprot.readString();
struct.tags.put(_key419, _val420);
}
iprot.readMapEnd();
}
struct.setTagsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // ATTRIBUTES
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map422 = iprot.readMapBegin();
struct.attributes = new java.util.HashMap(2*_map422.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key423;
@org.apache.thrift.annotation.Nullable java.lang.String _val424;
for (int _i425 = 0; _i425 < _map422.size; ++_i425)
{
_key423 = iprot.readString();
_val424 = iprot.readString();
struct.attributes.put(_key423, _val424);
}
iprot.readMapEnd();
}
struct.setAttributesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // MEASUREMENT_ALIAS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.measurementAlias = iprot.readString();
struct.setMeasurementAliasIsSet(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.isSetDataType()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataType' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetEncoding()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'encoding' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetCompressor()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'compressor' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TSCreateTimeseriesReq struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
oprot.writeI64(struct.sessionId);
oprot.writeFieldEnd();
if (struct.path != null) {
oprot.writeFieldBegin(PATH_FIELD_DESC);
oprot.writeString(struct.path);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(DATA_TYPE_FIELD_DESC);
oprot.writeI32(struct.dataType);
oprot.writeFieldEnd();
oprot.writeFieldBegin(ENCODING_FIELD_DESC);
oprot.writeI32(struct.encoding);
oprot.writeFieldEnd();
oprot.writeFieldBegin(COMPRESSOR_FIELD_DESC);
oprot.writeI32(struct.compressor);
oprot.writeFieldEnd();
if (struct.props != null) {
if (struct.isSetProps()) {
oprot.writeFieldBegin(PROPS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.props.size()));
for (java.util.Map.Entry _iter426 : struct.props.entrySet())
{
oprot.writeString(_iter426.getKey());
oprot.writeString(_iter426.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.tags != null) {
if (struct.isSetTags()) {
oprot.writeFieldBegin(TAGS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.tags.size()));
for (java.util.Map.Entry _iter427 : struct.tags.entrySet())
{
oprot.writeString(_iter427.getKey());
oprot.writeString(_iter427.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.attributes != null) {
if (struct.isSetAttributes()) {
oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
for (java.util.Map.Entry _iter428 : struct.attributes.entrySet())
{
oprot.writeString(_iter428.getKey());
oprot.writeString(_iter428.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.measurementAlias != null) {
if (struct.isSetMeasurementAlias()) {
oprot.writeFieldBegin(MEASUREMENT_ALIAS_FIELD_DESC);
oprot.writeString(struct.measurementAlias);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TSCreateTimeseriesReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TSCreateTimeseriesReqTupleScheme getScheme() {
return new TSCreateTimeseriesReqTupleScheme();
}
}
private static class TSCreateTimeseriesReqTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSCreateTimeseriesReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.sessionId);
oprot.writeString(struct.path);
oprot.writeI32(struct.dataType);
oprot.writeI32(struct.encoding);
oprot.writeI32(struct.compressor);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetProps()) {
optionals.set(0);
}
if (struct.isSetTags()) {
optionals.set(1);
}
if (struct.isSetAttributes()) {
optionals.set(2);
}
if (struct.isSetMeasurementAlias()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetProps()) {
{
oprot.writeI32(struct.props.size());
for (java.util.Map.Entry _iter429 : struct.props.entrySet())
{
oprot.writeString(_iter429.getKey());
oprot.writeString(_iter429.getValue());
}
}
}
if (struct.isSetTags()) {
{
oprot.writeI32(struct.tags.size());
for (java.util.Map.Entry _iter430 : struct.tags.entrySet())
{
oprot.writeString(_iter430.getKey());
oprot.writeString(_iter430.getValue());
}
}
}
if (struct.isSetAttributes()) {
{
oprot.writeI32(struct.attributes.size());
for (java.util.Map.Entry _iter431 : struct.attributes.entrySet())
{
oprot.writeString(_iter431.getKey());
oprot.writeString(_iter431.getValue());
}
}
}
if (struct.isSetMeasurementAlias()) {
oprot.writeString(struct.measurementAlias);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TSCreateTimeseriesReq 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.path = iprot.readString();
struct.setPathIsSet(true);
struct.dataType = iprot.readI32();
struct.setDataTypeIsSet(true);
struct.encoding = iprot.readI32();
struct.setEncodingIsSet(true);
struct.compressor = iprot.readI32();
struct.setCompressorIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map432 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.props = new java.util.HashMap(2*_map432.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key433;
@org.apache.thrift.annotation.Nullable java.lang.String _val434;
for (int _i435 = 0; _i435 < _map432.size; ++_i435)
{
_key433 = iprot.readString();
_val434 = iprot.readString();
struct.props.put(_key433, _val434);
}
}
struct.setPropsIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map436 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.tags = new java.util.HashMap(2*_map436.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key437;
@org.apache.thrift.annotation.Nullable java.lang.String _val438;
for (int _i439 = 0; _i439 < _map436.size; ++_i439)
{
_key437 = iprot.readString();
_val438 = iprot.readString();
struct.tags.put(_key437, _val438);
}
}
struct.setTagsIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TMap _map440 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.attributes = new java.util.HashMap(2*_map440.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key441;
@org.apache.thrift.annotation.Nullable java.lang.String _val442;
for (int _i443 = 0; _i443 < _map440.size; ++_i443)
{
_key441 = iprot.readString();
_val442 = iprot.readString();
struct.attributes.put(_key441, _val442);
}
}
struct.setAttributesIsSet(true);
}
if (incoming.get(3)) {
struct.measurementAlias = iprot.readString();
struct.setMeasurementAliasIsSet(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();
}
}