TPublishVersionRequest.java
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.doris.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TPublishVersionRequest implements org.apache.thrift.TBase<TPublishVersionRequest, TPublishVersionRequest._Fields>, java.io.Serializable, Cloneable, Comparable<TPublishVersionRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPublishVersionRequest");
private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transaction_id", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField PARTITION_VERSION_INFOS_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_version_infos", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField STRICT_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("strict_mode", org.apache.thrift.protocol.TType.BOOL, (short)3);
private static final org.apache.thrift.protocol.TField BASE_TABLET_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("base_tablet_ids", org.apache.thrift.protocol.TType.SET, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TPublishVersionRequestStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TPublishVersionRequestTupleSchemeFactory();
public long transaction_id; // required
public @org.apache.thrift.annotation.Nullable java.util.List<TPartitionVersionInfo> partition_version_infos; // required
public boolean strict_mode; // optional
public @org.apache.thrift.annotation.Nullable java.util.Set<java.lang.Long> base_tablet_ids; // 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 {
TRANSACTION_ID((short)1, "transaction_id"),
PARTITION_VERSION_INFOS((short)2, "partition_version_infos"),
STRICT_MODE((short)3, "strict_mode"),
BASE_TABLET_IDS((short)4, "base_tablet_ids");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
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: // TRANSACTION_ID
return TRANSACTION_ID;
case 2: // PARTITION_VERSION_INFOS
return PARTITION_VERSION_INFOS;
case 3: // STRICT_MODE
return STRICT_MODE;
case 4: // BASE_TABLET_IDS
return BASE_TABLET_IDS;
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 __TRANSACTION_ID_ISSET_ID = 0;
private static final int __STRICT_MODE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.STRICT_MODE,_Fields.BASE_TABLET_IDS};
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.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transaction_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "TTransactionId")));
tmpMap.put(_Fields.PARTITION_VERSION_INFOS, new org.apache.thrift.meta_data.FieldMetaData("partition_version_infos", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPartitionVersionInfo.class))));
tmpMap.put(_Fields.STRICT_MODE, new org.apache.thrift.meta_data.FieldMetaData("strict_mode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.BASE_TABLET_IDS, new org.apache.thrift.meta_data.FieldMetaData("base_tablet_ids", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "TTabletId"))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPublishVersionRequest.class, metaDataMap);
}
public TPublishVersionRequest() {
this.strict_mode = false;
}
public TPublishVersionRequest(
long transaction_id,
java.util.List<TPartitionVersionInfo> partition_version_infos)
{
this();
this.transaction_id = transaction_id;
setTransactionIdIsSet(true);
this.partition_version_infos = partition_version_infos;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TPublishVersionRequest(TPublishVersionRequest other) {
__isset_bitfield = other.__isset_bitfield;
this.transaction_id = other.transaction_id;
if (other.isSetPartitionVersionInfos()) {
java.util.List<TPartitionVersionInfo> __this__partition_version_infos = new java.util.ArrayList<TPartitionVersionInfo>(other.partition_version_infos.size());
for (TPartitionVersionInfo other_element : other.partition_version_infos) {
__this__partition_version_infos.add(new TPartitionVersionInfo(other_element));
}
this.partition_version_infos = __this__partition_version_infos;
}
this.strict_mode = other.strict_mode;
if (other.isSetBaseTabletIds()) {
java.util.Set<java.lang.Long> __this__base_tablet_ids = new java.util.HashSet<java.lang.Long>(other.base_tablet_ids.size());
for (java.lang.Long other_element : other.base_tablet_ids) {
__this__base_tablet_ids.add(other_element);
}
this.base_tablet_ids = __this__base_tablet_ids;
}
}
public TPublishVersionRequest deepCopy() {
return new TPublishVersionRequest(this);
}
@Override
public void clear() {
setTransactionIdIsSet(false);
this.transaction_id = 0;
this.partition_version_infos = null;
this.strict_mode = false;
this.base_tablet_ids = null;
}
public long getTransactionId() {
return this.transaction_id;
}
public TPublishVersionRequest setTransactionId(long transaction_id) {
this.transaction_id = transaction_id;
setTransactionIdIsSet(true);
return this;
}
public void unsetTransactionId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSACTION_ID_ISSET_ID);
}
/** Returns true if field transaction_id is set (has been assigned a value) and false otherwise */
public boolean isSetTransactionId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSACTION_ID_ISSET_ID);
}
public void setTransactionIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSACTION_ID_ISSET_ID, value);
}
public int getPartitionVersionInfosSize() {
return (this.partition_version_infos == null) ? 0 : this.partition_version_infos.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TPartitionVersionInfo> getPartitionVersionInfosIterator() {
return (this.partition_version_infos == null) ? null : this.partition_version_infos.iterator();
}
public void addToPartitionVersionInfos(TPartitionVersionInfo elem) {
if (this.partition_version_infos == null) {
this.partition_version_infos = new java.util.ArrayList<TPartitionVersionInfo>();
}
this.partition_version_infos.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TPartitionVersionInfo> getPartitionVersionInfos() {
return this.partition_version_infos;
}
public TPublishVersionRequest setPartitionVersionInfos(@org.apache.thrift.annotation.Nullable java.util.List<TPartitionVersionInfo> partition_version_infos) {
this.partition_version_infos = partition_version_infos;
return this;
}
public void unsetPartitionVersionInfos() {
this.partition_version_infos = null;
}
/** Returns true if field partition_version_infos is set (has been assigned a value) and false otherwise */
public boolean isSetPartitionVersionInfos() {
return this.partition_version_infos != null;
}
public void setPartitionVersionInfosIsSet(boolean value) {
if (!value) {
this.partition_version_infos = null;
}
}
public boolean isStrictMode() {
return this.strict_mode;
}
public TPublishVersionRequest setStrictMode(boolean strict_mode) {
this.strict_mode = strict_mode;
setStrictModeIsSet(true);
return this;
}
public void unsetStrictMode() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STRICT_MODE_ISSET_ID);
}
/** Returns true if field strict_mode is set (has been assigned a value) and false otherwise */
public boolean isSetStrictMode() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STRICT_MODE_ISSET_ID);
}
public void setStrictModeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STRICT_MODE_ISSET_ID, value);
}
public int getBaseTabletIdsSize() {
return (this.base_tablet_ids == null) ? 0 : this.base_tablet_ids.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getBaseTabletIdsIterator() {
return (this.base_tablet_ids == null) ? null : this.base_tablet_ids.iterator();
}
public void addToBaseTabletIds(long elem) {
if (this.base_tablet_ids == null) {
this.base_tablet_ids = new java.util.HashSet<java.lang.Long>();
}
this.base_tablet_ids.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.Set<java.lang.Long> getBaseTabletIds() {
return this.base_tablet_ids;
}
public TPublishVersionRequest setBaseTabletIds(@org.apache.thrift.annotation.Nullable java.util.Set<java.lang.Long> base_tablet_ids) {
this.base_tablet_ids = base_tablet_ids;
return this;
}
public void unsetBaseTabletIds() {
this.base_tablet_ids = null;
}
/** Returns true if field base_tablet_ids is set (has been assigned a value) and false otherwise */
public boolean isSetBaseTabletIds() {
return this.base_tablet_ids != null;
}
public void setBaseTabletIdsIsSet(boolean value) {
if (!value) {
this.base_tablet_ids = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TRANSACTION_ID:
if (value == null) {
unsetTransactionId();
} else {
setTransactionId((java.lang.Long)value);
}
break;
case PARTITION_VERSION_INFOS:
if (value == null) {
unsetPartitionVersionInfos();
} else {
setPartitionVersionInfos((java.util.List<TPartitionVersionInfo>)value);
}
break;
case STRICT_MODE:
if (value == null) {
unsetStrictMode();
} else {
setStrictMode((java.lang.Boolean)value);
}
break;
case BASE_TABLET_IDS:
if (value == null) {
unsetBaseTabletIds();
} else {
setBaseTabletIds((java.util.Set<java.lang.Long>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TRANSACTION_ID:
return getTransactionId();
case PARTITION_VERSION_INFOS:
return getPartitionVersionInfos();
case STRICT_MODE:
return isStrictMode();
case BASE_TABLET_IDS:
return getBaseTabletIds();
}
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 TRANSACTION_ID:
return isSetTransactionId();
case PARTITION_VERSION_INFOS:
return isSetPartitionVersionInfos();
case STRICT_MODE:
return isSetStrictMode();
case BASE_TABLET_IDS:
return isSetBaseTabletIds();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TPublishVersionRequest)
return this.equals((TPublishVersionRequest)that);
return false;
}
public boolean equals(TPublishVersionRequest that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_transaction_id = true;
boolean that_present_transaction_id = true;
if (this_present_transaction_id || that_present_transaction_id) {
if (!(this_present_transaction_id && that_present_transaction_id))
return false;
if (this.transaction_id != that.transaction_id)
return false;
}
boolean this_present_partition_version_infos = true && this.isSetPartitionVersionInfos();
boolean that_present_partition_version_infos = true && that.isSetPartitionVersionInfos();
if (this_present_partition_version_infos || that_present_partition_version_infos) {
if (!(this_present_partition_version_infos && that_present_partition_version_infos))
return false;
if (!this.partition_version_infos.equals(that.partition_version_infos))
return false;
}
boolean this_present_strict_mode = true && this.isSetStrictMode();
boolean that_present_strict_mode = true && that.isSetStrictMode();
if (this_present_strict_mode || that_present_strict_mode) {
if (!(this_present_strict_mode && that_present_strict_mode))
return false;
if (this.strict_mode != that.strict_mode)
return false;
}
boolean this_present_base_tablet_ids = true && this.isSetBaseTabletIds();
boolean that_present_base_tablet_ids = true && that.isSetBaseTabletIds();
if (this_present_base_tablet_ids || that_present_base_tablet_ids) {
if (!(this_present_base_tablet_ids && that_present_base_tablet_ids))
return false;
if (!this.base_tablet_ids.equals(that.base_tablet_ids))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(transaction_id);
hashCode = hashCode * 8191 + ((isSetPartitionVersionInfos()) ? 131071 : 524287);
if (isSetPartitionVersionInfos())
hashCode = hashCode * 8191 + partition_version_infos.hashCode();
hashCode = hashCode * 8191 + ((isSetStrictMode()) ? 131071 : 524287);
if (isSetStrictMode())
hashCode = hashCode * 8191 + ((strict_mode) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetBaseTabletIds()) ? 131071 : 524287);
if (isSetBaseTabletIds())
hashCode = hashCode * 8191 + base_tablet_ids.hashCode();
return hashCode;
}
@Override
public int compareTo(TPublishVersionRequest other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTransactionId(), other.isSetTransactionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTransactionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transaction_id, other.transaction_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPartitionVersionInfos(), other.isSetPartitionVersionInfos());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartitionVersionInfos()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_version_infos, other.partition_version_infos);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStrictMode(), other.isSetStrictMode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStrictMode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.strict_mode, other.strict_mode);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBaseTabletIds(), other.isSetBaseTabletIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBaseTabletIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_tablet_ids, other.base_tablet_ids);
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("TPublishVersionRequest(");
boolean first = true;
sb.append("transaction_id:");
sb.append(this.transaction_id);
first = false;
if (!first) sb.append(", ");
sb.append("partition_version_infos:");
if (this.partition_version_infos == null) {
sb.append("null");
} else {
sb.append(this.partition_version_infos);
}
first = false;
if (isSetStrictMode()) {
if (!first) sb.append(", ");
sb.append("strict_mode:");
sb.append(this.strict_mode);
first = false;
}
if (isSetBaseTabletIds()) {
if (!first) sb.append(", ");
sb.append("base_tablet_ids:");
if (this.base_tablet_ids == null) {
sb.append("null");
} else {
sb.append(this.base_tablet_ids);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'transaction_id' because it's a primitive and you chose the non-beans generator.
if (partition_version_infos == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'partition_version_infos' 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 TPublishVersionRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPublishVersionRequestStandardScheme getScheme() {
return new TPublishVersionRequestStandardScheme();
}
}
private static class TPublishVersionRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<TPublishVersionRequest> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TPublishVersionRequest 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: // TRANSACTION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.transaction_id = iprot.readI64();
struct.setTransactionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PARTITION_VERSION_INFOS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list228 = iprot.readListBegin();
struct.partition_version_infos = new java.util.ArrayList<TPartitionVersionInfo>(_list228.size);
@org.apache.thrift.annotation.Nullable TPartitionVersionInfo _elem229;
for (int _i230 = 0; _i230 < _list228.size; ++_i230)
{
_elem229 = new TPartitionVersionInfo();
_elem229.read(iprot);
struct.partition_version_infos.add(_elem229);
}
iprot.readListEnd();
}
struct.setPartitionVersionInfosIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // STRICT_MODE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.strict_mode = iprot.readBool();
struct.setStrictModeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // BASE_TABLET_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
org.apache.thrift.protocol.TSet _set231 = iprot.readSetBegin();
struct.base_tablet_ids = new java.util.HashSet<java.lang.Long>(2*_set231.size);
long _elem232;
for (int _i233 = 0; _i233 < _set231.size; ++_i233)
{
_elem232 = iprot.readI64();
struct.base_tablet_ids.add(_elem232);
}
iprot.readSetEnd();
}
struct.setBaseTabletIdsIsSet(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.isSetTransactionId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'transaction_id' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TPublishVersionRequest struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
oprot.writeI64(struct.transaction_id);
oprot.writeFieldEnd();
if (struct.partition_version_infos != null) {
oprot.writeFieldBegin(PARTITION_VERSION_INFOS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partition_version_infos.size()));
for (TPartitionVersionInfo _iter234 : struct.partition_version_infos)
{
_iter234.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.isSetStrictMode()) {
oprot.writeFieldBegin(STRICT_MODE_FIELD_DESC);
oprot.writeBool(struct.strict_mode);
oprot.writeFieldEnd();
}
if (struct.base_tablet_ids != null) {
if (struct.isSetBaseTabletIds()) {
oprot.writeFieldBegin(BASE_TABLET_IDS_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.base_tablet_ids.size()));
for (long _iter235 : struct.base_tablet_ids)
{
oprot.writeI64(_iter235);
}
oprot.writeSetEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TPublishVersionRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TPublishVersionRequestTupleScheme getScheme() {
return new TPublishVersionRequestTupleScheme();
}
}
private static class TPublishVersionRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<TPublishVersionRequest> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TPublishVersionRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.transaction_id);
{
oprot.writeI32(struct.partition_version_infos.size());
for (TPartitionVersionInfo _iter236 : struct.partition_version_infos)
{
_iter236.write(oprot);
}
}
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetStrictMode()) {
optionals.set(0);
}
if (struct.isSetBaseTabletIds()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetStrictMode()) {
oprot.writeBool(struct.strict_mode);
}
if (struct.isSetBaseTabletIds()) {
{
oprot.writeI32(struct.base_tablet_ids.size());
for (long _iter237 : struct.base_tablet_ids)
{
oprot.writeI64(_iter237);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TPublishVersionRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.transaction_id = iprot.readI64();
struct.setTransactionIdIsSet(true);
{
org.apache.thrift.protocol.TList _list238 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.partition_version_infos = new java.util.ArrayList<TPartitionVersionInfo>(_list238.size);
@org.apache.thrift.annotation.Nullable TPartitionVersionInfo _elem239;
for (int _i240 = 0; _i240 < _list238.size; ++_i240)
{
_elem239 = new TPartitionVersionInfo();
_elem239.read(iprot);
struct.partition_version_infos.add(_elem239);
}
}
struct.setPartitionVersionInfosIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.strict_mode = iprot.readBool();
struct.setStrictModeIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TSet _set241 = iprot.readSetBegin(org.apache.thrift.protocol.TType.I64);
struct.base_tablet_ids = new java.util.HashSet<java.lang.Long>(2*_set241.size);
long _elem242;
for (int _i243 = 0; _i243 < _set241.size; ++_i243)
{
_elem242 = iprot.readI64();
struct.base_tablet_ids.add(_elem242);
}
}
struct.setBaseTabletIdsIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> 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();
}
}