org.apache.iotdb.mpp.rpc.thrift.TPushSingleConsumerGroupMetaReq 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.mpp.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 TPushSingleConsumerGroupMetaReq 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("TPushSingleConsumerGroupMetaReq");
private static final org.apache.thrift.protocol.TField CONSUMER_GROUP_META_FIELD_DESC = new org.apache.thrift.protocol.TField("consumerGroupMeta", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField CONSUMER_GROUP_NAME_TO_DROP_FIELD_DESC = new org.apache.thrift.protocol.TField("consumerGroupNameToDrop", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPushSingleConsumerGroupMetaReqStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPushSingleConsumerGroupMetaReqTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer consumerGroupMeta; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String consumerGroupNameToDrop; // 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 {
CONSUMER_GROUP_META((short)1, "consumerGroupMeta"),
CONSUMER_GROUP_NAME_TO_DROP((short)2, "consumerGroupNameToDrop");
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: // CONSUMER_GROUP_META
return CONSUMER_GROUP_META;
case 2: // CONSUMER_GROUP_NAME_TO_DROP
return CONSUMER_GROUP_NAME_TO_DROP;
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 _Fields optionals[] = {_Fields.CONSUMER_GROUP_META,_Fields.CONSUMER_GROUP_NAME_TO_DROP};
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.CONSUMER_GROUP_META, new org.apache.thrift.meta_data.FieldMetaData("consumerGroupMeta", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.CONSUMER_GROUP_NAME_TO_DROP, new org.apache.thrift.meta_data.FieldMetaData("consumerGroupNameToDrop", 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(TPushSingleConsumerGroupMetaReq.class, metaDataMap);
}
public TPushSingleConsumerGroupMetaReq() {
}
/**
* Performs a deep copy on other.
*/
public TPushSingleConsumerGroupMetaReq(TPushSingleConsumerGroupMetaReq other) {
if (other.isSetConsumerGroupMeta()) {
this.consumerGroupMeta = org.apache.thrift.TBaseHelper.copyBinary(other.consumerGroupMeta);
}
if (other.isSetConsumerGroupNameToDrop()) {
this.consumerGroupNameToDrop = other.consumerGroupNameToDrop;
}
}
public TPushSingleConsumerGroupMetaReq deepCopy() {
return new TPushSingleConsumerGroupMetaReq(this);
}
@Override
public void clear() {
this.consumerGroupMeta = null;
this.consumerGroupNameToDrop = null;
}
public byte[] getConsumerGroupMeta() {
setConsumerGroupMeta(org.apache.thrift.TBaseHelper.rightSize(consumerGroupMeta));
return consumerGroupMeta == null ? null : consumerGroupMeta.array();
}
public java.nio.ByteBuffer bufferForConsumerGroupMeta() {
return org.apache.thrift.TBaseHelper.copyBinary(consumerGroupMeta);
}
public TPushSingleConsumerGroupMetaReq setConsumerGroupMeta(byte[] consumerGroupMeta) {
this.consumerGroupMeta = consumerGroupMeta == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(consumerGroupMeta.clone());
return this;
}
public TPushSingleConsumerGroupMetaReq setConsumerGroupMeta(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer consumerGroupMeta) {
this.consumerGroupMeta = org.apache.thrift.TBaseHelper.copyBinary(consumerGroupMeta);
return this;
}
public void unsetConsumerGroupMeta() {
this.consumerGroupMeta = null;
}
/** Returns true if field consumerGroupMeta is set (has been assigned a value) and false otherwise */
public boolean isSetConsumerGroupMeta() {
return this.consumerGroupMeta != null;
}
public void setConsumerGroupMetaIsSet(boolean value) {
if (!value) {
this.consumerGroupMeta = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getConsumerGroupNameToDrop() {
return this.consumerGroupNameToDrop;
}
public TPushSingleConsumerGroupMetaReq setConsumerGroupNameToDrop(@org.apache.thrift.annotation.Nullable java.lang.String consumerGroupNameToDrop) {
this.consumerGroupNameToDrop = consumerGroupNameToDrop;
return this;
}
public void unsetConsumerGroupNameToDrop() {
this.consumerGroupNameToDrop = null;
}
/** Returns true if field consumerGroupNameToDrop is set (has been assigned a value) and false otherwise */
public boolean isSetConsumerGroupNameToDrop() {
return this.consumerGroupNameToDrop != null;
}
public void setConsumerGroupNameToDropIsSet(boolean value) {
if (!value) {
this.consumerGroupNameToDrop = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case CONSUMER_GROUP_META:
if (value == null) {
unsetConsumerGroupMeta();
} else {
if (value instanceof byte[]) {
setConsumerGroupMeta((byte[])value);
} else {
setConsumerGroupMeta((java.nio.ByteBuffer)value);
}
}
break;
case CONSUMER_GROUP_NAME_TO_DROP:
if (value == null) {
unsetConsumerGroupNameToDrop();
} else {
setConsumerGroupNameToDrop((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CONSUMER_GROUP_META:
return getConsumerGroupMeta();
case CONSUMER_GROUP_NAME_TO_DROP:
return getConsumerGroupNameToDrop();
}
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 CONSUMER_GROUP_META:
return isSetConsumerGroupMeta();
case CONSUMER_GROUP_NAME_TO_DROP:
return isSetConsumerGroupNameToDrop();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TPushSingleConsumerGroupMetaReq)
return this.equals((TPushSingleConsumerGroupMetaReq)that);
return false;
}
public boolean equals(TPushSingleConsumerGroupMetaReq that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_consumerGroupMeta = true && this.isSetConsumerGroupMeta();
boolean that_present_consumerGroupMeta = true && that.isSetConsumerGroupMeta();
if (this_present_consumerGroupMeta || that_present_consumerGroupMeta) {
if (!(this_present_consumerGroupMeta && that_present_consumerGroupMeta))
return false;
if (!this.consumerGroupMeta.equals(that.consumerGroupMeta))
return false;
}
boolean this_present_consumerGroupNameToDrop = true && this.isSetConsumerGroupNameToDrop();
boolean that_present_consumerGroupNameToDrop = true && that.isSetConsumerGroupNameToDrop();
if (this_present_consumerGroupNameToDrop || that_present_consumerGroupNameToDrop) {
if (!(this_present_consumerGroupNameToDrop && that_present_consumerGroupNameToDrop))
return false;
if (!this.consumerGroupNameToDrop.equals(that.consumerGroupNameToDrop))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetConsumerGroupMeta()) ? 131071 : 524287);
if (isSetConsumerGroupMeta())
hashCode = hashCode * 8191 + consumerGroupMeta.hashCode();
hashCode = hashCode * 8191 + ((isSetConsumerGroupNameToDrop()) ? 131071 : 524287);
if (isSetConsumerGroupNameToDrop())
hashCode = hashCode * 8191 + consumerGroupNameToDrop.hashCode();
return hashCode;
}
@Override
public int compareTo(TPushSingleConsumerGroupMetaReq other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetConsumerGroupMeta(), other.isSetConsumerGroupMeta());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetConsumerGroupMeta()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consumerGroupMeta, other.consumerGroupMeta);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetConsumerGroupNameToDrop(), other.isSetConsumerGroupNameToDrop());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetConsumerGroupNameToDrop()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.consumerGroupNameToDrop, other.consumerGroupNameToDrop);
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("TPushSingleConsumerGroupMetaReq(");
boolean first = true;
if (isSetConsumerGroupMeta()) {
sb.append("consumerGroupMeta:");
if (this.consumerGroupMeta == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.consumerGroupMeta, sb);
}
first = false;
}
if (isSetConsumerGroupNameToDrop()) {
if (!first) sb.append(", ");
sb.append("consumerGroupNameToDrop:");
if (this.consumerGroupNameToDrop == null) {
sb.append("null");
} else {
sb.append(this.consumerGroupNameToDrop);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// 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 TPushSingleConsumerGroupMetaReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPushSingleConsumerGroupMetaReqStandardScheme getScheme() {
return new TPushSingleConsumerGroupMetaReqStandardScheme();
}
}
private static class TPushSingleConsumerGroupMetaReqStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, TPushSingleConsumerGroupMetaReq 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: // CONSUMER_GROUP_META
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.consumerGroupMeta = iprot.readBinary();
struct.setConsumerGroupMetaIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // CONSUMER_GROUP_NAME_TO_DROP
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.consumerGroupNameToDrop = iprot.readString();
struct.setConsumerGroupNameToDropIsSet(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, TPushSingleConsumerGroupMetaReq struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.consumerGroupMeta != null) {
if (struct.isSetConsumerGroupMeta()) {
oprot.writeFieldBegin(CONSUMER_GROUP_META_FIELD_DESC);
oprot.writeBinary(struct.consumerGroupMeta);
oprot.writeFieldEnd();
}
}
if (struct.consumerGroupNameToDrop != null) {
if (struct.isSetConsumerGroupNameToDrop()) {
oprot.writeFieldBegin(CONSUMER_GROUP_NAME_TO_DROP_FIELD_DESC);
oprot.writeString(struct.consumerGroupNameToDrop);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TPushSingleConsumerGroupMetaReqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPushSingleConsumerGroupMetaReqTupleScheme getScheme() {
return new TPushSingleConsumerGroupMetaReqTupleScheme();
}
}
private static class TPushSingleConsumerGroupMetaReqTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TPushSingleConsumerGroupMetaReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetConsumerGroupMeta()) {
optionals.set(0);
}
if (struct.isSetConsumerGroupNameToDrop()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetConsumerGroupMeta()) {
oprot.writeBinary(struct.consumerGroupMeta);
}
if (struct.isSetConsumerGroupNameToDrop()) {
oprot.writeString(struct.consumerGroupNameToDrop);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TPushSingleConsumerGroupMetaReq struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.consumerGroupMeta = iprot.readBinary();
struct.setConsumerGroupMetaIsSet(true);
}
if (incoming.get(1)) {
struct.consumerGroupNameToDrop = iprot.readString();
struct.setConsumerGroupNameToDropIsSet(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();
}
}