/**
 * Autogenerated by Thrift Compiler (0.11.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
#ifndef protocol_TYPES_H
#define protocol_TYPES_H

#include <iosfwd>

#include <thrift/Thrift.h>
#include <thrift/TApplicationException.h>
#include <thrift/TBase.h>
#include <thrift/protocol/TProtocol.h>
#include <thrift/transport/TTransport.h>

#include <thrift/stdcxx.h>


namespace similarity {

typedef std::vector<class ReplyEntry>  ReplyEntryList;

typedef std::vector<std::vector<class ReplyEntry> >  ReplyEntryListBatch;

class ReplyEntry;

class QueryException;

typedef struct _ReplyEntry__isset {
  _ReplyEntry__isset() : externId(false), obj(false) {}
  bool externId :1;
  bool obj :1;
} _ReplyEntry__isset;

class ReplyEntry : public virtual ::apache::thrift::TBase {
 public:

  ReplyEntry(const ReplyEntry&);
  ReplyEntry& operator=(const ReplyEntry&);
  ReplyEntry() : id(0), dist(0), externId(), obj() {
  }

  virtual ~ReplyEntry() throw();
  int32_t id;
  double dist;
  std::string externId;
  std::string obj;

  _ReplyEntry__isset __isset;

  void __set_id(const int32_t val);

  void __set_dist(const double val);

  void __set_externId(const std::string& val);

  void __set_obj(const std::string& val);

  bool operator == (const ReplyEntry & rhs) const
  {
    if (!(id == rhs.id))
      return false;
    if (!(dist == rhs.dist))
      return false;
    if (__isset.externId != rhs.__isset.externId)
      return false;
    else if (__isset.externId && !(externId == rhs.externId))
      return false;
    if (__isset.obj != rhs.__isset.obj)
      return false;
    else if (__isset.obj && !(obj == rhs.obj))
      return false;
    return true;
  }
  bool operator != (const ReplyEntry &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ReplyEntry & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

  virtual void printTo(std::ostream& out) const;
};

void swap(ReplyEntry &a, ReplyEntry &b);

std::ostream& operator<<(std::ostream& out, const ReplyEntry& obj);

typedef struct _QueryException__isset {
  _QueryException__isset() : message(false) {}
  bool message :1;
} _QueryException__isset;

class QueryException : public ::apache::thrift::TException {
 public:

  QueryException(const QueryException&);
  QueryException& operator=(const QueryException&);
  QueryException() : message() {
  }

  virtual ~QueryException() throw();
  std::string message;

  _QueryException__isset __isset;

  void __set_message(const std::string& val);

  bool operator == (const QueryException & rhs) const
  {
    if (!(message == rhs.message))
      return false;
    return true;
  }
  bool operator != (const QueryException &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const QueryException & ) const;

  uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
  uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;

  virtual void printTo(std::ostream& out) const;
  mutable std::string thriftTExceptionMessageHolder_;
  const char* what() const throw();
};

void swap(QueryException &a, QueryException &b);

std::ostream& operator<<(std::ostream& out, const QueryException& obj);

} // namespace

#endif
