All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.iotdb.service.rpc.thrift.ServerProperties Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Thrift Compiler (0.14.1)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.iotdb.service.rpc.thrift;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.14.1)", date = "2023-04-20")
public class ServerProperties implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ServerProperties");

  private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField SUPPORTED_TIME_AGGREGATION_OPERATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("supportedTimeAggregationOperations", org.apache.thrift.protocol.TType.LIST, (short)2);
  private static final org.apache.thrift.protocol.TField TIMESTAMP_PRECISION_FIELD_DESC = new org.apache.thrift.protocol.TField("timestampPrecision", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField MAX_CONCURRENT_CLIENT_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("maxConcurrentClientNum", org.apache.thrift.protocol.TType.I32, (short)4);
  private static final org.apache.thrift.protocol.TField WATERMARK_SECRET_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("watermarkSecretKey", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField WATERMARK_BIT_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("watermarkBitString", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField WATERMARK_PARAM_MARK_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("watermarkParamMarkRate", org.apache.thrift.protocol.TType.I32, (short)7);
  private static final org.apache.thrift.protocol.TField WATERMARK_PARAM_MAX_RIGHT_BIT_FIELD_DESC = new org.apache.thrift.protocol.TField("watermarkParamMaxRightBit", org.apache.thrift.protocol.TType.I32, (short)8);
  private static final org.apache.thrift.protocol.TField THRIFT_MAX_FRAME_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("thriftMaxFrameSize", org.apache.thrift.protocol.TType.I32, (short)9);
  private static final org.apache.thrift.protocol.TField IS_READ_ONLY_FIELD_DESC = new org.apache.thrift.protocol.TField("isReadOnly", org.apache.thrift.protocol.TType.BOOL, (short)10);
  private static final org.apache.thrift.protocol.TField BUILD_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("buildInfo", org.apache.thrift.protocol.TType.STRING, (short)11);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String version; // required
  public @org.apache.thrift.annotation.Nullable java.util.List supportedTimeAggregationOperations; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String timestampPrecision; // required
  public int maxConcurrentClientNum; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String watermarkSecretKey; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String watermarkBitString; // optional
  public int watermarkParamMarkRate; // optional
  public int watermarkParamMaxRightBit; // optional
  public int thriftMaxFrameSize; // optional
  public boolean isReadOnly; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String buildInfo; // 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 {
    VERSION((short)1, "version"),
    SUPPORTED_TIME_AGGREGATION_OPERATIONS((short)2, "supportedTimeAggregationOperations"),
    TIMESTAMP_PRECISION((short)3, "timestampPrecision"),
    MAX_CONCURRENT_CLIENT_NUM((short)4, "maxConcurrentClientNum"),
    WATERMARK_SECRET_KEY((short)5, "watermarkSecretKey"),
    WATERMARK_BIT_STRING((short)6, "watermarkBitString"),
    WATERMARK_PARAM_MARK_RATE((short)7, "watermarkParamMarkRate"),
    WATERMARK_PARAM_MAX_RIGHT_BIT((short)8, "watermarkParamMaxRightBit"),
    THRIFT_MAX_FRAME_SIZE((short)9, "thriftMaxFrameSize"),
    IS_READ_ONLY((short)10, "isReadOnly"),
    BUILD_INFO((short)11, "buildInfo");

    private static final java.util.Map byName = new java.util.HashMap();

    static {
      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // VERSION
          return VERSION;
        case 2: // SUPPORTED_TIME_AGGREGATION_OPERATIONS
          return SUPPORTED_TIME_AGGREGATION_OPERATIONS;
        case 3: // TIMESTAMP_PRECISION
          return TIMESTAMP_PRECISION;
        case 4: // MAX_CONCURRENT_CLIENT_NUM
          return MAX_CONCURRENT_CLIENT_NUM;
        case 5: // WATERMARK_SECRET_KEY
          return WATERMARK_SECRET_KEY;
        case 6: // WATERMARK_BIT_STRING
          return WATERMARK_BIT_STRING;
        case 7: // WATERMARK_PARAM_MARK_RATE
          return WATERMARK_PARAM_MARK_RATE;
        case 8: // WATERMARK_PARAM_MAX_RIGHT_BIT
          return WATERMARK_PARAM_MAX_RIGHT_BIT;
        case 9: // THRIFT_MAX_FRAME_SIZE
          return THRIFT_MAX_FRAME_SIZE;
        case 10: // IS_READ_ONLY
          return IS_READ_ONLY;
        case 11: // BUILD_INFO
          return BUILD_INFO;
        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 __MAXCONCURRENTCLIENTNUM_ISSET_ID = 0;
  private static final int __WATERMARKPARAMMARKRATE_ISSET_ID = 1;
  private static final int __WATERMARKPARAMMAXRIGHTBIT_ISSET_ID = 2;
  private static final int __THRIFTMAXFRAMESIZE_ISSET_ID = 3;
  private static final int __ISREADONLY_ISSET_ID = 4;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.WATERMARK_SECRET_KEY,_Fields.WATERMARK_BIT_STRING,_Fields.WATERMARK_PARAM_MARK_RATE,_Fields.WATERMARK_PARAM_MAX_RIGHT_BIT,_Fields.THRIFT_MAX_FRAME_SIZE,_Fields.IS_READ_ONLY,_Fields.BUILD_INFO};
  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.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SUPPORTED_TIME_AGGREGATION_OPERATIONS, new org.apache.thrift.meta_data.FieldMetaData("supportedTimeAggregationOperations", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.TIMESTAMP_PRECISION, new org.apache.thrift.meta_data.FieldMetaData("timestampPrecision", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.MAX_CONCURRENT_CLIENT_NUM, new org.apache.thrift.meta_data.FieldMetaData("maxConcurrentClientNum", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.WATERMARK_SECRET_KEY, new org.apache.thrift.meta_data.FieldMetaData("watermarkSecretKey", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.WATERMARK_BIT_STRING, new org.apache.thrift.meta_data.FieldMetaData("watermarkBitString", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.WATERMARK_PARAM_MARK_RATE, new org.apache.thrift.meta_data.FieldMetaData("watermarkParamMarkRate", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.WATERMARK_PARAM_MAX_RIGHT_BIT, new org.apache.thrift.meta_data.FieldMetaData("watermarkParamMaxRightBit", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.THRIFT_MAX_FRAME_SIZE, new org.apache.thrift.meta_data.FieldMetaData("thriftMaxFrameSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.IS_READ_ONLY, new org.apache.thrift.meta_data.FieldMetaData("isReadOnly", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.BUILD_INFO, new org.apache.thrift.meta_data.FieldMetaData("buildInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ServerProperties.class, metaDataMap);
  }

  public ServerProperties() {
  }

  public ServerProperties(
    java.lang.String version,
    java.util.List supportedTimeAggregationOperations,
    java.lang.String timestampPrecision,
    int maxConcurrentClientNum)
  {
    this();
    this.version = version;
    this.supportedTimeAggregationOperations = supportedTimeAggregationOperations;
    this.timestampPrecision = timestampPrecision;
    this.maxConcurrentClientNum = maxConcurrentClientNum;
    setMaxConcurrentClientNumIsSet(true);
  }

  /**
   * Performs a deep copy on other.
   */
  public ServerProperties(ServerProperties other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetVersion()) {
      this.version = other.version;
    }
    if (other.isSetSupportedTimeAggregationOperations()) {
      java.util.List __this__supportedTimeAggregationOperations = new java.util.ArrayList(other.supportedTimeAggregationOperations);
      this.supportedTimeAggregationOperations = __this__supportedTimeAggregationOperations;
    }
    if (other.isSetTimestampPrecision()) {
      this.timestampPrecision = other.timestampPrecision;
    }
    this.maxConcurrentClientNum = other.maxConcurrentClientNum;
    if (other.isSetWatermarkSecretKey()) {
      this.watermarkSecretKey = other.watermarkSecretKey;
    }
    if (other.isSetWatermarkBitString()) {
      this.watermarkBitString = other.watermarkBitString;
    }
    this.watermarkParamMarkRate = other.watermarkParamMarkRate;
    this.watermarkParamMaxRightBit = other.watermarkParamMaxRightBit;
    this.thriftMaxFrameSize = other.thriftMaxFrameSize;
    this.isReadOnly = other.isReadOnly;
    if (other.isSetBuildInfo()) {
      this.buildInfo = other.buildInfo;
    }
  }

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

  @Override
  public void clear() {
    this.version = null;
    this.supportedTimeAggregationOperations = null;
    this.timestampPrecision = null;
    setMaxConcurrentClientNumIsSet(false);
    this.maxConcurrentClientNum = 0;
    this.watermarkSecretKey = null;
    this.watermarkBitString = null;
    setWatermarkParamMarkRateIsSet(false);
    this.watermarkParamMarkRate = 0;
    setWatermarkParamMaxRightBitIsSet(false);
    this.watermarkParamMaxRightBit = 0;
    setThriftMaxFrameSizeIsSet(false);
    this.thriftMaxFrameSize = 0;
    setIsReadOnlyIsSet(false);
    this.isReadOnly = false;
    this.buildInfo = null;
  }

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

  public ServerProperties setVersion(@org.apache.thrift.annotation.Nullable java.lang.String version) {
    this.version = version;
    return this;
  }

  public void unsetVersion() {
    this.version = null;
  }

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

  public void setVersionIsSet(boolean value) {
    if (!value) {
      this.version = null;
    }
  }

  public int getSupportedTimeAggregationOperationsSize() {
    return (this.supportedTimeAggregationOperations == null) ? 0 : this.supportedTimeAggregationOperations.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator getSupportedTimeAggregationOperationsIterator() {
    return (this.supportedTimeAggregationOperations == null) ? null : this.supportedTimeAggregationOperations.iterator();
  }

  public void addToSupportedTimeAggregationOperations(java.lang.String elem) {
    if (this.supportedTimeAggregationOperations == null) {
      this.supportedTimeAggregationOperations = new java.util.ArrayList();
    }
    this.supportedTimeAggregationOperations.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List getSupportedTimeAggregationOperations() {
    return this.supportedTimeAggregationOperations;
  }

  public ServerProperties setSupportedTimeAggregationOperations(@org.apache.thrift.annotation.Nullable java.util.List supportedTimeAggregationOperations) {
    this.supportedTimeAggregationOperations = supportedTimeAggregationOperations;
    return this;
  }

  public void unsetSupportedTimeAggregationOperations() {
    this.supportedTimeAggregationOperations = null;
  }

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

  public void setSupportedTimeAggregationOperationsIsSet(boolean value) {
    if (!value) {
      this.supportedTimeAggregationOperations = null;
    }
  }

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

  public ServerProperties setTimestampPrecision(@org.apache.thrift.annotation.Nullable java.lang.String timestampPrecision) {
    this.timestampPrecision = timestampPrecision;
    return this;
  }

  public void unsetTimestampPrecision() {
    this.timestampPrecision = null;
  }

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

  public void setTimestampPrecisionIsSet(boolean value) {
    if (!value) {
      this.timestampPrecision = null;
    }
  }

  public int getMaxConcurrentClientNum() {
    return this.maxConcurrentClientNum;
  }

  public ServerProperties setMaxConcurrentClientNum(int maxConcurrentClientNum) {
    this.maxConcurrentClientNum = maxConcurrentClientNum;
    setMaxConcurrentClientNumIsSet(true);
    return this;
  }

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

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

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

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

  public ServerProperties setWatermarkSecretKey(@org.apache.thrift.annotation.Nullable java.lang.String watermarkSecretKey) {
    this.watermarkSecretKey = watermarkSecretKey;
    return this;
  }

  public void unsetWatermarkSecretKey() {
    this.watermarkSecretKey = null;
  }

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

  public void setWatermarkSecretKeyIsSet(boolean value) {
    if (!value) {
      this.watermarkSecretKey = null;
    }
  }

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

  public ServerProperties setWatermarkBitString(@org.apache.thrift.annotation.Nullable java.lang.String watermarkBitString) {
    this.watermarkBitString = watermarkBitString;
    return this;
  }

  public void unsetWatermarkBitString() {
    this.watermarkBitString = null;
  }

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

  public void setWatermarkBitStringIsSet(boolean value) {
    if (!value) {
      this.watermarkBitString = null;
    }
  }

  public int getWatermarkParamMarkRate() {
    return this.watermarkParamMarkRate;
  }

  public ServerProperties setWatermarkParamMarkRate(int watermarkParamMarkRate) {
    this.watermarkParamMarkRate = watermarkParamMarkRate;
    setWatermarkParamMarkRateIsSet(true);
    return this;
  }

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

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

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

  public int getWatermarkParamMaxRightBit() {
    return this.watermarkParamMaxRightBit;
  }

  public ServerProperties setWatermarkParamMaxRightBit(int watermarkParamMaxRightBit) {
    this.watermarkParamMaxRightBit = watermarkParamMaxRightBit;
    setWatermarkParamMaxRightBitIsSet(true);
    return this;
  }

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

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

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

  public int getThriftMaxFrameSize() {
    return this.thriftMaxFrameSize;
  }

  public ServerProperties setThriftMaxFrameSize(int thriftMaxFrameSize) {
    this.thriftMaxFrameSize = thriftMaxFrameSize;
    setThriftMaxFrameSizeIsSet(true);
    return this;
  }

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

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

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

  public boolean isIsReadOnly() {
    return this.isReadOnly;
  }

  public ServerProperties setIsReadOnly(boolean isReadOnly) {
    this.isReadOnly = isReadOnly;
    setIsReadOnlyIsSet(true);
    return this;
  }

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

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

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

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

  public ServerProperties setBuildInfo(@org.apache.thrift.annotation.Nullable java.lang.String buildInfo) {
    this.buildInfo = buildInfo;
    return this;
  }

  public void unsetBuildInfo() {
    this.buildInfo = null;
  }

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

  public void setBuildInfoIsSet(boolean value) {
    if (!value) {
      this.buildInfo = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case VERSION:
      if (value == null) {
        unsetVersion();
      } else {
        setVersion((java.lang.String)value);
      }
      break;

    case SUPPORTED_TIME_AGGREGATION_OPERATIONS:
      if (value == null) {
        unsetSupportedTimeAggregationOperations();
      } else {
        setSupportedTimeAggregationOperations((java.util.List)value);
      }
      break;

    case TIMESTAMP_PRECISION:
      if (value == null) {
        unsetTimestampPrecision();
      } else {
        setTimestampPrecision((java.lang.String)value);
      }
      break;

    case MAX_CONCURRENT_CLIENT_NUM:
      if (value == null) {
        unsetMaxConcurrentClientNum();
      } else {
        setMaxConcurrentClientNum((java.lang.Integer)value);
      }
      break;

    case WATERMARK_SECRET_KEY:
      if (value == null) {
        unsetWatermarkSecretKey();
      } else {
        setWatermarkSecretKey((java.lang.String)value);
      }
      break;

    case WATERMARK_BIT_STRING:
      if (value == null) {
        unsetWatermarkBitString();
      } else {
        setWatermarkBitString((java.lang.String)value);
      }
      break;

    case WATERMARK_PARAM_MARK_RATE:
      if (value == null) {
        unsetWatermarkParamMarkRate();
      } else {
        setWatermarkParamMarkRate((java.lang.Integer)value);
      }
      break;

    case WATERMARK_PARAM_MAX_RIGHT_BIT:
      if (value == null) {
        unsetWatermarkParamMaxRightBit();
      } else {
        setWatermarkParamMaxRightBit((java.lang.Integer)value);
      }
      break;

    case THRIFT_MAX_FRAME_SIZE:
      if (value == null) {
        unsetThriftMaxFrameSize();
      } else {
        setThriftMaxFrameSize((java.lang.Integer)value);
      }
      break;

    case IS_READ_ONLY:
      if (value == null) {
        unsetIsReadOnly();
      } else {
        setIsReadOnly((java.lang.Boolean)value);
      }
      break;

    case BUILD_INFO:
      if (value == null) {
        unsetBuildInfo();
      } else {
        setBuildInfo((java.lang.String)value);
      }
      break;

    }
  }

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

    case SUPPORTED_TIME_AGGREGATION_OPERATIONS:
      return getSupportedTimeAggregationOperations();

    case TIMESTAMP_PRECISION:
      return getTimestampPrecision();

    case MAX_CONCURRENT_CLIENT_NUM:
      return getMaxConcurrentClientNum();

    case WATERMARK_SECRET_KEY:
      return getWatermarkSecretKey();

    case WATERMARK_BIT_STRING:
      return getWatermarkBitString();

    case WATERMARK_PARAM_MARK_RATE:
      return getWatermarkParamMarkRate();

    case WATERMARK_PARAM_MAX_RIGHT_BIT:
      return getWatermarkParamMaxRightBit();

    case THRIFT_MAX_FRAME_SIZE:
      return getThriftMaxFrameSize();

    case IS_READ_ONLY:
      return isIsReadOnly();

    case BUILD_INFO:
      return getBuildInfo();

    }
    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 VERSION:
      return isSetVersion();
    case SUPPORTED_TIME_AGGREGATION_OPERATIONS:
      return isSetSupportedTimeAggregationOperations();
    case TIMESTAMP_PRECISION:
      return isSetTimestampPrecision();
    case MAX_CONCURRENT_CLIENT_NUM:
      return isSetMaxConcurrentClientNum();
    case WATERMARK_SECRET_KEY:
      return isSetWatermarkSecretKey();
    case WATERMARK_BIT_STRING:
      return isSetWatermarkBitString();
    case WATERMARK_PARAM_MARK_RATE:
      return isSetWatermarkParamMarkRate();
    case WATERMARK_PARAM_MAX_RIGHT_BIT:
      return isSetWatermarkParamMaxRightBit();
    case THRIFT_MAX_FRAME_SIZE:
      return isSetThriftMaxFrameSize();
    case IS_READ_ONLY:
      return isSetIsReadOnly();
    case BUILD_INFO:
      return isSetBuildInfo();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    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.equals(that.version))
        return false;
    }

    boolean this_present_supportedTimeAggregationOperations = true && this.isSetSupportedTimeAggregationOperations();
    boolean that_present_supportedTimeAggregationOperations = true && that.isSetSupportedTimeAggregationOperations();
    if (this_present_supportedTimeAggregationOperations || that_present_supportedTimeAggregationOperations) {
      if (!(this_present_supportedTimeAggregationOperations && that_present_supportedTimeAggregationOperations))
        return false;
      if (!this.supportedTimeAggregationOperations.equals(that.supportedTimeAggregationOperations))
        return false;
    }

    boolean this_present_timestampPrecision = true && this.isSetTimestampPrecision();
    boolean that_present_timestampPrecision = true && that.isSetTimestampPrecision();
    if (this_present_timestampPrecision || that_present_timestampPrecision) {
      if (!(this_present_timestampPrecision && that_present_timestampPrecision))
        return false;
      if (!this.timestampPrecision.equals(that.timestampPrecision))
        return false;
    }

    boolean this_present_maxConcurrentClientNum = true;
    boolean that_present_maxConcurrentClientNum = true;
    if (this_present_maxConcurrentClientNum || that_present_maxConcurrentClientNum) {
      if (!(this_present_maxConcurrentClientNum && that_present_maxConcurrentClientNum))
        return false;
      if (this.maxConcurrentClientNum != that.maxConcurrentClientNum)
        return false;
    }

    boolean this_present_watermarkSecretKey = true && this.isSetWatermarkSecretKey();
    boolean that_present_watermarkSecretKey = true && that.isSetWatermarkSecretKey();
    if (this_present_watermarkSecretKey || that_present_watermarkSecretKey) {
      if (!(this_present_watermarkSecretKey && that_present_watermarkSecretKey))
        return false;
      if (!this.watermarkSecretKey.equals(that.watermarkSecretKey))
        return false;
    }

    boolean this_present_watermarkBitString = true && this.isSetWatermarkBitString();
    boolean that_present_watermarkBitString = true && that.isSetWatermarkBitString();
    if (this_present_watermarkBitString || that_present_watermarkBitString) {
      if (!(this_present_watermarkBitString && that_present_watermarkBitString))
        return false;
      if (!this.watermarkBitString.equals(that.watermarkBitString))
        return false;
    }

    boolean this_present_watermarkParamMarkRate = true && this.isSetWatermarkParamMarkRate();
    boolean that_present_watermarkParamMarkRate = true && that.isSetWatermarkParamMarkRate();
    if (this_present_watermarkParamMarkRate || that_present_watermarkParamMarkRate) {
      if (!(this_present_watermarkParamMarkRate && that_present_watermarkParamMarkRate))
        return false;
      if (this.watermarkParamMarkRate != that.watermarkParamMarkRate)
        return false;
    }

    boolean this_present_watermarkParamMaxRightBit = true && this.isSetWatermarkParamMaxRightBit();
    boolean that_present_watermarkParamMaxRightBit = true && that.isSetWatermarkParamMaxRightBit();
    if (this_present_watermarkParamMaxRightBit || that_present_watermarkParamMaxRightBit) {
      if (!(this_present_watermarkParamMaxRightBit && that_present_watermarkParamMaxRightBit))
        return false;
      if (this.watermarkParamMaxRightBit != that.watermarkParamMaxRightBit)
        return false;
    }

    boolean this_present_thriftMaxFrameSize = true && this.isSetThriftMaxFrameSize();
    boolean that_present_thriftMaxFrameSize = true && that.isSetThriftMaxFrameSize();
    if (this_present_thriftMaxFrameSize || that_present_thriftMaxFrameSize) {
      if (!(this_present_thriftMaxFrameSize && that_present_thriftMaxFrameSize))
        return false;
      if (this.thriftMaxFrameSize != that.thriftMaxFrameSize)
        return false;
    }

    boolean this_present_isReadOnly = true && this.isSetIsReadOnly();
    boolean that_present_isReadOnly = true && that.isSetIsReadOnly();
    if (this_present_isReadOnly || that_present_isReadOnly) {
      if (!(this_present_isReadOnly && that_present_isReadOnly))
        return false;
      if (this.isReadOnly != that.isReadOnly)
        return false;
    }

    boolean this_present_buildInfo = true && this.isSetBuildInfo();
    boolean that_present_buildInfo = true && that.isSetBuildInfo();
    if (this_present_buildInfo || that_present_buildInfo) {
      if (!(this_present_buildInfo && that_present_buildInfo))
        return false;
      if (!this.buildInfo.equals(that.buildInfo))
        return false;
    }

    return true;
  }

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

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

    hashCode = hashCode * 8191 + ((isSetSupportedTimeAggregationOperations()) ? 131071 : 524287);
    if (isSetSupportedTimeAggregationOperations())
      hashCode = hashCode * 8191 + supportedTimeAggregationOperations.hashCode();

    hashCode = hashCode * 8191 + ((isSetTimestampPrecision()) ? 131071 : 524287);
    if (isSetTimestampPrecision())
      hashCode = hashCode * 8191 + timestampPrecision.hashCode();

    hashCode = hashCode * 8191 + maxConcurrentClientNum;

    hashCode = hashCode * 8191 + ((isSetWatermarkSecretKey()) ? 131071 : 524287);
    if (isSetWatermarkSecretKey())
      hashCode = hashCode * 8191 + watermarkSecretKey.hashCode();

    hashCode = hashCode * 8191 + ((isSetWatermarkBitString()) ? 131071 : 524287);
    if (isSetWatermarkBitString())
      hashCode = hashCode * 8191 + watermarkBitString.hashCode();

    hashCode = hashCode * 8191 + ((isSetWatermarkParamMarkRate()) ? 131071 : 524287);
    if (isSetWatermarkParamMarkRate())
      hashCode = hashCode * 8191 + watermarkParamMarkRate;

    hashCode = hashCode * 8191 + ((isSetWatermarkParamMaxRightBit()) ? 131071 : 524287);
    if (isSetWatermarkParamMaxRightBit())
      hashCode = hashCode * 8191 + watermarkParamMaxRightBit;

    hashCode = hashCode * 8191 + ((isSetThriftMaxFrameSize()) ? 131071 : 524287);
    if (isSetThriftMaxFrameSize())
      hashCode = hashCode * 8191 + thriftMaxFrameSize;

    hashCode = hashCode * 8191 + ((isSetIsReadOnly()) ? 131071 : 524287);
    if (isSetIsReadOnly())
      hashCode = hashCode * 8191 + ((isReadOnly) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetBuildInfo()) ? 131071 : 524287);
    if (isSetBuildInfo())
      hashCode = hashCode * 8191 + buildInfo.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    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(isSetSupportedTimeAggregationOperations(), other.isSetSupportedTimeAggregationOperations());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSupportedTimeAggregationOperations()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supportedTimeAggregationOperations, other.supportedTimeAggregationOperations);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTimestampPrecision(), other.isSetTimestampPrecision());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimestampPrecision()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestampPrecision, other.timestampPrecision);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMaxConcurrentClientNum(), other.isSetMaxConcurrentClientNum());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxConcurrentClientNum()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxConcurrentClientNum, other.maxConcurrentClientNum);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetWatermarkSecretKey(), other.isSetWatermarkSecretKey());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWatermarkSecretKey()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.watermarkSecretKey, other.watermarkSecretKey);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetWatermarkBitString(), other.isSetWatermarkBitString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWatermarkBitString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.watermarkBitString, other.watermarkBitString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetWatermarkParamMarkRate(), other.isSetWatermarkParamMarkRate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWatermarkParamMarkRate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.watermarkParamMarkRate, other.watermarkParamMarkRate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetWatermarkParamMaxRightBit(), other.isSetWatermarkParamMaxRightBit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWatermarkParamMaxRightBit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.watermarkParamMaxRightBit, other.watermarkParamMaxRightBit);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetThriftMaxFrameSize(), other.isSetThriftMaxFrameSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetThriftMaxFrameSize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.thriftMaxFrameSize, other.thriftMaxFrameSize);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsReadOnly(), other.isSetIsReadOnly());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsReadOnly()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isReadOnly, other.isReadOnly);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBuildInfo(), other.isSetBuildInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBuildInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.buildInfo, other.buildInfo);
      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("ServerProperties(");
    boolean first = true;

    sb.append("version:");
    if (this.version == null) {
      sb.append("null");
    } else {
      sb.append(this.version);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("supportedTimeAggregationOperations:");
    if (this.supportedTimeAggregationOperations == null) {
      sb.append("null");
    } else {
      sb.append(this.supportedTimeAggregationOperations);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("timestampPrecision:");
    if (this.timestampPrecision == null) {
      sb.append("null");
    } else {
      sb.append(this.timestampPrecision);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("maxConcurrentClientNum:");
    sb.append(this.maxConcurrentClientNum);
    first = false;
    if (isSetWatermarkSecretKey()) {
      if (!first) sb.append(", ");
      sb.append("watermarkSecretKey:");
      if (this.watermarkSecretKey == null) {
        sb.append("null");
      } else {
        sb.append(this.watermarkSecretKey);
      }
      first = false;
    }
    if (isSetWatermarkBitString()) {
      if (!first) sb.append(", ");
      sb.append("watermarkBitString:");
      if (this.watermarkBitString == null) {
        sb.append("null");
      } else {
        sb.append(this.watermarkBitString);
      }
      first = false;
    }
    if (isSetWatermarkParamMarkRate()) {
      if (!first) sb.append(", ");
      sb.append("watermarkParamMarkRate:");
      sb.append(this.watermarkParamMarkRate);
      first = false;
    }
    if (isSetWatermarkParamMaxRightBit()) {
      if (!first) sb.append(", ");
      sb.append("watermarkParamMaxRightBit:");
      sb.append(this.watermarkParamMaxRightBit);
      first = false;
    }
    if (isSetThriftMaxFrameSize()) {
      if (!first) sb.append(", ");
      sb.append("thriftMaxFrameSize:");
      sb.append(this.thriftMaxFrameSize);
      first = false;
    }
    if (isSetIsReadOnly()) {
      if (!first) sb.append(", ");
      sb.append("isReadOnly:");
      sb.append(this.isReadOnly);
      first = false;
    }
    if (isSetBuildInfo()) {
      if (!first) sb.append(", ");
      sb.append("buildInfo:");
      if (this.buildInfo == null) {
        sb.append("null");
      } else {
        sb.append(this.buildInfo);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (version == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'version' was not present! Struct: " + toString());
    }
    if (supportedTimeAggregationOperations == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'supportedTimeAggregationOperations' was not present! Struct: " + toString());
    }
    if (timestampPrecision == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestampPrecision' was not present! Struct: " + toString());
    }
    // check for sub-struct validity
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

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

  private static class ServerPropertiesStandardScheme extends org.apache.thrift.scheme.StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, ServerProperties 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: // VERSION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.version = iprot.readString();
              struct.setVersionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // SUPPORTED_TIME_AGGREGATION_OPERATIONS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list630 = iprot.readListBegin();
                struct.supportedTimeAggregationOperations = new java.util.ArrayList(_list630.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem631;
                for (int _i632 = 0; _i632 < _list630.size; ++_i632)
                {
                  _elem631 = iprot.readString();
                  struct.supportedTimeAggregationOperations.add(_elem631);
                }
                iprot.readListEnd();
              }
              struct.setSupportedTimeAggregationOperationsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TIMESTAMP_PRECISION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.timestampPrecision = iprot.readString();
              struct.setTimestampPrecisionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // MAX_CONCURRENT_CLIENT_NUM
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.maxConcurrentClientNum = iprot.readI32();
              struct.setMaxConcurrentClientNumIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // WATERMARK_SECRET_KEY
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.watermarkSecretKey = iprot.readString();
              struct.setWatermarkSecretKeyIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // WATERMARK_BIT_STRING
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.watermarkBitString = iprot.readString();
              struct.setWatermarkBitStringIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // WATERMARK_PARAM_MARK_RATE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.watermarkParamMarkRate = iprot.readI32();
              struct.setWatermarkParamMarkRateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // WATERMARK_PARAM_MAX_RIGHT_BIT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.watermarkParamMaxRightBit = iprot.readI32();
              struct.setWatermarkParamMaxRightBitIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // THRIFT_MAX_FRAME_SIZE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.thriftMaxFrameSize = iprot.readI32();
              struct.setThriftMaxFrameSizeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // IS_READ_ONLY
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isReadOnly = iprot.readBool();
              struct.setIsReadOnlyIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // BUILD_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.buildInfo = iprot.readString();
              struct.setBuildInfoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.version != null) {
        oprot.writeFieldBegin(VERSION_FIELD_DESC);
        oprot.writeString(struct.version);
        oprot.writeFieldEnd();
      }
      if (struct.supportedTimeAggregationOperations != null) {
        oprot.writeFieldBegin(SUPPORTED_TIME_AGGREGATION_OPERATIONS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.supportedTimeAggregationOperations.size()));
          for (java.lang.String _iter633 : struct.supportedTimeAggregationOperations)
          {
            oprot.writeString(_iter633);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.timestampPrecision != null) {
        oprot.writeFieldBegin(TIMESTAMP_PRECISION_FIELD_DESC);
        oprot.writeString(struct.timestampPrecision);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(MAX_CONCURRENT_CLIENT_NUM_FIELD_DESC);
      oprot.writeI32(struct.maxConcurrentClientNum);
      oprot.writeFieldEnd();
      if (struct.watermarkSecretKey != null) {
        if (struct.isSetWatermarkSecretKey()) {
          oprot.writeFieldBegin(WATERMARK_SECRET_KEY_FIELD_DESC);
          oprot.writeString(struct.watermarkSecretKey);
          oprot.writeFieldEnd();
        }
      }
      if (struct.watermarkBitString != null) {
        if (struct.isSetWatermarkBitString()) {
          oprot.writeFieldBegin(WATERMARK_BIT_STRING_FIELD_DESC);
          oprot.writeString(struct.watermarkBitString);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetWatermarkParamMarkRate()) {
        oprot.writeFieldBegin(WATERMARK_PARAM_MARK_RATE_FIELD_DESC);
        oprot.writeI32(struct.watermarkParamMarkRate);
        oprot.writeFieldEnd();
      }
      if (struct.isSetWatermarkParamMaxRightBit()) {
        oprot.writeFieldBegin(WATERMARK_PARAM_MAX_RIGHT_BIT_FIELD_DESC);
        oprot.writeI32(struct.watermarkParamMaxRightBit);
        oprot.writeFieldEnd();
      }
      if (struct.isSetThriftMaxFrameSize()) {
        oprot.writeFieldBegin(THRIFT_MAX_FRAME_SIZE_FIELD_DESC);
        oprot.writeI32(struct.thriftMaxFrameSize);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIsReadOnly()) {
        oprot.writeFieldBegin(IS_READ_ONLY_FIELD_DESC);
        oprot.writeBool(struct.isReadOnly);
        oprot.writeFieldEnd();
      }
      if (struct.buildInfo != null) {
        if (struct.isSetBuildInfo()) {
          oprot.writeFieldBegin(BUILD_INFO_FIELD_DESC);
          oprot.writeString(struct.buildInfo);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class ServerPropertiesTupleScheme extends org.apache.thrift.scheme.TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, ServerProperties struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeString(struct.version);
      {
        oprot.writeI32(struct.supportedTimeAggregationOperations.size());
        for (java.lang.String _iter634 : struct.supportedTimeAggregationOperations)
        {
          oprot.writeString(_iter634);
        }
      }
      oprot.writeString(struct.timestampPrecision);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetMaxConcurrentClientNum()) {
        optionals.set(0);
      }
      if (struct.isSetWatermarkSecretKey()) {
        optionals.set(1);
      }
      if (struct.isSetWatermarkBitString()) {
        optionals.set(2);
      }
      if (struct.isSetWatermarkParamMarkRate()) {
        optionals.set(3);
      }
      if (struct.isSetWatermarkParamMaxRightBit()) {
        optionals.set(4);
      }
      if (struct.isSetThriftMaxFrameSize()) {
        optionals.set(5);
      }
      if (struct.isSetIsReadOnly()) {
        optionals.set(6);
      }
      if (struct.isSetBuildInfo()) {
        optionals.set(7);
      }
      oprot.writeBitSet(optionals, 8);
      if (struct.isSetMaxConcurrentClientNum()) {
        oprot.writeI32(struct.maxConcurrentClientNum);
      }
      if (struct.isSetWatermarkSecretKey()) {
        oprot.writeString(struct.watermarkSecretKey);
      }
      if (struct.isSetWatermarkBitString()) {
        oprot.writeString(struct.watermarkBitString);
      }
      if (struct.isSetWatermarkParamMarkRate()) {
        oprot.writeI32(struct.watermarkParamMarkRate);
      }
      if (struct.isSetWatermarkParamMaxRightBit()) {
        oprot.writeI32(struct.watermarkParamMaxRightBit);
      }
      if (struct.isSetThriftMaxFrameSize()) {
        oprot.writeI32(struct.thriftMaxFrameSize);
      }
      if (struct.isSetIsReadOnly()) {
        oprot.writeBool(struct.isReadOnly);
      }
      if (struct.isSetBuildInfo()) {
        oprot.writeString(struct.buildInfo);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, ServerProperties struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.version = iprot.readString();
      struct.setVersionIsSet(true);
      {
        org.apache.thrift.protocol.TList _list635 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
        struct.supportedTimeAggregationOperations = new java.util.ArrayList(_list635.size);
        @org.apache.thrift.annotation.Nullable java.lang.String _elem636;
        for (int _i637 = 0; _i637 < _list635.size; ++_i637)
        {
          _elem636 = iprot.readString();
          struct.supportedTimeAggregationOperations.add(_elem636);
        }
      }
      struct.setSupportedTimeAggregationOperationsIsSet(true);
      struct.timestampPrecision = iprot.readString();
      struct.setTimestampPrecisionIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(8);
      if (incoming.get(0)) {
        struct.maxConcurrentClientNum = iprot.readI32();
        struct.setMaxConcurrentClientNumIsSet(true);
      }
      if (incoming.get(1)) {
        struct.watermarkSecretKey = iprot.readString();
        struct.setWatermarkSecretKeyIsSet(true);
      }
      if (incoming.get(2)) {
        struct.watermarkBitString = iprot.readString();
        struct.setWatermarkBitStringIsSet(true);
      }
      if (incoming.get(3)) {
        struct.watermarkParamMarkRate = iprot.readI32();
        struct.setWatermarkParamMarkRateIsSet(true);
      }
      if (incoming.get(4)) {
        struct.watermarkParamMaxRightBit = iprot.readI32();
        struct.setWatermarkParamMaxRightBitIsSet(true);
      }
      if (incoming.get(5)) {
        struct.thriftMaxFrameSize = iprot.readI32();
        struct.setThriftMaxFrameSizeIsSet(true);
      }
      if (incoming.get(6)) {
        struct.isReadOnly = iprot.readBool();
        struct.setIsReadOnlyIsSet(true);
      }
      if (incoming.get(7)) {
        struct.buildInfo = iprot.readString();
        struct.setBuildInfoIsSet(true);
      }
    }
  }

  private static  S scheme(org.apache.thrift.protocol.TProtocol proto) {
    return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy