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

#include <iosfwd>

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

#include <thrift/cxxfunctional.h>


namespace CarreraConsumer {

class Message;

class Context;

class ConsumeResult;

class PullRequest;

class PullResponse;

class ConsumeStatsRequest;

class FetchRequest;

class QidResponse;

class FetchResponse;

class AckResult;

class ConsumeStats;

class PullException;

typedef struct _Message__isset {
  _Message__isset() : key(false), value(false), tag(false), offset(false) {}
  bool key :1;
  bool value :1;
  bool tag :1;
  bool offset :1;
} _Message__isset;

class Message {
 public:

  static const char* ascii_fingerprint; // = "5F9965D46A4F3845985AC0F9B81C3C69";
  static const uint8_t binary_fingerprint[16]; // = {0x5F,0x99,0x65,0xD4,0x6A,0x4F,0x38,0x45,0x98,0x5A,0xC0,0xF9,0xB8,0x1C,0x3C,0x69};

  Message(const Message&);
  Message& operator=(const Message&);
  Message() : key(), value(), tag(), offset(0) {
  }

  virtual ~Message() throw();
  std::string key;
  std::string value;
  std::string tag;
  int64_t offset;

  _Message__isset __isset;

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

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

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

  void __set_offset(const int64_t val);

  bool operator == (const Message & rhs) const
  {
    if (!(key == rhs.key))
      return false;
    if (!(value == rhs.value))
      return false;
    if (!(tag == rhs.tag))
      return false;
    if (!(offset == rhs.offset))
      return false;
    return true;
  }
  bool operator != (const Message &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Message & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const Message& obj);
};

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

typedef struct _Context__isset {
  _Context__isset() : groupId(false), topic(false), qid(false) {}
  bool groupId :1;
  bool topic :1;
  bool qid :1;
} _Context__isset;

class Context {
 public:

  static const char* ascii_fingerprint; // = "AB879940BD15B6B25691265F7384B271";
  static const uint8_t binary_fingerprint[16]; // = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71};

  Context(const Context&);
  Context& operator=(const Context&);
  Context() : groupId(), topic(), qid() {
  }

  virtual ~Context() throw();
  std::string groupId;
  std::string topic;
  std::string qid;

  _Context__isset __isset;

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

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

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

  bool operator == (const Context & rhs) const
  {
    if (!(groupId == rhs.groupId))
      return false;
    if (!(topic == rhs.topic))
      return false;
    if (!(qid == rhs.qid))
      return false;
    return true;
  }
  bool operator != (const Context &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Context & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const Context& obj);
};

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

typedef struct _ConsumeResult__isset {
  _ConsumeResult__isset() : context(false), successOffsets(false), failOffsets(false) {}
  bool context :1;
  bool successOffsets :1;
  bool failOffsets :1;
} _ConsumeResult__isset;

class ConsumeResult {
 public:

  static const char* ascii_fingerprint; // = "49084826B04BB3679061C8BC372B1450";
  static const uint8_t binary_fingerprint[16]; // = {0x49,0x08,0x48,0x26,0xB0,0x4B,0xB3,0x67,0x90,0x61,0xC8,0xBC,0x37,0x2B,0x14,0x50};

  ConsumeResult(const ConsumeResult&);
  ConsumeResult& operator=(const ConsumeResult&);
  ConsumeResult() {
  }

  virtual ~ConsumeResult() throw();
  Context context;
  std::vector<int64_t>  successOffsets;
  std::vector<int64_t>  failOffsets;

  _ConsumeResult__isset __isset;

  void __set_context(const Context& val);

  void __set_successOffsets(const std::vector<int64_t> & val);

  void __set_failOffsets(const std::vector<int64_t> & val);

  bool operator == (const ConsumeResult & rhs) const
  {
    if (!(context == rhs.context))
      return false;
    if (!(successOffsets == rhs.successOffsets))
      return false;
    if (!(failOffsets == rhs.failOffsets))
      return false;
    return true;
  }
  bool operator != (const ConsumeResult &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ConsumeResult & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const ConsumeResult& obj);
};

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

typedef struct _PullRequest__isset {
  _PullRequest__isset() : topic(false), maxBatchSize(false), maxLingerTime(false), result(false), version(false) {}
  bool topic :1;
  bool maxBatchSize :1;
  bool maxLingerTime :1;
  bool result :1;
  bool version :1;
} _PullRequest__isset;

class PullRequest {
 public:

  static const char* ascii_fingerprint; // = "8E7B6E318589AF347C2D248D82D6644F";
  static const uint8_t binary_fingerprint[16]; // = {0x8E,0x7B,0x6E,0x31,0x85,0x89,0xAF,0x34,0x7C,0x2D,0x24,0x8D,0x82,0xD6,0x64,0x4F};

  PullRequest(const PullRequest&);
  PullRequest& operator=(const PullRequest&);
  PullRequest() : groupId(), topic(), maxBatchSize(0), maxLingerTime(0), version() {
  }

  virtual ~PullRequest() throw();
  std::string groupId;
  std::string topic;
  int32_t maxBatchSize;
  int32_t maxLingerTime;
  ConsumeResult result;
  std::string version;

  _PullRequest__isset __isset;

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

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

  void __set_maxBatchSize(const int32_t val);

  void __set_maxLingerTime(const int32_t val);

  void __set_result(const ConsumeResult& val);

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

  bool operator == (const PullRequest & rhs) const
  {
    if (!(groupId == rhs.groupId))
      return false;
    if (__isset.topic != rhs.__isset.topic)
      return false;
    else if (__isset.topic && !(topic == rhs.topic))
      return false;
    if (__isset.maxBatchSize != rhs.__isset.maxBatchSize)
      return false;
    else if (__isset.maxBatchSize && !(maxBatchSize == rhs.maxBatchSize))
      return false;
    if (__isset.maxLingerTime != rhs.__isset.maxLingerTime)
      return false;
    else if (__isset.maxLingerTime && !(maxLingerTime == rhs.maxLingerTime))
      return false;
    if (__isset.result != rhs.__isset.result)
      return false;
    else if (__isset.result && !(result == rhs.result))
      return false;
    if (__isset.version != rhs.__isset.version)
      return false;
    else if (__isset.version && !(version == rhs.version))
      return false;
    return true;
  }
  bool operator != (const PullRequest &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const PullRequest & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const PullRequest& obj);
};

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

typedef struct _PullResponse__isset {
  _PullResponse__isset() : context(false), messages(false) {}
  bool context :1;
  bool messages :1;
} _PullResponse__isset;

class PullResponse {
 public:

  static const char* ascii_fingerprint; // = "747C01C432C2D84503C2B635B8CB58F3";
  static const uint8_t binary_fingerprint[16]; // = {0x74,0x7C,0x01,0xC4,0x32,0xC2,0xD8,0x45,0x03,0xC2,0xB6,0x35,0xB8,0xCB,0x58,0xF3};

  PullResponse(const PullResponse&);
  PullResponse& operator=(const PullResponse&);
  PullResponse() {
  }

  virtual ~PullResponse() throw();
  Context context;
  std::vector<Message>  messages;

  _PullResponse__isset __isset;

  void __set_context(const Context& val);

  void __set_messages(const std::vector<Message> & val);

  bool operator == (const PullResponse & rhs) const
  {
    if (!(context == rhs.context))
      return false;
    if (!(messages == rhs.messages))
      return false;
    return true;
  }
  bool operator != (const PullResponse &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const PullResponse & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const PullResponse& obj);
};

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

typedef struct _ConsumeStatsRequest__isset {
  _ConsumeStatsRequest__isset() : topic(false), version(false) {}
  bool topic :1;
  bool version :1;
} _ConsumeStatsRequest__isset;

class ConsumeStatsRequest {
 public:

  static const char* ascii_fingerprint; // = "4BF81DD46A7371532E49811022D58D36";
  static const uint8_t binary_fingerprint[16]; // = {0x4B,0xF8,0x1D,0xD4,0x6A,0x73,0x71,0x53,0x2E,0x49,0x81,0x10,0x22,0xD5,0x8D,0x36};

  ConsumeStatsRequest(const ConsumeStatsRequest&);
  ConsumeStatsRequest& operator=(const ConsumeStatsRequest&);
  ConsumeStatsRequest() : group(), topic(), version() {
  }

  virtual ~ConsumeStatsRequest() throw();
  std::string group;
  std::string topic;
  std::string version;

  _ConsumeStatsRequest__isset __isset;

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

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

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

  bool operator == (const ConsumeStatsRequest & rhs) const
  {
    if (!(group == rhs.group))
      return false;
    if (__isset.topic != rhs.__isset.topic)
      return false;
    else if (__isset.topic && !(topic == rhs.topic))
      return false;
    if (__isset.version != rhs.__isset.version)
      return false;
    else if (__isset.version && !(version == rhs.version))
      return false;
    return true;
  }
  bool operator != (const ConsumeStatsRequest &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ConsumeStatsRequest & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const ConsumeStatsRequest& obj);
};

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

typedef struct _FetchRequest__isset {
  _FetchRequest__isset() : fetchOffset(false), maxBatchSize(false), maxLingerTime(false), version(false) {}
  bool fetchOffset :1;
  bool maxBatchSize :1;
  bool maxLingerTime :1;
  bool version :1;
} _FetchRequest__isset;

class FetchRequest {
 public:

  static const char* ascii_fingerprint; // = "906773A8CD439B466BD075DB396E9FD4";
  static const uint8_t binary_fingerprint[16]; // = {0x90,0x67,0x73,0xA8,0xCD,0x43,0x9B,0x46,0x6B,0xD0,0x75,0xDB,0x39,0x6E,0x9F,0xD4};

  FetchRequest(const FetchRequest&);
  FetchRequest& operator=(const FetchRequest&);
  FetchRequest() : consumerId(), groupId(), cluster(), maxBatchSize(0), maxLingerTime(0), version() {
  }

  virtual ~FetchRequest() throw();
  std::string consumerId;
  std::string groupId;
  std::string cluster;
  std::map<std::string, std::map<std::string, int64_t> >  fetchOffset;
  int32_t maxBatchSize;
  int32_t maxLingerTime;
  std::string version;

  _FetchRequest__isset __isset;

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

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

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

  void __set_fetchOffset(const std::map<std::string, std::map<std::string, int64_t> > & val);

  void __set_maxBatchSize(const int32_t val);

  void __set_maxLingerTime(const int32_t val);

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

  bool operator == (const FetchRequest & rhs) const
  {
    if (!(consumerId == rhs.consumerId))
      return false;
    if (!(groupId == rhs.groupId))
      return false;
    if (!(cluster == rhs.cluster))
      return false;
    if (__isset.fetchOffset != rhs.__isset.fetchOffset)
      return false;
    else if (__isset.fetchOffset && !(fetchOffset == rhs.fetchOffset))
      return false;
    if (__isset.maxBatchSize != rhs.__isset.maxBatchSize)
      return false;
    else if (__isset.maxBatchSize && !(maxBatchSize == rhs.maxBatchSize))
      return false;
    if (__isset.maxLingerTime != rhs.__isset.maxLingerTime)
      return false;
    else if (__isset.maxLingerTime && !(maxLingerTime == rhs.maxLingerTime))
      return false;
    if (__isset.version != rhs.__isset.version)
      return false;
    else if (__isset.version && !(version == rhs.version))
      return false;
    return true;
  }
  bool operator != (const FetchRequest &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FetchRequest & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const FetchRequest& obj);
};

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

typedef struct _QidResponse__isset {
  _QidResponse__isset() : nextRequestOffset(false) {}
  bool nextRequestOffset :1;
} _QidResponse__isset;

class QidResponse {
 public:

  static const char* ascii_fingerprint; // = "D27932A420DED5C23617C48CBE8CC55E";
  static const uint8_t binary_fingerprint[16]; // = {0xD2,0x79,0x32,0xA4,0x20,0xDE,0xD5,0xC2,0x36,0x17,0xC4,0x8C,0xBE,0x8C,0xC5,0x5E};

  QidResponse(const QidResponse&);
  QidResponse& operator=(const QidResponse&);
  QidResponse() : topic(), qid(), nextRequestOffset(0) {
  }

  virtual ~QidResponse() throw();
  std::string topic;
  std::string qid;
  int64_t nextRequestOffset;
  std::vector<Message>  messages;

  _QidResponse__isset __isset;

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

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

  void __set_nextRequestOffset(const int64_t val);

  void __set_messages(const std::vector<Message> & val);

  bool operator == (const QidResponse & rhs) const
  {
    if (!(topic == rhs.topic))
      return false;
    if (!(qid == rhs.qid))
      return false;
    if (__isset.nextRequestOffset != rhs.__isset.nextRequestOffset)
      return false;
    else if (__isset.nextRequestOffset && !(nextRequestOffset == rhs.nextRequestOffset))
      return false;
    if (!(messages == rhs.messages))
      return false;
    return true;
  }
  bool operator != (const QidResponse &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const QidResponse & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const QidResponse& obj);
};

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

typedef struct _FetchResponse__isset {
  _FetchResponse__isset() : code(false) {}
  bool code :1;
} _FetchResponse__isset;

class FetchResponse {
 public:

  static const char* ascii_fingerprint; // = "B56E50C806471F5271B7B3E2704047F5";
  static const uint8_t binary_fingerprint[16]; // = {0xB5,0x6E,0x50,0xC8,0x06,0x47,0x1F,0x52,0x71,0xB7,0xB3,0xE2,0x70,0x40,0x47,0xF5};

  FetchResponse(const FetchResponse&);
  FetchResponse& operator=(const FetchResponse&);
  FetchResponse() : code(0) {
  }

  virtual ~FetchResponse() throw();
  int32_t code;
  std::vector<QidResponse>  results;

  _FetchResponse__isset __isset;

  void __set_code(const int32_t val);

  void __set_results(const std::vector<QidResponse> & val);

  bool operator == (const FetchResponse & rhs) const
  {
    if (__isset.code != rhs.__isset.code)
      return false;
    else if (__isset.code && !(code == rhs.code))
      return false;
    if (!(results == rhs.results))
      return false;
    return true;
  }
  bool operator != (const FetchResponse &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const FetchResponse & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const FetchResponse& obj);
};

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


class AckResult {
 public:

  static const char* ascii_fingerprint; // = "3F9AC3B359E37DC260749F3B0D4910E4";
  static const uint8_t binary_fingerprint[16]; // = {0x3F,0x9A,0xC3,0xB3,0x59,0xE3,0x7D,0xC2,0x60,0x74,0x9F,0x3B,0x0D,0x49,0x10,0xE4};

  AckResult(const AckResult&);
  AckResult& operator=(const AckResult&);
  AckResult() : consumerId(), groupId(), cluster() {
  }

  virtual ~AckResult() throw();
  std::string consumerId;
  std::string groupId;
  std::string cluster;
  std::map<std::string, std::map<std::string, int64_t> >  offsets;

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

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

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

  void __set_offsets(const std::map<std::string, std::map<std::string, int64_t> > & val);

  bool operator == (const AckResult & rhs) const
  {
    if (!(consumerId == rhs.consumerId))
      return false;
    if (!(groupId == rhs.groupId))
      return false;
    if (!(cluster == rhs.cluster))
      return false;
    if (!(offsets == rhs.offsets))
      return false;
    return true;
  }
  bool operator != (const AckResult &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const AckResult & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const AckResult& obj);
};

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

typedef struct _ConsumeStats__isset {
  _ConsumeStats__isset() : group(false), topic(false), consumeOffsets(false), produceOffsets(false) {}
  bool group :1;
  bool topic :1;
  bool consumeOffsets :1;
  bool produceOffsets :1;
} _ConsumeStats__isset;

class ConsumeStats {
 public:

  static const char* ascii_fingerprint; // = "8D9F5B5937A1540513F1581F5CBEB4BE";
  static const uint8_t binary_fingerprint[16]; // = {0x8D,0x9F,0x5B,0x59,0x37,0xA1,0x54,0x05,0x13,0xF1,0x58,0x1F,0x5C,0xBE,0xB4,0xBE};

  ConsumeStats(const ConsumeStats&);
  ConsumeStats& operator=(const ConsumeStats&);
  ConsumeStats() : group(), topic() {
  }

  virtual ~ConsumeStats() throw();
  std::string group;
  std::string topic;
  std::map<std::string, int64_t>  consumeOffsets;
  std::map<std::string, int64_t>  produceOffsets;

  _ConsumeStats__isset __isset;

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

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

  void __set_consumeOffsets(const std::map<std::string, int64_t> & val);

  void __set_produceOffsets(const std::map<std::string, int64_t> & val);

  bool operator == (const ConsumeStats & rhs) const
  {
    if (!(group == rhs.group))
      return false;
    if (!(topic == rhs.topic))
      return false;
    if (!(consumeOffsets == rhs.consumeOffsets))
      return false;
    if (!(produceOffsets == rhs.produceOffsets))
      return false;
    return true;
  }
  bool operator != (const ConsumeStats &rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const ConsumeStats & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const ConsumeStats& obj);
};

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

typedef struct _PullException__isset {
  _PullException__isset() : code(false), message(false) {}
  bool code :1;
  bool message :1;
} _PullException__isset;

class PullException : public ::apache::thrift::TException {
 public:

  static const char* ascii_fingerprint; // = "3F5FC93B338687BC7235B1AB103F47B3";
  static const uint8_t binary_fingerprint[16]; // = {0x3F,0x5F,0xC9,0x3B,0x33,0x86,0x87,0xBC,0x72,0x35,0xB1,0xAB,0x10,0x3F,0x47,0xB3};

  PullException(const PullException&);
  PullException& operator=(const PullException&);
  PullException() : code(0), message() {
  }

  virtual ~PullException() throw();
  int32_t code;
  std::string message;

  _PullException__isset __isset;

  void __set_code(const int32_t val);

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

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

  bool operator < (const PullException & ) const;

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

  friend std::ostream& operator<<(std::ostream& out, const PullException& obj);
};

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

} // namespace

#endif
