Example #1
0
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    oprot.writeFieldBegin(START_INDEX_FIELD_DESC);
    oprot.writeI32(this.startIndex);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(TOTAL_NOTES_FIELD_DESC);
    oprot.writeI32(this.totalNotes);
    oprot.writeFieldEnd();
    if (this.notes != null) {
      oprot.writeFieldBegin(NOTES_FIELD_DESC);
      {
        oprot.writeListBegin(new TList(TType.STRUCT, this.notes.size()));
        for (com.evernote.edam.type.Note _iter57 : this.notes) {
          _iter57.write(oprot);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    if (this.stoppedWords != null) {
      if (isSetStoppedWords()) {
        oprot.writeFieldBegin(STOPPED_WORDS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRING, this.stoppedWords.size()));
          for (String _iter58 : this.stoppedWords) {
            oprot.writeString(_iter58);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
    }
    if (this.searchedWords != null) {
      if (isSetSearchedWords()) {
        oprot.writeFieldBegin(SEARCHED_WORDS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRING, this.searchedWords.size()));
          for (String _iter59 : this.searchedWords) {
            oprot.writeString(_iter59);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
    }
    if (isSetUpdateCount()) {
      oprot.writeFieldBegin(UPDATE_COUNT_FIELD_DESC);
      oprot.writeI32(this.updateCount);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (this.guid != null) {
      if (isSetGuid()) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
    }
    if (this.name != null) {
      if (isSetName()) {
        oprot.writeFieldBegin(NAME_FIELD_DESC);
        oprot.writeString(this.name);
        oprot.writeFieldEnd();
      }
    }
    if (this.query != null) {
      if (isSetQuery()) {
        oprot.writeFieldBegin(QUERY_FIELD_DESC);
        oprot.writeString(this.query);
        oprot.writeFieldEnd();
      }
    }
    if (this.format != null) {
      if (isSetFormat()) {
        oprot.writeFieldBegin(FORMAT_FIELD_DESC);
        oprot.writeI32(this.format.getValue());
        oprot.writeFieldEnd();
      }
    }
    if (isSetUpdateSequenceNum()) {
      oprot.writeFieldBegin(UPDATE_SEQUENCE_NUM_FIELD_DESC);
      oprot.writeI32(this.updateSequenceNum);
      oprot.writeFieldEnd();
    }
    if (this.scope != null) {
      if (isSetScope()) {
        oprot.writeFieldBegin(SCOPE_FIELD_DESC);
        this.scope.write(oprot);
        oprot.writeFieldEnd();
      }
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }