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

  private static final org.apache.thrift.protocol.TField TABLET_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tablet_id", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField TABLET_SCHEMA_FIELD_DESC = new org.apache.thrift.protocol.TField("tablet_schema", org.apache.thrift.protocol.TType.STRUCT, (short)2);
  private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField VERSION_HASH_FIELD_DESC = new org.apache.thrift.protocol.TField("version_hash", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField STORAGE_MEDIUM_FIELD_DESC = new org.apache.thrift.protocol.TField("storage_medium", org.apache.thrift.protocol.TType.I32, (short)5);
  private static final org.apache.thrift.protocol.TField IN_RESTORE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("in_restore_mode", org.apache.thrift.protocol.TType.BOOL, (short)6);
  private static final org.apache.thrift.protocol.TField BASE_TABLET_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("base_tablet_id", org.apache.thrift.protocol.TType.I64, (short)7);
  private static final org.apache.thrift.protocol.TField BASE_SCHEMA_HASH_FIELD_DESC = new org.apache.thrift.protocol.TField("base_schema_hash", org.apache.thrift.protocol.TType.I32, (short)8);
  private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I64, (short)9);
  private static final org.apache.thrift.protocol.TField PARTITION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_id", org.apache.thrift.protocol.TType.I64, (short)10);
  private static final org.apache.thrift.protocol.TField ALLOCATION_TERM_FIELD_DESC = new org.apache.thrift.protocol.TField("allocation_term", org.apache.thrift.protocol.TType.I64, (short)11);
  private static final org.apache.thrift.protocol.TField IS_ECO_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("is_eco_mode", org.apache.thrift.protocol.TType.BOOL, (short)12);
  private static final org.apache.thrift.protocol.TField STORAGE_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("storage_format", org.apache.thrift.protocol.TType.I32, (short)13);
  private static final org.apache.thrift.protocol.TField TABLET_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("tablet_type", org.apache.thrift.protocol.TType.I32, (short)14);
  private static final org.apache.thrift.protocol.TField COMPRESSION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("compression_type", org.apache.thrift.protocol.TType.I32, (short)16);
  private static final org.apache.thrift.protocol.TField REPLICA_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("replica_id", org.apache.thrift.protocol.TType.I64, (short)17);
  private static final org.apache.thrift.protocol.TField ENABLE_UNIQUE_KEY_MERGE_ON_WRITE_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_unique_key_merge_on_write", org.apache.thrift.protocol.TType.BOOL, (short)19);
  private static final org.apache.thrift.protocol.TField STORAGE_POLICY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storage_policy_id", org.apache.thrift.protocol.TType.I64, (short)20);
  private static final org.apache.thrift.protocol.TField BINLOG_CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("binlog_config", org.apache.thrift.protocol.TType.STRUCT, (short)21);
  private static final org.apache.thrift.protocol.TField COMPACTION_POLICY_FIELD_DESC = new org.apache.thrift.protocol.TField("compaction_policy", org.apache.thrift.protocol.TType.STRING, (short)22);
  private static final org.apache.thrift.protocol.TField TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("time_series_compaction_goal_size_mbytes", org.apache.thrift.protocol.TType.I64, (short)23);
  private static final org.apache.thrift.protocol.TField TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD_FIELD_DESC = new org.apache.thrift.protocol.TField("time_series_compaction_file_count_threshold", org.apache.thrift.protocol.TType.I64, (short)24);
  private static final org.apache.thrift.protocol.TField TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("time_series_compaction_time_threshold_seconds", org.apache.thrift.protocol.TType.I64, (short)25);
  private static final org.apache.thrift.protocol.TField TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD_FIELD_DESC = new org.apache.thrift.protocol.TField("time_series_compaction_empty_rowsets_threshold", org.apache.thrift.protocol.TType.I64, (short)26);
  private static final org.apache.thrift.protocol.TField TIME_SERIES_COMPACTION_LEVEL_THRESHOLD_FIELD_DESC = new org.apache.thrift.protocol.TField("time_series_compaction_level_threshold", org.apache.thrift.protocol.TType.I64, (short)27);
  private static final org.apache.thrift.protocol.TField INVERTED_INDEX_STORAGE_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("inverted_index_storage_format", org.apache.thrift.protocol.TType.I32, (short)28);
  private static final org.apache.thrift.protocol.TField INVERTED_INDEX_FILE_STORAGE_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("inverted_index_file_storage_format", org.apache.thrift.protocol.TType.I32, (short)29);
  private static final org.apache.thrift.protocol.TField TDE_ALGORITHM_FIELD_DESC = new org.apache.thrift.protocol.TField("tde_algorithm", org.apache.thrift.protocol.TType.I32, (short)30);
  private static final org.apache.thrift.protocol.TField VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("vertical_compaction_num_columns_per_group", org.apache.thrift.protocol.TType.I32, (short)31);
  private static final org.apache.thrift.protocol.TField IS_IN_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("is_in_memory", org.apache.thrift.protocol.TType.BOOL, (short)1000);
  private static final org.apache.thrift.protocol.TField IS_PERSISTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("is_persistent", org.apache.thrift.protocol.TType.BOOL, (short)1001);

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

  public long tablet_id; // required
  public @org.apache.thrift.annotation.Nullable TTabletSchema tablet_schema; // required
  public long version; // optional
  public long version_hash; // optional
  /**
   * 
   * @see org.apache.doris.thrift.TStorageMedium
   */
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStorageMedium storage_medium; // optional
  public boolean in_restore_mode; // optional
  public long base_tablet_id; // optional
  public int base_schema_hash; // optional
  public long table_id; // optional
  public long partition_id; // optional
  public long allocation_term; // optional
  public boolean is_eco_mode; // optional
  /**
   * 
   * @see TStorageFormat
   */
  public @org.apache.thrift.annotation.Nullable TStorageFormat storage_format; // optional
  /**
   * 
   * @see TTabletType
   */
  public @org.apache.thrift.annotation.Nullable TTabletType tablet_type; // optional
  /**
   * 
   * @see TCompressionType
   */
  public @org.apache.thrift.annotation.Nullable TCompressionType compression_type; // optional
  public long replica_id; // optional
  public boolean enable_unique_key_merge_on_write; // optional
  public long storage_policy_id; // optional
  public @org.apache.thrift.annotation.Nullable TBinlogConfig binlog_config; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String compaction_policy; // optional
  public long time_series_compaction_goal_size_mbytes; // optional
  public long time_series_compaction_file_count_threshold; // optional
  public long time_series_compaction_time_threshold_seconds; // optional
  public long time_series_compaction_empty_rowsets_threshold; // optional
  public long time_series_compaction_level_threshold; // optional
  /**
   * 
   * @see TInvertedIndexStorageFormat
   */
  public @org.apache.thrift.annotation.Nullable TInvertedIndexStorageFormat inverted_index_storage_format; // optional
  /**
   * 
   * @see org.apache.doris.thrift.TInvertedIndexFileStorageFormat
   */
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TInvertedIndexFileStorageFormat inverted_index_file_storage_format; // optional
  /**
   * 
   * @see TEncryptionAlgorithm
   */
  public @org.apache.thrift.annotation.Nullable TEncryptionAlgorithm tde_algorithm; // optional
  public int vertical_compaction_num_columns_per_group; // optional
  public boolean is_in_memory; // optional
  public boolean is_persistent; // 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 {
    TABLET_ID((short)1, "tablet_id"),
    TABLET_SCHEMA((short)2, "tablet_schema"),
    VERSION((short)3, "version"),
    VERSION_HASH((short)4, "version_hash"),
    /**
     * 
     * @see org.apache.doris.thrift.TStorageMedium
     */
    STORAGE_MEDIUM((short)5, "storage_medium"),
    IN_RESTORE_MODE((short)6, "in_restore_mode"),
    BASE_TABLET_ID((short)7, "base_tablet_id"),
    BASE_SCHEMA_HASH((short)8, "base_schema_hash"),
    TABLE_ID((short)9, "table_id"),
    PARTITION_ID((short)10, "partition_id"),
    ALLOCATION_TERM((short)11, "allocation_term"),
    IS_ECO_MODE((short)12, "is_eco_mode"),
    /**
     * 
     * @see TStorageFormat
     */
    STORAGE_FORMAT((short)13, "storage_format"),
    /**
     * 
     * @see TTabletType
     */
    TABLET_TYPE((short)14, "tablet_type"),
    /**
     * 
     * @see TCompressionType
     */
    COMPRESSION_TYPE((short)16, "compression_type"),
    REPLICA_ID((short)17, "replica_id"),
    ENABLE_UNIQUE_KEY_MERGE_ON_WRITE((short)19, "enable_unique_key_merge_on_write"),
    STORAGE_POLICY_ID((short)20, "storage_policy_id"),
    BINLOG_CONFIG((short)21, "binlog_config"),
    COMPACTION_POLICY((short)22, "compaction_policy"),
    TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES((short)23, "time_series_compaction_goal_size_mbytes"),
    TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD((short)24, "time_series_compaction_file_count_threshold"),
    TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS((short)25, "time_series_compaction_time_threshold_seconds"),
    TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD((short)26, "time_series_compaction_empty_rowsets_threshold"),
    TIME_SERIES_COMPACTION_LEVEL_THRESHOLD((short)27, "time_series_compaction_level_threshold"),
    /**
     * 
     * @see TInvertedIndexStorageFormat
     */
    INVERTED_INDEX_STORAGE_FORMAT((short)28, "inverted_index_storage_format"),
    /**
     * 
     * @see org.apache.doris.thrift.TInvertedIndexFileStorageFormat
     */
    INVERTED_INDEX_FILE_STORAGE_FORMAT((short)29, "inverted_index_file_storage_format"),
    /**
     * 
     * @see TEncryptionAlgorithm
     */
    TDE_ALGORITHM((short)30, "tde_algorithm"),
    VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP((short)31, "vertical_compaction_num_columns_per_group"),
    IS_IN_MEMORY((short)1000, "is_in_memory"),
    IS_PERSISTENT((short)1001, "is_persistent");

    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: // TABLET_ID
          return TABLET_ID;
        case 2: // TABLET_SCHEMA
          return TABLET_SCHEMA;
        case 3: // VERSION
          return VERSION;
        case 4: // VERSION_HASH
          return VERSION_HASH;
        case 5: // STORAGE_MEDIUM
          return STORAGE_MEDIUM;
        case 6: // IN_RESTORE_MODE
          return IN_RESTORE_MODE;
        case 7: // BASE_TABLET_ID
          return BASE_TABLET_ID;
        case 8: // BASE_SCHEMA_HASH
          return BASE_SCHEMA_HASH;
        case 9: // TABLE_ID
          return TABLE_ID;
        case 10: // PARTITION_ID
          return PARTITION_ID;
        case 11: // ALLOCATION_TERM
          return ALLOCATION_TERM;
        case 12: // IS_ECO_MODE
          return IS_ECO_MODE;
        case 13: // STORAGE_FORMAT
          return STORAGE_FORMAT;
        case 14: // TABLET_TYPE
          return TABLET_TYPE;
        case 16: // COMPRESSION_TYPE
          return COMPRESSION_TYPE;
        case 17: // REPLICA_ID
          return REPLICA_ID;
        case 19: // ENABLE_UNIQUE_KEY_MERGE_ON_WRITE
          return ENABLE_UNIQUE_KEY_MERGE_ON_WRITE;
        case 20: // STORAGE_POLICY_ID
          return STORAGE_POLICY_ID;
        case 21: // BINLOG_CONFIG
          return BINLOG_CONFIG;
        case 22: // COMPACTION_POLICY
          return COMPACTION_POLICY;
        case 23: // TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES
          return TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES;
        case 24: // TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD
          return TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD;
        case 25: // TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS
          return TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS;
        case 26: // TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD
          return TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD;
        case 27: // TIME_SERIES_COMPACTION_LEVEL_THRESHOLD
          return TIME_SERIES_COMPACTION_LEVEL_THRESHOLD;
        case 28: // INVERTED_INDEX_STORAGE_FORMAT
          return INVERTED_INDEX_STORAGE_FORMAT;
        case 29: // INVERTED_INDEX_FILE_STORAGE_FORMAT
          return INVERTED_INDEX_FILE_STORAGE_FORMAT;
        case 30: // TDE_ALGORITHM
          return TDE_ALGORITHM;
        case 31: // VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP
          return VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP;
        case 1000: // IS_IN_MEMORY
          return IS_IN_MEMORY;
        case 1001: // IS_PERSISTENT
          return IS_PERSISTENT;
        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 __TABLET_ID_ISSET_ID = 0;
  private static final int __VERSION_ISSET_ID = 1;
  private static final int __VERSION_HASH_ISSET_ID = 2;
  private static final int __IN_RESTORE_MODE_ISSET_ID = 3;
  private static final int __BASE_TABLET_ID_ISSET_ID = 4;
  private static final int __BASE_SCHEMA_HASH_ISSET_ID = 5;
  private static final int __TABLE_ID_ISSET_ID = 6;
  private static final int __PARTITION_ID_ISSET_ID = 7;
  private static final int __ALLOCATION_TERM_ISSET_ID = 8;
  private static final int __IS_ECO_MODE_ISSET_ID = 9;
  private static final int __REPLICA_ID_ISSET_ID = 10;
  private static final int __ENABLE_UNIQUE_KEY_MERGE_ON_WRITE_ISSET_ID = 11;
  private static final int __STORAGE_POLICY_ID_ISSET_ID = 12;
  private static final int __TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES_ISSET_ID = 13;
  private static final int __TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD_ISSET_ID = 14;
  private static final int __TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS_ISSET_ID = 15;
  private static final int __TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD_ISSET_ID = 16;
  private static final int __TIME_SERIES_COMPACTION_LEVEL_THRESHOLD_ISSET_ID = 17;
  private static final int __VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP_ISSET_ID = 18;
  private static final int __IS_IN_MEMORY_ISSET_ID = 19;
  private static final int __IS_PERSISTENT_ISSET_ID = 20;
  private int __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.VERSION,_Fields.VERSION_HASH,_Fields.STORAGE_MEDIUM,_Fields.IN_RESTORE_MODE,_Fields.BASE_TABLET_ID,_Fields.BASE_SCHEMA_HASH,_Fields.TABLE_ID,_Fields.PARTITION_ID,_Fields.ALLOCATION_TERM,_Fields.IS_ECO_MODE,_Fields.STORAGE_FORMAT,_Fields.TABLET_TYPE,_Fields.COMPRESSION_TYPE,_Fields.REPLICA_ID,_Fields.ENABLE_UNIQUE_KEY_MERGE_ON_WRITE,_Fields.STORAGE_POLICY_ID,_Fields.BINLOG_CONFIG,_Fields.COMPACTION_POLICY,_Fields.TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES,_Fields.TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD,_Fields.TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS,_Fields.TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD,_Fields.TIME_SERIES_COMPACTION_LEVEL_THRESHOLD,_Fields.INVERTED_INDEX_STORAGE_FORMAT,_Fields.INVERTED_INDEX_FILE_STORAGE_FORMAT,_Fields.TDE_ALGORITHM,_Fields.VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP,_Fields.IS_IN_MEMORY,_Fields.IS_PERSISTENT};
  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.TABLET_ID, new org.apache.thrift.meta_data.FieldMetaData("tablet_id", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "TTabletId")));
    tmpMap.put(_Fields.TABLET_SCHEMA, new org.apache.thrift.meta_data.FieldMetaData("tablet_schema", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTabletSchema.class)));
    tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "TVersion")));
    tmpMap.put(_Fields.VERSION_HASH, new org.apache.thrift.meta_data.FieldMetaData("version_hash", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "TVersionHash")));
    tmpMap.put(_Fields.STORAGE_MEDIUM, new org.apache.thrift.meta_data.FieldMetaData("storage_medium", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TStorageMedium.class)));
    tmpMap.put(_Fields.IN_RESTORE_MODE, new org.apache.thrift.meta_data.FieldMetaData("in_restore_mode", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.BASE_TABLET_ID, new org.apache.thrift.meta_data.FieldMetaData("base_tablet_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "TTabletId")));
    tmpMap.put(_Fields.BASE_SCHEMA_HASH, new org.apache.thrift.meta_data.FieldMetaData("base_schema_hash", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32        , "TSchemaHash")));
    tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.PARTITION_ID, new org.apache.thrift.meta_data.FieldMetaData("partition_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.ALLOCATION_TERM, new org.apache.thrift.meta_data.FieldMetaData("allocation_term", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.IS_ECO_MODE, new org.apache.thrift.meta_data.FieldMetaData("is_eco_mode", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.STORAGE_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("storage_format", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TStorageFormat.class)));
    tmpMap.put(_Fields.TABLET_TYPE, new org.apache.thrift.meta_data.FieldMetaData("tablet_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TTabletType.class)));
    tmpMap.put(_Fields.COMPRESSION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("compression_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TCompressionType.class)));
    tmpMap.put(_Fields.REPLICA_ID, new org.apache.thrift.meta_data.FieldMetaData("replica_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "TReplicaId")));
    tmpMap.put(_Fields.ENABLE_UNIQUE_KEY_MERGE_ON_WRITE, new org.apache.thrift.meta_data.FieldMetaData("enable_unique_key_merge_on_write", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.STORAGE_POLICY_ID, new org.apache.thrift.meta_data.FieldMetaData("storage_policy_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.BINLOG_CONFIG, new org.apache.thrift.meta_data.FieldMetaData("binlog_config", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TBinlogConfig.class)));
    tmpMap.put(_Fields.COMPACTION_POLICY, new org.apache.thrift.meta_data.FieldMetaData("compaction_policy", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES, new org.apache.thrift.meta_data.FieldMetaData("time_series_compaction_goal_size_mbytes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD, new org.apache.thrift.meta_data.FieldMetaData("time_series_compaction_file_count_threshold", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS, new org.apache.thrift.meta_data.FieldMetaData("time_series_compaction_time_threshold_seconds", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD, new org.apache.thrift.meta_data.FieldMetaData("time_series_compaction_empty_rowsets_threshold", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TIME_SERIES_COMPACTION_LEVEL_THRESHOLD, new org.apache.thrift.meta_data.FieldMetaData("time_series_compaction_level_threshold", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.INVERTED_INDEX_STORAGE_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("inverted_index_storage_format", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TInvertedIndexStorageFormat.class)));
    tmpMap.put(_Fields.INVERTED_INDEX_FILE_STORAGE_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("inverted_index_file_storage_format", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TInvertedIndexFileStorageFormat.class)));
    tmpMap.put(_Fields.TDE_ALGORITHM, new org.apache.thrift.meta_data.FieldMetaData("tde_algorithm", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TEncryptionAlgorithm.class)));
    tmpMap.put(_Fields.VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP, new org.apache.thrift.meta_data.FieldMetaData("vertical_compaction_num_columns_per_group", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.IS_IN_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("is_in_memory", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IS_PERSISTENT, new org.apache.thrift.meta_data.FieldMetaData("is_persistent", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCreateTabletReq.class, metaDataMap);
  }

  public TCreateTabletReq() {
    this.compression_type = org.apache.doris.thrift.TCompressionType.LZ4F;

    this.replica_id = 0L;

    this.enable_unique_key_merge_on_write = false;

    this.compaction_policy = "size_based";

    this.time_series_compaction_goal_size_mbytes = 1024L;

    this.time_series_compaction_file_count_threshold = 1000L;

    this.time_series_compaction_time_threshold_seconds = 3600L;

    this.time_series_compaction_empty_rowsets_threshold = 5L;

    this.time_series_compaction_level_threshold = 1L;

    this.inverted_index_storage_format = org.apache.doris.thrift.TInvertedIndexStorageFormat.DEFAULT;

    this.inverted_index_file_storage_format = org.apache.doris.thrift.TInvertedIndexFileStorageFormat.V2;

    this.vertical_compaction_num_columns_per_group = 5;

    this.is_in_memory = false;

    this.is_persistent = false;

  }

  public TCreateTabletReq(
    long tablet_id,
    TTabletSchema tablet_schema)
  {
    this();
    this.tablet_id = tablet_id;
    setTabletIdIsSet(true);
    this.tablet_schema = tablet_schema;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TCreateTabletReq(TCreateTabletReq other) {
    __isset_bitfield = other.__isset_bitfield;
    this.tablet_id = other.tablet_id;
    if (other.isSetTabletSchema()) {
      this.tablet_schema = new TTabletSchema(other.tablet_schema);
    }
    this.version = other.version;
    this.version_hash = other.version_hash;
    if (other.isSetStorageMedium()) {
      this.storage_medium = other.storage_medium;
    }
    this.in_restore_mode = other.in_restore_mode;
    this.base_tablet_id = other.base_tablet_id;
    this.base_schema_hash = other.base_schema_hash;
    this.table_id = other.table_id;
    this.partition_id = other.partition_id;
    this.allocation_term = other.allocation_term;
    this.is_eco_mode = other.is_eco_mode;
    if (other.isSetStorageFormat()) {
      this.storage_format = other.storage_format;
    }
    if (other.isSetTabletType()) {
      this.tablet_type = other.tablet_type;
    }
    if (other.isSetCompressionType()) {
      this.compression_type = other.compression_type;
    }
    this.replica_id = other.replica_id;
    this.enable_unique_key_merge_on_write = other.enable_unique_key_merge_on_write;
    this.storage_policy_id = other.storage_policy_id;
    if (other.isSetBinlogConfig()) {
      this.binlog_config = new TBinlogConfig(other.binlog_config);
    }
    if (other.isSetCompactionPolicy()) {
      this.compaction_policy = other.compaction_policy;
    }
    this.time_series_compaction_goal_size_mbytes = other.time_series_compaction_goal_size_mbytes;
    this.time_series_compaction_file_count_threshold = other.time_series_compaction_file_count_threshold;
    this.time_series_compaction_time_threshold_seconds = other.time_series_compaction_time_threshold_seconds;
    this.time_series_compaction_empty_rowsets_threshold = other.time_series_compaction_empty_rowsets_threshold;
    this.time_series_compaction_level_threshold = other.time_series_compaction_level_threshold;
    if (other.isSetInvertedIndexStorageFormat()) {
      this.inverted_index_storage_format = other.inverted_index_storage_format;
    }
    if (other.isSetInvertedIndexFileStorageFormat()) {
      this.inverted_index_file_storage_format = other.inverted_index_file_storage_format;
    }
    if (other.isSetTdeAlgorithm()) {
      this.tde_algorithm = other.tde_algorithm;
    }
    this.vertical_compaction_num_columns_per_group = other.vertical_compaction_num_columns_per_group;
    this.is_in_memory = other.is_in_memory;
    this.is_persistent = other.is_persistent;
  }

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

  @Override
  public void clear() {
    setTabletIdIsSet(false);
    this.tablet_id = 0;
    this.tablet_schema = null;
    setVersionIsSet(false);
    this.version = 0;
    setVersionHashIsSet(false);
    this.version_hash = 0;
    this.storage_medium = null;
    setInRestoreModeIsSet(false);
    this.in_restore_mode = false;
    setBaseTabletIdIsSet(false);
    this.base_tablet_id = 0;
    setBaseSchemaHashIsSet(false);
    this.base_schema_hash = 0;
    setTableIdIsSet(false);
    this.table_id = 0;
    setPartitionIdIsSet(false);
    this.partition_id = 0;
    setAllocationTermIsSet(false);
    this.allocation_term = 0;
    setIsEcoModeIsSet(false);
    this.is_eco_mode = false;
    this.storage_format = null;
    this.tablet_type = null;
    this.compression_type = org.apache.doris.thrift.TCompressionType.LZ4F;

    this.replica_id = 0L;

    this.enable_unique_key_merge_on_write = false;

    setStoragePolicyIdIsSet(false);
    this.storage_policy_id = 0;
    this.binlog_config = null;
    this.compaction_policy = "size_based";

    this.time_series_compaction_goal_size_mbytes = 1024L;

    this.time_series_compaction_file_count_threshold = 1000L;

    this.time_series_compaction_time_threshold_seconds = 3600L;

    this.time_series_compaction_empty_rowsets_threshold = 5L;

    this.time_series_compaction_level_threshold = 1L;

    this.inverted_index_storage_format = org.apache.doris.thrift.TInvertedIndexStorageFormat.DEFAULT;

    this.inverted_index_file_storage_format = org.apache.doris.thrift.TInvertedIndexFileStorageFormat.V2;

    this.tde_algorithm = null;
    this.vertical_compaction_num_columns_per_group = 5;

    this.is_in_memory = false;

    this.is_persistent = false;

  }

  public long getTabletId() {
    return this.tablet_id;
  }

  public TCreateTabletReq setTabletId(long tablet_id) {
    this.tablet_id = tablet_id;
    setTabletIdIsSet(true);
    return this;
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public TTabletSchema getTabletSchema() {
    return this.tablet_schema;
  }

  public TCreateTabletReq setTabletSchema(@org.apache.thrift.annotation.Nullable TTabletSchema tablet_schema) {
    this.tablet_schema = tablet_schema;
    return this;
  }

  public void unsetTabletSchema() {
    this.tablet_schema = null;
  }

  /** Returns true if field tablet_schema is set (has been assigned a value) and false otherwise */
  public boolean isSetTabletSchema() {
    return this.tablet_schema != null;
  }

  public void setTabletSchemaIsSet(boolean value) {
    if (!value) {
      this.tablet_schema = null;
    }
  }

  public long getVersion() {
    return this.version;
  }

  public TCreateTabletReq setVersion(long version) {
    this.version = version;
    setVersionIsSet(true);
    return this;
  }

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

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

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

  public long getVersionHash() {
    return this.version_hash;
  }

  public TCreateTabletReq setVersionHash(long version_hash) {
    this.version_hash = version_hash;
    setVersionHashIsSet(true);
    return this;
  }

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

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

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

  /**
   * 
   * @see org.apache.doris.thrift.TStorageMedium
   */
  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TStorageMedium getStorageMedium() {
    return this.storage_medium;
  }

  /**
   * 
   * @see org.apache.doris.thrift.TStorageMedium
   */
  public TCreateTabletReq setStorageMedium(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStorageMedium storage_medium) {
    this.storage_medium = storage_medium;
    return this;
  }

  public void unsetStorageMedium() {
    this.storage_medium = null;
  }

  /** Returns true if field storage_medium is set (has been assigned a value) and false otherwise */
  public boolean isSetStorageMedium() {
    return this.storage_medium != null;
  }

  public void setStorageMediumIsSet(boolean value) {
    if (!value) {
      this.storage_medium = null;
    }
  }

  public boolean isInRestoreMode() {
    return this.in_restore_mode;
  }

  public TCreateTabletReq setInRestoreMode(boolean in_restore_mode) {
    this.in_restore_mode = in_restore_mode;
    setInRestoreModeIsSet(true);
    return this;
  }

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

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

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

  public long getBaseTabletId() {
    return this.base_tablet_id;
  }

  public TCreateTabletReq setBaseTabletId(long base_tablet_id) {
    this.base_tablet_id = base_tablet_id;
    setBaseTabletIdIsSet(true);
    return this;
  }

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

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

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

  public int getBaseSchemaHash() {
    return this.base_schema_hash;
  }

  public TCreateTabletReq setBaseSchemaHash(int base_schema_hash) {
    this.base_schema_hash = base_schema_hash;
    setBaseSchemaHashIsSet(true);
    return this;
  }

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

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

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

  public long getTableId() {
    return this.table_id;
  }

  public TCreateTabletReq setTableId(long table_id) {
    this.table_id = table_id;
    setTableIdIsSet(true);
    return this;
  }

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

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

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

  public long getPartitionId() {
    return this.partition_id;
  }

  public TCreateTabletReq setPartitionId(long partition_id) {
    this.partition_id = partition_id;
    setPartitionIdIsSet(true);
    return this;
  }

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

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

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

  public long getAllocationTerm() {
    return this.allocation_term;
  }

  public TCreateTabletReq setAllocationTerm(long allocation_term) {
    this.allocation_term = allocation_term;
    setAllocationTermIsSet(true);
    return this;
  }

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

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

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

  public boolean isIsEcoMode() {
    return this.is_eco_mode;
  }

  public TCreateTabletReq setIsEcoMode(boolean is_eco_mode) {
    this.is_eco_mode = is_eco_mode;
    setIsEcoModeIsSet(true);
    return this;
  }

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

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

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

  /**
   * 
   * @see TStorageFormat
   */
  @org.apache.thrift.annotation.Nullable
  public TStorageFormat getStorageFormat() {
    return this.storage_format;
  }

  /**
   * 
   * @see TStorageFormat
   */
  public TCreateTabletReq setStorageFormat(@org.apache.thrift.annotation.Nullable TStorageFormat storage_format) {
    this.storage_format = storage_format;
    return this;
  }

  public void unsetStorageFormat() {
    this.storage_format = null;
  }

  /** Returns true if field storage_format is set (has been assigned a value) and false otherwise */
  public boolean isSetStorageFormat() {
    return this.storage_format != null;
  }

  public void setStorageFormatIsSet(boolean value) {
    if (!value) {
      this.storage_format = null;
    }
  }

  /**
   * 
   * @see TTabletType
   */
  @org.apache.thrift.annotation.Nullable
  public TTabletType getTabletType() {
    return this.tablet_type;
  }

  /**
   * 
   * @see TTabletType
   */
  public TCreateTabletReq setTabletType(@org.apache.thrift.annotation.Nullable TTabletType tablet_type) {
    this.tablet_type = tablet_type;
    return this;
  }

  public void unsetTabletType() {
    this.tablet_type = null;
  }

  /** Returns true if field tablet_type is set (has been assigned a value) and false otherwise */
  public boolean isSetTabletType() {
    return this.tablet_type != null;
  }

  public void setTabletTypeIsSet(boolean value) {
    if (!value) {
      this.tablet_type = null;
    }
  }

  /**
   * 
   * @see TCompressionType
   */
  @org.apache.thrift.annotation.Nullable
  public TCompressionType getCompressionType() {
    return this.compression_type;
  }

  /**
   * 
   * @see TCompressionType
   */
  public TCreateTabletReq setCompressionType(@org.apache.thrift.annotation.Nullable TCompressionType compression_type) {
    this.compression_type = compression_type;
    return this;
  }

  public void unsetCompressionType() {
    this.compression_type = null;
  }

  /** Returns true if field compression_type is set (has been assigned a value) and false otherwise */
  public boolean isSetCompressionType() {
    return this.compression_type != null;
  }

  public void setCompressionTypeIsSet(boolean value) {
    if (!value) {
      this.compression_type = null;
    }
  }

  public long getReplicaId() {
    return this.replica_id;
  }

  public TCreateTabletReq setReplicaId(long replica_id) {
    this.replica_id = replica_id;
    setReplicaIdIsSet(true);
    return this;
  }

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

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

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

  public boolean isEnableUniqueKeyMergeOnWrite() {
    return this.enable_unique_key_merge_on_write;
  }

  public TCreateTabletReq setEnableUniqueKeyMergeOnWrite(boolean enable_unique_key_merge_on_write) {
    this.enable_unique_key_merge_on_write = enable_unique_key_merge_on_write;
    setEnableUniqueKeyMergeOnWriteIsSet(true);
    return this;
  }

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

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

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

  public long getStoragePolicyId() {
    return this.storage_policy_id;
  }

  public TCreateTabletReq setStoragePolicyId(long storage_policy_id) {
    this.storage_policy_id = storage_policy_id;
    setStoragePolicyIdIsSet(true);
    return this;
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public TBinlogConfig getBinlogConfig() {
    return this.binlog_config;
  }

  public TCreateTabletReq setBinlogConfig(@org.apache.thrift.annotation.Nullable TBinlogConfig binlog_config) {
    this.binlog_config = binlog_config;
    return this;
  }

  public void unsetBinlogConfig() {
    this.binlog_config = null;
  }

  /** Returns true if field binlog_config is set (has been assigned a value) and false otherwise */
  public boolean isSetBinlogConfig() {
    return this.binlog_config != null;
  }

  public void setBinlogConfigIsSet(boolean value) {
    if (!value) {
      this.binlog_config = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.String getCompactionPolicy() {
    return this.compaction_policy;
  }

  public TCreateTabletReq setCompactionPolicy(@org.apache.thrift.annotation.Nullable java.lang.String compaction_policy) {
    this.compaction_policy = compaction_policy;
    return this;
  }

  public void unsetCompactionPolicy() {
    this.compaction_policy = null;
  }

  /** Returns true if field compaction_policy is set (has been assigned a value) and false otherwise */
  public boolean isSetCompactionPolicy() {
    return this.compaction_policy != null;
  }

  public void setCompactionPolicyIsSet(boolean value) {
    if (!value) {
      this.compaction_policy = null;
    }
  }

  public long getTimeSeriesCompactionGoalSizeMbytes() {
    return this.time_series_compaction_goal_size_mbytes;
  }

  public TCreateTabletReq setTimeSeriesCompactionGoalSizeMbytes(long time_series_compaction_goal_size_mbytes) {
    this.time_series_compaction_goal_size_mbytes = time_series_compaction_goal_size_mbytes;
    setTimeSeriesCompactionGoalSizeMbytesIsSet(true);
    return this;
  }

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

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

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

  public long getTimeSeriesCompactionFileCountThreshold() {
    return this.time_series_compaction_file_count_threshold;
  }

  public TCreateTabletReq setTimeSeriesCompactionFileCountThreshold(long time_series_compaction_file_count_threshold) {
    this.time_series_compaction_file_count_threshold = time_series_compaction_file_count_threshold;
    setTimeSeriesCompactionFileCountThresholdIsSet(true);
    return this;
  }

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

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

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

  public long getTimeSeriesCompactionTimeThresholdSeconds() {
    return this.time_series_compaction_time_threshold_seconds;
  }

  public TCreateTabletReq setTimeSeriesCompactionTimeThresholdSeconds(long time_series_compaction_time_threshold_seconds) {
    this.time_series_compaction_time_threshold_seconds = time_series_compaction_time_threshold_seconds;
    setTimeSeriesCompactionTimeThresholdSecondsIsSet(true);
    return this;
  }

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

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

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

  public long getTimeSeriesCompactionEmptyRowsetsThreshold() {
    return this.time_series_compaction_empty_rowsets_threshold;
  }

  public TCreateTabletReq setTimeSeriesCompactionEmptyRowsetsThreshold(long time_series_compaction_empty_rowsets_threshold) {
    this.time_series_compaction_empty_rowsets_threshold = time_series_compaction_empty_rowsets_threshold;
    setTimeSeriesCompactionEmptyRowsetsThresholdIsSet(true);
    return this;
  }

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

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

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

  public long getTimeSeriesCompactionLevelThreshold() {
    return this.time_series_compaction_level_threshold;
  }

  public TCreateTabletReq setTimeSeriesCompactionLevelThreshold(long time_series_compaction_level_threshold) {
    this.time_series_compaction_level_threshold = time_series_compaction_level_threshold;
    setTimeSeriesCompactionLevelThresholdIsSet(true);
    return this;
  }

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

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

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

  /**
   * 
   * @see TInvertedIndexStorageFormat
   */
  @org.apache.thrift.annotation.Nullable
  public TInvertedIndexStorageFormat getInvertedIndexStorageFormat() {
    return this.inverted_index_storage_format;
  }

  /**
   * 
   * @see TInvertedIndexStorageFormat
   */
  public TCreateTabletReq setInvertedIndexStorageFormat(@org.apache.thrift.annotation.Nullable TInvertedIndexStorageFormat inverted_index_storage_format) {
    this.inverted_index_storage_format = inverted_index_storage_format;
    return this;
  }

  public void unsetInvertedIndexStorageFormat() {
    this.inverted_index_storage_format = null;
  }

  /** Returns true if field inverted_index_storage_format is set (has been assigned a value) and false otherwise */
  public boolean isSetInvertedIndexStorageFormat() {
    return this.inverted_index_storage_format != null;
  }

  public void setInvertedIndexStorageFormatIsSet(boolean value) {
    if (!value) {
      this.inverted_index_storage_format = null;
    }
  }

  /**
   * 
   * @see org.apache.doris.thrift.TInvertedIndexFileStorageFormat
   */
  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TInvertedIndexFileStorageFormat getInvertedIndexFileStorageFormat() {
    return this.inverted_index_file_storage_format;
  }

  /**
   * 
   * @see org.apache.doris.thrift.TInvertedIndexFileStorageFormat
   */
  public TCreateTabletReq setInvertedIndexFileStorageFormat(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TInvertedIndexFileStorageFormat inverted_index_file_storage_format) {
    this.inverted_index_file_storage_format = inverted_index_file_storage_format;
    return this;
  }

  public void unsetInvertedIndexFileStorageFormat() {
    this.inverted_index_file_storage_format = null;
  }

  /** Returns true if field inverted_index_file_storage_format is set (has been assigned a value) and false otherwise */
  public boolean isSetInvertedIndexFileStorageFormat() {
    return this.inverted_index_file_storage_format != null;
  }

  public void setInvertedIndexFileStorageFormatIsSet(boolean value) {
    if (!value) {
      this.inverted_index_file_storage_format = null;
    }
  }

  /**
   * 
   * @see TEncryptionAlgorithm
   */
  @org.apache.thrift.annotation.Nullable
  public TEncryptionAlgorithm getTdeAlgorithm() {
    return this.tde_algorithm;
  }

  /**
   * 
   * @see TEncryptionAlgorithm
   */
  public TCreateTabletReq setTdeAlgorithm(@org.apache.thrift.annotation.Nullable TEncryptionAlgorithm tde_algorithm) {
    this.tde_algorithm = tde_algorithm;
    return this;
  }

  public void unsetTdeAlgorithm() {
    this.tde_algorithm = null;
  }

  /** Returns true if field tde_algorithm is set (has been assigned a value) and false otherwise */
  public boolean isSetTdeAlgorithm() {
    return this.tde_algorithm != null;
  }

  public void setTdeAlgorithmIsSet(boolean value) {
    if (!value) {
      this.tde_algorithm = null;
    }
  }

  public int getVerticalCompactionNumColumnsPerGroup() {
    return this.vertical_compaction_num_columns_per_group;
  }

  public TCreateTabletReq setVerticalCompactionNumColumnsPerGroup(int vertical_compaction_num_columns_per_group) {
    this.vertical_compaction_num_columns_per_group = vertical_compaction_num_columns_per_group;
    setVerticalCompactionNumColumnsPerGroupIsSet(true);
    return this;
  }

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

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

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

  public boolean isIsInMemory() {
    return this.is_in_memory;
  }

  public TCreateTabletReq setIsInMemory(boolean is_in_memory) {
    this.is_in_memory = is_in_memory;
    setIsInMemoryIsSet(true);
    return this;
  }

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

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

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

  public boolean isIsPersistent() {
    return this.is_persistent;
  }

  public TCreateTabletReq setIsPersistent(boolean is_persistent) {
    this.is_persistent = is_persistent;
    setIsPersistentIsSet(true);
    return this;
  }

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

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

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

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case TABLET_ID:
      if (value == null) {
        unsetTabletId();
      } else {
        setTabletId((java.lang.Long)value);
      }
      break;

    case TABLET_SCHEMA:
      if (value == null) {
        unsetTabletSchema();
      } else {
        setTabletSchema((TTabletSchema)value);
      }
      break;

    case VERSION:
      if (value == null) {
        unsetVersion();
      } else {
        setVersion((java.lang.Long)value);
      }
      break;

    case VERSION_HASH:
      if (value == null) {
        unsetVersionHash();
      } else {
        setVersionHash((java.lang.Long)value);
      }
      break;

    case STORAGE_MEDIUM:
      if (value == null) {
        unsetStorageMedium();
      } else {
        setStorageMedium((org.apache.doris.thrift.TStorageMedium)value);
      }
      break;

    case IN_RESTORE_MODE:
      if (value == null) {
        unsetInRestoreMode();
      } else {
        setInRestoreMode((java.lang.Boolean)value);
      }
      break;

    case BASE_TABLET_ID:
      if (value == null) {
        unsetBaseTabletId();
      } else {
        setBaseTabletId((java.lang.Long)value);
      }
      break;

    case BASE_SCHEMA_HASH:
      if (value == null) {
        unsetBaseSchemaHash();
      } else {
        setBaseSchemaHash((java.lang.Integer)value);
      }
      break;

    case TABLE_ID:
      if (value == null) {
        unsetTableId();
      } else {
        setTableId((java.lang.Long)value);
      }
      break;

    case PARTITION_ID:
      if (value == null) {
        unsetPartitionId();
      } else {
        setPartitionId((java.lang.Long)value);
      }
      break;

    case ALLOCATION_TERM:
      if (value == null) {
        unsetAllocationTerm();
      } else {
        setAllocationTerm((java.lang.Long)value);
      }
      break;

    case IS_ECO_MODE:
      if (value == null) {
        unsetIsEcoMode();
      } else {
        setIsEcoMode((java.lang.Boolean)value);
      }
      break;

    case STORAGE_FORMAT:
      if (value == null) {
        unsetStorageFormat();
      } else {
        setStorageFormat((TStorageFormat)value);
      }
      break;

    case TABLET_TYPE:
      if (value == null) {
        unsetTabletType();
      } else {
        setTabletType((TTabletType)value);
      }
      break;

    case COMPRESSION_TYPE:
      if (value == null) {
        unsetCompressionType();
      } else {
        setCompressionType((TCompressionType)value);
      }
      break;

    case REPLICA_ID:
      if (value == null) {
        unsetReplicaId();
      } else {
        setReplicaId((java.lang.Long)value);
      }
      break;

    case ENABLE_UNIQUE_KEY_MERGE_ON_WRITE:
      if (value == null) {
        unsetEnableUniqueKeyMergeOnWrite();
      } else {
        setEnableUniqueKeyMergeOnWrite((java.lang.Boolean)value);
      }
      break;

    case STORAGE_POLICY_ID:
      if (value == null) {
        unsetStoragePolicyId();
      } else {
        setStoragePolicyId((java.lang.Long)value);
      }
      break;

    case BINLOG_CONFIG:
      if (value == null) {
        unsetBinlogConfig();
      } else {
        setBinlogConfig((TBinlogConfig)value);
      }
      break;

    case COMPACTION_POLICY:
      if (value == null) {
        unsetCompactionPolicy();
      } else {
        setCompactionPolicy((java.lang.String)value);
      }
      break;

    case TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES:
      if (value == null) {
        unsetTimeSeriesCompactionGoalSizeMbytes();
      } else {
        setTimeSeriesCompactionGoalSizeMbytes((java.lang.Long)value);
      }
      break;

    case TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD:
      if (value == null) {
        unsetTimeSeriesCompactionFileCountThreshold();
      } else {
        setTimeSeriesCompactionFileCountThreshold((java.lang.Long)value);
      }
      break;

    case TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS:
      if (value == null) {
        unsetTimeSeriesCompactionTimeThresholdSeconds();
      } else {
        setTimeSeriesCompactionTimeThresholdSeconds((java.lang.Long)value);
      }
      break;

    case TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD:
      if (value == null) {
        unsetTimeSeriesCompactionEmptyRowsetsThreshold();
      } else {
        setTimeSeriesCompactionEmptyRowsetsThreshold((java.lang.Long)value);
      }
      break;

    case TIME_SERIES_COMPACTION_LEVEL_THRESHOLD:
      if (value == null) {
        unsetTimeSeriesCompactionLevelThreshold();
      } else {
        setTimeSeriesCompactionLevelThreshold((java.lang.Long)value);
      }
      break;

    case INVERTED_INDEX_STORAGE_FORMAT:
      if (value == null) {
        unsetInvertedIndexStorageFormat();
      } else {
        setInvertedIndexStorageFormat((TInvertedIndexStorageFormat)value);
      }
      break;

    case INVERTED_INDEX_FILE_STORAGE_FORMAT:
      if (value == null) {
        unsetInvertedIndexFileStorageFormat();
      } else {
        setInvertedIndexFileStorageFormat((org.apache.doris.thrift.TInvertedIndexFileStorageFormat)value);
      }
      break;

    case TDE_ALGORITHM:
      if (value == null) {
        unsetTdeAlgorithm();
      } else {
        setTdeAlgorithm((TEncryptionAlgorithm)value);
      }
      break;

    case VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP:
      if (value == null) {
        unsetVerticalCompactionNumColumnsPerGroup();
      } else {
        setVerticalCompactionNumColumnsPerGroup((java.lang.Integer)value);
      }
      break;

    case IS_IN_MEMORY:
      if (value == null) {
        unsetIsInMemory();
      } else {
        setIsInMemory((java.lang.Boolean)value);
      }
      break;

    case IS_PERSISTENT:
      if (value == null) {
        unsetIsPersistent();
      } else {
        setIsPersistent((java.lang.Boolean)value);
      }
      break;

    }
  }

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

    case TABLET_SCHEMA:
      return getTabletSchema();

    case VERSION:
      return getVersion();

    case VERSION_HASH:
      return getVersionHash();

    case STORAGE_MEDIUM:
      return getStorageMedium();

    case IN_RESTORE_MODE:
      return isInRestoreMode();

    case BASE_TABLET_ID:
      return getBaseTabletId();

    case BASE_SCHEMA_HASH:
      return getBaseSchemaHash();

    case TABLE_ID:
      return getTableId();

    case PARTITION_ID:
      return getPartitionId();

    case ALLOCATION_TERM:
      return getAllocationTerm();

    case IS_ECO_MODE:
      return isIsEcoMode();

    case STORAGE_FORMAT:
      return getStorageFormat();

    case TABLET_TYPE:
      return getTabletType();

    case COMPRESSION_TYPE:
      return getCompressionType();

    case REPLICA_ID:
      return getReplicaId();

    case ENABLE_UNIQUE_KEY_MERGE_ON_WRITE:
      return isEnableUniqueKeyMergeOnWrite();

    case STORAGE_POLICY_ID:
      return getStoragePolicyId();

    case BINLOG_CONFIG:
      return getBinlogConfig();

    case COMPACTION_POLICY:
      return getCompactionPolicy();

    case TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES:
      return getTimeSeriesCompactionGoalSizeMbytes();

    case TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD:
      return getTimeSeriesCompactionFileCountThreshold();

    case TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS:
      return getTimeSeriesCompactionTimeThresholdSeconds();

    case TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD:
      return getTimeSeriesCompactionEmptyRowsetsThreshold();

    case TIME_SERIES_COMPACTION_LEVEL_THRESHOLD:
      return getTimeSeriesCompactionLevelThreshold();

    case INVERTED_INDEX_STORAGE_FORMAT:
      return getInvertedIndexStorageFormat();

    case INVERTED_INDEX_FILE_STORAGE_FORMAT:
      return getInvertedIndexFileStorageFormat();

    case TDE_ALGORITHM:
      return getTdeAlgorithm();

    case VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP:
      return getVerticalCompactionNumColumnsPerGroup();

    case IS_IN_MEMORY:
      return isIsInMemory();

    case IS_PERSISTENT:
      return isIsPersistent();

    }
    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 TABLET_ID:
      return isSetTabletId();
    case TABLET_SCHEMA:
      return isSetTabletSchema();
    case VERSION:
      return isSetVersion();
    case VERSION_HASH:
      return isSetVersionHash();
    case STORAGE_MEDIUM:
      return isSetStorageMedium();
    case IN_RESTORE_MODE:
      return isSetInRestoreMode();
    case BASE_TABLET_ID:
      return isSetBaseTabletId();
    case BASE_SCHEMA_HASH:
      return isSetBaseSchemaHash();
    case TABLE_ID:
      return isSetTableId();
    case PARTITION_ID:
      return isSetPartitionId();
    case ALLOCATION_TERM:
      return isSetAllocationTerm();
    case IS_ECO_MODE:
      return isSetIsEcoMode();
    case STORAGE_FORMAT:
      return isSetStorageFormat();
    case TABLET_TYPE:
      return isSetTabletType();
    case COMPRESSION_TYPE:
      return isSetCompressionType();
    case REPLICA_ID:
      return isSetReplicaId();
    case ENABLE_UNIQUE_KEY_MERGE_ON_WRITE:
      return isSetEnableUniqueKeyMergeOnWrite();
    case STORAGE_POLICY_ID:
      return isSetStoragePolicyId();
    case BINLOG_CONFIG:
      return isSetBinlogConfig();
    case COMPACTION_POLICY:
      return isSetCompactionPolicy();
    case TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES:
      return isSetTimeSeriesCompactionGoalSizeMbytes();
    case TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD:
      return isSetTimeSeriesCompactionFileCountThreshold();
    case TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS:
      return isSetTimeSeriesCompactionTimeThresholdSeconds();
    case TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD:
      return isSetTimeSeriesCompactionEmptyRowsetsThreshold();
    case TIME_SERIES_COMPACTION_LEVEL_THRESHOLD:
      return isSetTimeSeriesCompactionLevelThreshold();
    case INVERTED_INDEX_STORAGE_FORMAT:
      return isSetInvertedIndexStorageFormat();
    case INVERTED_INDEX_FILE_STORAGE_FORMAT:
      return isSetInvertedIndexFileStorageFormat();
    case TDE_ALGORITHM:
      return isSetTdeAlgorithm();
    case VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP:
      return isSetVerticalCompactionNumColumnsPerGroup();
    case IS_IN_MEMORY:
      return isSetIsInMemory();
    case IS_PERSISTENT:
      return isSetIsPersistent();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_tablet_id = true;
    boolean that_present_tablet_id = true;
    if (this_present_tablet_id || that_present_tablet_id) {
      if (!(this_present_tablet_id && that_present_tablet_id))
        return false;
      if (this.tablet_id != that.tablet_id)
        return false;
    }

    boolean this_present_tablet_schema = true && this.isSetTabletSchema();
    boolean that_present_tablet_schema = true && that.isSetTabletSchema();
    if (this_present_tablet_schema || that_present_tablet_schema) {
      if (!(this_present_tablet_schema && that_present_tablet_schema))
        return false;
      if (!this.tablet_schema.equals(that.tablet_schema))
        return false;
    }

    boolean this_present_version = true && this.isSetVersion();
    boolean that_present_version = true && that.isSetVersion();
    if (this_present_version || that_present_version) {
      if (!(this_present_version && that_present_version))
        return false;
      if (this.version != that.version)
        return false;
    }

    boolean this_present_version_hash = true && this.isSetVersionHash();
    boolean that_present_version_hash = true && that.isSetVersionHash();
    if (this_present_version_hash || that_present_version_hash) {
      if (!(this_present_version_hash && that_present_version_hash))
        return false;
      if (this.version_hash != that.version_hash)
        return false;
    }

    boolean this_present_storage_medium = true && this.isSetStorageMedium();
    boolean that_present_storage_medium = true && that.isSetStorageMedium();
    if (this_present_storage_medium || that_present_storage_medium) {
      if (!(this_present_storage_medium && that_present_storage_medium))
        return false;
      if (!this.storage_medium.equals(that.storage_medium))
        return false;
    }

    boolean this_present_in_restore_mode = true && this.isSetInRestoreMode();
    boolean that_present_in_restore_mode = true && that.isSetInRestoreMode();
    if (this_present_in_restore_mode || that_present_in_restore_mode) {
      if (!(this_present_in_restore_mode && that_present_in_restore_mode))
        return false;
      if (this.in_restore_mode != that.in_restore_mode)
        return false;
    }

    boolean this_present_base_tablet_id = true && this.isSetBaseTabletId();
    boolean that_present_base_tablet_id = true && that.isSetBaseTabletId();
    if (this_present_base_tablet_id || that_present_base_tablet_id) {
      if (!(this_present_base_tablet_id && that_present_base_tablet_id))
        return false;
      if (this.base_tablet_id != that.base_tablet_id)
        return false;
    }

    boolean this_present_base_schema_hash = true && this.isSetBaseSchemaHash();
    boolean that_present_base_schema_hash = true && that.isSetBaseSchemaHash();
    if (this_present_base_schema_hash || that_present_base_schema_hash) {
      if (!(this_present_base_schema_hash && that_present_base_schema_hash))
        return false;
      if (this.base_schema_hash != that.base_schema_hash)
        return false;
    }

    boolean this_present_table_id = true && this.isSetTableId();
    boolean that_present_table_id = true && that.isSetTableId();
    if (this_present_table_id || that_present_table_id) {
      if (!(this_present_table_id && that_present_table_id))
        return false;
      if (this.table_id != that.table_id)
        return false;
    }

    boolean this_present_partition_id = true && this.isSetPartitionId();
    boolean that_present_partition_id = true && that.isSetPartitionId();
    if (this_present_partition_id || that_present_partition_id) {
      if (!(this_present_partition_id && that_present_partition_id))
        return false;
      if (this.partition_id != that.partition_id)
        return false;
    }

    boolean this_present_allocation_term = true && this.isSetAllocationTerm();
    boolean that_present_allocation_term = true && that.isSetAllocationTerm();
    if (this_present_allocation_term || that_present_allocation_term) {
      if (!(this_present_allocation_term && that_present_allocation_term))
        return false;
      if (this.allocation_term != that.allocation_term)
        return false;
    }

    boolean this_present_is_eco_mode = true && this.isSetIsEcoMode();
    boolean that_present_is_eco_mode = true && that.isSetIsEcoMode();
    if (this_present_is_eco_mode || that_present_is_eco_mode) {
      if (!(this_present_is_eco_mode && that_present_is_eco_mode))
        return false;
      if (this.is_eco_mode != that.is_eco_mode)
        return false;
    }

    boolean this_present_storage_format = true && this.isSetStorageFormat();
    boolean that_present_storage_format = true && that.isSetStorageFormat();
    if (this_present_storage_format || that_present_storage_format) {
      if (!(this_present_storage_format && that_present_storage_format))
        return false;
      if (!this.storage_format.equals(that.storage_format))
        return false;
    }

    boolean this_present_tablet_type = true && this.isSetTabletType();
    boolean that_present_tablet_type = true && that.isSetTabletType();
    if (this_present_tablet_type || that_present_tablet_type) {
      if (!(this_present_tablet_type && that_present_tablet_type))
        return false;
      if (!this.tablet_type.equals(that.tablet_type))
        return false;
    }

    boolean this_present_compression_type = true && this.isSetCompressionType();
    boolean that_present_compression_type = true && that.isSetCompressionType();
    if (this_present_compression_type || that_present_compression_type) {
      if (!(this_present_compression_type && that_present_compression_type))
        return false;
      if (!this.compression_type.equals(that.compression_type))
        return false;
    }

    boolean this_present_replica_id = true && this.isSetReplicaId();
    boolean that_present_replica_id = true && that.isSetReplicaId();
    if (this_present_replica_id || that_present_replica_id) {
      if (!(this_present_replica_id && that_present_replica_id))
        return false;
      if (this.replica_id != that.replica_id)
        return false;
    }

    boolean this_present_enable_unique_key_merge_on_write = true && this.isSetEnableUniqueKeyMergeOnWrite();
    boolean that_present_enable_unique_key_merge_on_write = true && that.isSetEnableUniqueKeyMergeOnWrite();
    if (this_present_enable_unique_key_merge_on_write || that_present_enable_unique_key_merge_on_write) {
      if (!(this_present_enable_unique_key_merge_on_write && that_present_enable_unique_key_merge_on_write))
        return false;
      if (this.enable_unique_key_merge_on_write != that.enable_unique_key_merge_on_write)
        return false;
    }

    boolean this_present_storage_policy_id = true && this.isSetStoragePolicyId();
    boolean that_present_storage_policy_id = true && that.isSetStoragePolicyId();
    if (this_present_storage_policy_id || that_present_storage_policy_id) {
      if (!(this_present_storage_policy_id && that_present_storage_policy_id))
        return false;
      if (this.storage_policy_id != that.storage_policy_id)
        return false;
    }

    boolean this_present_binlog_config = true && this.isSetBinlogConfig();
    boolean that_present_binlog_config = true && that.isSetBinlogConfig();
    if (this_present_binlog_config || that_present_binlog_config) {
      if (!(this_present_binlog_config && that_present_binlog_config))
        return false;
      if (!this.binlog_config.equals(that.binlog_config))
        return false;
    }

    boolean this_present_compaction_policy = true && this.isSetCompactionPolicy();
    boolean that_present_compaction_policy = true && that.isSetCompactionPolicy();
    if (this_present_compaction_policy || that_present_compaction_policy) {
      if (!(this_present_compaction_policy && that_present_compaction_policy))
        return false;
      if (!this.compaction_policy.equals(that.compaction_policy))
        return false;
    }

    boolean this_present_time_series_compaction_goal_size_mbytes = true && this.isSetTimeSeriesCompactionGoalSizeMbytes();
    boolean that_present_time_series_compaction_goal_size_mbytes = true && that.isSetTimeSeriesCompactionGoalSizeMbytes();
    if (this_present_time_series_compaction_goal_size_mbytes || that_present_time_series_compaction_goal_size_mbytes) {
      if (!(this_present_time_series_compaction_goal_size_mbytes && that_present_time_series_compaction_goal_size_mbytes))
        return false;
      if (this.time_series_compaction_goal_size_mbytes != that.time_series_compaction_goal_size_mbytes)
        return false;
    }

    boolean this_present_time_series_compaction_file_count_threshold = true && this.isSetTimeSeriesCompactionFileCountThreshold();
    boolean that_present_time_series_compaction_file_count_threshold = true && that.isSetTimeSeriesCompactionFileCountThreshold();
    if (this_present_time_series_compaction_file_count_threshold || that_present_time_series_compaction_file_count_threshold) {
      if (!(this_present_time_series_compaction_file_count_threshold && that_present_time_series_compaction_file_count_threshold))
        return false;
      if (this.time_series_compaction_file_count_threshold != that.time_series_compaction_file_count_threshold)
        return false;
    }

    boolean this_present_time_series_compaction_time_threshold_seconds = true && this.isSetTimeSeriesCompactionTimeThresholdSeconds();
    boolean that_present_time_series_compaction_time_threshold_seconds = true && that.isSetTimeSeriesCompactionTimeThresholdSeconds();
    if (this_present_time_series_compaction_time_threshold_seconds || that_present_time_series_compaction_time_threshold_seconds) {
      if (!(this_present_time_series_compaction_time_threshold_seconds && that_present_time_series_compaction_time_threshold_seconds))
        return false;
      if (this.time_series_compaction_time_threshold_seconds != that.time_series_compaction_time_threshold_seconds)
        return false;
    }

    boolean this_present_time_series_compaction_empty_rowsets_threshold = true && this.isSetTimeSeriesCompactionEmptyRowsetsThreshold();
    boolean that_present_time_series_compaction_empty_rowsets_threshold = true && that.isSetTimeSeriesCompactionEmptyRowsetsThreshold();
    if (this_present_time_series_compaction_empty_rowsets_threshold || that_present_time_series_compaction_empty_rowsets_threshold) {
      if (!(this_present_time_series_compaction_empty_rowsets_threshold && that_present_time_series_compaction_empty_rowsets_threshold))
        return false;
      if (this.time_series_compaction_empty_rowsets_threshold != that.time_series_compaction_empty_rowsets_threshold)
        return false;
    }

    boolean this_present_time_series_compaction_level_threshold = true && this.isSetTimeSeriesCompactionLevelThreshold();
    boolean that_present_time_series_compaction_level_threshold = true && that.isSetTimeSeriesCompactionLevelThreshold();
    if (this_present_time_series_compaction_level_threshold || that_present_time_series_compaction_level_threshold) {
      if (!(this_present_time_series_compaction_level_threshold && that_present_time_series_compaction_level_threshold))
        return false;
      if (this.time_series_compaction_level_threshold != that.time_series_compaction_level_threshold)
        return false;
    }

    boolean this_present_inverted_index_storage_format = true && this.isSetInvertedIndexStorageFormat();
    boolean that_present_inverted_index_storage_format = true && that.isSetInvertedIndexStorageFormat();
    if (this_present_inverted_index_storage_format || that_present_inverted_index_storage_format) {
      if (!(this_present_inverted_index_storage_format && that_present_inverted_index_storage_format))
        return false;
      if (!this.inverted_index_storage_format.equals(that.inverted_index_storage_format))
        return false;
    }

    boolean this_present_inverted_index_file_storage_format = true && this.isSetInvertedIndexFileStorageFormat();
    boolean that_present_inverted_index_file_storage_format = true && that.isSetInvertedIndexFileStorageFormat();
    if (this_present_inverted_index_file_storage_format || that_present_inverted_index_file_storage_format) {
      if (!(this_present_inverted_index_file_storage_format && that_present_inverted_index_file_storage_format))
        return false;
      if (!this.inverted_index_file_storage_format.equals(that.inverted_index_file_storage_format))
        return false;
    }

    boolean this_present_tde_algorithm = true && this.isSetTdeAlgorithm();
    boolean that_present_tde_algorithm = true && that.isSetTdeAlgorithm();
    if (this_present_tde_algorithm || that_present_tde_algorithm) {
      if (!(this_present_tde_algorithm && that_present_tde_algorithm))
        return false;
      if (!this.tde_algorithm.equals(that.tde_algorithm))
        return false;
    }

    boolean this_present_vertical_compaction_num_columns_per_group = true && this.isSetVerticalCompactionNumColumnsPerGroup();
    boolean that_present_vertical_compaction_num_columns_per_group = true && that.isSetVerticalCompactionNumColumnsPerGroup();
    if (this_present_vertical_compaction_num_columns_per_group || that_present_vertical_compaction_num_columns_per_group) {
      if (!(this_present_vertical_compaction_num_columns_per_group && that_present_vertical_compaction_num_columns_per_group))
        return false;
      if (this.vertical_compaction_num_columns_per_group != that.vertical_compaction_num_columns_per_group)
        return false;
    }

    boolean this_present_is_in_memory = true && this.isSetIsInMemory();
    boolean that_present_is_in_memory = true && that.isSetIsInMemory();
    if (this_present_is_in_memory || that_present_is_in_memory) {
      if (!(this_present_is_in_memory && that_present_is_in_memory))
        return false;
      if (this.is_in_memory != that.is_in_memory)
        return false;
    }

    boolean this_present_is_persistent = true && this.isSetIsPersistent();
    boolean that_present_is_persistent = true && that.isSetIsPersistent();
    if (this_present_is_persistent || that_present_is_persistent) {
      if (!(this_present_is_persistent && that_present_is_persistent))
        return false;
      if (this.is_persistent != that.is_persistent)
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(tablet_id);

    hashCode = hashCode * 8191 + ((isSetTabletSchema()) ? 131071 : 524287);
    if (isSetTabletSchema())
      hashCode = hashCode * 8191 + tablet_schema.hashCode();

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

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

    hashCode = hashCode * 8191 + ((isSetStorageMedium()) ? 131071 : 524287);
    if (isSetStorageMedium())
      hashCode = hashCode * 8191 + storage_medium.getValue();

    hashCode = hashCode * 8191 + ((isSetInRestoreMode()) ? 131071 : 524287);
    if (isSetInRestoreMode())
      hashCode = hashCode * 8191 + ((in_restore_mode) ? 131071 : 524287);

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

    hashCode = hashCode * 8191 + ((isSetBaseSchemaHash()) ? 131071 : 524287);
    if (isSetBaseSchemaHash())
      hashCode = hashCode * 8191 + base_schema_hash;

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

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

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

    hashCode = hashCode * 8191 + ((isSetIsEcoMode()) ? 131071 : 524287);
    if (isSetIsEcoMode())
      hashCode = hashCode * 8191 + ((is_eco_mode) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetStorageFormat()) ? 131071 : 524287);
    if (isSetStorageFormat())
      hashCode = hashCode * 8191 + storage_format.getValue();

    hashCode = hashCode * 8191 + ((isSetTabletType()) ? 131071 : 524287);
    if (isSetTabletType())
      hashCode = hashCode * 8191 + tablet_type.getValue();

    hashCode = hashCode * 8191 + ((isSetCompressionType()) ? 131071 : 524287);
    if (isSetCompressionType())
      hashCode = hashCode * 8191 + compression_type.getValue();

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

    hashCode = hashCode * 8191 + ((isSetEnableUniqueKeyMergeOnWrite()) ? 131071 : 524287);
    if (isSetEnableUniqueKeyMergeOnWrite())
      hashCode = hashCode * 8191 + ((enable_unique_key_merge_on_write) ? 131071 : 524287);

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

    hashCode = hashCode * 8191 + ((isSetBinlogConfig()) ? 131071 : 524287);
    if (isSetBinlogConfig())
      hashCode = hashCode * 8191 + binlog_config.hashCode();

    hashCode = hashCode * 8191 + ((isSetCompactionPolicy()) ? 131071 : 524287);
    if (isSetCompactionPolicy())
      hashCode = hashCode * 8191 + compaction_policy.hashCode();

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

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

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

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

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

    hashCode = hashCode * 8191 + ((isSetInvertedIndexStorageFormat()) ? 131071 : 524287);
    if (isSetInvertedIndexStorageFormat())
      hashCode = hashCode * 8191 + inverted_index_storage_format.getValue();

    hashCode = hashCode * 8191 + ((isSetInvertedIndexFileStorageFormat()) ? 131071 : 524287);
    if (isSetInvertedIndexFileStorageFormat())
      hashCode = hashCode * 8191 + inverted_index_file_storage_format.getValue();

    hashCode = hashCode * 8191 + ((isSetTdeAlgorithm()) ? 131071 : 524287);
    if (isSetTdeAlgorithm())
      hashCode = hashCode * 8191 + tde_algorithm.getValue();

    hashCode = hashCode * 8191 + ((isSetVerticalCompactionNumColumnsPerGroup()) ? 131071 : 524287);
    if (isSetVerticalCompactionNumColumnsPerGroup())
      hashCode = hashCode * 8191 + vertical_compaction_num_columns_per_group;

    hashCode = hashCode * 8191 + ((isSetIsInMemory()) ? 131071 : 524287);
    if (isSetIsInMemory())
      hashCode = hashCode * 8191 + ((is_in_memory) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetIsPersistent()) ? 131071 : 524287);
    if (isSetIsPersistent())
      hashCode = hashCode * 8191 + ((is_persistent) ? 131071 : 524287);

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetTabletId(), other.isSetTabletId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTabletId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablet_id, other.tablet_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTabletSchema(), other.isSetTabletSchema());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTabletSchema()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablet_schema, other.tablet_schema);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVersion()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetVersionHash(), other.isSetVersionHash());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVersionHash()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version_hash, other.version_hash);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStorageMedium(), other.isSetStorageMedium());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStorageMedium()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storage_medium, other.storage_medium);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetInRestoreMode(), other.isSetInRestoreMode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInRestoreMode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.in_restore_mode, other.in_restore_mode);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBaseTabletId(), other.isSetBaseTabletId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBaseTabletId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_tablet_id, other.base_tablet_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBaseSchemaHash(), other.isSetBaseSchemaHash());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBaseSchemaHash()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_schema_hash, other.base_schema_hash);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableId(), other.isSetTableId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_id, other.table_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPartitionId(), other.isSetPartitionId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPartitionId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_id, other.partition_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAllocationTerm(), other.isSetAllocationTerm());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAllocationTerm()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allocation_term, other.allocation_term);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsEcoMode(), other.isSetIsEcoMode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsEcoMode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_eco_mode, other.is_eco_mode);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStorageFormat(), other.isSetStorageFormat());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStorageFormat()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storage_format, other.storage_format);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTabletType(), other.isSetTabletType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTabletType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablet_type, other.tablet_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCompressionType(), other.isSetCompressionType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCompressionType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compression_type, other.compression_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReplicaId(), other.isSetReplicaId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReplicaId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replica_id, other.replica_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEnableUniqueKeyMergeOnWrite(), other.isSetEnableUniqueKeyMergeOnWrite());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnableUniqueKeyMergeOnWrite()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_unique_key_merge_on_write, other.enable_unique_key_merge_on_write);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStoragePolicyId(), other.isSetStoragePolicyId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStoragePolicyId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storage_policy_id, other.storage_policy_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBinlogConfig(), other.isSetBinlogConfig());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBinlogConfig()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binlog_config, other.binlog_config);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCompactionPolicy(), other.isSetCompactionPolicy());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCompactionPolicy()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compaction_policy, other.compaction_policy);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTimeSeriesCompactionGoalSizeMbytes(), other.isSetTimeSeriesCompactionGoalSizeMbytes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimeSeriesCompactionGoalSizeMbytes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time_series_compaction_goal_size_mbytes, other.time_series_compaction_goal_size_mbytes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTimeSeriesCompactionFileCountThreshold(), other.isSetTimeSeriesCompactionFileCountThreshold());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimeSeriesCompactionFileCountThreshold()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time_series_compaction_file_count_threshold, other.time_series_compaction_file_count_threshold);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTimeSeriesCompactionTimeThresholdSeconds(), other.isSetTimeSeriesCompactionTimeThresholdSeconds());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimeSeriesCompactionTimeThresholdSeconds()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time_series_compaction_time_threshold_seconds, other.time_series_compaction_time_threshold_seconds);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTimeSeriesCompactionEmptyRowsetsThreshold(), other.isSetTimeSeriesCompactionEmptyRowsetsThreshold());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimeSeriesCompactionEmptyRowsetsThreshold()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time_series_compaction_empty_rowsets_threshold, other.time_series_compaction_empty_rowsets_threshold);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTimeSeriesCompactionLevelThreshold(), other.isSetTimeSeriesCompactionLevelThreshold());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimeSeriesCompactionLevelThreshold()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time_series_compaction_level_threshold, other.time_series_compaction_level_threshold);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetInvertedIndexStorageFormat(), other.isSetInvertedIndexStorageFormat());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInvertedIndexStorageFormat()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inverted_index_storage_format, other.inverted_index_storage_format);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetInvertedIndexFileStorageFormat(), other.isSetInvertedIndexFileStorageFormat());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInvertedIndexFileStorageFormat()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inverted_index_file_storage_format, other.inverted_index_file_storage_format);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTdeAlgorithm(), other.isSetTdeAlgorithm());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTdeAlgorithm()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tde_algorithm, other.tde_algorithm);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetVerticalCompactionNumColumnsPerGroup(), other.isSetVerticalCompactionNumColumnsPerGroup());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVerticalCompactionNumColumnsPerGroup()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vertical_compaction_num_columns_per_group, other.vertical_compaction_num_columns_per_group);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsInMemory(), other.isSetIsInMemory());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsInMemory()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_in_memory, other.is_in_memory);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsPersistent(), other.isSetIsPersistent());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsPersistent()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_persistent, other.is_persistent);
      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("TCreateTabletReq(");
    boolean first = true;

    sb.append("tablet_id:");
    sb.append(this.tablet_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("tablet_schema:");
    if (this.tablet_schema == null) {
      sb.append("null");
    } else {
      sb.append(this.tablet_schema);
    }
    first = false;
    if (isSetVersion()) {
      if (!first) sb.append(", ");
      sb.append("version:");
      sb.append(this.version);
      first = false;
    }
    if (isSetVersionHash()) {
      if (!first) sb.append(", ");
      sb.append("version_hash:");
      sb.append(this.version_hash);
      first = false;
    }
    if (isSetStorageMedium()) {
      if (!first) sb.append(", ");
      sb.append("storage_medium:");
      if (this.storage_medium == null) {
        sb.append("null");
      } else {
        sb.append(this.storage_medium);
      }
      first = false;
    }
    if (isSetInRestoreMode()) {
      if (!first) sb.append(", ");
      sb.append("in_restore_mode:");
      sb.append(this.in_restore_mode);
      first = false;
    }
    if (isSetBaseTabletId()) {
      if (!first) sb.append(", ");
      sb.append("base_tablet_id:");
      sb.append(this.base_tablet_id);
      first = false;
    }
    if (isSetBaseSchemaHash()) {
      if (!first) sb.append(", ");
      sb.append("base_schema_hash:");
      sb.append(this.base_schema_hash);
      first = false;
    }
    if (isSetTableId()) {
      if (!first) sb.append(", ");
      sb.append("table_id:");
      sb.append(this.table_id);
      first = false;
    }
    if (isSetPartitionId()) {
      if (!first) sb.append(", ");
      sb.append("partition_id:");
      sb.append(this.partition_id);
      first = false;
    }
    if (isSetAllocationTerm()) {
      if (!first) sb.append(", ");
      sb.append("allocation_term:");
      sb.append(this.allocation_term);
      first = false;
    }
    if (isSetIsEcoMode()) {
      if (!first) sb.append(", ");
      sb.append("is_eco_mode:");
      sb.append(this.is_eco_mode);
      first = false;
    }
    if (isSetStorageFormat()) {
      if (!first) sb.append(", ");
      sb.append("storage_format:");
      if (this.storage_format == null) {
        sb.append("null");
      } else {
        sb.append(this.storage_format);
      }
      first = false;
    }
    if (isSetTabletType()) {
      if (!first) sb.append(", ");
      sb.append("tablet_type:");
      if (this.tablet_type == null) {
        sb.append("null");
      } else {
        sb.append(this.tablet_type);
      }
      first = false;
    }
    if (isSetCompressionType()) {
      if (!first) sb.append(", ");
      sb.append("compression_type:");
      if (this.compression_type == null) {
        sb.append("null");
      } else {
        sb.append(this.compression_type);
      }
      first = false;
    }
    if (isSetReplicaId()) {
      if (!first) sb.append(", ");
      sb.append("replica_id:");
      sb.append(this.replica_id);
      first = false;
    }
    if (isSetEnableUniqueKeyMergeOnWrite()) {
      if (!first) sb.append(", ");
      sb.append("enable_unique_key_merge_on_write:");
      sb.append(this.enable_unique_key_merge_on_write);
      first = false;
    }
    if (isSetStoragePolicyId()) {
      if (!first) sb.append(", ");
      sb.append("storage_policy_id:");
      sb.append(this.storage_policy_id);
      first = false;
    }
    if (isSetBinlogConfig()) {
      if (!first) sb.append(", ");
      sb.append("binlog_config:");
      if (this.binlog_config == null) {
        sb.append("null");
      } else {
        sb.append(this.binlog_config);
      }
      first = false;
    }
    if (isSetCompactionPolicy()) {
      if (!first) sb.append(", ");
      sb.append("compaction_policy:");
      if (this.compaction_policy == null) {
        sb.append("null");
      } else {
        sb.append(this.compaction_policy);
      }
      first = false;
    }
    if (isSetTimeSeriesCompactionGoalSizeMbytes()) {
      if (!first) sb.append(", ");
      sb.append("time_series_compaction_goal_size_mbytes:");
      sb.append(this.time_series_compaction_goal_size_mbytes);
      first = false;
    }
    if (isSetTimeSeriesCompactionFileCountThreshold()) {
      if (!first) sb.append(", ");
      sb.append("time_series_compaction_file_count_threshold:");
      sb.append(this.time_series_compaction_file_count_threshold);
      first = false;
    }
    if (isSetTimeSeriesCompactionTimeThresholdSeconds()) {
      if (!first) sb.append(", ");
      sb.append("time_series_compaction_time_threshold_seconds:");
      sb.append(this.time_series_compaction_time_threshold_seconds);
      first = false;
    }
    if (isSetTimeSeriesCompactionEmptyRowsetsThreshold()) {
      if (!first) sb.append(", ");
      sb.append("time_series_compaction_empty_rowsets_threshold:");
      sb.append(this.time_series_compaction_empty_rowsets_threshold);
      first = false;
    }
    if (isSetTimeSeriesCompactionLevelThreshold()) {
      if (!first) sb.append(", ");
      sb.append("time_series_compaction_level_threshold:");
      sb.append(this.time_series_compaction_level_threshold);
      first = false;
    }
    if (isSetInvertedIndexStorageFormat()) {
      if (!first) sb.append(", ");
      sb.append("inverted_index_storage_format:");
      if (this.inverted_index_storage_format == null) {
        sb.append("null");
      } else {
        sb.append(this.inverted_index_storage_format);
      }
      first = false;
    }
    if (isSetInvertedIndexFileStorageFormat()) {
      if (!first) sb.append(", ");
      sb.append("inverted_index_file_storage_format:");
      if (this.inverted_index_file_storage_format == null) {
        sb.append("null");
      } else {
        sb.append(this.inverted_index_file_storage_format);
      }
      first = false;
    }
    if (isSetTdeAlgorithm()) {
      if (!first) sb.append(", ");
      sb.append("tde_algorithm:");
      if (this.tde_algorithm == null) {
        sb.append("null");
      } else {
        sb.append(this.tde_algorithm);
      }
      first = false;
    }
    if (isSetVerticalCompactionNumColumnsPerGroup()) {
      if (!first) sb.append(", ");
      sb.append("vertical_compaction_num_columns_per_group:");
      sb.append(this.vertical_compaction_num_columns_per_group);
      first = false;
    }
    if (isSetIsInMemory()) {
      if (!first) sb.append(", ");
      sb.append("is_in_memory:");
      sb.append(this.is_in_memory);
      first = false;
    }
    if (isSetIsPersistent()) {
      if (!first) sb.append(", ");
      sb.append("is_persistent:");
      sb.append(this.is_persistent);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // alas, we cannot check 'tablet_id' because it's a primitive and you chose the non-beans generator.
    if (tablet_schema == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablet_schema' was not present! Struct: " + toString());
    }
    // check for sub-struct validity
    if (tablet_schema != null) {
      tablet_schema.validate();
    }
    if (binlog_config != null) {
      binlog_config.validate();
    }
  }

  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 TCreateTabletReqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TCreateTabletReqStandardScheme getScheme() {
      return new TCreateTabletReqStandardScheme();
    }
  }

  private static class TCreateTabletReqStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCreateTabletReq> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TCreateTabletReq 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: // TABLET_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.tablet_id = iprot.readI64();
              struct.setTabletIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // TABLET_SCHEMA
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.tablet_schema = new TTabletSchema();
              struct.tablet_schema.read(iprot);
              struct.setTabletSchemaIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // VERSION
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.version = iprot.readI64();
              struct.setVersionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // VERSION_HASH
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.version_hash = iprot.readI64();
              struct.setVersionHashIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // STORAGE_MEDIUM
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.storage_medium = org.apache.doris.thrift.TStorageMedium.findByValue(iprot.readI32());
              struct.setStorageMediumIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // IN_RESTORE_MODE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.in_restore_mode = iprot.readBool();
              struct.setInRestoreModeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // BASE_TABLET_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.base_tablet_id = iprot.readI64();
              struct.setBaseTabletIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // BASE_SCHEMA_HASH
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.base_schema_hash = iprot.readI32();
              struct.setBaseSchemaHashIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // TABLE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.table_id = iprot.readI64();
              struct.setTableIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // PARTITION_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.partition_id = iprot.readI64();
              struct.setPartitionIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // ALLOCATION_TERM
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.allocation_term = iprot.readI64();
              struct.setAllocationTermIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // IS_ECO_MODE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.is_eco_mode = iprot.readBool();
              struct.setIsEcoModeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // STORAGE_FORMAT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.storage_format = org.apache.doris.thrift.TStorageFormat.findByValue(iprot.readI32());
              struct.setStorageFormatIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // TABLET_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.tablet_type = org.apache.doris.thrift.TTabletType.findByValue(iprot.readI32());
              struct.setTabletTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 16: // COMPRESSION_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.compression_type = org.apache.doris.thrift.TCompressionType.findByValue(iprot.readI32());
              struct.setCompressionTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 17: // REPLICA_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.replica_id = iprot.readI64();
              struct.setReplicaIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 19: // ENABLE_UNIQUE_KEY_MERGE_ON_WRITE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.enable_unique_key_merge_on_write = iprot.readBool();
              struct.setEnableUniqueKeyMergeOnWriteIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 20: // STORAGE_POLICY_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.storage_policy_id = iprot.readI64();
              struct.setStoragePolicyIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 21: // BINLOG_CONFIG
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.binlog_config = new TBinlogConfig();
              struct.binlog_config.read(iprot);
              struct.setBinlogConfigIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 22: // COMPACTION_POLICY
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.compaction_policy = iprot.readString();
              struct.setCompactionPolicyIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 23: // TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.time_series_compaction_goal_size_mbytes = iprot.readI64();
              struct.setTimeSeriesCompactionGoalSizeMbytesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 24: // TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.time_series_compaction_file_count_threshold = iprot.readI64();
              struct.setTimeSeriesCompactionFileCountThresholdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 25: // TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.time_series_compaction_time_threshold_seconds = iprot.readI64();
              struct.setTimeSeriesCompactionTimeThresholdSecondsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 26: // TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.time_series_compaction_empty_rowsets_threshold = iprot.readI64();
              struct.setTimeSeriesCompactionEmptyRowsetsThresholdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 27: // TIME_SERIES_COMPACTION_LEVEL_THRESHOLD
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.time_series_compaction_level_threshold = iprot.readI64();
              struct.setTimeSeriesCompactionLevelThresholdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 28: // INVERTED_INDEX_STORAGE_FORMAT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.inverted_index_storage_format = org.apache.doris.thrift.TInvertedIndexStorageFormat.findByValue(iprot.readI32());
              struct.setInvertedIndexStorageFormatIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 29: // INVERTED_INDEX_FILE_STORAGE_FORMAT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.inverted_index_file_storage_format = org.apache.doris.thrift.TInvertedIndexFileStorageFormat.findByValue(iprot.readI32());
              struct.setInvertedIndexFileStorageFormatIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 30: // TDE_ALGORITHM
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.tde_algorithm = org.apache.doris.thrift.TEncryptionAlgorithm.findByValue(iprot.readI32());
              struct.setTdeAlgorithmIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 31: // VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.vertical_compaction_num_columns_per_group = iprot.readI32();
              struct.setVerticalCompactionNumColumnsPerGroupIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 1000: // IS_IN_MEMORY
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.is_in_memory = iprot.readBool();
              struct.setIsInMemoryIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 1001: // IS_PERSISTENT
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.is_persistent = iprot.readBool();
              struct.setIsPersistentIsSet(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.isSetTabletId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablet_id' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, TCreateTabletReq struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(TABLET_ID_FIELD_DESC);
      oprot.writeI64(struct.tablet_id);
      oprot.writeFieldEnd();
      if (struct.tablet_schema != null) {
        oprot.writeFieldBegin(TABLET_SCHEMA_FIELD_DESC);
        struct.tablet_schema.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.isSetVersion()) {
        oprot.writeFieldBegin(VERSION_FIELD_DESC);
        oprot.writeI64(struct.version);
        oprot.writeFieldEnd();
      }
      if (struct.isSetVersionHash()) {
        oprot.writeFieldBegin(VERSION_HASH_FIELD_DESC);
        oprot.writeI64(struct.version_hash);
        oprot.writeFieldEnd();
      }
      if (struct.storage_medium != null) {
        if (struct.isSetStorageMedium()) {
          oprot.writeFieldBegin(STORAGE_MEDIUM_FIELD_DESC);
          oprot.writeI32(struct.storage_medium.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetInRestoreMode()) {
        oprot.writeFieldBegin(IN_RESTORE_MODE_FIELD_DESC);
        oprot.writeBool(struct.in_restore_mode);
        oprot.writeFieldEnd();
      }
      if (struct.isSetBaseTabletId()) {
        oprot.writeFieldBegin(BASE_TABLET_ID_FIELD_DESC);
        oprot.writeI64(struct.base_tablet_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetBaseSchemaHash()) {
        oprot.writeFieldBegin(BASE_SCHEMA_HASH_FIELD_DESC);
        oprot.writeI32(struct.base_schema_hash);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTableId()) {
        oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
        oprot.writeI64(struct.table_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetPartitionId()) {
        oprot.writeFieldBegin(PARTITION_ID_FIELD_DESC);
        oprot.writeI64(struct.partition_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetAllocationTerm()) {
        oprot.writeFieldBegin(ALLOCATION_TERM_FIELD_DESC);
        oprot.writeI64(struct.allocation_term);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIsEcoMode()) {
        oprot.writeFieldBegin(IS_ECO_MODE_FIELD_DESC);
        oprot.writeBool(struct.is_eco_mode);
        oprot.writeFieldEnd();
      }
      if (struct.storage_format != null) {
        if (struct.isSetStorageFormat()) {
          oprot.writeFieldBegin(STORAGE_FORMAT_FIELD_DESC);
          oprot.writeI32(struct.storage_format.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.tablet_type != null) {
        if (struct.isSetTabletType()) {
          oprot.writeFieldBegin(TABLET_TYPE_FIELD_DESC);
          oprot.writeI32(struct.tablet_type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.compression_type != null) {
        if (struct.isSetCompressionType()) {
          oprot.writeFieldBegin(COMPRESSION_TYPE_FIELD_DESC);
          oprot.writeI32(struct.compression_type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetReplicaId()) {
        oprot.writeFieldBegin(REPLICA_ID_FIELD_DESC);
        oprot.writeI64(struct.replica_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetEnableUniqueKeyMergeOnWrite()) {
        oprot.writeFieldBegin(ENABLE_UNIQUE_KEY_MERGE_ON_WRITE_FIELD_DESC);
        oprot.writeBool(struct.enable_unique_key_merge_on_write);
        oprot.writeFieldEnd();
      }
      if (struct.isSetStoragePolicyId()) {
        oprot.writeFieldBegin(STORAGE_POLICY_ID_FIELD_DESC);
        oprot.writeI64(struct.storage_policy_id);
        oprot.writeFieldEnd();
      }
      if (struct.binlog_config != null) {
        if (struct.isSetBinlogConfig()) {
          oprot.writeFieldBegin(BINLOG_CONFIG_FIELD_DESC);
          struct.binlog_config.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.compaction_policy != null) {
        if (struct.isSetCompactionPolicy()) {
          oprot.writeFieldBegin(COMPACTION_POLICY_FIELD_DESC);
          oprot.writeString(struct.compaction_policy);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetTimeSeriesCompactionGoalSizeMbytes()) {
        oprot.writeFieldBegin(TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES_FIELD_DESC);
        oprot.writeI64(struct.time_series_compaction_goal_size_mbytes);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTimeSeriesCompactionFileCountThreshold()) {
        oprot.writeFieldBegin(TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD_FIELD_DESC);
        oprot.writeI64(struct.time_series_compaction_file_count_threshold);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTimeSeriesCompactionTimeThresholdSeconds()) {
        oprot.writeFieldBegin(TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS_FIELD_DESC);
        oprot.writeI64(struct.time_series_compaction_time_threshold_seconds);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTimeSeriesCompactionEmptyRowsetsThreshold()) {
        oprot.writeFieldBegin(TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD_FIELD_DESC);
        oprot.writeI64(struct.time_series_compaction_empty_rowsets_threshold);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTimeSeriesCompactionLevelThreshold()) {
        oprot.writeFieldBegin(TIME_SERIES_COMPACTION_LEVEL_THRESHOLD_FIELD_DESC);
        oprot.writeI64(struct.time_series_compaction_level_threshold);
        oprot.writeFieldEnd();
      }
      if (struct.inverted_index_storage_format != null) {
        if (struct.isSetInvertedIndexStorageFormat()) {
          oprot.writeFieldBegin(INVERTED_INDEX_STORAGE_FORMAT_FIELD_DESC);
          oprot.writeI32(struct.inverted_index_storage_format.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.inverted_index_file_storage_format != null) {
        if (struct.isSetInvertedIndexFileStorageFormat()) {
          oprot.writeFieldBegin(INVERTED_INDEX_FILE_STORAGE_FORMAT_FIELD_DESC);
          oprot.writeI32(struct.inverted_index_file_storage_format.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.tde_algorithm != null) {
        if (struct.isSetTdeAlgorithm()) {
          oprot.writeFieldBegin(TDE_ALGORITHM_FIELD_DESC);
          oprot.writeI32(struct.tde_algorithm.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetVerticalCompactionNumColumnsPerGroup()) {
        oprot.writeFieldBegin(VERTICAL_COMPACTION_NUM_COLUMNS_PER_GROUP_FIELD_DESC);
        oprot.writeI32(struct.vertical_compaction_num_columns_per_group);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIsInMemory()) {
        oprot.writeFieldBegin(IS_IN_MEMORY_FIELD_DESC);
        oprot.writeBool(struct.is_in_memory);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIsPersistent()) {
        oprot.writeFieldBegin(IS_PERSISTENT_FIELD_DESC);
        oprot.writeBool(struct.is_persistent);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TCreateTabletReqTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCreateTabletReq> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TCreateTabletReq struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeI64(struct.tablet_id);
      struct.tablet_schema.write(oprot);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetVersion()) {
        optionals.set(0);
      }
      if (struct.isSetVersionHash()) {
        optionals.set(1);
      }
      if (struct.isSetStorageMedium()) {
        optionals.set(2);
      }
      if (struct.isSetInRestoreMode()) {
        optionals.set(3);
      }
      if (struct.isSetBaseTabletId()) {
        optionals.set(4);
      }
      if (struct.isSetBaseSchemaHash()) {
        optionals.set(5);
      }
      if (struct.isSetTableId()) {
        optionals.set(6);
      }
      if (struct.isSetPartitionId()) {
        optionals.set(7);
      }
      if (struct.isSetAllocationTerm()) {
        optionals.set(8);
      }
      if (struct.isSetIsEcoMode()) {
        optionals.set(9);
      }
      if (struct.isSetStorageFormat()) {
        optionals.set(10);
      }
      if (struct.isSetTabletType()) {
        optionals.set(11);
      }
      if (struct.isSetCompressionType()) {
        optionals.set(12);
      }
      if (struct.isSetReplicaId()) {
        optionals.set(13);
      }
      if (struct.isSetEnableUniqueKeyMergeOnWrite()) {
        optionals.set(14);
      }
      if (struct.isSetStoragePolicyId()) {
        optionals.set(15);
      }
      if (struct.isSetBinlogConfig()) {
        optionals.set(16);
      }
      if (struct.isSetCompactionPolicy()) {
        optionals.set(17);
      }
      if (struct.isSetTimeSeriesCompactionGoalSizeMbytes()) {
        optionals.set(18);
      }
      if (struct.isSetTimeSeriesCompactionFileCountThreshold()) {
        optionals.set(19);
      }
      if (struct.isSetTimeSeriesCompactionTimeThresholdSeconds()) {
        optionals.set(20);
      }
      if (struct.isSetTimeSeriesCompactionEmptyRowsetsThreshold()) {
        optionals.set(21);
      }
      if (struct.isSetTimeSeriesCompactionLevelThreshold()) {
        optionals.set(22);
      }
      if (struct.isSetInvertedIndexStorageFormat()) {
        optionals.set(23);
      }
      if (struct.isSetInvertedIndexFileStorageFormat()) {
        optionals.set(24);
      }
      if (struct.isSetTdeAlgorithm()) {
        optionals.set(25);
      }
      if (struct.isSetVerticalCompactionNumColumnsPerGroup()) {
        optionals.set(26);
      }
      if (struct.isSetIsInMemory()) {
        optionals.set(27);
      }
      if (struct.isSetIsPersistent()) {
        optionals.set(28);
      }
      oprot.writeBitSet(optionals, 29);
      if (struct.isSetVersion()) {
        oprot.writeI64(struct.version);
      }
      if (struct.isSetVersionHash()) {
        oprot.writeI64(struct.version_hash);
      }
      if (struct.isSetStorageMedium()) {
        oprot.writeI32(struct.storage_medium.getValue());
      }
      if (struct.isSetInRestoreMode()) {
        oprot.writeBool(struct.in_restore_mode);
      }
      if (struct.isSetBaseTabletId()) {
        oprot.writeI64(struct.base_tablet_id);
      }
      if (struct.isSetBaseSchemaHash()) {
        oprot.writeI32(struct.base_schema_hash);
      }
      if (struct.isSetTableId()) {
        oprot.writeI64(struct.table_id);
      }
      if (struct.isSetPartitionId()) {
        oprot.writeI64(struct.partition_id);
      }
      if (struct.isSetAllocationTerm()) {
        oprot.writeI64(struct.allocation_term);
      }
      if (struct.isSetIsEcoMode()) {
        oprot.writeBool(struct.is_eco_mode);
      }
      if (struct.isSetStorageFormat()) {
        oprot.writeI32(struct.storage_format.getValue());
      }
      if (struct.isSetTabletType()) {
        oprot.writeI32(struct.tablet_type.getValue());
      }
      if (struct.isSetCompressionType()) {
        oprot.writeI32(struct.compression_type.getValue());
      }
      if (struct.isSetReplicaId()) {
        oprot.writeI64(struct.replica_id);
      }
      if (struct.isSetEnableUniqueKeyMergeOnWrite()) {
        oprot.writeBool(struct.enable_unique_key_merge_on_write);
      }
      if (struct.isSetStoragePolicyId()) {
        oprot.writeI64(struct.storage_policy_id);
      }
      if (struct.isSetBinlogConfig()) {
        struct.binlog_config.write(oprot);
      }
      if (struct.isSetCompactionPolicy()) {
        oprot.writeString(struct.compaction_policy);
      }
      if (struct.isSetTimeSeriesCompactionGoalSizeMbytes()) {
        oprot.writeI64(struct.time_series_compaction_goal_size_mbytes);
      }
      if (struct.isSetTimeSeriesCompactionFileCountThreshold()) {
        oprot.writeI64(struct.time_series_compaction_file_count_threshold);
      }
      if (struct.isSetTimeSeriesCompactionTimeThresholdSeconds()) {
        oprot.writeI64(struct.time_series_compaction_time_threshold_seconds);
      }
      if (struct.isSetTimeSeriesCompactionEmptyRowsetsThreshold()) {
        oprot.writeI64(struct.time_series_compaction_empty_rowsets_threshold);
      }
      if (struct.isSetTimeSeriesCompactionLevelThreshold()) {
        oprot.writeI64(struct.time_series_compaction_level_threshold);
      }
      if (struct.isSetInvertedIndexStorageFormat()) {
        oprot.writeI32(struct.inverted_index_storage_format.getValue());
      }
      if (struct.isSetInvertedIndexFileStorageFormat()) {
        oprot.writeI32(struct.inverted_index_file_storage_format.getValue());
      }
      if (struct.isSetTdeAlgorithm()) {
        oprot.writeI32(struct.tde_algorithm.getValue());
      }
      if (struct.isSetVerticalCompactionNumColumnsPerGroup()) {
        oprot.writeI32(struct.vertical_compaction_num_columns_per_group);
      }
      if (struct.isSetIsInMemory()) {
        oprot.writeBool(struct.is_in_memory);
      }
      if (struct.isSetIsPersistent()) {
        oprot.writeBool(struct.is_persistent);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TCreateTabletReq struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.tablet_id = iprot.readI64();
      struct.setTabletIdIsSet(true);
      struct.tablet_schema = new TTabletSchema();
      struct.tablet_schema.read(iprot);
      struct.setTabletSchemaIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(29);
      if (incoming.get(0)) {
        struct.version = iprot.readI64();
        struct.setVersionIsSet(true);
      }
      if (incoming.get(1)) {
        struct.version_hash = iprot.readI64();
        struct.setVersionHashIsSet(true);
      }
      if (incoming.get(2)) {
        struct.storage_medium = org.apache.doris.thrift.TStorageMedium.findByValue(iprot.readI32());
        struct.setStorageMediumIsSet(true);
      }
      if (incoming.get(3)) {
        struct.in_restore_mode = iprot.readBool();
        struct.setInRestoreModeIsSet(true);
      }
      if (incoming.get(4)) {
        struct.base_tablet_id = iprot.readI64();
        struct.setBaseTabletIdIsSet(true);
      }
      if (incoming.get(5)) {
        struct.base_schema_hash = iprot.readI32();
        struct.setBaseSchemaHashIsSet(true);
      }
      if (incoming.get(6)) {
        struct.table_id = iprot.readI64();
        struct.setTableIdIsSet(true);
      }
      if (incoming.get(7)) {
        struct.partition_id = iprot.readI64();
        struct.setPartitionIdIsSet(true);
      }
      if (incoming.get(8)) {
        struct.allocation_term = iprot.readI64();
        struct.setAllocationTermIsSet(true);
      }
      if (incoming.get(9)) {
        struct.is_eco_mode = iprot.readBool();
        struct.setIsEcoModeIsSet(true);
      }
      if (incoming.get(10)) {
        struct.storage_format = org.apache.doris.thrift.TStorageFormat.findByValue(iprot.readI32());
        struct.setStorageFormatIsSet(true);
      }
      if (incoming.get(11)) {
        struct.tablet_type = org.apache.doris.thrift.TTabletType.findByValue(iprot.readI32());
        struct.setTabletTypeIsSet(true);
      }
      if (incoming.get(12)) {
        struct.compression_type = org.apache.doris.thrift.TCompressionType.findByValue(iprot.readI32());
        struct.setCompressionTypeIsSet(true);
      }
      if (incoming.get(13)) {
        struct.replica_id = iprot.readI64();
        struct.setReplicaIdIsSet(true);
      }
      if (incoming.get(14)) {
        struct.enable_unique_key_merge_on_write = iprot.readBool();
        struct.setEnableUniqueKeyMergeOnWriteIsSet(true);
      }
      if (incoming.get(15)) {
        struct.storage_policy_id = iprot.readI64();
        struct.setStoragePolicyIdIsSet(true);
      }
      if (incoming.get(16)) {
        struct.binlog_config = new TBinlogConfig();
        struct.binlog_config.read(iprot);
        struct.setBinlogConfigIsSet(true);
      }
      if (incoming.get(17)) {
        struct.compaction_policy = iprot.readString();
        struct.setCompactionPolicyIsSet(true);
      }
      if (incoming.get(18)) {
        struct.time_series_compaction_goal_size_mbytes = iprot.readI64();
        struct.setTimeSeriesCompactionGoalSizeMbytesIsSet(true);
      }
      if (incoming.get(19)) {
        struct.time_series_compaction_file_count_threshold = iprot.readI64();
        struct.setTimeSeriesCompactionFileCountThresholdIsSet(true);
      }
      if (incoming.get(20)) {
        struct.time_series_compaction_time_threshold_seconds = iprot.readI64();
        struct.setTimeSeriesCompactionTimeThresholdSecondsIsSet(true);
      }
      if (incoming.get(21)) {
        struct.time_series_compaction_empty_rowsets_threshold = iprot.readI64();
        struct.setTimeSeriesCompactionEmptyRowsetsThresholdIsSet(true);
      }
      if (incoming.get(22)) {
        struct.time_series_compaction_level_threshold = iprot.readI64();
        struct.setTimeSeriesCompactionLevelThresholdIsSet(true);
      }
      if (incoming.get(23)) {
        struct.inverted_index_storage_format = org.apache.doris.thrift.TInvertedIndexStorageFormat.findByValue(iprot.readI32());
        struct.setInvertedIndexStorageFormatIsSet(true);
      }
      if (incoming.get(24)) {
        struct.inverted_index_file_storage_format = org.apache.doris.thrift.TInvertedIndexFileStorageFormat.findByValue(iprot.readI32());
        struct.setInvertedIndexFileStorageFormatIsSet(true);
      }
      if (incoming.get(25)) {
        struct.tde_algorithm = org.apache.doris.thrift.TEncryptionAlgorithm.findByValue(iprot.readI32());
        struct.setTdeAlgorithmIsSet(true);
      }
      if (incoming.get(26)) {
        struct.vertical_compaction_num_columns_per_group = iprot.readI32();
        struct.setVerticalCompactionNumColumnsPerGroupIsSet(true);
      }
      if (incoming.get(27)) {
        struct.is_in_memory = iprot.readBool();
        struct.setIsInMemoryIsSet(true);
      }
      if (incoming.get(28)) {
        struct.is_persistent = iprot.readBool();
        struct.setIsPersistentIsSet(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();
  }
}