public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    oprot.writeFieldBegin(CURRENT_TIME_FIELD_DESC);
    oprot.writeI64(this.currentTime);
    oprot.writeFieldEnd();
    if (this.authenticationToken != null) {
      oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
      oprot.writeString(this.authenticationToken);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(EXPIRATION_FIELD_DESC);
    oprot.writeI64(this.expiration);
    oprot.writeFieldEnd();
    if (this.user != null) {
      if (isSetUser()) {
        oprot.writeFieldBegin(USER_FIELD_DESC);
        this.user.write(oprot);
        oprot.writeFieldEnd();
      }
    }
    if (this.publicUserInfo != null) {
      if (isSetPublicUserInfo()) {
        oprot.writeFieldBegin(PUBLIC_USER_INFO_FIELD_DESC);
        this.publicUserInfo.write(oprot);
        oprot.writeFieldEnd();
      }
    }
    if (this.noteStoreUrl != null) {
      if (isSetNoteStoreUrl()) {
        oprot.writeFieldBegin(NOTE_STORE_URL_FIELD_DESC);
        oprot.writeString(this.noteStoreUrl);
        oprot.writeFieldEnd();
      }
    }
    if (this.webApiUrlPrefix != null) {
      if (isSetWebApiUrlPrefix()) {
        oprot.writeFieldBegin(WEB_API_URL_PREFIX_FIELD_DESC);
        oprot.writeString(this.webApiUrlPrefix);
        oprot.writeFieldEnd();
      }
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }