// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: presence_service.proto

#ifndef PROTOBUF_presence_5fservice_2eproto__INCLUDED
#define PROTOBUF_presence_5fservice_2eproto__INCLUDED

#include <string>

#include <google/protobuf/stubs/common.h>

#if GOOGLE_PROTOBUF_VERSION < 2006000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please update
#error your headers.
#endif
#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers.  Please
#error regenerate this file with a newer version of protoc.
#endif

#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/unknown_field_set.h>
#include "entity_types.pb.h"
#include "presence_types.pb.h"
#include "rpc_types.pb.h"
#include "ServiceBase.h"
#include "MessageBuffer.h"
#include <functional>
#include <type_traits>
// @@protoc_insertion_point(includes)

namespace bgs {
namespace protocol {
namespace presence {
namespace v1 {

// Internal implementation detail -- do not call these.
void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
void protobuf_AssignDesc_presence_5fservice_2eproto();
void protobuf_ShutdownFile_presence_5fservice_2eproto();

class SubscribeRequest;
class SubscribeNotificationRequest;
class UnsubscribeRequest;
class UpdateRequest;
class QueryRequest;
class QueryResponse;
class OwnershipRequest;
class BatchSubscribeRequest;
class SubscribeResult;
class BatchSubscribeResponse;
class BatchUnsubscribeRequest;

// ===================================================================

class TC_PROTO_API SubscribeRequest : public ::google::protobuf::Message {
 public:
  SubscribeRequest();
  virtual ~SubscribeRequest();

  SubscribeRequest(const SubscribeRequest& from);

  inline SubscribeRequest& operator=(const SubscribeRequest& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const SubscribeRequest& default_instance();

  void Swap(SubscribeRequest* other);

  // implements Message ----------------------------------------------

  SubscribeRequest* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const SubscribeRequest& from);
  void MergeFrom(const SubscribeRequest& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional .bgs.protocol.EntityId agent_id = 1;
  inline bool has_agent_id() const;
  inline void clear_agent_id();
  static const int kAgentIdFieldNumber = 1;
  inline const ::bgs::protocol::EntityId& agent_id() const;
  inline ::bgs::protocol::EntityId* mutable_agent_id();
  inline ::bgs::protocol::EntityId* release_agent_id();
  inline void set_allocated_agent_id(::bgs::protocol::EntityId* agent_id);

  // required .bgs.protocol.EntityId entity_id = 2;
  inline bool has_entity_id() const;
  inline void clear_entity_id();
  static const int kEntityIdFieldNumber = 2;
  inline const ::bgs::protocol::EntityId& entity_id() const;
  inline ::bgs::protocol::EntityId* mutable_entity_id();
  inline ::bgs::protocol::EntityId* release_entity_id();
  inline void set_allocated_entity_id(::bgs::protocol::EntityId* entity_id);

  // required uint64 object_id = 3;
  inline bool has_object_id() const;
  inline void clear_object_id();
  static const int kObjectIdFieldNumber = 3;
  inline ::google::protobuf::uint64 object_id() const;
  inline void set_object_id(::google::protobuf::uint64 value);

  // repeated fixed32 program = 4;
  inline int program_size() const;
  inline void clear_program();
  static const int kProgramFieldNumber = 4;
  inline ::google::protobuf::uint32 program(int index) const;
  inline void set_program(int index, ::google::protobuf::uint32 value);
  inline void add_program(::google::protobuf::uint32 value);
  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
      program() const;
  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
      mutable_program();

  // repeated .bgs.protocol.presence.v1.FieldKey key = 6;
  inline int key_size() const;
  inline void clear_key();
  static const int kKeyFieldNumber = 6;
  inline const ::bgs::protocol::presence::v1::FieldKey& key(int index) const;
  inline ::bgs::protocol::presence::v1::FieldKey* mutable_key(int index);
  inline ::bgs::protocol::presence::v1::FieldKey* add_key();
  inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >&
      key() const;
  inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >*
      mutable_key();

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.SubscribeRequest)
 private:
  inline void set_has_agent_id();
  inline void clear_has_agent_id();
  inline void set_has_entity_id();
  inline void clear_has_entity_id();
  inline void set_has_object_id();
  inline void clear_has_object_id();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::bgs::protocol::EntityId* agent_id_;
  ::bgs::protocol::EntityId* entity_id_;
  ::google::protobuf::uint64 object_id_;
  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > program_;
  ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey > key_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static SubscribeRequest* default_instance_;
};
// -------------------------------------------------------------------

class TC_PROTO_API SubscribeNotificationRequest : public ::google::protobuf::Message {
 public:
  SubscribeNotificationRequest();
  virtual ~SubscribeNotificationRequest();

  SubscribeNotificationRequest(const SubscribeNotificationRequest& from);

  inline SubscribeNotificationRequest& operator=(const SubscribeNotificationRequest& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const SubscribeNotificationRequest& default_instance();

  void Swap(SubscribeNotificationRequest* other);

  // implements Message ----------------------------------------------

  SubscribeNotificationRequest* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const SubscribeNotificationRequest& from);
  void MergeFrom(const SubscribeNotificationRequest& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // required .bgs.protocol.EntityId entity_id = 1;
  inline bool has_entity_id() const;
  inline void clear_entity_id();
  static const int kEntityIdFieldNumber = 1;
  inline const ::bgs::protocol::EntityId& entity_id() const;
  inline ::bgs::protocol::EntityId* mutable_entity_id();
  inline ::bgs::protocol::EntityId* release_entity_id();
  inline void set_allocated_entity_id(::bgs::protocol::EntityId* entity_id);

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.SubscribeNotificationRequest)
 private:
  inline void set_has_entity_id();
  inline void clear_has_entity_id();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::bgs::protocol::EntityId* entity_id_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static SubscribeNotificationRequest* default_instance_;
};
// -------------------------------------------------------------------

class TC_PROTO_API UnsubscribeRequest : public ::google::protobuf::Message {
 public:
  UnsubscribeRequest();
  virtual ~UnsubscribeRequest();

  UnsubscribeRequest(const UnsubscribeRequest& from);

  inline UnsubscribeRequest& operator=(const UnsubscribeRequest& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const UnsubscribeRequest& default_instance();

  void Swap(UnsubscribeRequest* other);

  // implements Message ----------------------------------------------

  UnsubscribeRequest* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const UnsubscribeRequest& from);
  void MergeFrom(const UnsubscribeRequest& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional .bgs.protocol.EntityId agent_id = 1;
  inline bool has_agent_id() const;
  inline void clear_agent_id();
  static const int kAgentIdFieldNumber = 1;
  inline const ::bgs::protocol::EntityId& agent_id() const;
  inline ::bgs::protocol::EntityId* mutable_agent_id();
  inline ::bgs::protocol::EntityId* release_agent_id();
  inline void set_allocated_agent_id(::bgs::protocol::EntityId* agent_id);

  // required .bgs.protocol.EntityId entity_id = 2;
  inline bool has_entity_id() const;
  inline void clear_entity_id();
  static const int kEntityIdFieldNumber = 2;
  inline const ::bgs::protocol::EntityId& entity_id() const;
  inline ::bgs::protocol::EntityId* mutable_entity_id();
  inline ::bgs::protocol::EntityId* release_entity_id();
  inline void set_allocated_entity_id(::bgs::protocol::EntityId* entity_id);

  // optional uint64 object_id = 3;
  inline bool has_object_id() const;
  inline void clear_object_id();
  static const int kObjectIdFieldNumber = 3;
  inline ::google::protobuf::uint64 object_id() const;
  inline void set_object_id(::google::protobuf::uint64 value);

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.UnsubscribeRequest)
 private:
  inline void set_has_agent_id();
  inline void clear_has_agent_id();
  inline void set_has_entity_id();
  inline void clear_has_entity_id();
  inline void set_has_object_id();
  inline void clear_has_object_id();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::bgs::protocol::EntityId* agent_id_;
  ::bgs::protocol::EntityId* entity_id_;
  ::google::protobuf::uint64 object_id_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static UnsubscribeRequest* default_instance_;
};
// -------------------------------------------------------------------

class TC_PROTO_API UpdateRequest : public ::google::protobuf::Message {
 public:
  UpdateRequest();
  virtual ~UpdateRequest();

  UpdateRequest(const UpdateRequest& from);

  inline UpdateRequest& operator=(const UpdateRequest& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const UpdateRequest& default_instance();

  void Swap(UpdateRequest* other);

  // implements Message ----------------------------------------------

  UpdateRequest* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const UpdateRequest& from);
  void MergeFrom(const UpdateRequest& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // required .bgs.protocol.EntityId entity_id = 1;
  inline bool has_entity_id() const;
  inline void clear_entity_id();
  static const int kEntityIdFieldNumber = 1;
  inline const ::bgs::protocol::EntityId& entity_id() const;
  inline ::bgs::protocol::EntityId* mutable_entity_id();
  inline ::bgs::protocol::EntityId* release_entity_id();
  inline void set_allocated_entity_id(::bgs::protocol::EntityId* entity_id);

  // repeated .bgs.protocol.presence.v1.FieldOperation field_operation = 2;
  inline int field_operation_size() const;
  inline void clear_field_operation();
  static const int kFieldOperationFieldNumber = 2;
  inline const ::bgs::protocol::presence::v1::FieldOperation& field_operation(int index) const;
  inline ::bgs::protocol::presence::v1::FieldOperation* mutable_field_operation(int index);
  inline ::bgs::protocol::presence::v1::FieldOperation* add_field_operation();
  inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldOperation >&
      field_operation() const;
  inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldOperation >*
      mutable_field_operation();

  // optional bool no_create = 3;
  inline bool has_no_create() const;
  inline void clear_no_create();
  static const int kNoCreateFieldNumber = 3;
  inline bool no_create() const;
  inline void set_no_create(bool value);

  // optional .bgs.protocol.EntityId agent_id = 4;
  inline bool has_agent_id() const;
  inline void clear_agent_id();
  static const int kAgentIdFieldNumber = 4;
  inline const ::bgs::protocol::EntityId& agent_id() const;
  inline ::bgs::protocol::EntityId* mutable_agent_id();
  inline ::bgs::protocol::EntityId* release_agent_id();
  inline void set_allocated_agent_id(::bgs::protocol::EntityId* agent_id);

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.UpdateRequest)
 private:
  inline void set_has_entity_id();
  inline void clear_has_entity_id();
  inline void set_has_no_create();
  inline void clear_has_no_create();
  inline void set_has_agent_id();
  inline void clear_has_agent_id();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::bgs::protocol::EntityId* entity_id_;
  ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldOperation > field_operation_;
  ::bgs::protocol::EntityId* agent_id_;
  bool no_create_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static UpdateRequest* default_instance_;
};
// -------------------------------------------------------------------

class TC_PROTO_API QueryRequest : public ::google::protobuf::Message {
 public:
  QueryRequest();
  virtual ~QueryRequest();

  QueryRequest(const QueryRequest& from);

  inline QueryRequest& operator=(const QueryRequest& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const QueryRequest& default_instance();

  void Swap(QueryRequest* other);

  // implements Message ----------------------------------------------

  QueryRequest* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const QueryRequest& from);
  void MergeFrom(const QueryRequest& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // required .bgs.protocol.EntityId entity_id = 1;
  inline bool has_entity_id() const;
  inline void clear_entity_id();
  static const int kEntityIdFieldNumber = 1;
  inline const ::bgs::protocol::EntityId& entity_id() const;
  inline ::bgs::protocol::EntityId* mutable_entity_id();
  inline ::bgs::protocol::EntityId* release_entity_id();
  inline void set_allocated_entity_id(::bgs::protocol::EntityId* entity_id);

  // repeated .bgs.protocol.presence.v1.FieldKey key = 2;
  inline int key_size() const;
  inline void clear_key();
  static const int kKeyFieldNumber = 2;
  inline const ::bgs::protocol::presence::v1::FieldKey& key(int index) const;
  inline ::bgs::protocol::presence::v1::FieldKey* mutable_key(int index);
  inline ::bgs::protocol::presence::v1::FieldKey* add_key();
  inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >&
      key() const;
  inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >*
      mutable_key();

  // optional .bgs.protocol.EntityId agent_id = 3;
  inline bool has_agent_id() const;
  inline void clear_agent_id();
  static const int kAgentIdFieldNumber = 3;
  inline const ::bgs::protocol::EntityId& agent_id() const;
  inline ::bgs::protocol::EntityId* mutable_agent_id();
  inline ::bgs::protocol::EntityId* release_agent_id();
  inline void set_allocated_agent_id(::bgs::protocol::EntityId* agent_id);

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.QueryRequest)
 private:
  inline void set_has_entity_id();
  inline void clear_has_entity_id();
  inline void set_has_agent_id();
  inline void clear_has_agent_id();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::bgs::protocol::EntityId* entity_id_;
  ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey > key_;
  ::bgs::protocol::EntityId* agent_id_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static QueryRequest* default_instance_;
};
// -------------------------------------------------------------------

class TC_PROTO_API QueryResponse : public ::google::protobuf::Message {
 public:
  QueryResponse();
  virtual ~QueryResponse();

  QueryResponse(const QueryResponse& from);

  inline QueryResponse& operator=(const QueryResponse& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const QueryResponse& default_instance();

  void Swap(QueryResponse* other);

  // implements Message ----------------------------------------------

  QueryResponse* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const QueryResponse& from);
  void MergeFrom(const QueryResponse& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // repeated .bgs.protocol.presence.v1.Field field = 2;
  inline int field_size() const;
  inline void clear_field();
  static const int kFieldFieldNumber = 2;
  inline const ::bgs::protocol::presence::v1::Field& field(int index) const;
  inline ::bgs::protocol::presence::v1::Field* mutable_field(int index);
  inline ::bgs::protocol::presence::v1::Field* add_field();
  inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::Field >&
      field() const;
  inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::Field >*
      mutable_field();

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.QueryResponse)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::Field > field_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static QueryResponse* default_instance_;
};
// -------------------------------------------------------------------

class TC_PROTO_API OwnershipRequest : public ::google::protobuf::Message {
 public:
  OwnershipRequest();
  virtual ~OwnershipRequest();

  OwnershipRequest(const OwnershipRequest& from);

  inline OwnershipRequest& operator=(const OwnershipRequest& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const OwnershipRequest& default_instance();

  void Swap(OwnershipRequest* other);

  // implements Message ----------------------------------------------

  OwnershipRequest* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const OwnershipRequest& from);
  void MergeFrom(const OwnershipRequest& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // required .bgs.protocol.EntityId entity_id = 1;
  inline bool has_entity_id() const;
  inline void clear_entity_id();
  static const int kEntityIdFieldNumber = 1;
  inline const ::bgs::protocol::EntityId& entity_id() const;
  inline ::bgs::protocol::EntityId* mutable_entity_id();
  inline ::bgs::protocol::EntityId* release_entity_id();
  inline void set_allocated_entity_id(::bgs::protocol::EntityId* entity_id);

  // optional bool release_ownership = 2;
  inline bool has_release_ownership() const;
  inline void clear_release_ownership();
  static const int kReleaseOwnershipFieldNumber = 2;
  inline bool release_ownership() const;
  inline void set_release_ownership(bool value);

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.OwnershipRequest)
 private:
  inline void set_has_entity_id();
  inline void clear_has_entity_id();
  inline void set_has_release_ownership();
  inline void clear_has_release_ownership();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::bgs::protocol::EntityId* entity_id_;
  bool release_ownership_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static OwnershipRequest* default_instance_;
};
// -------------------------------------------------------------------

class TC_PROTO_API BatchSubscribeRequest : public ::google::protobuf::Message {
 public:
  BatchSubscribeRequest();
  virtual ~BatchSubscribeRequest();

  BatchSubscribeRequest(const BatchSubscribeRequest& from);

  inline BatchSubscribeRequest& operator=(const BatchSubscribeRequest& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const BatchSubscribeRequest& default_instance();

  void Swap(BatchSubscribeRequest* other);

  // implements Message ----------------------------------------------

  BatchSubscribeRequest* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const BatchSubscribeRequest& from);
  void MergeFrom(const BatchSubscribeRequest& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional .bgs.protocol.EntityId agent_id = 1;
  inline bool has_agent_id() const;
  inline void clear_agent_id();
  static const int kAgentIdFieldNumber = 1;
  inline const ::bgs::protocol::EntityId& agent_id() const;
  inline ::bgs::protocol::EntityId* mutable_agent_id();
  inline ::bgs::protocol::EntityId* release_agent_id();
  inline void set_allocated_agent_id(::bgs::protocol::EntityId* agent_id);

  // repeated .bgs.protocol.EntityId entity_id = 2;
  inline int entity_id_size() const;
  inline void clear_entity_id();
  static const int kEntityIdFieldNumber = 2;
  inline const ::bgs::protocol::EntityId& entity_id(int index) const;
  inline ::bgs::protocol::EntityId* mutable_entity_id(int index);
  inline ::bgs::protocol::EntityId* add_entity_id();
  inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::EntityId >&
      entity_id() const;
  inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::EntityId >*
      mutable_entity_id();

  // repeated fixed32 program = 3;
  inline int program_size() const;
  inline void clear_program();
  static const int kProgramFieldNumber = 3;
  inline ::google::protobuf::uint32 program(int index) const;
  inline void set_program(int index, ::google::protobuf::uint32 value);
  inline void add_program(::google::protobuf::uint32 value);
  inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
      program() const;
  inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
      mutable_program();

  // repeated .bgs.protocol.presence.v1.FieldKey key = 4;
  inline int key_size() const;
  inline void clear_key();
  static const int kKeyFieldNumber = 4;
  inline const ::bgs::protocol::presence::v1::FieldKey& key(int index) const;
  inline ::bgs::protocol::presence::v1::FieldKey* mutable_key(int index);
  inline ::bgs::protocol::presence::v1::FieldKey* add_key();
  inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >&
      key() const;
  inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >*
      mutable_key();

  // optional uint64 object_id = 5;
  inline bool has_object_id() const;
  inline void clear_object_id();
  static const int kObjectIdFieldNumber = 5;
  inline ::google::protobuf::uint64 object_id() const;
  inline void set_object_id(::google::protobuf::uint64 value);

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.BatchSubscribeRequest)
 private:
  inline void set_has_agent_id();
  inline void clear_has_agent_id();
  inline void set_has_object_id();
  inline void clear_has_object_id();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::bgs::protocol::EntityId* agent_id_;
  ::google::protobuf::RepeatedPtrField< ::bgs::protocol::EntityId > entity_id_;
  ::google::protobuf::RepeatedField< ::google::protobuf::uint32 > program_;
  ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey > key_;
  ::google::protobuf::uint64 object_id_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static BatchSubscribeRequest* default_instance_;
};
// -------------------------------------------------------------------

class TC_PROTO_API SubscribeResult : public ::google::protobuf::Message {
 public:
  SubscribeResult();
  virtual ~SubscribeResult();

  SubscribeResult(const SubscribeResult& from);

  inline SubscribeResult& operator=(const SubscribeResult& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const SubscribeResult& default_instance();

  void Swap(SubscribeResult* other);

  // implements Message ----------------------------------------------

  SubscribeResult* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const SubscribeResult& from);
  void MergeFrom(const SubscribeResult& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional .bgs.protocol.EntityId entity_id = 1;
  inline bool has_entity_id() const;
  inline void clear_entity_id();
  static const int kEntityIdFieldNumber = 1;
  inline const ::bgs::protocol::EntityId& entity_id() const;
  inline ::bgs::protocol::EntityId* mutable_entity_id();
  inline ::bgs::protocol::EntityId* release_entity_id();
  inline void set_allocated_entity_id(::bgs::protocol::EntityId* entity_id);

  // optional uint32 result = 2;
  inline bool has_result() const;
  inline void clear_result();
  static const int kResultFieldNumber = 2;
  inline ::google::protobuf::uint32 result() const;
  inline void set_result(::google::protobuf::uint32 value);

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.SubscribeResult)
 private:
  inline void set_has_entity_id();
  inline void clear_has_entity_id();
  inline void set_has_result();
  inline void clear_has_result();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::bgs::protocol::EntityId* entity_id_;
  ::google::protobuf::uint32 result_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static SubscribeResult* default_instance_;
};
// -------------------------------------------------------------------

class TC_PROTO_API BatchSubscribeResponse : public ::google::protobuf::Message {
 public:
  BatchSubscribeResponse();
  virtual ~BatchSubscribeResponse();

  BatchSubscribeResponse(const BatchSubscribeResponse& from);

  inline BatchSubscribeResponse& operator=(const BatchSubscribeResponse& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const BatchSubscribeResponse& default_instance();

  void Swap(BatchSubscribeResponse* other);

  // implements Message ----------------------------------------------

  BatchSubscribeResponse* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const BatchSubscribeResponse& from);
  void MergeFrom(const BatchSubscribeResponse& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // repeated .bgs.protocol.presence.v1.SubscribeResult subscribe_failed = 1;
  inline int subscribe_failed_size() const;
  inline void clear_subscribe_failed();
  static const int kSubscribeFailedFieldNumber = 1;
  inline const ::bgs::protocol::presence::v1::SubscribeResult& subscribe_failed(int index) const;
  inline ::bgs::protocol::presence::v1::SubscribeResult* mutable_subscribe_failed(int index);
  inline ::bgs::protocol::presence::v1::SubscribeResult* add_subscribe_failed();
  inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::SubscribeResult >&
      subscribe_failed() const;
  inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::SubscribeResult >*
      mutable_subscribe_failed();

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.BatchSubscribeResponse)
 private:

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::SubscribeResult > subscribe_failed_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static BatchSubscribeResponse* default_instance_;
};
// -------------------------------------------------------------------

class TC_PROTO_API BatchUnsubscribeRequest : public ::google::protobuf::Message {
 public:
  BatchUnsubscribeRequest();
  virtual ~BatchUnsubscribeRequest();

  BatchUnsubscribeRequest(const BatchUnsubscribeRequest& from);

  inline BatchUnsubscribeRequest& operator=(const BatchUnsubscribeRequest& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const BatchUnsubscribeRequest& default_instance();

  void Swap(BatchUnsubscribeRequest* other);

  // implements Message ----------------------------------------------

  BatchUnsubscribeRequest* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const BatchUnsubscribeRequest& from);
  void MergeFrom(const BatchUnsubscribeRequest& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:
  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional .bgs.protocol.EntityId agent_id = 1;
  inline bool has_agent_id() const;
  inline void clear_agent_id();
  static const int kAgentIdFieldNumber = 1;
  inline const ::bgs::protocol::EntityId& agent_id() const;
  inline ::bgs::protocol::EntityId* mutable_agent_id();
  inline ::bgs::protocol::EntityId* release_agent_id();
  inline void set_allocated_agent_id(::bgs::protocol::EntityId* agent_id);

  // repeated .bgs.protocol.EntityId entity_id = 2;
  inline int entity_id_size() const;
  inline void clear_entity_id();
  static const int kEntityIdFieldNumber = 2;
  inline const ::bgs::protocol::EntityId& entity_id(int index) const;
  inline ::bgs::protocol::EntityId* mutable_entity_id(int index);
  inline ::bgs::protocol::EntityId* add_entity_id();
  inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::EntityId >&
      entity_id() const;
  inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::EntityId >*
      mutable_entity_id();

  // optional uint64 object_id = 3;
  inline bool has_object_id() const;
  inline void clear_object_id();
  static const int kObjectIdFieldNumber = 3;
  inline ::google::protobuf::uint64 object_id() const;
  inline void set_object_id(::google::protobuf::uint64 value);

  // @@protoc_insertion_point(class_scope:bgs.protocol.presence.v1.BatchUnsubscribeRequest)
 private:
  inline void set_has_agent_id();
  inline void clear_has_agent_id();
  inline void set_has_object_id();
  inline void clear_has_object_id();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::google::protobuf::uint32 _has_bits_[1];
  mutable int _cached_size_;
  ::bgs::protocol::EntityId* agent_id_;
  ::google::protobuf::RepeatedPtrField< ::bgs::protocol::EntityId > entity_id_;
  ::google::protobuf::uint64 object_id_;
  friend void TC_PROTO_API protobuf_AddDesc_presence_5fservice_2eproto();
  friend void protobuf_AssignDesc_presence_5fservice_2eproto();
  friend void protobuf_ShutdownFile_presence_5fservice_2eproto();

  void InitAsDefaultInstance();
  static BatchUnsubscribeRequest* default_instance_;
};
// ===================================================================

class TC_PROTO_API PresenceService : public ServiceBase
{
 public:

  explicit PresenceService(bool use_original_hash);
  virtual ~PresenceService();

  typedef std::integral_constant<uint32, 0xFA0796FFu> OriginalHash;
  typedef std::integral_constant<uint32, 0xD8F94B3Bu> NameHash;

  static google::protobuf::ServiceDescriptor const* descriptor();

  void CallServerMethod(uint32 token, uint32 methodId, MessageBuffer buffer) final;

 protected:
  // server methods --------------------------------------------------
  virtual uint32 HandleSubscribe(::bgs::protocol::presence::v1::SubscribeRequest const* request, ::bgs::protocol::NoData* response, std::function<void(ServiceBase*, uint32, ::google::protobuf::Message const*)>& continuation);
  virtual uint32 HandleUnsubscribe(::bgs::protocol::presence::v1::UnsubscribeRequest const* request, ::bgs::protocol::NoData* response, std::function<void(ServiceBase*, uint32, ::google::protobuf::Message const*)>& continuation);
  virtual uint32 HandleUpdate(::bgs::protocol::presence::v1::UpdateRequest const* request, ::bgs::protocol::NoData* response, std::function<void(ServiceBase*, uint32, ::google::protobuf::Message const*)>& continuation);
  virtual uint32 HandleQuery(::bgs::protocol::presence::v1::QueryRequest const* request, ::bgs::protocol::presence::v1::QueryResponse* response, std::function<void(ServiceBase*, uint32, ::google::protobuf::Message const*)>& continuation);
  virtual uint32 HandleOwnership(::bgs::protocol::presence::v1::OwnershipRequest const* request, ::bgs::protocol::NoData* response, std::function<void(ServiceBase*, uint32, ::google::protobuf::Message const*)>& continuation);
  virtual uint32 HandleSubscribeNotification(::bgs::protocol::presence::v1::SubscribeNotificationRequest const* request, ::bgs::protocol::NoData* response, std::function<void(ServiceBase*, uint32, ::google::protobuf::Message const*)>& continuation);
  virtual uint32 HandleBatchSubscribe(::bgs::protocol::presence::v1::BatchSubscribeRequest const* request, ::bgs::protocol::presence::v1::BatchSubscribeResponse* response, std::function<void(ServiceBase*, uint32, ::google::protobuf::Message const*)>& continuation);
  virtual uint32 HandleBatchUnsubscribe(::bgs::protocol::presence::v1::BatchUnsubscribeRequest const* request, ::bgs::protocol::NoData* response, std::function<void(ServiceBase*, uint32, ::google::protobuf::Message const*)>& continuation);

 private:
  uint32 service_hash_;

  GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PresenceService);
};

// ===================================================================


// ===================================================================

// SubscribeRequest

// optional .bgs.protocol.EntityId agent_id = 1;
inline bool SubscribeRequest::has_agent_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void SubscribeRequest::set_has_agent_id() {
  _has_bits_[0] |= 0x00000001u;
}
inline void SubscribeRequest::clear_has_agent_id() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void SubscribeRequest::clear_agent_id() {
  if (agent_id_ != NULL) agent_id_->::bgs::protocol::EntityId::Clear();
  clear_has_agent_id();
}
inline const ::bgs::protocol::EntityId& SubscribeRequest::agent_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.SubscribeRequest.agent_id)
  return agent_id_ != NULL ? *agent_id_ : *default_instance_->agent_id_;
}
inline ::bgs::protocol::EntityId* SubscribeRequest::mutable_agent_id() {
  set_has_agent_id();
  if (agent_id_ == NULL) agent_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.SubscribeRequest.agent_id)
  return agent_id_;
}
inline ::bgs::protocol::EntityId* SubscribeRequest::release_agent_id() {
  clear_has_agent_id();
  ::bgs::protocol::EntityId* temp = agent_id_;
  agent_id_ = NULL;
  return temp;
}
inline void SubscribeRequest::set_allocated_agent_id(::bgs::protocol::EntityId* agent_id) {
  delete agent_id_;
  agent_id_ = agent_id;
  if (agent_id) {
    set_has_agent_id();
  } else {
    clear_has_agent_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.SubscribeRequest.agent_id)
}

// required .bgs.protocol.EntityId entity_id = 2;
inline bool SubscribeRequest::has_entity_id() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void SubscribeRequest::set_has_entity_id() {
  _has_bits_[0] |= 0x00000002u;
}
inline void SubscribeRequest::clear_has_entity_id() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void SubscribeRequest::clear_entity_id() {
  if (entity_id_ != NULL) entity_id_->::bgs::protocol::EntityId::Clear();
  clear_has_entity_id();
}
inline const ::bgs::protocol::EntityId& SubscribeRequest::entity_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.SubscribeRequest.entity_id)
  return entity_id_ != NULL ? *entity_id_ : *default_instance_->entity_id_;
}
inline ::bgs::protocol::EntityId* SubscribeRequest::mutable_entity_id() {
  set_has_entity_id();
  if (entity_id_ == NULL) entity_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.SubscribeRequest.entity_id)
  return entity_id_;
}
inline ::bgs::protocol::EntityId* SubscribeRequest::release_entity_id() {
  clear_has_entity_id();
  ::bgs::protocol::EntityId* temp = entity_id_;
  entity_id_ = NULL;
  return temp;
}
inline void SubscribeRequest::set_allocated_entity_id(::bgs::protocol::EntityId* entity_id) {
  delete entity_id_;
  entity_id_ = entity_id;
  if (entity_id) {
    set_has_entity_id();
  } else {
    clear_has_entity_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.SubscribeRequest.entity_id)
}

// required uint64 object_id = 3;
inline bool SubscribeRequest::has_object_id() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void SubscribeRequest::set_has_object_id() {
  _has_bits_[0] |= 0x00000004u;
}
inline void SubscribeRequest::clear_has_object_id() {
  _has_bits_[0] &= ~0x00000004u;
}
inline void SubscribeRequest::clear_object_id() {
  object_id_ = GOOGLE_ULONGLONG(0);
  clear_has_object_id();
}
inline ::google::protobuf::uint64 SubscribeRequest::object_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.SubscribeRequest.object_id)
  return object_id_;
}
inline void SubscribeRequest::set_object_id(::google::protobuf::uint64 value) {
  set_has_object_id();
  object_id_ = value;
  // @@protoc_insertion_point(field_set:bgs.protocol.presence.v1.SubscribeRequest.object_id)
}

// repeated fixed32 program = 4;
inline int SubscribeRequest::program_size() const {
  return program_.size();
}
inline void SubscribeRequest::clear_program() {
  program_.Clear();
}
inline ::google::protobuf::uint32 SubscribeRequest::program(int index) const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.SubscribeRequest.program)
  return program_.Get(index);
}
inline void SubscribeRequest::set_program(int index, ::google::protobuf::uint32 value) {
  program_.Set(index, value);
  // @@protoc_insertion_point(field_set:bgs.protocol.presence.v1.SubscribeRequest.program)
}
inline void SubscribeRequest::add_program(::google::protobuf::uint32 value) {
  program_.Add(value);
  // @@protoc_insertion_point(field_add:bgs.protocol.presence.v1.SubscribeRequest.program)
}
inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
SubscribeRequest::program() const {
  // @@protoc_insertion_point(field_list:bgs.protocol.presence.v1.SubscribeRequest.program)
  return program_;
}
inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
SubscribeRequest::mutable_program() {
  // @@protoc_insertion_point(field_mutable_list:bgs.protocol.presence.v1.SubscribeRequest.program)
  return &program_;
}

// repeated .bgs.protocol.presence.v1.FieldKey key = 6;
inline int SubscribeRequest::key_size() const {
  return key_.size();
}
inline void SubscribeRequest::clear_key() {
  key_.Clear();
}
inline const ::bgs::protocol::presence::v1::FieldKey& SubscribeRequest::key(int index) const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.SubscribeRequest.key)
  return key_.Get(index);
}
inline ::bgs::protocol::presence::v1::FieldKey* SubscribeRequest::mutable_key(int index) {
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.SubscribeRequest.key)
  return key_.Mutable(index);
}
inline ::bgs::protocol::presence::v1::FieldKey* SubscribeRequest::add_key() {
  // @@protoc_insertion_point(field_add:bgs.protocol.presence.v1.SubscribeRequest.key)
  return key_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >&
SubscribeRequest::key() const {
  // @@protoc_insertion_point(field_list:bgs.protocol.presence.v1.SubscribeRequest.key)
  return key_;
}
inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >*
SubscribeRequest::mutable_key() {
  // @@protoc_insertion_point(field_mutable_list:bgs.protocol.presence.v1.SubscribeRequest.key)
  return &key_;
}

// -------------------------------------------------------------------

// SubscribeNotificationRequest

// required .bgs.protocol.EntityId entity_id = 1;
inline bool SubscribeNotificationRequest::has_entity_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void SubscribeNotificationRequest::set_has_entity_id() {
  _has_bits_[0] |= 0x00000001u;
}
inline void SubscribeNotificationRequest::clear_has_entity_id() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void SubscribeNotificationRequest::clear_entity_id() {
  if (entity_id_ != NULL) entity_id_->::bgs::protocol::EntityId::Clear();
  clear_has_entity_id();
}
inline const ::bgs::protocol::EntityId& SubscribeNotificationRequest::entity_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.SubscribeNotificationRequest.entity_id)
  return entity_id_ != NULL ? *entity_id_ : *default_instance_->entity_id_;
}
inline ::bgs::protocol::EntityId* SubscribeNotificationRequest::mutable_entity_id() {
  set_has_entity_id();
  if (entity_id_ == NULL) entity_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.SubscribeNotificationRequest.entity_id)
  return entity_id_;
}
inline ::bgs::protocol::EntityId* SubscribeNotificationRequest::release_entity_id() {
  clear_has_entity_id();
  ::bgs::protocol::EntityId* temp = entity_id_;
  entity_id_ = NULL;
  return temp;
}
inline void SubscribeNotificationRequest::set_allocated_entity_id(::bgs::protocol::EntityId* entity_id) {
  delete entity_id_;
  entity_id_ = entity_id;
  if (entity_id) {
    set_has_entity_id();
  } else {
    clear_has_entity_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.SubscribeNotificationRequest.entity_id)
}

// -------------------------------------------------------------------

// UnsubscribeRequest

// optional .bgs.protocol.EntityId agent_id = 1;
inline bool UnsubscribeRequest::has_agent_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void UnsubscribeRequest::set_has_agent_id() {
  _has_bits_[0] |= 0x00000001u;
}
inline void UnsubscribeRequest::clear_has_agent_id() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void UnsubscribeRequest::clear_agent_id() {
  if (agent_id_ != NULL) agent_id_->::bgs::protocol::EntityId::Clear();
  clear_has_agent_id();
}
inline const ::bgs::protocol::EntityId& UnsubscribeRequest::agent_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.UnsubscribeRequest.agent_id)
  return agent_id_ != NULL ? *agent_id_ : *default_instance_->agent_id_;
}
inline ::bgs::protocol::EntityId* UnsubscribeRequest::mutable_agent_id() {
  set_has_agent_id();
  if (agent_id_ == NULL) agent_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.UnsubscribeRequest.agent_id)
  return agent_id_;
}
inline ::bgs::protocol::EntityId* UnsubscribeRequest::release_agent_id() {
  clear_has_agent_id();
  ::bgs::protocol::EntityId* temp = agent_id_;
  agent_id_ = NULL;
  return temp;
}
inline void UnsubscribeRequest::set_allocated_agent_id(::bgs::protocol::EntityId* agent_id) {
  delete agent_id_;
  agent_id_ = agent_id;
  if (agent_id) {
    set_has_agent_id();
  } else {
    clear_has_agent_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.UnsubscribeRequest.agent_id)
}

// required .bgs.protocol.EntityId entity_id = 2;
inline bool UnsubscribeRequest::has_entity_id() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void UnsubscribeRequest::set_has_entity_id() {
  _has_bits_[0] |= 0x00000002u;
}
inline void UnsubscribeRequest::clear_has_entity_id() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void UnsubscribeRequest::clear_entity_id() {
  if (entity_id_ != NULL) entity_id_->::bgs::protocol::EntityId::Clear();
  clear_has_entity_id();
}
inline const ::bgs::protocol::EntityId& UnsubscribeRequest::entity_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.UnsubscribeRequest.entity_id)
  return entity_id_ != NULL ? *entity_id_ : *default_instance_->entity_id_;
}
inline ::bgs::protocol::EntityId* UnsubscribeRequest::mutable_entity_id() {
  set_has_entity_id();
  if (entity_id_ == NULL) entity_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.UnsubscribeRequest.entity_id)
  return entity_id_;
}
inline ::bgs::protocol::EntityId* UnsubscribeRequest::release_entity_id() {
  clear_has_entity_id();
  ::bgs::protocol::EntityId* temp = entity_id_;
  entity_id_ = NULL;
  return temp;
}
inline void UnsubscribeRequest::set_allocated_entity_id(::bgs::protocol::EntityId* entity_id) {
  delete entity_id_;
  entity_id_ = entity_id;
  if (entity_id) {
    set_has_entity_id();
  } else {
    clear_has_entity_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.UnsubscribeRequest.entity_id)
}

// optional uint64 object_id = 3;
inline bool UnsubscribeRequest::has_object_id() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void UnsubscribeRequest::set_has_object_id() {
  _has_bits_[0] |= 0x00000004u;
}
inline void UnsubscribeRequest::clear_has_object_id() {
  _has_bits_[0] &= ~0x00000004u;
}
inline void UnsubscribeRequest::clear_object_id() {
  object_id_ = GOOGLE_ULONGLONG(0);
  clear_has_object_id();
}
inline ::google::protobuf::uint64 UnsubscribeRequest::object_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.UnsubscribeRequest.object_id)
  return object_id_;
}
inline void UnsubscribeRequest::set_object_id(::google::protobuf::uint64 value) {
  set_has_object_id();
  object_id_ = value;
  // @@protoc_insertion_point(field_set:bgs.protocol.presence.v1.UnsubscribeRequest.object_id)
}

// -------------------------------------------------------------------

// UpdateRequest

// required .bgs.protocol.EntityId entity_id = 1;
inline bool UpdateRequest::has_entity_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void UpdateRequest::set_has_entity_id() {
  _has_bits_[0] |= 0x00000001u;
}
inline void UpdateRequest::clear_has_entity_id() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void UpdateRequest::clear_entity_id() {
  if (entity_id_ != NULL) entity_id_->::bgs::protocol::EntityId::Clear();
  clear_has_entity_id();
}
inline const ::bgs::protocol::EntityId& UpdateRequest::entity_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.UpdateRequest.entity_id)
  return entity_id_ != NULL ? *entity_id_ : *default_instance_->entity_id_;
}
inline ::bgs::protocol::EntityId* UpdateRequest::mutable_entity_id() {
  set_has_entity_id();
  if (entity_id_ == NULL) entity_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.UpdateRequest.entity_id)
  return entity_id_;
}
inline ::bgs::protocol::EntityId* UpdateRequest::release_entity_id() {
  clear_has_entity_id();
  ::bgs::protocol::EntityId* temp = entity_id_;
  entity_id_ = NULL;
  return temp;
}
inline void UpdateRequest::set_allocated_entity_id(::bgs::protocol::EntityId* entity_id) {
  delete entity_id_;
  entity_id_ = entity_id;
  if (entity_id) {
    set_has_entity_id();
  } else {
    clear_has_entity_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.UpdateRequest.entity_id)
}

// repeated .bgs.protocol.presence.v1.FieldOperation field_operation = 2;
inline int UpdateRequest::field_operation_size() const {
  return field_operation_.size();
}
inline void UpdateRequest::clear_field_operation() {
  field_operation_.Clear();
}
inline const ::bgs::protocol::presence::v1::FieldOperation& UpdateRequest::field_operation(int index) const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.UpdateRequest.field_operation)
  return field_operation_.Get(index);
}
inline ::bgs::protocol::presence::v1::FieldOperation* UpdateRequest::mutable_field_operation(int index) {
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.UpdateRequest.field_operation)
  return field_operation_.Mutable(index);
}
inline ::bgs::protocol::presence::v1::FieldOperation* UpdateRequest::add_field_operation() {
  // @@protoc_insertion_point(field_add:bgs.protocol.presence.v1.UpdateRequest.field_operation)
  return field_operation_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldOperation >&
UpdateRequest::field_operation() const {
  // @@protoc_insertion_point(field_list:bgs.protocol.presence.v1.UpdateRequest.field_operation)
  return field_operation_;
}
inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldOperation >*
UpdateRequest::mutable_field_operation() {
  // @@protoc_insertion_point(field_mutable_list:bgs.protocol.presence.v1.UpdateRequest.field_operation)
  return &field_operation_;
}

// optional bool no_create = 3;
inline bool UpdateRequest::has_no_create() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void UpdateRequest::set_has_no_create() {
  _has_bits_[0] |= 0x00000004u;
}
inline void UpdateRequest::clear_has_no_create() {
  _has_bits_[0] &= ~0x00000004u;
}
inline void UpdateRequest::clear_no_create() {
  no_create_ = false;
  clear_has_no_create();
}
inline bool UpdateRequest::no_create() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.UpdateRequest.no_create)
  return no_create_;
}
inline void UpdateRequest::set_no_create(bool value) {
  set_has_no_create();
  no_create_ = value;
  // @@protoc_insertion_point(field_set:bgs.protocol.presence.v1.UpdateRequest.no_create)
}

// optional .bgs.protocol.EntityId agent_id = 4;
inline bool UpdateRequest::has_agent_id() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void UpdateRequest::set_has_agent_id() {
  _has_bits_[0] |= 0x00000008u;
}
inline void UpdateRequest::clear_has_agent_id() {
  _has_bits_[0] &= ~0x00000008u;
}
inline void UpdateRequest::clear_agent_id() {
  if (agent_id_ != NULL) agent_id_->::bgs::protocol::EntityId::Clear();
  clear_has_agent_id();
}
inline const ::bgs::protocol::EntityId& UpdateRequest::agent_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.UpdateRequest.agent_id)
  return agent_id_ != NULL ? *agent_id_ : *default_instance_->agent_id_;
}
inline ::bgs::protocol::EntityId* UpdateRequest::mutable_agent_id() {
  set_has_agent_id();
  if (agent_id_ == NULL) agent_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.UpdateRequest.agent_id)
  return agent_id_;
}
inline ::bgs::protocol::EntityId* UpdateRequest::release_agent_id() {
  clear_has_agent_id();
  ::bgs::protocol::EntityId* temp = agent_id_;
  agent_id_ = NULL;
  return temp;
}
inline void UpdateRequest::set_allocated_agent_id(::bgs::protocol::EntityId* agent_id) {
  delete agent_id_;
  agent_id_ = agent_id;
  if (agent_id) {
    set_has_agent_id();
  } else {
    clear_has_agent_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.UpdateRequest.agent_id)
}

// -------------------------------------------------------------------

// QueryRequest

// required .bgs.protocol.EntityId entity_id = 1;
inline bool QueryRequest::has_entity_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void QueryRequest::set_has_entity_id() {
  _has_bits_[0] |= 0x00000001u;
}
inline void QueryRequest::clear_has_entity_id() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void QueryRequest::clear_entity_id() {
  if (entity_id_ != NULL) entity_id_->::bgs::protocol::EntityId::Clear();
  clear_has_entity_id();
}
inline const ::bgs::protocol::EntityId& QueryRequest::entity_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.QueryRequest.entity_id)
  return entity_id_ != NULL ? *entity_id_ : *default_instance_->entity_id_;
}
inline ::bgs::protocol::EntityId* QueryRequest::mutable_entity_id() {
  set_has_entity_id();
  if (entity_id_ == NULL) entity_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.QueryRequest.entity_id)
  return entity_id_;
}
inline ::bgs::protocol::EntityId* QueryRequest::release_entity_id() {
  clear_has_entity_id();
  ::bgs::protocol::EntityId* temp = entity_id_;
  entity_id_ = NULL;
  return temp;
}
inline void QueryRequest::set_allocated_entity_id(::bgs::protocol::EntityId* entity_id) {
  delete entity_id_;
  entity_id_ = entity_id;
  if (entity_id) {
    set_has_entity_id();
  } else {
    clear_has_entity_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.QueryRequest.entity_id)
}

// repeated .bgs.protocol.presence.v1.FieldKey key = 2;
inline int QueryRequest::key_size() const {
  return key_.size();
}
inline void QueryRequest::clear_key() {
  key_.Clear();
}
inline const ::bgs::protocol::presence::v1::FieldKey& QueryRequest::key(int index) const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.QueryRequest.key)
  return key_.Get(index);
}
inline ::bgs::protocol::presence::v1::FieldKey* QueryRequest::mutable_key(int index) {
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.QueryRequest.key)
  return key_.Mutable(index);
}
inline ::bgs::protocol::presence::v1::FieldKey* QueryRequest::add_key() {
  // @@protoc_insertion_point(field_add:bgs.protocol.presence.v1.QueryRequest.key)
  return key_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >&
QueryRequest::key() const {
  // @@protoc_insertion_point(field_list:bgs.protocol.presence.v1.QueryRequest.key)
  return key_;
}
inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >*
QueryRequest::mutable_key() {
  // @@protoc_insertion_point(field_mutable_list:bgs.protocol.presence.v1.QueryRequest.key)
  return &key_;
}

// optional .bgs.protocol.EntityId agent_id = 3;
inline bool QueryRequest::has_agent_id() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void QueryRequest::set_has_agent_id() {
  _has_bits_[0] |= 0x00000004u;
}
inline void QueryRequest::clear_has_agent_id() {
  _has_bits_[0] &= ~0x00000004u;
}
inline void QueryRequest::clear_agent_id() {
  if (agent_id_ != NULL) agent_id_->::bgs::protocol::EntityId::Clear();
  clear_has_agent_id();
}
inline const ::bgs::protocol::EntityId& QueryRequest::agent_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.QueryRequest.agent_id)
  return agent_id_ != NULL ? *agent_id_ : *default_instance_->agent_id_;
}
inline ::bgs::protocol::EntityId* QueryRequest::mutable_agent_id() {
  set_has_agent_id();
  if (agent_id_ == NULL) agent_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.QueryRequest.agent_id)
  return agent_id_;
}
inline ::bgs::protocol::EntityId* QueryRequest::release_agent_id() {
  clear_has_agent_id();
  ::bgs::protocol::EntityId* temp = agent_id_;
  agent_id_ = NULL;
  return temp;
}
inline void QueryRequest::set_allocated_agent_id(::bgs::protocol::EntityId* agent_id) {
  delete agent_id_;
  agent_id_ = agent_id;
  if (agent_id) {
    set_has_agent_id();
  } else {
    clear_has_agent_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.QueryRequest.agent_id)
}

// -------------------------------------------------------------------

// QueryResponse

// repeated .bgs.protocol.presence.v1.Field field = 2;
inline int QueryResponse::field_size() const {
  return field_.size();
}
inline void QueryResponse::clear_field() {
  field_.Clear();
}
inline const ::bgs::protocol::presence::v1::Field& QueryResponse::field(int index) const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.QueryResponse.field)
  return field_.Get(index);
}
inline ::bgs::protocol::presence::v1::Field* QueryResponse::mutable_field(int index) {
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.QueryResponse.field)
  return field_.Mutable(index);
}
inline ::bgs::protocol::presence::v1::Field* QueryResponse::add_field() {
  // @@protoc_insertion_point(field_add:bgs.protocol.presence.v1.QueryResponse.field)
  return field_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::Field >&
QueryResponse::field() const {
  // @@protoc_insertion_point(field_list:bgs.protocol.presence.v1.QueryResponse.field)
  return field_;
}
inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::Field >*
QueryResponse::mutable_field() {
  // @@protoc_insertion_point(field_mutable_list:bgs.protocol.presence.v1.QueryResponse.field)
  return &field_;
}

// -------------------------------------------------------------------

// OwnershipRequest

// required .bgs.protocol.EntityId entity_id = 1;
inline bool OwnershipRequest::has_entity_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void OwnershipRequest::set_has_entity_id() {
  _has_bits_[0] |= 0x00000001u;
}
inline void OwnershipRequest::clear_has_entity_id() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void OwnershipRequest::clear_entity_id() {
  if (entity_id_ != NULL) entity_id_->::bgs::protocol::EntityId::Clear();
  clear_has_entity_id();
}
inline const ::bgs::protocol::EntityId& OwnershipRequest::entity_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.OwnershipRequest.entity_id)
  return entity_id_ != NULL ? *entity_id_ : *default_instance_->entity_id_;
}
inline ::bgs::protocol::EntityId* OwnershipRequest::mutable_entity_id() {
  set_has_entity_id();
  if (entity_id_ == NULL) entity_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.OwnershipRequest.entity_id)
  return entity_id_;
}
inline ::bgs::protocol::EntityId* OwnershipRequest::release_entity_id() {
  clear_has_entity_id();
  ::bgs::protocol::EntityId* temp = entity_id_;
  entity_id_ = NULL;
  return temp;
}
inline void OwnershipRequest::set_allocated_entity_id(::bgs::protocol::EntityId* entity_id) {
  delete entity_id_;
  entity_id_ = entity_id;
  if (entity_id) {
    set_has_entity_id();
  } else {
    clear_has_entity_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.OwnershipRequest.entity_id)
}

// optional bool release_ownership = 2;
inline bool OwnershipRequest::has_release_ownership() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void OwnershipRequest::set_has_release_ownership() {
  _has_bits_[0] |= 0x00000002u;
}
inline void OwnershipRequest::clear_has_release_ownership() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void OwnershipRequest::clear_release_ownership() {
  release_ownership_ = false;
  clear_has_release_ownership();
}
inline bool OwnershipRequest::release_ownership() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.OwnershipRequest.release_ownership)
  return release_ownership_;
}
inline void OwnershipRequest::set_release_ownership(bool value) {
  set_has_release_ownership();
  release_ownership_ = value;
  // @@protoc_insertion_point(field_set:bgs.protocol.presence.v1.OwnershipRequest.release_ownership)
}

// -------------------------------------------------------------------

// BatchSubscribeRequest

// optional .bgs.protocol.EntityId agent_id = 1;
inline bool BatchSubscribeRequest::has_agent_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void BatchSubscribeRequest::set_has_agent_id() {
  _has_bits_[0] |= 0x00000001u;
}
inline void BatchSubscribeRequest::clear_has_agent_id() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void BatchSubscribeRequest::clear_agent_id() {
  if (agent_id_ != NULL) agent_id_->::bgs::protocol::EntityId::Clear();
  clear_has_agent_id();
}
inline const ::bgs::protocol::EntityId& BatchSubscribeRequest::agent_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.BatchSubscribeRequest.agent_id)
  return agent_id_ != NULL ? *agent_id_ : *default_instance_->agent_id_;
}
inline ::bgs::protocol::EntityId* BatchSubscribeRequest::mutable_agent_id() {
  set_has_agent_id();
  if (agent_id_ == NULL) agent_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.BatchSubscribeRequest.agent_id)
  return agent_id_;
}
inline ::bgs::protocol::EntityId* BatchSubscribeRequest::release_agent_id() {
  clear_has_agent_id();
  ::bgs::protocol::EntityId* temp = agent_id_;
  agent_id_ = NULL;
  return temp;
}
inline void BatchSubscribeRequest::set_allocated_agent_id(::bgs::protocol::EntityId* agent_id) {
  delete agent_id_;
  agent_id_ = agent_id;
  if (agent_id) {
    set_has_agent_id();
  } else {
    clear_has_agent_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.BatchSubscribeRequest.agent_id)
}

// repeated .bgs.protocol.EntityId entity_id = 2;
inline int BatchSubscribeRequest::entity_id_size() const {
  return entity_id_.size();
}
inline void BatchSubscribeRequest::clear_entity_id() {
  entity_id_.Clear();
}
inline const ::bgs::protocol::EntityId& BatchSubscribeRequest::entity_id(int index) const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.BatchSubscribeRequest.entity_id)
  return entity_id_.Get(index);
}
inline ::bgs::protocol::EntityId* BatchSubscribeRequest::mutable_entity_id(int index) {
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.BatchSubscribeRequest.entity_id)
  return entity_id_.Mutable(index);
}
inline ::bgs::protocol::EntityId* BatchSubscribeRequest::add_entity_id() {
  // @@protoc_insertion_point(field_add:bgs.protocol.presence.v1.BatchSubscribeRequest.entity_id)
  return entity_id_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::EntityId >&
BatchSubscribeRequest::entity_id() const {
  // @@protoc_insertion_point(field_list:bgs.protocol.presence.v1.BatchSubscribeRequest.entity_id)
  return entity_id_;
}
inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::EntityId >*
BatchSubscribeRequest::mutable_entity_id() {
  // @@protoc_insertion_point(field_mutable_list:bgs.protocol.presence.v1.BatchSubscribeRequest.entity_id)
  return &entity_id_;
}

// repeated fixed32 program = 3;
inline int BatchSubscribeRequest::program_size() const {
  return program_.size();
}
inline void BatchSubscribeRequest::clear_program() {
  program_.Clear();
}
inline ::google::protobuf::uint32 BatchSubscribeRequest::program(int index) const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.BatchSubscribeRequest.program)
  return program_.Get(index);
}
inline void BatchSubscribeRequest::set_program(int index, ::google::protobuf::uint32 value) {
  program_.Set(index, value);
  // @@protoc_insertion_point(field_set:bgs.protocol.presence.v1.BatchSubscribeRequest.program)
}
inline void BatchSubscribeRequest::add_program(::google::protobuf::uint32 value) {
  program_.Add(value);
  // @@protoc_insertion_point(field_add:bgs.protocol.presence.v1.BatchSubscribeRequest.program)
}
inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
BatchSubscribeRequest::program() const {
  // @@protoc_insertion_point(field_list:bgs.protocol.presence.v1.BatchSubscribeRequest.program)
  return program_;
}
inline ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
BatchSubscribeRequest::mutable_program() {
  // @@protoc_insertion_point(field_mutable_list:bgs.protocol.presence.v1.BatchSubscribeRequest.program)
  return &program_;
}

// repeated .bgs.protocol.presence.v1.FieldKey key = 4;
inline int BatchSubscribeRequest::key_size() const {
  return key_.size();
}
inline void BatchSubscribeRequest::clear_key() {
  key_.Clear();
}
inline const ::bgs::protocol::presence::v1::FieldKey& BatchSubscribeRequest::key(int index) const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.BatchSubscribeRequest.key)
  return key_.Get(index);
}
inline ::bgs::protocol::presence::v1::FieldKey* BatchSubscribeRequest::mutable_key(int index) {
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.BatchSubscribeRequest.key)
  return key_.Mutable(index);
}
inline ::bgs::protocol::presence::v1::FieldKey* BatchSubscribeRequest::add_key() {
  // @@protoc_insertion_point(field_add:bgs.protocol.presence.v1.BatchSubscribeRequest.key)
  return key_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >&
BatchSubscribeRequest::key() const {
  // @@protoc_insertion_point(field_list:bgs.protocol.presence.v1.BatchSubscribeRequest.key)
  return key_;
}
inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::FieldKey >*
BatchSubscribeRequest::mutable_key() {
  // @@protoc_insertion_point(field_mutable_list:bgs.protocol.presence.v1.BatchSubscribeRequest.key)
  return &key_;
}

// optional uint64 object_id = 5;
inline bool BatchSubscribeRequest::has_object_id() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void BatchSubscribeRequest::set_has_object_id() {
  _has_bits_[0] |= 0x00000010u;
}
inline void BatchSubscribeRequest::clear_has_object_id() {
  _has_bits_[0] &= ~0x00000010u;
}
inline void BatchSubscribeRequest::clear_object_id() {
  object_id_ = GOOGLE_ULONGLONG(0);
  clear_has_object_id();
}
inline ::google::protobuf::uint64 BatchSubscribeRequest::object_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.BatchSubscribeRequest.object_id)
  return object_id_;
}
inline void BatchSubscribeRequest::set_object_id(::google::protobuf::uint64 value) {
  set_has_object_id();
  object_id_ = value;
  // @@protoc_insertion_point(field_set:bgs.protocol.presence.v1.BatchSubscribeRequest.object_id)
}

// -------------------------------------------------------------------

// SubscribeResult

// optional .bgs.protocol.EntityId entity_id = 1;
inline bool SubscribeResult::has_entity_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void SubscribeResult::set_has_entity_id() {
  _has_bits_[0] |= 0x00000001u;
}
inline void SubscribeResult::clear_has_entity_id() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void SubscribeResult::clear_entity_id() {
  if (entity_id_ != NULL) entity_id_->::bgs::protocol::EntityId::Clear();
  clear_has_entity_id();
}
inline const ::bgs::protocol::EntityId& SubscribeResult::entity_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.SubscribeResult.entity_id)
  return entity_id_ != NULL ? *entity_id_ : *default_instance_->entity_id_;
}
inline ::bgs::protocol::EntityId* SubscribeResult::mutable_entity_id() {
  set_has_entity_id();
  if (entity_id_ == NULL) entity_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.SubscribeResult.entity_id)
  return entity_id_;
}
inline ::bgs::protocol::EntityId* SubscribeResult::release_entity_id() {
  clear_has_entity_id();
  ::bgs::protocol::EntityId* temp = entity_id_;
  entity_id_ = NULL;
  return temp;
}
inline void SubscribeResult::set_allocated_entity_id(::bgs::protocol::EntityId* entity_id) {
  delete entity_id_;
  entity_id_ = entity_id;
  if (entity_id) {
    set_has_entity_id();
  } else {
    clear_has_entity_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.SubscribeResult.entity_id)
}

// optional uint32 result = 2;
inline bool SubscribeResult::has_result() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void SubscribeResult::set_has_result() {
  _has_bits_[0] |= 0x00000002u;
}
inline void SubscribeResult::clear_has_result() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void SubscribeResult::clear_result() {
  result_ = 0u;
  clear_has_result();
}
inline ::google::protobuf::uint32 SubscribeResult::result() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.SubscribeResult.result)
  return result_;
}
inline void SubscribeResult::set_result(::google::protobuf::uint32 value) {
  set_has_result();
  result_ = value;
  // @@protoc_insertion_point(field_set:bgs.protocol.presence.v1.SubscribeResult.result)
}

// -------------------------------------------------------------------

// BatchSubscribeResponse

// repeated .bgs.protocol.presence.v1.SubscribeResult subscribe_failed = 1;
inline int BatchSubscribeResponse::subscribe_failed_size() const {
  return subscribe_failed_.size();
}
inline void BatchSubscribeResponse::clear_subscribe_failed() {
  subscribe_failed_.Clear();
}
inline const ::bgs::protocol::presence::v1::SubscribeResult& BatchSubscribeResponse::subscribe_failed(int index) const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.BatchSubscribeResponse.subscribe_failed)
  return subscribe_failed_.Get(index);
}
inline ::bgs::protocol::presence::v1::SubscribeResult* BatchSubscribeResponse::mutable_subscribe_failed(int index) {
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.BatchSubscribeResponse.subscribe_failed)
  return subscribe_failed_.Mutable(index);
}
inline ::bgs::protocol::presence::v1::SubscribeResult* BatchSubscribeResponse::add_subscribe_failed() {
  // @@protoc_insertion_point(field_add:bgs.protocol.presence.v1.BatchSubscribeResponse.subscribe_failed)
  return subscribe_failed_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::SubscribeResult >&
BatchSubscribeResponse::subscribe_failed() const {
  // @@protoc_insertion_point(field_list:bgs.protocol.presence.v1.BatchSubscribeResponse.subscribe_failed)
  return subscribe_failed_;
}
inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::presence::v1::SubscribeResult >*
BatchSubscribeResponse::mutable_subscribe_failed() {
  // @@protoc_insertion_point(field_mutable_list:bgs.protocol.presence.v1.BatchSubscribeResponse.subscribe_failed)
  return &subscribe_failed_;
}

// -------------------------------------------------------------------

// BatchUnsubscribeRequest

// optional .bgs.protocol.EntityId agent_id = 1;
inline bool BatchUnsubscribeRequest::has_agent_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void BatchUnsubscribeRequest::set_has_agent_id() {
  _has_bits_[0] |= 0x00000001u;
}
inline void BatchUnsubscribeRequest::clear_has_agent_id() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void BatchUnsubscribeRequest::clear_agent_id() {
  if (agent_id_ != NULL) agent_id_->::bgs::protocol::EntityId::Clear();
  clear_has_agent_id();
}
inline const ::bgs::protocol::EntityId& BatchUnsubscribeRequest::agent_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.BatchUnsubscribeRequest.agent_id)
  return agent_id_ != NULL ? *agent_id_ : *default_instance_->agent_id_;
}
inline ::bgs::protocol::EntityId* BatchUnsubscribeRequest::mutable_agent_id() {
  set_has_agent_id();
  if (agent_id_ == NULL) agent_id_ = new ::bgs::protocol::EntityId;
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.BatchUnsubscribeRequest.agent_id)
  return agent_id_;
}
inline ::bgs::protocol::EntityId* BatchUnsubscribeRequest::release_agent_id() {
  clear_has_agent_id();
  ::bgs::protocol::EntityId* temp = agent_id_;
  agent_id_ = NULL;
  return temp;
}
inline void BatchUnsubscribeRequest::set_allocated_agent_id(::bgs::protocol::EntityId* agent_id) {
  delete agent_id_;
  agent_id_ = agent_id;
  if (agent_id) {
    set_has_agent_id();
  } else {
    clear_has_agent_id();
  }
  // @@protoc_insertion_point(field_set_allocated:bgs.protocol.presence.v1.BatchUnsubscribeRequest.agent_id)
}

// repeated .bgs.protocol.EntityId entity_id = 2;
inline int BatchUnsubscribeRequest::entity_id_size() const {
  return entity_id_.size();
}
inline void BatchUnsubscribeRequest::clear_entity_id() {
  entity_id_.Clear();
}
inline const ::bgs::protocol::EntityId& BatchUnsubscribeRequest::entity_id(int index) const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.BatchUnsubscribeRequest.entity_id)
  return entity_id_.Get(index);
}
inline ::bgs::protocol::EntityId* BatchUnsubscribeRequest::mutable_entity_id(int index) {
  // @@protoc_insertion_point(field_mutable:bgs.protocol.presence.v1.BatchUnsubscribeRequest.entity_id)
  return entity_id_.Mutable(index);
}
inline ::bgs::protocol::EntityId* BatchUnsubscribeRequest::add_entity_id() {
  // @@protoc_insertion_point(field_add:bgs.protocol.presence.v1.BatchUnsubscribeRequest.entity_id)
  return entity_id_.Add();
}
inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::EntityId >&
BatchUnsubscribeRequest::entity_id() const {
  // @@protoc_insertion_point(field_list:bgs.protocol.presence.v1.BatchUnsubscribeRequest.entity_id)
  return entity_id_;
}
inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::EntityId >*
BatchUnsubscribeRequest::mutable_entity_id() {
  // @@protoc_insertion_point(field_mutable_list:bgs.protocol.presence.v1.BatchUnsubscribeRequest.entity_id)
  return &entity_id_;
}

// optional uint64 object_id = 3;
inline bool BatchUnsubscribeRequest::has_object_id() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void BatchUnsubscribeRequest::set_has_object_id() {
  _has_bits_[0] |= 0x00000004u;
}
inline void BatchUnsubscribeRequest::clear_has_object_id() {
  _has_bits_[0] &= ~0x00000004u;
}
inline void BatchUnsubscribeRequest::clear_object_id() {
  object_id_ = GOOGLE_ULONGLONG(0);
  clear_has_object_id();
}
inline ::google::protobuf::uint64 BatchUnsubscribeRequest::object_id() const {
  // @@protoc_insertion_point(field_get:bgs.protocol.presence.v1.BatchUnsubscribeRequest.object_id)
  return object_id_;
}
inline void BatchUnsubscribeRequest::set_object_id(::google::protobuf::uint64 value) {
  set_has_object_id();
  object_id_ = value;
  // @@protoc_insertion_point(field_set:bgs.protocol.presence.v1.BatchUnsubscribeRequest.object_id)
}


// @@protoc_insertion_point(namespace_scope)

}  // namespace v1
}  // namespace presence
}  // namespace protocol
}  // namespace bgs

#ifndef SWIG
namespace google {
namespace protobuf {


}  // namespace google
}  // namespace protobuf
#endif  // SWIG

// @@protoc_insertion_point(global_scope)

#endif  // PROTOBUF_presence_5fservice_2eproto__INCLUDED
