/** * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.xiaomi.infra.galaxy.sds.thrift; import libthrift091.scheme.IScheme; import libthrift091.scheme.SchemeFactory; import libthrift091.scheme.StandardScheme; import libthrift091.scheme.TupleScheme; import libthrift091.protocol.TTupleProtocol; import libthrift091.protocol.TProtocolException; import libthrift091.EncodingUtils; import libthrift091.TException; import libthrift091.async.AsyncMethodCallback; import libthrift091.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) /** * point-in-time recovery * */ @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-12-30") public class PointInTimeRecovery implements libthrift091.TBase<PointInTimeRecovery, PointInTimeRecovery._Fields>, java.io.Serializable, Cloneable, Comparable<PointInTimeRecovery> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("PointInTimeRecovery"); private static final libthrift091.protocol.TField ENABLE_POINT_IN_TIME_RECOVERY_FIELD_DESC = new libthrift091.protocol.TField("enablePointInTimeRecovery", libthrift091.protocol.TType.BOOL, (short)1); private static final libthrift091.protocol.TField TOPIC_NAME_FIELD_DESC = new libthrift091.protocol.TField("topicName", libthrift091.protocol.TType.STRING, (short)2); private static final libthrift091.protocol.TField TTL_FIELD_DESC = new libthrift091.protocol.TField("ttl", libthrift091.protocol.TType.I64, (short)3); private static final libthrift091.protocol.TField SNAPSHOT_PERIOD_FIELD_DESC = new libthrift091.protocol.TField("snapshotPeriod", libthrift091.protocol.TType.I64, (short)4); private static final libthrift091.protocol.TField CREATED_TIMESTAMP_FIELD_DESC = new libthrift091.protocol.TField("createdTimestamp", libthrift091.protocol.TType.I64, (short)5); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new PointInTimeRecoveryStandardSchemeFactory()); schemes.put(TupleScheme.class, new PointInTimeRecoveryTupleSchemeFactory()); } /** * PITR is enabled or not; */ public boolean enablePointInTimeRecovery; // optional /** * topic name, should be stream-enabled and topic ttl >= pitr ttl; */ public String topicName; // optional /** * PITR ttl, include checkpoints and snapshots; */ public long ttl; // optional /** * snapshot period; */ public long snapshotPeriod; // optional /** * created timestamp, output value; */ public long createdTimestamp; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements libthrift091.TFieldIdEnum { /** * PITR is enabled or not; */ ENABLE_POINT_IN_TIME_RECOVERY((short)1, "enablePointInTimeRecovery"), /** * topic name, should be stream-enabled and topic ttl >= pitr ttl; */ TOPIC_NAME((short)2, "topicName"), /** * PITR ttl, include checkpoints and snapshots; */ TTL((short)3, "ttl"), /** * snapshot period; */ SNAPSHOT_PERIOD((short)4, "snapshotPeriod"), /** * created timestamp, output value; */ CREATED_TIMESTAMP((short)5, "createdTimestamp"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // ENABLE_POINT_IN_TIME_RECOVERY return ENABLE_POINT_IN_TIME_RECOVERY; case 2: // TOPIC_NAME return TOPIC_NAME; case 3: // TTL return TTL; case 4: // SNAPSHOT_PERIOD return SNAPSHOT_PERIOD; case 5: // CREATED_TIMESTAMP return CREATED_TIMESTAMP; 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __ENABLEPOINTINTIMERECOVERY_ISSET_ID = 0; private static final int __TTL_ISSET_ID = 1; private static final int __SNAPSHOTPERIOD_ISSET_ID = 2; private static final int __CREATEDTIMESTAMP_ISSET_ID = 3; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.ENABLE_POINT_IN_TIME_RECOVERY,_Fields.TOPIC_NAME,_Fields.TTL,_Fields.SNAPSHOT_PERIOD,_Fields.CREATED_TIMESTAMP}; public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ENABLE_POINT_IN_TIME_RECOVERY, new libthrift091.meta_data.FieldMetaData("enablePointInTimeRecovery", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.BOOL))); tmpMap.put(_Fields.TOPIC_NAME, new libthrift091.meta_data.FieldMetaData("topicName", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING))); tmpMap.put(_Fields.TTL, new libthrift091.meta_data.FieldMetaData("ttl", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64))); tmpMap.put(_Fields.SNAPSHOT_PERIOD, new libthrift091.meta_data.FieldMetaData("snapshotPeriod", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64))); tmpMap.put(_Fields.CREATED_TIMESTAMP, new libthrift091.meta_data.FieldMetaData("createdTimestamp", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(PointInTimeRecovery.class, metaDataMap); } public PointInTimeRecovery() { } /** * Performs a deep copy on <i>other</i>. */ public PointInTimeRecovery(PointInTimeRecovery other) { __isset_bitfield = other.__isset_bitfield; this.enablePointInTimeRecovery = other.enablePointInTimeRecovery; if (other.isSetTopicName()) { this.topicName = other.topicName; } this.ttl = other.ttl; this.snapshotPeriod = other.snapshotPeriod; this.createdTimestamp = other.createdTimestamp; } public PointInTimeRecovery deepCopy() { return new PointInTimeRecovery(this); } @Override public void clear() { setEnablePointInTimeRecoveryIsSet(false); this.enablePointInTimeRecovery = false; this.topicName = null; setTtlIsSet(false); this.ttl = 0; setSnapshotPeriodIsSet(false); this.snapshotPeriod = 0; setCreatedTimestampIsSet(false); this.createdTimestamp = 0; } /** * PITR is enabled or not; */ public boolean isEnablePointInTimeRecovery() { return this.enablePointInTimeRecovery; } /** * PITR is enabled or not; */ public PointInTimeRecovery setEnablePointInTimeRecovery(boolean enablePointInTimeRecovery) { this.enablePointInTimeRecovery = enablePointInTimeRecovery; setEnablePointInTimeRecoveryIsSet(true); return this; } public void unsetEnablePointInTimeRecovery() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLEPOINTINTIMERECOVERY_ISSET_ID); } /** Returns true if field enablePointInTimeRecovery is set (has been assigned a value) and false otherwise */ public boolean isSetEnablePointInTimeRecovery() { return EncodingUtils.testBit(__isset_bitfield, __ENABLEPOINTINTIMERECOVERY_ISSET_ID); } public void setEnablePointInTimeRecoveryIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLEPOINTINTIMERECOVERY_ISSET_ID, value); } /** * topic name, should be stream-enabled and topic ttl >= pitr ttl; */ public String getTopicName() { return this.topicName; } /** * topic name, should be stream-enabled and topic ttl >= pitr ttl; */ public PointInTimeRecovery setTopicName(String topicName) { this.topicName = topicName; return this; } public void unsetTopicName() { this.topicName = null; } /** Returns true if field topicName is set (has been assigned a value) and false otherwise */ public boolean isSetTopicName() { return this.topicName != null; } public void setTopicNameIsSet(boolean value) { if (!value) { this.topicName = null; } } /** * PITR ttl, include checkpoints and snapshots; */ public long getTtl() { return this.ttl; } /** * PITR ttl, include checkpoints and snapshots; */ public PointInTimeRecovery setTtl(long ttl) { this.ttl = ttl; setTtlIsSet(true); return this; } public void unsetTtl() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TTL_ISSET_ID); } /** Returns true if field ttl is set (has been assigned a value) and false otherwise */ public boolean isSetTtl() { return EncodingUtils.testBit(__isset_bitfield, __TTL_ISSET_ID); } public void setTtlIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TTL_ISSET_ID, value); } /** * snapshot period; */ public long getSnapshotPeriod() { return this.snapshotPeriod; } /** * snapshot period; */ public PointInTimeRecovery setSnapshotPeriod(long snapshotPeriod) { this.snapshotPeriod = snapshotPeriod; setSnapshotPeriodIsSet(true); return this; } public void unsetSnapshotPeriod() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SNAPSHOTPERIOD_ISSET_ID); } /** Returns true if field snapshotPeriod is set (has been assigned a value) and false otherwise */ public boolean isSetSnapshotPeriod() { return EncodingUtils.testBit(__isset_bitfield, __SNAPSHOTPERIOD_ISSET_ID); } public void setSnapshotPeriodIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SNAPSHOTPERIOD_ISSET_ID, value); } /** * created timestamp, output value; */ public long getCreatedTimestamp() { return this.createdTimestamp; } /** * created timestamp, output value; */ public PointInTimeRecovery setCreatedTimestamp(long createdTimestamp) { this.createdTimestamp = createdTimestamp; setCreatedTimestampIsSet(true); return this; } public void unsetCreatedTimestamp() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATEDTIMESTAMP_ISSET_ID); } /** Returns true if field createdTimestamp is set (has been assigned a value) and false otherwise */ public boolean isSetCreatedTimestamp() { return EncodingUtils.testBit(__isset_bitfield, __CREATEDTIMESTAMP_ISSET_ID); } public void setCreatedTimestampIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATEDTIMESTAMP_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case ENABLE_POINT_IN_TIME_RECOVERY: if (value == null) { unsetEnablePointInTimeRecovery(); } else { setEnablePointInTimeRecovery((Boolean)value); } break; case TOPIC_NAME: if (value == null) { unsetTopicName(); } else { setTopicName((String)value); } break; case TTL: if (value == null) { unsetTtl(); } else { setTtl((Long)value); } break; case SNAPSHOT_PERIOD: if (value == null) { unsetSnapshotPeriod(); } else { setSnapshotPeriod((Long)value); } break; case CREATED_TIMESTAMP: if (value == null) { unsetCreatedTimestamp(); } else { setCreatedTimestamp((Long)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case ENABLE_POINT_IN_TIME_RECOVERY: return Boolean.valueOf(isEnablePointInTimeRecovery()); case TOPIC_NAME: return getTopicName(); case TTL: return Long.valueOf(getTtl()); case SNAPSHOT_PERIOD: return Long.valueOf(getSnapshotPeriod()); case CREATED_TIMESTAMP: return Long.valueOf(getCreatedTimestamp()); } throw new 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 IllegalArgumentException(); } switch (field) { case ENABLE_POINT_IN_TIME_RECOVERY: return isSetEnablePointInTimeRecovery(); case TOPIC_NAME: return isSetTopicName(); case TTL: return isSetTtl(); case SNAPSHOT_PERIOD: return isSetSnapshotPeriod(); case CREATED_TIMESTAMP: return isSetCreatedTimestamp(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof PointInTimeRecovery) return this.equals((PointInTimeRecovery)that); return false; } public boolean equals(PointInTimeRecovery that) { if (that == null) return false; boolean this_present_enablePointInTimeRecovery = true && this.isSetEnablePointInTimeRecovery(); boolean that_present_enablePointInTimeRecovery = true && that.isSetEnablePointInTimeRecovery(); if (this_present_enablePointInTimeRecovery || that_present_enablePointInTimeRecovery) { if (!(this_present_enablePointInTimeRecovery && that_present_enablePointInTimeRecovery)) return false; if (this.enablePointInTimeRecovery != that.enablePointInTimeRecovery) return false; } boolean this_present_topicName = true && this.isSetTopicName(); boolean that_present_topicName = true && that.isSetTopicName(); if (this_present_topicName || that_present_topicName) { if (!(this_present_topicName && that_present_topicName)) return false; if (!this.topicName.equals(that.topicName)) return false; } boolean this_present_ttl = true && this.isSetTtl(); boolean that_present_ttl = true && that.isSetTtl(); if (this_present_ttl || that_present_ttl) { if (!(this_present_ttl && that_present_ttl)) return false; if (this.ttl != that.ttl) return false; } boolean this_present_snapshotPeriod = true && this.isSetSnapshotPeriod(); boolean that_present_snapshotPeriod = true && that.isSetSnapshotPeriod(); if (this_present_snapshotPeriod || that_present_snapshotPeriod) { if (!(this_present_snapshotPeriod && that_present_snapshotPeriod)) return false; if (this.snapshotPeriod != that.snapshotPeriod) return false; } boolean this_present_createdTimestamp = true && this.isSetCreatedTimestamp(); boolean that_present_createdTimestamp = true && that.isSetCreatedTimestamp(); if (this_present_createdTimestamp || that_present_createdTimestamp) { if (!(this_present_createdTimestamp && that_present_createdTimestamp)) return false; if (this.createdTimestamp != that.createdTimestamp) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_enablePointInTimeRecovery = true && (isSetEnablePointInTimeRecovery()); list.add(present_enablePointInTimeRecovery); if (present_enablePointInTimeRecovery) list.add(enablePointInTimeRecovery); boolean present_topicName = true && (isSetTopicName()); list.add(present_topicName); if (present_topicName) list.add(topicName); boolean present_ttl = true && (isSetTtl()); list.add(present_ttl); if (present_ttl) list.add(ttl); boolean present_snapshotPeriod = true && (isSetSnapshotPeriod()); list.add(present_snapshotPeriod); if (present_snapshotPeriod) list.add(snapshotPeriod); boolean present_createdTimestamp = true && (isSetCreatedTimestamp()); list.add(present_createdTimestamp); if (present_createdTimestamp) list.add(createdTimestamp); return list.hashCode(); } @Override public int compareTo(PointInTimeRecovery other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetEnablePointInTimeRecovery()).compareTo(other.isSetEnablePointInTimeRecovery()); if (lastComparison != 0) { return lastComparison; } if (isSetEnablePointInTimeRecovery()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.enablePointInTimeRecovery, other.enablePointInTimeRecovery); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTopicName()).compareTo(other.isSetTopicName()); if (lastComparison != 0) { return lastComparison; } if (isSetTopicName()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.topicName, other.topicName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTtl()).compareTo(other.isSetTtl()); if (lastComparison != 0) { return lastComparison; } if (isSetTtl()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.ttl, other.ttl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSnapshotPeriod()).compareTo(other.isSetSnapshotPeriod()); if (lastComparison != 0) { return lastComparison; } if (isSetSnapshotPeriod()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.snapshotPeriod, other.snapshotPeriod); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCreatedTimestamp()).compareTo(other.isSetCreatedTimestamp()); if (lastComparison != 0) { return lastComparison; } if (isSetCreatedTimestamp()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.createdTimestamp, other.createdTimestamp); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("PointInTimeRecovery("); boolean first = true; if (isSetEnablePointInTimeRecovery()) { sb.append("enablePointInTimeRecovery:"); sb.append(this.enablePointInTimeRecovery); first = false; } if (isSetTopicName()) { if (!first) sb.append(", "); sb.append("topicName:"); if (this.topicName == null) { sb.append("null"); } else { sb.append(this.topicName); } first = false; } if (isSetTtl()) { if (!first) sb.append(", "); sb.append("ttl:"); sb.append(this.ttl); first = false; } if (isSetSnapshotPeriod()) { if (!first) sb.append(", "); sb.append("snapshotPeriod:"); sb.append(this.snapshotPeriod); first = false; } if (isSetCreatedTimestamp()) { if (!first) sb.append(", "); sb.append("createdTimestamp:"); sb.append(this.createdTimestamp); first = false; } sb.append(")"); return sb.toString(); } public void validate() throws libthrift091.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private static class PointInTimeRecoveryStandardSchemeFactory implements SchemeFactory { public PointInTimeRecoveryStandardScheme getScheme() { return new PointInTimeRecoveryStandardScheme(); } } private static class PointInTimeRecoveryStandardScheme extends StandardScheme<PointInTimeRecovery> { public void read(libthrift091.protocol.TProtocol iprot, PointInTimeRecovery struct) throws libthrift091.TException { libthrift091.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == libthrift091.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // ENABLE_POINT_IN_TIME_RECOVERY if (schemeField.type == libthrift091.protocol.TType.BOOL) { struct.enablePointInTimeRecovery = iprot.readBool(); struct.setEnablePointInTimeRecoveryIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // TOPIC_NAME if (schemeField.type == libthrift091.protocol.TType.STRING) { struct.topicName = iprot.readString(); struct.setTopicNameIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TTL if (schemeField.type == libthrift091.protocol.TType.I64) { struct.ttl = iprot.readI64(); struct.setTtlIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // SNAPSHOT_PERIOD if (schemeField.type == libthrift091.protocol.TType.I64) { struct.snapshotPeriod = iprot.readI64(); struct.setSnapshotPeriodIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // CREATED_TIMESTAMP if (schemeField.type == libthrift091.protocol.TType.I64) { struct.createdTimestamp = iprot.readI64(); struct.setCreatedTimestampIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: libthrift091.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(libthrift091.protocol.TProtocol oprot, PointInTimeRecovery struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetEnablePointInTimeRecovery()) { oprot.writeFieldBegin(ENABLE_POINT_IN_TIME_RECOVERY_FIELD_DESC); oprot.writeBool(struct.enablePointInTimeRecovery); oprot.writeFieldEnd(); } if (struct.topicName != null) { if (struct.isSetTopicName()) { oprot.writeFieldBegin(TOPIC_NAME_FIELD_DESC); oprot.writeString(struct.topicName); oprot.writeFieldEnd(); } } if (struct.isSetTtl()) { oprot.writeFieldBegin(TTL_FIELD_DESC); oprot.writeI64(struct.ttl); oprot.writeFieldEnd(); } if (struct.isSetSnapshotPeriod()) { oprot.writeFieldBegin(SNAPSHOT_PERIOD_FIELD_DESC); oprot.writeI64(struct.snapshotPeriod); oprot.writeFieldEnd(); } if (struct.isSetCreatedTimestamp()) { oprot.writeFieldBegin(CREATED_TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.createdTimestamp); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class PointInTimeRecoveryTupleSchemeFactory implements SchemeFactory { public PointInTimeRecoveryTupleScheme getScheme() { return new PointInTimeRecoveryTupleScheme(); } } private static class PointInTimeRecoveryTupleScheme extends TupleScheme<PointInTimeRecovery> { @Override public void write(libthrift091.protocol.TProtocol prot, PointInTimeRecovery struct) throws libthrift091.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetEnablePointInTimeRecovery()) { optionals.set(0); } if (struct.isSetTopicName()) { optionals.set(1); } if (struct.isSetTtl()) { optionals.set(2); } if (struct.isSetSnapshotPeriod()) { optionals.set(3); } if (struct.isSetCreatedTimestamp()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetEnablePointInTimeRecovery()) { oprot.writeBool(struct.enablePointInTimeRecovery); } if (struct.isSetTopicName()) { oprot.writeString(struct.topicName); } if (struct.isSetTtl()) { oprot.writeI64(struct.ttl); } if (struct.isSetSnapshotPeriod()) { oprot.writeI64(struct.snapshotPeriod); } if (struct.isSetCreatedTimestamp()) { oprot.writeI64(struct.createdTimestamp); } } @Override public void read(libthrift091.protocol.TProtocol prot, PointInTimeRecovery struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.enablePointInTimeRecovery = iprot.readBool(); struct.setEnablePointInTimeRecoveryIsSet(true); } if (incoming.get(1)) { struct.topicName = iprot.readString(); struct.setTopicNameIsSet(true); } if (incoming.get(2)) { struct.ttl = iprot.readI64(); struct.setTtlIsSet(true); } if (incoming.get(3)) { struct.snapshotPeriod = iprot.readI64(); struct.setSnapshotPeriodIsSet(true); } if (incoming.get(4)) { struct.createdTimestamp = iprot.readI64(); struct.setCreatedTimestampIsSet(true); } } } }