/** Performs a deep copy on <i>other</i>. */
 public RemoteInterpreterContext(RemoteInterpreterContext other) {
   if (other.isSetNoteId()) {
     this.noteId = other.noteId;
   }
   if (other.isSetParagraphId()) {
     this.paragraphId = other.paragraphId;
   }
   if (other.isSetParagraphTitle()) {
     this.paragraphTitle = other.paragraphTitle;
   }
   if (other.isSetParagraphText()) {
     this.paragraphText = other.paragraphText;
   }
   if (other.isSetAuthenticationInfo()) {
     this.authenticationInfo = other.authenticationInfo;
   }
   if (other.isSetConfig()) {
     this.config = other.config;
   }
   if (other.isSetGui()) {
     this.gui = other.gui;
   }
   if (other.isSetRunners()) {
     this.runners = other.runners;
   }
 }
    public void write(org.apache.thrift.protocol.TProtocol oprot, RemoteInterpreterContext struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.noteId != null) {
        oprot.writeFieldBegin(NOTE_ID_FIELD_DESC);
        oprot.writeString(struct.noteId);
        oprot.writeFieldEnd();
      }
      if (struct.paragraphId != null) {
        oprot.writeFieldBegin(PARAGRAPH_ID_FIELD_DESC);
        oprot.writeString(struct.paragraphId);
        oprot.writeFieldEnd();
      }
      if (struct.paragraphTitle != null) {
        oprot.writeFieldBegin(PARAGRAPH_TITLE_FIELD_DESC);
        oprot.writeString(struct.paragraphTitle);
        oprot.writeFieldEnd();
      }
      if (struct.paragraphText != null) {
        oprot.writeFieldBegin(PARAGRAPH_TEXT_FIELD_DESC);
        oprot.writeString(struct.paragraphText);
        oprot.writeFieldEnd();
      }
      if (struct.authenticationInfo != null) {
        oprot.writeFieldBegin(AUTHENTICATION_INFO_FIELD_DESC);
        oprot.writeString(struct.authenticationInfo);
        oprot.writeFieldEnd();
      }
      if (struct.config != null) {
        oprot.writeFieldBegin(CONFIG_FIELD_DESC);
        oprot.writeString(struct.config);
        oprot.writeFieldEnd();
      }
      if (struct.gui != null) {
        oprot.writeFieldBegin(GUI_FIELD_DESC);
        oprot.writeString(struct.gui);
        oprot.writeFieldEnd();
      }
      if (struct.runners != null) {
        oprot.writeFieldBegin(RUNNERS_FIELD_DESC);
        oprot.writeString(struct.runners);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
    public void read(org.apache.thrift.protocol.TProtocol iprot, RemoteInterpreterContext 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: // NOTE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.noteId = iprot.readString();
              struct.setNoteIdIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // PARAGRAPH_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.paragraphId = iprot.readString();
              struct.setParagraphIdIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // PARAGRAPH_TITLE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.paragraphTitle = iprot.readString();
              struct.setParagraphTitleIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // PARAGRAPH_TEXT
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.paragraphText = iprot.readString();
              struct.setParagraphTextIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // AUTHENTICATION_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.authenticationInfo = iprot.readString();
              struct.setAuthenticationInfoIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // CONFIG
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.config = iprot.readString();
              struct.setConfigIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // GUI
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.gui = iprot.readString();
              struct.setGuiIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // RUNNERS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.runners = iprot.readString();
              struct.setRunnersIsSet(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();
    }
  @Override
  public int compareTo(RemoteInterpreterContext other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetNoteId()).compareTo(other.isSetNoteId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNoteId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.noteId, other.noteId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetParagraphId()).compareTo(other.isSetParagraphId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetParagraphId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paragraphId, other.paragraphId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetParagraphTitle()).compareTo(other.isSetParagraphTitle());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetParagraphTitle()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.paragraphTitle, other.paragraphTitle);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetParagraphText()).compareTo(other.isSetParagraphText());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetParagraphText()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.paragraphText, other.paragraphText);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetAuthenticationInfo()).compareTo(other.isSetAuthenticationInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAuthenticationInfo()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.authenticationInfo, other.authenticationInfo);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetConfig()).compareTo(other.isSetConfig());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetConfig()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.config, other.config);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetGui()).compareTo(other.isSetGui());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGui()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gui, other.gui);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRunners()).compareTo(other.isSetRunners());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRunners()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runners, other.runners);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
  public boolean equals(RemoteInterpreterContext that) {
    if (that == null) return false;

    boolean this_present_noteId = true && this.isSetNoteId();
    boolean that_present_noteId = true && that.isSetNoteId();
    if (this_present_noteId || that_present_noteId) {
      if (!(this_present_noteId && that_present_noteId)) return false;
      if (!this.noteId.equals(that.noteId)) return false;
    }

    boolean this_present_paragraphId = true && this.isSetParagraphId();
    boolean that_present_paragraphId = true && that.isSetParagraphId();
    if (this_present_paragraphId || that_present_paragraphId) {
      if (!(this_present_paragraphId && that_present_paragraphId)) return false;
      if (!this.paragraphId.equals(that.paragraphId)) return false;
    }

    boolean this_present_paragraphTitle = true && this.isSetParagraphTitle();
    boolean that_present_paragraphTitle = true && that.isSetParagraphTitle();
    if (this_present_paragraphTitle || that_present_paragraphTitle) {
      if (!(this_present_paragraphTitle && that_present_paragraphTitle)) return false;
      if (!this.paragraphTitle.equals(that.paragraphTitle)) return false;
    }

    boolean this_present_paragraphText = true && this.isSetParagraphText();
    boolean that_present_paragraphText = true && that.isSetParagraphText();
    if (this_present_paragraphText || that_present_paragraphText) {
      if (!(this_present_paragraphText && that_present_paragraphText)) return false;
      if (!this.paragraphText.equals(that.paragraphText)) return false;
    }

    boolean this_present_authenticationInfo = true && this.isSetAuthenticationInfo();
    boolean that_present_authenticationInfo = true && that.isSetAuthenticationInfo();
    if (this_present_authenticationInfo || that_present_authenticationInfo) {
      if (!(this_present_authenticationInfo && that_present_authenticationInfo)) return false;
      if (!this.authenticationInfo.equals(that.authenticationInfo)) return false;
    }

    boolean this_present_config = true && this.isSetConfig();
    boolean that_present_config = true && that.isSetConfig();
    if (this_present_config || that_present_config) {
      if (!(this_present_config && that_present_config)) return false;
      if (!this.config.equals(that.config)) return false;
    }

    boolean this_present_gui = true && this.isSetGui();
    boolean that_present_gui = true && that.isSetGui();
    if (this_present_gui || that_present_gui) {
      if (!(this_present_gui && that_present_gui)) return false;
      if (!this.gui.equals(that.gui)) return false;
    }

    boolean this_present_runners = true && this.isSetRunners();
    boolean that_present_runners = true && that.isSetRunners();
    if (this_present_runners || that_present_runners) {
      if (!(this_present_runners && that_present_runners)) return false;
      if (!this.runners.equals(that.runners)) return false;
    }

    return true;
  }
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterContext struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(8);
   if (incoming.get(0)) {
     struct.noteId = iprot.readString();
     struct.setNoteIdIsSet(true);
   }
   if (incoming.get(1)) {
     struct.paragraphId = iprot.readString();
     struct.setParagraphIdIsSet(true);
   }
   if (incoming.get(2)) {
     struct.paragraphTitle = iprot.readString();
     struct.setParagraphTitleIsSet(true);
   }
   if (incoming.get(3)) {
     struct.paragraphText = iprot.readString();
     struct.setParagraphTextIsSet(true);
   }
   if (incoming.get(4)) {
     struct.authenticationInfo = iprot.readString();
     struct.setAuthenticationInfoIsSet(true);
   }
   if (incoming.get(5)) {
     struct.config = iprot.readString();
     struct.setConfigIsSet(true);
   }
   if (incoming.get(6)) {
     struct.gui = iprot.readString();
     struct.setGuiIsSet(true);
   }
   if (incoming.get(7)) {
     struct.runners = iprot.readString();
     struct.setRunnersIsSet(true);
   }
 }
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, RemoteInterpreterContext struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetNoteId()) {
     optionals.set(0);
   }
   if (struct.isSetParagraphId()) {
     optionals.set(1);
   }
   if (struct.isSetParagraphTitle()) {
     optionals.set(2);
   }
   if (struct.isSetParagraphText()) {
     optionals.set(3);
   }
   if (struct.isSetAuthenticationInfo()) {
     optionals.set(4);
   }
   if (struct.isSetConfig()) {
     optionals.set(5);
   }
   if (struct.isSetGui()) {
     optionals.set(6);
   }
   if (struct.isSetRunners()) {
     optionals.set(7);
   }
   oprot.writeBitSet(optionals, 8);
   if (struct.isSetNoteId()) {
     oprot.writeString(struct.noteId);
   }
   if (struct.isSetParagraphId()) {
     oprot.writeString(struct.paragraphId);
   }
   if (struct.isSetParagraphTitle()) {
     oprot.writeString(struct.paragraphTitle);
   }
   if (struct.isSetParagraphText()) {
     oprot.writeString(struct.paragraphText);
   }
   if (struct.isSetAuthenticationInfo()) {
     oprot.writeString(struct.authenticationInfo);
   }
   if (struct.isSetConfig()) {
     oprot.writeString(struct.config);
   }
   if (struct.isSetGui()) {
     oprot.writeString(struct.gui);
   }
   if (struct.isSetRunners()) {
     oprot.writeString(struct.runners);
   }
 }