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 = "2024-09-12")
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 THRIFT_MAX_FRAME_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("thriftMaxFrameSize", org.apache.thrift.protocol.TType.I32, (short)5);
  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)6);
  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)7);
  private static final org.apache.thrift.protocol.TField LOGO_FIELD_DESC = new org.apache.thrift.protocol.TField("logo", org.apache.thrift.protocol.TType.STRING, (short)8);

  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 int thriftMaxFrameSize; // optional
  public boolean isReadOnly; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String buildInfo; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String logo; // 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"),
    THRIFT_MAX_FRAME_SIZE((short)5, "thriftMaxFrameSize"),
    IS_READ_ONLY((short)6, "isReadOnly"),
    BUILD_INFO((short)7, "buildInfo"),
    LOGO((short)8, "logo");

    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: // THRIFT_MAX_FRAME_SIZE
          return THRIFT_MAX_FRAME_SIZE;
        case 6: // IS_READ_ONLY
          return IS_READ_ONLY;
        case 7: // BUILD_INFO
          return BUILD_INFO;
        case 8: // LOGO
          return LOGO;
        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 __THRIFTMAXFRAMESIZE_ISSET_ID = 1;
  private static final int __ISREADONLY_ISSET_ID = 2;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.THRIFT_MAX_FRAME_SIZE,_Fields.IS_READ_ONLY,_Fields.BUILD_INFO,_Fields.LOGO};
  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.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)));
    tmpMap.put(_Fields.LOGO, new org.apache.thrift.meta_data.FieldMetaData("logo", 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;
    this.thriftMaxFrameSize = other.thriftMaxFrameSize;
    this.isReadOnly = other.isReadOnly;
    if (other.isSetBuildInfo()) {
      this.buildInfo = other.buildInfo;
    }
    if (other.isSetLogo()) {
      this.logo = other.logo;
    }
  }

  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;
    setThriftMaxFrameSizeIsSet(false);
    this.thriftMaxFrameSize = 0;
    setIsReadOnlyIsSet(false);
    this.isReadOnly = false;
    this.buildInfo = null;
    this.logo = 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);
  }

  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;
    }
  }

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

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

  public void unsetLogo() {
    this.logo = null;
  }

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

  public void setLogoIsSet(boolean value) {
    if (!value) {
      this.logo = 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 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;

    case LOGO:
      if (value == null) {
        unsetLogo();
      } else {
        setLogo((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 THRIFT_MAX_FRAME_SIZE:
      return getThriftMaxFrameSize();

    case IS_READ_ONLY:
      return isIsReadOnly();

    case BUILD_INFO:
      return getBuildInfo();

    case LOGO:
      return getLogo();

    }
    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 THRIFT_MAX_FRAME_SIZE:
      return isSetThriftMaxFrameSize();
    case IS_READ_ONLY:
      return isSetIsReadOnly();
    case BUILD_INFO:
      return isSetBuildInfo();
    case LOGO:
      return isSetLogo();
    }
    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_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;
    }

    boolean this_present_logo = true && this.isSetLogo();
    boolean that_present_logo = true && that.isSetLogo();
    if (this_present_logo || that_present_logo) {
      if (!(this_present_logo && that_present_logo))
        return false;
      if (!this.logo.equals(that.logo))
        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 + ((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();

    hashCode = hashCode * 8191 + ((isSetLogo()) ? 131071 : 524287);
    if (isSetLogo())
      hashCode = hashCode * 8191 + logo.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(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;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLogo(), other.isSetLogo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLogo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logo, other.logo);
      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 (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;
    }
    if (isSetLogo()) {
      if (!first) sb.append(", ");
      sb.append("logo:");
      if (this.logo == null) {
        sb.append("null");
      } else {
        sb.append(this.logo);
      }
      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 _list654 = iprot.readListBegin();
                struct.supportedTimeAggregationOperations = new java.util.ArrayList(_list654.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem655;
                for (int _i656 = 0; _i656 < _list654.size; ++_i656)
                {
                  _elem655 = iprot.readString();
                  struct.supportedTimeAggregationOperations.add(_elem655);
                }
                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: // 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 6: // 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 7: // 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;
          case 8: // LOGO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.logo = iprot.readString();
              struct.setLogoIsSet(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 _iter657 : struct.supportedTimeAggregationOperations)
          {
            oprot.writeString(_iter657);
          }
          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.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();
        }
      }
      if (struct.logo != null) {
        if (struct.isSetLogo()) {
          oprot.writeFieldBegin(LOGO_FIELD_DESC);
          oprot.writeString(struct.logo);
          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 _iter658 : struct.supportedTimeAggregationOperations)
        {
          oprot.writeString(_iter658);
        }
      }
      oprot.writeString(struct.timestampPrecision);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetMaxConcurrentClientNum()) {
        optionals.set(0);
      }
      if (struct.isSetThriftMaxFrameSize()) {
        optionals.set(1);
      }
      if (struct.isSetIsReadOnly()) {
        optionals.set(2);
      }
      if (struct.isSetBuildInfo()) {
        optionals.set(3);
      }
      if (struct.isSetLogo()) {
        optionals.set(4);
      }
      oprot.writeBitSet(optionals, 5);
      if (struct.isSetMaxConcurrentClientNum()) {
        oprot.writeI32(struct.maxConcurrentClientNum);
      }
      if (struct.isSetThriftMaxFrameSize()) {
        oprot.writeI32(struct.thriftMaxFrameSize);
      }
      if (struct.isSetIsReadOnly()) {
        oprot.writeBool(struct.isReadOnly);
      }
      if (struct.isSetBuildInfo()) {
        oprot.writeString(struct.buildInfo);
      }
      if (struct.isSetLogo()) {
        oprot.writeString(struct.logo);
      }
    }

    @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 _list659 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
        struct.supportedTimeAggregationOperations = new java.util.ArrayList(_list659.size);
        @org.apache.thrift.annotation.Nullable java.lang.String _elem660;
        for (int _i661 = 0; _i661 < _list659.size; ++_i661)
        {
          _elem660 = iprot.readString();
          struct.supportedTimeAggregationOperations.add(_elem660);
        }
      }
      struct.setSupportedTimeAggregationOperationsIsSet(true);
      struct.timestampPrecision = iprot.readString();
      struct.setTimestampPrecisionIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(5);
      if (incoming.get(0)) {
        struct.maxConcurrentClientNum = iprot.readI32();
        struct.setMaxConcurrentClientNumIsSet(true);
      }
      if (incoming.get(1)) {
        struct.thriftMaxFrameSize = iprot.readI32();
        struct.setThriftMaxFrameSizeIsSet(true);
      }
      if (incoming.get(2)) {
        struct.isReadOnly = iprot.readBool();
        struct.setIsReadOnlyIsSet(true);
      }
      if (incoming.get(3)) {
        struct.buildInfo = iprot.readString();
        struct.setBuildInfoIsSet(true);
      }
      if (incoming.get(4)) {
        struct.logo = iprot.readString();
        struct.setLogoIsSet(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