/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
#pragma once

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

namespace apache { namespace thrift { namespace reflection {
class Schema;
}}}




enum Animal {
  DOG = 1,
  CAT = 2,
  TARANTULA = 3
};

extern const std::map<int, const char*> _Animal_VALUES_TO_NAMES;

extern const std::map<const char*, int, apache::thrift::ltstr> _Animal_NAMES_TO_VALUES;


namespace apache { namespace thrift { 
template<>
struct TEnumTraits< ::Animal> : public TEnumTraitsBase< ::Animal>
{
inline static constexpr  ::Animal min() {
return  ::Animal::DOG;
}
inline static constexpr  ::Animal max() {
return  ::Animal::TARANTULA;
}
};
}} // apache:thrift


class Color;

class Vehicle;

class Person;

typedef int64_t PersonID;

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

class Color : public apache::thrift::TStructType<Color> {
 public:

  static const uint64_t _reflection_id = 11194926431654439212U;
  static void _reflection_register(::apache::thrift::reflection::Schema&);
  Color() : red(0), green(0), blue(0), alpha(0) {
  }

  Color(const Color&) = default;
  Color& operator=(const Color& src)= default;
  Color(Color&&) = default;
  Color& operator=(Color&&) = default;

  void __clear();

  virtual ~Color() throw() {}

  double red;
  double green;
  double blue;
  double alpha;

  struct __isset {
    __isset() { __clear(); } 
    void __clear() {
      red = false;
      green = false;
      blue = false;
      alpha = false;
    }
    bool red;
    bool green;
    bool blue;
    bool alpha;
  } __isset;

  bool operator == (const Color &) const;
  bool operator != (const Color& rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Color & ) const;

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

};

class Color;
void merge(const Color& from, Color& to);
void merge(Color&& from, Color& to);
void swap(Vehicle &a, Vehicle &b);

class Vehicle : public apache::thrift::TStructType<Vehicle> {
 public:

  static const uint64_t _reflection_id = 11029503283921871788U;
  static void _reflection_register(::apache::thrift::reflection::Schema&);
  Vehicle() {
  }

  Vehicle(const Vehicle&) = default;
  Vehicle& operator=(const Vehicle& src)= default;
  Vehicle(Vehicle&&) = default;
  Vehicle& operator=(Vehicle&&) = default;

  void __clear();

  virtual ~Vehicle() throw() {}

  Color color;
  std::string licensePlate;
  std::string description;
  std::string name;

  struct __isset {
    __isset() { __clear(); } 
    void __clear() {
      color = false;
      licensePlate = false;
      description = false;
      name = false;
    }
    bool color;
    bool licensePlate;
    bool description;
    bool name;
  } __isset;

  bool operator == (const Vehicle &) const;
  bool operator != (const Vehicle& rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Vehicle & ) const;

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

};

class Vehicle;
void merge(const Vehicle& from, Vehicle& to);
void merge(Vehicle&& from, Vehicle& to);
void swap(Person &a, Person &b);

class Person : public apache::thrift::TStructType<Person> {
 public:

  static const uint64_t _reflection_id = 17004913262661492556U;
  static void _reflection_register(::apache::thrift::reflection::Schema&);
  Person() : id(0), age(0), bestFriend(0), afraidOfAnimal(static_cast<Animal>(0)) {
  }

  Person(const Person&) = default;
  Person& operator=(const Person& src)= default;
  Person(Person&&) = default;
  Person& operator=(Person&&) = default;

  void __clear();

  virtual ~Person() throw() {}

  PersonID id;
  std::string name;
  int16_t age;
  std::string address;
  Color favoriteColor;
  std::set<PersonID>  friends;
  PersonID bestFriend;
  std::map<Animal, std::string>  petNames;
  Animal afraidOfAnimal;
  std::vector<Vehicle>  vehicles;

  struct __isset {
    __isset() { __clear(); } 
    void __clear() {
      id = false;
      name = false;
      age = false;
      address = false;
      favoriteColor = false;
      friends = false;
      bestFriend = false;
      petNames = false;
      afraidOfAnimal = false;
      vehicles = false;
    }
    bool id;
    bool name;
    bool age;
    bool address;
    bool favoriteColor;
    bool friends;
    bool bestFriend;
    bool petNames;
    bool afraidOfAnimal;
    bool vehicles;
  } __isset;

  bool operator == (const Person &) const;
  bool operator != (const Person& rhs) const {
    return !(*this == rhs);
  }

  bool operator < (const Person & ) const;

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

};

class Person;
void merge(const Person& from, Person& to);
void merge(Person&& from, Person& to);


