TBinlogConfig.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 TBinlogConfig implements org.apache.thrift.TBase<TBinlogConfig, TBinlogConfig._Fields>, java.io.Serializable, Cloneable, Comparable<TBinlogConfig> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBinlogConfig");

  private static final org.apache.thrift.protocol.TField ENABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("enable", org.apache.thrift.protocol.TType.BOOL, (short)1);
  private static final org.apache.thrift.protocol.TField TTL_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("ttl_seconds", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField MAX_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_bytes", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField MAX_HISTORY_NUMS_FIELD_DESC = new org.apache.thrift.protocol.TField("max_history_nums", org.apache.thrift.protocol.TType.I64, (short)4);

  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TBinlogConfigStandardSchemeFactory();
  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TBinlogConfigTupleSchemeFactory();

  public boolean enable; // optional
  public long ttl_seconds; // optional
  public long max_bytes; // optional
  public long max_history_nums; // 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 {
    ENABLE((short)1, "enable"),
    TTL_SECONDS((short)2, "ttl_seconds"),
    MAX_BYTES((short)3, "max_bytes"),
    MAX_HISTORY_NUMS((short)4, "max_history_nums");

    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: // ENABLE
          return ENABLE;
        case 2: // TTL_SECONDS
          return TTL_SECONDS;
        case 3: // MAX_BYTES
          return MAX_BYTES;
        case 4: // MAX_HISTORY_NUMS
          return MAX_HISTORY_NUMS;
        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 __ENABLE_ISSET_ID = 0;
  private static final int __TTL_SECONDS_ISSET_ID = 1;
  private static final int __MAX_BYTES_ISSET_ID = 2;
  private static final int __MAX_HISTORY_NUMS_ISSET_ID = 3;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.ENABLE,_Fields.TTL_SECONDS,_Fields.MAX_BYTES,_Fields.MAX_HISTORY_NUMS};
  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.ENABLE, new org.apache.thrift.meta_data.FieldMetaData("enable", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.TTL_SECONDS, new org.apache.thrift.meta_data.FieldMetaData("ttl_seconds", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.MAX_BYTES, new org.apache.thrift.meta_data.FieldMetaData("max_bytes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.MAX_HISTORY_NUMS, new org.apache.thrift.meta_data.FieldMetaData("max_history_nums", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TBinlogConfig.class, metaDataMap);
  }

  public TBinlogConfig() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TBinlogConfig(TBinlogConfig other) {
    __isset_bitfield = other.__isset_bitfield;
    this.enable = other.enable;
    this.ttl_seconds = other.ttl_seconds;
    this.max_bytes = other.max_bytes;
    this.max_history_nums = other.max_history_nums;
  }

  public TBinlogConfig deepCopy() {
    return new TBinlogConfig(this);
  }

  @Override
  public void clear() {
    setEnableIsSet(false);
    this.enable = false;
    setTtlSecondsIsSet(false);
    this.ttl_seconds = 0;
    setMaxBytesIsSet(false);
    this.max_bytes = 0;
    setMaxHistoryNumsIsSet(false);
    this.max_history_nums = 0;
  }

  public boolean isEnable() {
    return this.enable;
  }

  public TBinlogConfig setEnable(boolean enable) {
    this.enable = enable;
    setEnableIsSet(true);
    return this;
  }

  public void unsetEnable() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLE_ISSET_ID);
  }

  /** Returns true if field enable is set (has been assigned a value) and false otherwise */
  public boolean isSetEnable() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLE_ISSET_ID);
  }

  public void setEnableIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLE_ISSET_ID, value);
  }

  public long getTtlSeconds() {
    return this.ttl_seconds;
  }

  public TBinlogConfig setTtlSeconds(long ttl_seconds) {
    this.ttl_seconds = ttl_seconds;
    setTtlSecondsIsSet(true);
    return this;
  }

  public void unsetTtlSeconds() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TTL_SECONDS_ISSET_ID);
  }

  /** Returns true if field ttl_seconds is set (has been assigned a value) and false otherwise */
  public boolean isSetTtlSeconds() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TTL_SECONDS_ISSET_ID);
  }

  public void setTtlSecondsIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TTL_SECONDS_ISSET_ID, value);
  }

  public long getMaxBytes() {
    return this.max_bytes;
  }

  public TBinlogConfig setMaxBytes(long max_bytes) {
    this.max_bytes = max_bytes;
    setMaxBytesIsSet(true);
    return this;
  }

  public void unsetMaxBytes() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAX_BYTES_ISSET_ID);
  }

  /** Returns true if field max_bytes is set (has been assigned a value) and false otherwise */
  public boolean isSetMaxBytes() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAX_BYTES_ISSET_ID);
  }

  public void setMaxBytesIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAX_BYTES_ISSET_ID, value);
  }

  public long getMaxHistoryNums() {
    return this.max_history_nums;
  }

  public TBinlogConfig setMaxHistoryNums(long max_history_nums) {
    this.max_history_nums = max_history_nums;
    setMaxHistoryNumsIsSet(true);
    return this;
  }

  public void unsetMaxHistoryNums() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAX_HISTORY_NUMS_ISSET_ID);
  }

  /** Returns true if field max_history_nums is set (has been assigned a value) and false otherwise */
  public boolean isSetMaxHistoryNums() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAX_HISTORY_NUMS_ISSET_ID);
  }

  public void setMaxHistoryNumsIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAX_HISTORY_NUMS_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case ENABLE:
      if (value == null) {
        unsetEnable();
      } else {
        setEnable((java.lang.Boolean)value);
      }
      break;

    case TTL_SECONDS:
      if (value == null) {
        unsetTtlSeconds();
      } else {
        setTtlSeconds((java.lang.Long)value);
      }
      break;

    case MAX_BYTES:
      if (value == null) {
        unsetMaxBytes();
      } else {
        setMaxBytes((java.lang.Long)value);
      }
      break;

    case MAX_HISTORY_NUMS:
      if (value == null) {
        unsetMaxHistoryNums();
      } else {
        setMaxHistoryNums((java.lang.Long)value);
      }
      break;

    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.Object getFieldValue(_Fields field) {
    switch (field) {
    case ENABLE:
      return isEnable();

    case TTL_SECONDS:
      return getTtlSeconds();

    case MAX_BYTES:
      return getMaxBytes();

    case MAX_HISTORY_NUMS:
      return getMaxHistoryNums();

    }
    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 ENABLE:
      return isSetEnable();
    case TTL_SECONDS:
      return isSetTtlSeconds();
    case MAX_BYTES:
      return isSetMaxBytes();
    case MAX_HISTORY_NUMS:
      return isSetMaxHistoryNums();
    }
    throw new java.lang.IllegalStateException();
  }

  @Override
  public boolean equals(java.lang.Object that) {
    if (that instanceof TBinlogConfig)
      return this.equals((TBinlogConfig)that);
    return false;
  }

  public boolean equals(TBinlogConfig that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_enable = true && this.isSetEnable();
    boolean that_present_enable = true && that.isSetEnable();
    if (this_present_enable || that_present_enable) {
      if (!(this_present_enable && that_present_enable))
        return false;
      if (this.enable != that.enable)
        return false;
    }

    boolean this_present_ttl_seconds = true && this.isSetTtlSeconds();
    boolean that_present_ttl_seconds = true && that.isSetTtlSeconds();
    if (this_present_ttl_seconds || that_present_ttl_seconds) {
      if (!(this_present_ttl_seconds && that_present_ttl_seconds))
        return false;
      if (this.ttl_seconds != that.ttl_seconds)
        return false;
    }

    boolean this_present_max_bytes = true && this.isSetMaxBytes();
    boolean that_present_max_bytes = true && that.isSetMaxBytes();
    if (this_present_max_bytes || that_present_max_bytes) {
      if (!(this_present_max_bytes && that_present_max_bytes))
        return false;
      if (this.max_bytes != that.max_bytes)
        return false;
    }

    boolean this_present_max_history_nums = true && this.isSetMaxHistoryNums();
    boolean that_present_max_history_nums = true && that.isSetMaxHistoryNums();
    if (this_present_max_history_nums || that_present_max_history_nums) {
      if (!(this_present_max_history_nums && that_present_max_history_nums))
        return false;
      if (this.max_history_nums != that.max_history_nums)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;

    hashCode = hashCode * 8191 + ((isSetEnable()) ? 131071 : 524287);
    if (isSetEnable())
      hashCode = hashCode * 8191 + ((enable) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetTtlSeconds()) ? 131071 : 524287);
    if (isSetTtlSeconds())
      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(ttl_seconds);

    hashCode = hashCode * 8191 + ((isSetMaxBytes()) ? 131071 : 524287);
    if (isSetMaxBytes())
      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(max_bytes);

    hashCode = hashCode * 8191 + ((isSetMaxHistoryNums()) ? 131071 : 524287);
    if (isSetMaxHistoryNums())
      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(max_history_nums);

    return hashCode;
  }

  @Override
  public int compareTo(TBinlogConfig other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetEnable(), other.isSetEnable());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnable()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable, other.enable);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTtlSeconds(), other.isSetTtlSeconds());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTtlSeconds()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ttl_seconds, other.ttl_seconds);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMaxBytes(), other.isSetMaxBytes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxBytes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_bytes, other.max_bytes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMaxHistoryNums(), other.isSetMaxHistoryNums());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxHistoryNums()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_history_nums, other.max_history_nums);
      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("TBinlogConfig(");
    boolean first = true;

    if (isSetEnable()) {
      sb.append("enable:");
      sb.append(this.enable);
      first = false;
    }
    if (isSetTtlSeconds()) {
      if (!first) sb.append(", ");
      sb.append("ttl_seconds:");
      sb.append(this.ttl_seconds);
      first = false;
    }
    if (isSetMaxBytes()) {
      if (!first) sb.append(", ");
      sb.append("max_bytes:");
      sb.append(this.max_bytes);
      first = false;
    }
    if (isSetMaxHistoryNums()) {
      if (!first) sb.append(", ");
      sb.append("max_history_nums:");
      sb.append(this.max_history_nums);
      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 {
      // 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 TBinlogConfigStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TBinlogConfigStandardScheme getScheme() {
      return new TBinlogConfigStandardScheme();
    }
  }

  private static class TBinlogConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme<TBinlogConfig> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TBinlogConfig 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: // ENABLE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.enable = iprot.readBool();
              struct.setEnableIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // TTL_SECONDS
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.ttl_seconds = iprot.readI64();
              struct.setTtlSecondsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // MAX_BYTES
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.max_bytes = iprot.readI64();
              struct.setMaxBytesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // MAX_HISTORY_NUMS
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.max_history_nums = iprot.readI64();
              struct.setMaxHistoryNumsIsSet(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, TBinlogConfig struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.isSetEnable()) {
        oprot.writeFieldBegin(ENABLE_FIELD_DESC);
        oprot.writeBool(struct.enable);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTtlSeconds()) {
        oprot.writeFieldBegin(TTL_SECONDS_FIELD_DESC);
        oprot.writeI64(struct.ttl_seconds);
        oprot.writeFieldEnd();
      }
      if (struct.isSetMaxBytes()) {
        oprot.writeFieldBegin(MAX_BYTES_FIELD_DESC);
        oprot.writeI64(struct.max_bytes);
        oprot.writeFieldEnd();
      }
      if (struct.isSetMaxHistoryNums()) {
        oprot.writeFieldBegin(MAX_HISTORY_NUMS_FIELD_DESC);
        oprot.writeI64(struct.max_history_nums);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class TBinlogConfigTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TBinlogConfigTupleScheme getScheme() {
      return new TBinlogConfigTupleScheme();
    }
  }

  private static class TBinlogConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme<TBinlogConfig> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TBinlogConfig 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.isSetEnable()) {
        optionals.set(0);
      }
      if (struct.isSetTtlSeconds()) {
        optionals.set(1);
      }
      if (struct.isSetMaxBytes()) {
        optionals.set(2);
      }
      if (struct.isSetMaxHistoryNums()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetEnable()) {
        oprot.writeBool(struct.enable);
      }
      if (struct.isSetTtlSeconds()) {
        oprot.writeI64(struct.ttl_seconds);
      }
      if (struct.isSetMaxBytes()) {
        oprot.writeI64(struct.max_bytes);
      }
      if (struct.isSetMaxHistoryNums()) {
        oprot.writeI64(struct.max_history_nums);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TBinlogConfig struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.enable = iprot.readBool();
        struct.setEnableIsSet(true);
      }
      if (incoming.get(1)) {
        struct.ttl_seconds = iprot.readI64();
        struct.setTtlSecondsIsSet(true);
      }
      if (incoming.get(2)) {
        struct.max_bytes = iprot.readI64();
        struct.setMaxBytesIsSet(true);
      }
      if (incoming.get(3)) {
        struct.max_history_nums = iprot.readI64();
        struct.setMaxHistoryNumsIsSet(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();
  }
}