TPythonEnvInfo.java

/**
 * Autogenerated by Thrift Compiler (0.16.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.doris.thrift;

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

  private static final org.apache.thrift.protocol.TField ENV_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("env_name", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField FULL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("full_version", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField ENV_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("env_type", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField BASE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("base_path", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField EXECUTABLE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("executable_path", org.apache.thrift.protocol.TType.STRING, (short)5);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String env_name; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String full_version; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String env_type; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String base_path; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String executable_path; // 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 {
    ENV_NAME((short)1, "env_name"),
    FULL_VERSION((short)2, "full_version"),
    ENV_TYPE((short)3, "env_type"),
    BASE_PATH((short)4, "base_path"),
    EXECUTABLE_PATH((short)5, "executable_path");

    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

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

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // ENV_NAME
          return ENV_NAME;
        case 2: // FULL_VERSION
          return FULL_VERSION;
        case 3: // ENV_TYPE
          return ENV_TYPE;
        case 4: // BASE_PATH
          return BASE_PATH;
        case 5: // EXECUTABLE_PATH
          return EXECUTABLE_PATH;
        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 _Fields optionals[] = {_Fields.ENV_NAME,_Fields.FULL_VERSION,_Fields.ENV_TYPE,_Fields.BASE_PATH,_Fields.EXECUTABLE_PATH};
  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.ENV_NAME, new org.apache.thrift.meta_data.FieldMetaData("env_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.FULL_VERSION, new org.apache.thrift.meta_data.FieldMetaData("full_version", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ENV_TYPE, new org.apache.thrift.meta_data.FieldMetaData("env_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.BASE_PATH, new org.apache.thrift.meta_data.FieldMetaData("base_path", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.EXECUTABLE_PATH, new org.apache.thrift.meta_data.FieldMetaData("executable_path", 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(TPythonEnvInfo.class, metaDataMap);
  }

  public TPythonEnvInfo() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TPythonEnvInfo(TPythonEnvInfo other) {
    if (other.isSetEnvName()) {
      this.env_name = other.env_name;
    }
    if (other.isSetFullVersion()) {
      this.full_version = other.full_version;
    }
    if (other.isSetEnvType()) {
      this.env_type = other.env_type;
    }
    if (other.isSetBasePath()) {
      this.base_path = other.base_path;
    }
    if (other.isSetExecutablePath()) {
      this.executable_path = other.executable_path;
    }
  }

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

  @Override
  public void clear() {
    this.env_name = null;
    this.full_version = null;
    this.env_type = null;
    this.base_path = null;
    this.executable_path = null;
  }

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

  public TPythonEnvInfo setEnvName(@org.apache.thrift.annotation.Nullable java.lang.String env_name) {
    this.env_name = env_name;
    return this;
  }

  public void unsetEnvName() {
    this.env_name = null;
  }

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

  public void setEnvNameIsSet(boolean value) {
    if (!value) {
      this.env_name = null;
    }
  }

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

  public TPythonEnvInfo setFullVersion(@org.apache.thrift.annotation.Nullable java.lang.String full_version) {
    this.full_version = full_version;
    return this;
  }

  public void unsetFullVersion() {
    this.full_version = null;
  }

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

  public void setFullVersionIsSet(boolean value) {
    if (!value) {
      this.full_version = null;
    }
  }

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

  public TPythonEnvInfo setEnvType(@org.apache.thrift.annotation.Nullable java.lang.String env_type) {
    this.env_type = env_type;
    return this;
  }

  public void unsetEnvType() {
    this.env_type = null;
  }

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

  public void setEnvTypeIsSet(boolean value) {
    if (!value) {
      this.env_type = null;
    }
  }

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

  public TPythonEnvInfo setBasePath(@org.apache.thrift.annotation.Nullable java.lang.String base_path) {
    this.base_path = base_path;
    return this;
  }

  public void unsetBasePath() {
    this.base_path = null;
  }

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

  public void setBasePathIsSet(boolean value) {
    if (!value) {
      this.base_path = null;
    }
  }

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

  public TPythonEnvInfo setExecutablePath(@org.apache.thrift.annotation.Nullable java.lang.String executable_path) {
    this.executable_path = executable_path;
    return this;
  }

  public void unsetExecutablePath() {
    this.executable_path = null;
  }

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

  public void setExecutablePathIsSet(boolean value) {
    if (!value) {
      this.executable_path = null;
    }
  }

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

    case FULL_VERSION:
      if (value == null) {
        unsetFullVersion();
      } else {
        setFullVersion((java.lang.String)value);
      }
      break;

    case ENV_TYPE:
      if (value == null) {
        unsetEnvType();
      } else {
        setEnvType((java.lang.String)value);
      }
      break;

    case BASE_PATH:
      if (value == null) {
        unsetBasePath();
      } else {
        setBasePath((java.lang.String)value);
      }
      break;

    case EXECUTABLE_PATH:
      if (value == null) {
        unsetExecutablePath();
      } else {
        setExecutablePath((java.lang.String)value);
      }
      break;

    }
  }

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

    case FULL_VERSION:
      return getFullVersion();

    case ENV_TYPE:
      return getEnvType();

    case BASE_PATH:
      return getBasePath();

    case EXECUTABLE_PATH:
      return getExecutablePath();

    }
    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 ENV_NAME:
      return isSetEnvName();
    case FULL_VERSION:
      return isSetFullVersion();
    case ENV_TYPE:
      return isSetEnvType();
    case BASE_PATH:
      return isSetBasePath();
    case EXECUTABLE_PATH:
      return isSetExecutablePath();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_env_name = true && this.isSetEnvName();
    boolean that_present_env_name = true && that.isSetEnvName();
    if (this_present_env_name || that_present_env_name) {
      if (!(this_present_env_name && that_present_env_name))
        return false;
      if (!this.env_name.equals(that.env_name))
        return false;
    }

    boolean this_present_full_version = true && this.isSetFullVersion();
    boolean that_present_full_version = true && that.isSetFullVersion();
    if (this_present_full_version || that_present_full_version) {
      if (!(this_present_full_version && that_present_full_version))
        return false;
      if (!this.full_version.equals(that.full_version))
        return false;
    }

    boolean this_present_env_type = true && this.isSetEnvType();
    boolean that_present_env_type = true && that.isSetEnvType();
    if (this_present_env_type || that_present_env_type) {
      if (!(this_present_env_type && that_present_env_type))
        return false;
      if (!this.env_type.equals(that.env_type))
        return false;
    }

    boolean this_present_base_path = true && this.isSetBasePath();
    boolean that_present_base_path = true && that.isSetBasePath();
    if (this_present_base_path || that_present_base_path) {
      if (!(this_present_base_path && that_present_base_path))
        return false;
      if (!this.base_path.equals(that.base_path))
        return false;
    }

    boolean this_present_executable_path = true && this.isSetExecutablePath();
    boolean that_present_executable_path = true && that.isSetExecutablePath();
    if (this_present_executable_path || that_present_executable_path) {
      if (!(this_present_executable_path && that_present_executable_path))
        return false;
      if (!this.executable_path.equals(that.executable_path))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetEnvName()) ? 131071 : 524287);
    if (isSetEnvName())
      hashCode = hashCode * 8191 + env_name.hashCode();

    hashCode = hashCode * 8191 + ((isSetFullVersion()) ? 131071 : 524287);
    if (isSetFullVersion())
      hashCode = hashCode * 8191 + full_version.hashCode();

    hashCode = hashCode * 8191 + ((isSetEnvType()) ? 131071 : 524287);
    if (isSetEnvType())
      hashCode = hashCode * 8191 + env_type.hashCode();

    hashCode = hashCode * 8191 + ((isSetBasePath()) ? 131071 : 524287);
    if (isSetBasePath())
      hashCode = hashCode * 8191 + base_path.hashCode();

    hashCode = hashCode * 8191 + ((isSetExecutablePath()) ? 131071 : 524287);
    if (isSetExecutablePath())
      hashCode = hashCode * 8191 + executable_path.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetEnvName(), other.isSetEnvName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnvName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.env_name, other.env_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFullVersion(), other.isSetFullVersion());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFullVersion()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.full_version, other.full_version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEnvType(), other.isSetEnvType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnvType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.env_type, other.env_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBasePath(), other.isSetBasePath());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBasePath()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_path, other.base_path);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetExecutablePath(), other.isSetExecutablePath());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetExecutablePath()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executable_path, other.executable_path);
      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("TPythonEnvInfo(");
    boolean first = true;

    if (isSetEnvName()) {
      sb.append("env_name:");
      if (this.env_name == null) {
        sb.append("null");
      } else {
        sb.append(this.env_name);
      }
      first = false;
    }
    if (isSetFullVersion()) {
      if (!first) sb.append(", ");
      sb.append("full_version:");
      if (this.full_version == null) {
        sb.append("null");
      } else {
        sb.append(this.full_version);
      }
      first = false;
    }
    if (isSetEnvType()) {
      if (!first) sb.append(", ");
      sb.append("env_type:");
      if (this.env_type == null) {
        sb.append("null");
      } else {
        sb.append(this.env_type);
      }
      first = false;
    }
    if (isSetBasePath()) {
      if (!first) sb.append(", ");
      sb.append("base_path:");
      if (this.base_path == null) {
        sb.append("null");
      } else {
        sb.append(this.base_path);
      }
      first = false;
    }
    if (isSetExecutablePath()) {
      if (!first) sb.append(", ");
      sb.append("executable_path:");
      if (this.executable_path == null) {
        sb.append("null");
      } else {
        sb.append(this.executable_path);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
  }

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

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
    try {
      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 TPythonEnvInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TPythonEnvInfoStandardScheme getScheme() {
      return new TPythonEnvInfoStandardScheme();
    }
  }

  private static class TPythonEnvInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TPythonEnvInfo> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TPythonEnvInfo 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: // ENV_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.env_name = iprot.readString();
              struct.setEnvNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // FULL_VERSION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.full_version = iprot.readString();
              struct.setFullVersionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // ENV_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.env_type = iprot.readString();
              struct.setEnvTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // BASE_PATH
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.base_path = iprot.readString();
              struct.setBasePathIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // EXECUTABLE_PATH
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.executable_path = iprot.readString();
              struct.setExecutablePathIsSet(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, TPythonEnvInfo struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.env_name != null) {
        if (struct.isSetEnvName()) {
          oprot.writeFieldBegin(ENV_NAME_FIELD_DESC);
          oprot.writeString(struct.env_name);
          oprot.writeFieldEnd();
        }
      }
      if (struct.full_version != null) {
        if (struct.isSetFullVersion()) {
          oprot.writeFieldBegin(FULL_VERSION_FIELD_DESC);
          oprot.writeString(struct.full_version);
          oprot.writeFieldEnd();
        }
      }
      if (struct.env_type != null) {
        if (struct.isSetEnvType()) {
          oprot.writeFieldBegin(ENV_TYPE_FIELD_DESC);
          oprot.writeString(struct.env_type);
          oprot.writeFieldEnd();
        }
      }
      if (struct.base_path != null) {
        if (struct.isSetBasePath()) {
          oprot.writeFieldBegin(BASE_PATH_FIELD_DESC);
          oprot.writeString(struct.base_path);
          oprot.writeFieldEnd();
        }
      }
      if (struct.executable_path != null) {
        if (struct.isSetExecutablePath()) {
          oprot.writeFieldBegin(EXECUTABLE_PATH_FIELD_DESC);
          oprot.writeString(struct.executable_path);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TPythonEnvInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TPythonEnvInfo> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TPythonEnvInfo struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetEnvName()) {
        optionals.set(0);
      }
      if (struct.isSetFullVersion()) {
        optionals.set(1);
      }
      if (struct.isSetEnvType()) {
        optionals.set(2);
      }
      if (struct.isSetBasePath()) {
        optionals.set(3);
      }
      if (struct.isSetExecutablePath()) {
        optionals.set(4);
      }
      oprot.writeBitSet(optionals, 5);
      if (struct.isSetEnvName()) {
        oprot.writeString(struct.env_name);
      }
      if (struct.isSetFullVersion()) {
        oprot.writeString(struct.full_version);
      }
      if (struct.isSetEnvType()) {
        oprot.writeString(struct.env_type);
      }
      if (struct.isSetBasePath()) {
        oprot.writeString(struct.base_path);
      }
      if (struct.isSetExecutablePath()) {
        oprot.writeString(struct.executable_path);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TPythonEnvInfo struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(5);
      if (incoming.get(0)) {
        struct.env_name = iprot.readString();
        struct.setEnvNameIsSet(true);
      }
      if (incoming.get(1)) {
        struct.full_version = iprot.readString();
        struct.setFullVersionIsSet(true);
      }
      if (incoming.get(2)) {
        struct.env_type = iprot.readString();
        struct.setEnvTypeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.base_path = iprot.readString();
        struct.setBasePathIsSet(true);
      }
      if (incoming.get(4)) {
        struct.executable_path = iprot.readString();
        struct.setExecutablePathIsSet(true);
      }
    }
  }

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