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

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "coprocess_object.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)

namespace coprocess {

namespace {

const ::google::protobuf::Descriptor* Object_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Object_reflection_ = NULL;
const ::google::protobuf::Descriptor* Object_MetadataEntry_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Object_SpecEntry_descriptor_ = NULL;
const ::google::protobuf::Descriptor* Event_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Event_reflection_ = NULL;
const ::google::protobuf::Descriptor* EventReply_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  EventReply_reflection_ = NULL;

}  // namespace


void protobuf_AssignDesc_coprocess_5fobject_2eproto() GOOGLE_ATTRIBUTE_COLD;
void protobuf_AssignDesc_coprocess_5fobject_2eproto() {
  protobuf_AddDesc_coprocess_5fobject_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "coprocess_object.proto");
  GOOGLE_CHECK(file != NULL);
  Object_descriptor_ = file->message_type(0);
  static const int Object_offsets_[6] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Object, hook_type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Object, hook_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Object, request_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Object, session_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Object, metadata_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Object, spec_),
  };
  Object_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      Object_descriptor_,
      Object::internal_default_instance(),
      Object_offsets_,
      -1,
      -1,
      -1,
      sizeof(Object),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Object, _internal_metadata_));
  Object_MetadataEntry_descriptor_ = Object_descriptor_->nested_type(0);
  Object_SpecEntry_descriptor_ = Object_descriptor_->nested_type(1);
  Event_descriptor_ = file->message_type(1);
  static const int Event_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Event, payload_),
  };
  Event_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      Event_descriptor_,
      Event::internal_default_instance(),
      Event_offsets_,
      -1,
      -1,
      -1,
      sizeof(Event),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Event, _internal_metadata_));
  EventReply_descriptor_ = file->message_type(2);
  static const int EventReply_offsets_[1] = {
  };
  EventReply_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      EventReply_descriptor_,
      EventReply::internal_default_instance(),
      EventReply_offsets_,
      -1,
      -1,
      -1,
      sizeof(EventReply),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EventReply, _internal_metadata_));
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_coprocess_5fobject_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      Object_descriptor_, Object::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
        Object_MetadataEntry_descriptor_,
        ::google::protobuf::internal::MapEntry<
            ::std::string,
            ::std::string,
            ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
            ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
            0>::CreateDefaultInstance(
                Object_MetadataEntry_descriptor_));
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
        Object_SpecEntry_descriptor_,
        ::google::protobuf::internal::MapEntry<
            ::std::string,
            ::std::string,
            ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
            ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
            0>::CreateDefaultInstance(
                Object_SpecEntry_descriptor_));
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      Event_descriptor_, Event::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      EventReply_descriptor_, EventReply::internal_default_instance());
}

}  // namespace

void protobuf_ShutdownFile_coprocess_5fobject_2eproto() {
  Object_default_instance_.Shutdown();
  delete Object_reflection_;
  Event_default_instance_.Shutdown();
  delete Event_reflection_;
  EventReply_default_instance_.Shutdown();
  delete EventReply_reflection_;
}

void protobuf_InitDefaults_coprocess_5fobject_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::coprocess::protobuf_InitDefaults_coprocess_5fmini_5frequest_5fobject_2eproto();
  ::coprocess::protobuf_InitDefaults_coprocess_5fsession_5fstate_2eproto();
  ::coprocess::protobuf_InitDefaults_coprocess_5fcommon_2eproto();
  ::google::protobuf::internal::GetEmptyString();
  Object_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  ::google::protobuf::internal::GetEmptyString();
  Event_default_instance_.DefaultConstruct();
  EventReply_default_instance_.DefaultConstruct();
  Object_default_instance_.get_mutable()->InitAsDefaultInstance();
  Event_default_instance_.get_mutable()->InitAsDefaultInstance();
  EventReply_default_instance_.get_mutable()->InitAsDefaultInstance();
}

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_coprocess_5fobject_2eproto_once_);
void protobuf_InitDefaults_coprocess_5fobject_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_coprocess_5fobject_2eproto_once_,
                 &protobuf_InitDefaults_coprocess_5fobject_2eproto_impl);
}
void protobuf_AddDesc_coprocess_5fobject_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  protobuf_InitDefaults_coprocess_5fobject_2eproto();
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\026coprocess_object.proto\022\tcoprocess\032#cop"
    "rocess_mini_request_object.proto\032\035coproc"
    "ess_session_state.proto\032\026coprocess_commo"
    "n.proto\"\330\002\n\006Object\022&\n\thook_type\030\001 \001(\0162\023."
    "coprocess.HookType\022\021\n\thook_name\030\002 \001(\t\022-\n"
    "\007request\030\003 \001(\0132\034.coprocess.MiniRequestOb"
    "ject\022(\n\007session\030\004 \001(\0132\027.coprocess.Sessio"
    "nState\0221\n\010metadata\030\005 \003(\0132\037.coprocess.Obj"
    "ect.MetadataEntry\022)\n\004spec\030\006 \003(\0132\033.coproc"
    "ess.Object.SpecEntry\032/\n\rMetadataEntry\022\013\n"
    "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032+\n\tSpecEnt"
    "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\030\n\005Ev"
    "ent\022\017\n\007payload\030\001 \001(\t\"\014\n\nEventReply2|\n\nDi"
    "spatcher\0222\n\010Dispatch\022\021.coprocess.Object\032"
    "\021.coprocess.Object\"\000\022:\n\rDispatchEvent\022\020."
    "coprocess.Event\032\025.coprocess.EventReply\"\000"
    "b\006proto3", 648);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "coprocess_object.proto", &protobuf_RegisterTypes);
  ::coprocess::protobuf_AddDesc_coprocess_5fmini_5frequest_5fobject_2eproto();
  ::coprocess::protobuf_AddDesc_coprocess_5fsession_5fstate_2eproto();
  ::coprocess::protobuf_AddDesc_coprocess_5fcommon_2eproto();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_coprocess_5fobject_2eproto);
}

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_coprocess_5fobject_2eproto_once_);
void protobuf_AddDesc_coprocess_5fobject_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_coprocess_5fobject_2eproto_once_,
                 &protobuf_AddDesc_coprocess_5fobject_2eproto_impl);
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_coprocess_5fobject_2eproto {
  StaticDescriptorInitializer_coprocess_5fobject_2eproto() {
    protobuf_AddDesc_coprocess_5fobject_2eproto();
  }
} static_descriptor_initializer_coprocess_5fobject_2eproto_;

namespace {

static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN;
static void MergeFromFail(int line) {
  ::google::protobuf::internal::MergeFromFail(__FILE__, line);
}

}  // namespace


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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Object::kHookTypeFieldNumber;
const int Object::kHookNameFieldNumber;
const int Object::kRequestFieldNumber;
const int Object::kSessionFieldNumber;
const int Object::kMetadataFieldNumber;
const int Object::kSpecFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Object::Object()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_coprocess_5fobject_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:coprocess.Object)
}

void Object::InitAsDefaultInstance() {
  request_ = const_cast< ::coprocess::MiniRequestObject*>(
      ::coprocess::MiniRequestObject::internal_default_instance());
  session_ = const_cast< ::coprocess::SessionState*>(
      ::coprocess::SessionState::internal_default_instance());
}

Object::Object(const Object& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:coprocess.Object)
}

void Object::SharedCtor() {
  metadata_.SetAssignDescriptorCallback(
      protobuf_AssignDescriptorsOnce);
  metadata_.SetEntryDescriptor(
      &::coprocess::Object_MetadataEntry_descriptor_);
  spec_.SetAssignDescriptorCallback(
      protobuf_AssignDescriptorsOnce);
  spec_.SetEntryDescriptor(
      &::coprocess::Object_SpecEntry_descriptor_);
  hook_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  request_ = NULL;
  session_ = NULL;
  hook_type_ = 0;
  _cached_size_ = 0;
}

Object::~Object() {
  // @@protoc_insertion_point(destructor:coprocess.Object)
  SharedDtor();
}

void Object::SharedDtor() {
  hook_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != &Object_default_instance_.get()) {
    delete request_;
    delete session_;
  }
}

void Object::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Object::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Object_descriptor_;
}

const Object& Object::default_instance() {
  protobuf_InitDefaults_coprocess_5fobject_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<Object> Object_default_instance_;

Object* Object::New(::google::protobuf::Arena* arena) const {
  Object* n = new Object;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Object::Clear() {
// @@protoc_insertion_point(message_clear_start:coprocess.Object)
  hook_type_ = 0;
  hook_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == NULL && request_ != NULL) delete request_;
  request_ = NULL;
  if (GetArenaNoVirtual() == NULL && session_ != NULL) delete session_;
  session_ = NULL;
  metadata_.Clear();
  spec_.Clear();
}

bool Object::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:coprocess.Object)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .coprocess.HookType hook_type = 1;
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          set_hook_type(static_cast< ::coprocess::HookType >(value));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_hook_name;
        break;
      }

      // optional string hook_name = 2;
      case 2: {
        if (tag == 18) {
         parse_hook_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_hook_name()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->hook_name().data(), this->hook_name().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "coprocess.Object.hook_name"));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_request;
        break;
      }

      // optional .coprocess.MiniRequestObject request = 3;
      case 3: {
        if (tag == 26) {
         parse_request:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_request()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(34)) goto parse_session;
        break;
      }

      // optional .coprocess.SessionState session = 4;
      case 4: {
        if (tag == 34) {
         parse_session:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_session()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(42)) goto parse_metadata;
        break;
      }

      // map<string, string> metadata = 5;
      case 5: {
        if (tag == 42) {
         parse_metadata:
          DO_(input->IncrementRecursionDepth());
         parse_loop_metadata:
          Object_MetadataEntry::Parser< ::google::protobuf::internal::MapField<
              ::std::string, ::std::string,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              0 >,
            ::google::protobuf::Map< ::std::string, ::std::string > > parser(&metadata_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.key().data(), parser.key().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "coprocess.Object.MetadataEntry.key"));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.value().data(), parser.value().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "coprocess.Object.MetadataEntry.value"));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(42)) goto parse_loop_metadata;
        if (input->ExpectTag(50)) goto parse_loop_spec;
        input->UnsafeDecrementRecursionDepth();
        break;
      }

      // map<string, string> spec = 6;
      case 6: {
        if (tag == 50) {
          DO_(input->IncrementRecursionDepth());
         parse_loop_spec:
          Object_SpecEntry::Parser< ::google::protobuf::internal::MapField<
              ::std::string, ::std::string,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
              0 >,
            ::google::protobuf::Map< ::std::string, ::std::string > > parser(&spec_);
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
              input, &parser));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.key().data(), parser.key().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "coprocess.Object.SpecEntry.key"));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            parser.value().data(), parser.value().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "coprocess.Object.SpecEntry.value"));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(50)) goto parse_loop_spec;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:coprocess.Object)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:coprocess.Object)
  return false;
#undef DO_
}

void Object::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:coprocess.Object)
  // optional .coprocess.HookType hook_type = 1;
  if (this->hook_type() != 0) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->hook_type(), output);
  }

  // optional string hook_name = 2;
  if (this->hook_name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->hook_name().data(), this->hook_name().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "coprocess.Object.hook_name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->hook_name(), output);
  }

  // optional .coprocess.MiniRequestObject request = 3;
  if (this->has_request()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *this->request_, output);
  }

  // optional .coprocess.SessionState session = 4;
  if (this->has_session()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *this->session_, output);
  }

  // map<string, string> metadata = 5;
  if (!this->metadata().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), p->first.length(),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "coprocess.Object.MetadataEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), p->second.length(),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "coprocess.Object.MetadataEntry.value");
      }
    };

    if (output->IsSerializationDeterminstic() &&
        this->metadata().size() > 1) {
      ::google::protobuf::scoped_array<SortItem> items(
          new SortItem[this->metadata().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->metadata().begin();
          it != this->metadata().end(); ++it, ++n) {
        items[n] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[n], Less());
      ::google::protobuf::scoped_ptr<Object_MetadataEntry> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(metadata_.NewEntryWrapper(
            items[i]->first, items[i]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            5, *entry, output);
        Utf8Check::Check(items[i]);
      }
    } else {
      ::google::protobuf::scoped_ptr<Object_MetadataEntry> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->metadata().begin();
          it != this->metadata().end(); ++it) {
        entry.reset(metadata_.NewEntryWrapper(
            it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            5, *entry, output);
        Utf8Check::Check(&*it);
      }
    }
  }

  // map<string, string> spec = 6;
  if (!this->spec().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), p->first.length(),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "coprocess.Object.SpecEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), p->second.length(),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "coprocess.Object.SpecEntry.value");
      }
    };

    if (output->IsSerializationDeterminstic() &&
        this->spec().size() > 1) {
      ::google::protobuf::scoped_array<SortItem> items(
          new SortItem[this->spec().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->spec().begin();
          it != this->spec().end(); ++it, ++n) {
        items[n] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[n], Less());
      ::google::protobuf::scoped_ptr<Object_SpecEntry> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(spec_.NewEntryWrapper(
            items[i]->first, items[i]->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            6, *entry, output);
        Utf8Check::Check(items[i]);
      }
    } else {
      ::google::protobuf::scoped_ptr<Object_SpecEntry> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->spec().begin();
          it != this->spec().end(); ++it) {
        entry.reset(spec_.NewEntryWrapper(
            it->first, it->second));
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
            6, *entry, output);
        Utf8Check::Check(&*it);
      }
    }
  }

  // @@protoc_insertion_point(serialize_end:coprocess.Object)
}

::google::protobuf::uint8* Object::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:coprocess.Object)
  // optional .coprocess.HookType hook_type = 1;
  if (this->hook_type() != 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->hook_type(), target);
  }

  // optional string hook_name = 2;
  if (this->hook_name().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->hook_name().data(), this->hook_name().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "coprocess.Object.hook_name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->hook_name(), target);
  }

  // optional .coprocess.MiniRequestObject request = 3;
  if (this->has_request()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        3, *this->request_, false, target);
  }

  // optional .coprocess.SessionState session = 4;
  if (this->has_session()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        4, *this->session_, false, target);
  }

  // map<string, string> metadata = 5;
  if (!this->metadata().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), p->first.length(),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "coprocess.Object.MetadataEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), p->second.length(),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "coprocess.Object.MetadataEntry.value");
      }
    };

    if (deterministic &&
        this->metadata().size() > 1) {
      ::google::protobuf::scoped_array<SortItem> items(
          new SortItem[this->metadata().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->metadata().begin();
          it != this->metadata().end(); ++it, ++n) {
        items[n] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[n], Less());
      ::google::protobuf::scoped_ptr<Object_MetadataEntry> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(metadata_.NewEntryWrapper(
            items[i]->first, items[i]->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       5, *entry, deterministic, target);
;
        Utf8Check::Check(items[i]);
      }
    } else {
      ::google::protobuf::scoped_ptr<Object_MetadataEntry> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->metadata().begin();
          it != this->metadata().end(); ++it) {
        entry.reset(metadata_.NewEntryWrapper(
            it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       5, *entry, deterministic, target);
;
        Utf8Check::Check(&*it);
      }
    }
  }

  // map<string, string> spec = 6;
  if (!this->spec().empty()) {
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
        ConstPtr;
    typedef ConstPtr SortItem;
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
    struct Utf8Check {
      static void Check(ConstPtr p) {
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->first.data(), p->first.length(),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "coprocess.Object.SpecEntry.key");
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          p->second.data(), p->second.length(),
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
          "coprocess.Object.SpecEntry.value");
      }
    };

    if (deterministic &&
        this->spec().size() > 1) {
      ::google::protobuf::scoped_array<SortItem> items(
          new SortItem[this->spec().size()]);
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
      size_type n = 0;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->spec().begin();
          it != this->spec().end(); ++it, ++n) {
        items[n] = SortItem(&*it);
      }
      ::std::sort(&items[0], &items[n], Less());
      ::google::protobuf::scoped_ptr<Object_SpecEntry> entry;
      for (size_type i = 0; i < n; i++) {
        entry.reset(spec_.NewEntryWrapper(
            items[i]->first, items[i]->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       6, *entry, deterministic, target);
;
        Utf8Check::Check(items[i]);
      }
    } else {
      ::google::protobuf::scoped_ptr<Object_SpecEntry> entry;
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
          it = this->spec().begin();
          it != this->spec().end(); ++it) {
        entry.reset(spec_.NewEntryWrapper(
            it->first, it->second));
        target = ::google::protobuf::internal::WireFormatLite::
                   InternalWriteMessageNoVirtualToArray(
                       6, *entry, deterministic, target);
;
        Utf8Check::Check(&*it);
      }
    }
  }

  // @@protoc_insertion_point(serialize_to_array_end:coprocess.Object)
  return target;
}

size_t Object::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:coprocess.Object)
  size_t total_size = 0;

  // optional .coprocess.HookType hook_type = 1;
  if (this->hook_type() != 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->hook_type());
  }

  // optional string hook_name = 2;
  if (this->hook_name().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->hook_name());
  }

  // optional .coprocess.MiniRequestObject request = 3;
  if (this->has_request()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        *this->request_);
  }

  // optional .coprocess.SessionState session = 4;
  if (this->has_session()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        *this->session_);
  }

  // map<string, string> metadata = 5;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->metadata_size());
  {
    ::google::protobuf::scoped_ptr<Object_MetadataEntry> entry;
    for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
        it = this->metadata().begin();
        it != this->metadata().end(); ++it) {
      entry.reset(metadata_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  // map<string, string> spec = 6;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->spec_size());
  {
    ::google::protobuf::scoped_ptr<Object_SpecEntry> entry;
    for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
        it = this->spec().begin();
        it != this->spec().end(); ++it) {
      entry.reset(spec_.NewEntryWrapper(it->first, it->second));
      total_size += ::google::protobuf::internal::WireFormatLite::
          MessageSizeNoVirtual(*entry);
    }
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Object::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:coprocess.Object)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const Object* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Object>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:coprocess.Object)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:coprocess.Object)
    UnsafeMergeFrom(*source);
  }
}

void Object::MergeFrom(const Object& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:coprocess.Object)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void Object::UnsafeMergeFrom(const Object& from) {
  GOOGLE_DCHECK(&from != this);
  metadata_.MergeFrom(from.metadata_);
  spec_.MergeFrom(from.spec_);
  if (from.hook_type() != 0) {
    set_hook_type(from.hook_type());
  }
  if (from.hook_name().size() > 0) {

    hook_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.hook_name_);
  }
  if (from.has_request()) {
    mutable_request()->::coprocess::MiniRequestObject::MergeFrom(from.request());
  }
  if (from.has_session()) {
    mutable_session()->::coprocess::SessionState::MergeFrom(from.session());
  }
}

void Object::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:coprocess.Object)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Object::CopyFrom(const Object& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:coprocess.Object)
  if (&from == this) return;
  Clear();
  UnsafeMergeFrom(from);
}

bool Object::IsInitialized() const {

  return true;
}

void Object::Swap(Object* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Object::InternalSwap(Object* other) {
  std::swap(hook_type_, other->hook_type_);
  hook_name_.Swap(&other->hook_name_);
  std::swap(request_, other->request_);
  std::swap(session_, other->session_);
  metadata_.Swap(&other->metadata_);
  spec_.Swap(&other->spec_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Object::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Object_descriptor_;
  metadata.reflection = Object_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Object

// optional .coprocess.HookType hook_type = 1;
void Object::clear_hook_type() {
  hook_type_ = 0;
}
::coprocess::HookType Object::hook_type() const {
  // @@protoc_insertion_point(field_get:coprocess.Object.hook_type)
  return static_cast< ::coprocess::HookType >(hook_type_);
}
void Object::set_hook_type(::coprocess::HookType value) {
  
  hook_type_ = value;
  // @@protoc_insertion_point(field_set:coprocess.Object.hook_type)
}

// optional string hook_name = 2;
void Object::clear_hook_name() {
  hook_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
const ::std::string& Object::hook_name() const {
  // @@protoc_insertion_point(field_get:coprocess.Object.hook_name)
  return hook_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Object::set_hook_name(const ::std::string& value) {
  
  hook_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:coprocess.Object.hook_name)
}
void Object::set_hook_name(const char* value) {
  
  hook_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:coprocess.Object.hook_name)
}
void Object::set_hook_name(const char* value, size_t size) {
  
  hook_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:coprocess.Object.hook_name)
}
::std::string* Object::mutable_hook_name() {
  
  // @@protoc_insertion_point(field_mutable:coprocess.Object.hook_name)
  return hook_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Object::release_hook_name() {
  // @@protoc_insertion_point(field_release:coprocess.Object.hook_name)
  
  return hook_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Object::set_allocated_hook_name(::std::string* hook_name) {
  if (hook_name != NULL) {
    
  } else {
    
  }
  hook_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), hook_name);
  // @@protoc_insertion_point(field_set_allocated:coprocess.Object.hook_name)
}

// optional .coprocess.MiniRequestObject request = 3;
bool Object::has_request() const {
  return this != internal_default_instance() && request_ != NULL;
}
void Object::clear_request() {
  if (GetArenaNoVirtual() == NULL && request_ != NULL) delete request_;
  request_ = NULL;
}
const ::coprocess::MiniRequestObject& Object::request() const {
  // @@protoc_insertion_point(field_get:coprocess.Object.request)
  return request_ != NULL ? *request_
                         : *::coprocess::MiniRequestObject::internal_default_instance();
}
::coprocess::MiniRequestObject* Object::mutable_request() {
  
  if (request_ == NULL) {
    request_ = new ::coprocess::MiniRequestObject;
  }
  // @@protoc_insertion_point(field_mutable:coprocess.Object.request)
  return request_;
}
::coprocess::MiniRequestObject* Object::release_request() {
  // @@protoc_insertion_point(field_release:coprocess.Object.request)
  
  ::coprocess::MiniRequestObject* temp = request_;
  request_ = NULL;
  return temp;
}
void Object::set_allocated_request(::coprocess::MiniRequestObject* request) {
  delete request_;
  request_ = request;
  if (request) {
    
  } else {
    
  }
  // @@protoc_insertion_point(field_set_allocated:coprocess.Object.request)
}

// optional .coprocess.SessionState session = 4;
bool Object::has_session() const {
  return this != internal_default_instance() && session_ != NULL;
}
void Object::clear_session() {
  if (GetArenaNoVirtual() == NULL && session_ != NULL) delete session_;
  session_ = NULL;
}
const ::coprocess::SessionState& Object::session() const {
  // @@protoc_insertion_point(field_get:coprocess.Object.session)
  return session_ != NULL ? *session_
                         : *::coprocess::SessionState::internal_default_instance();
}
::coprocess::SessionState* Object::mutable_session() {
  
  if (session_ == NULL) {
    session_ = new ::coprocess::SessionState;
  }
  // @@protoc_insertion_point(field_mutable:coprocess.Object.session)
  return session_;
}
::coprocess::SessionState* Object::release_session() {
  // @@protoc_insertion_point(field_release:coprocess.Object.session)
  
  ::coprocess::SessionState* temp = session_;
  session_ = NULL;
  return temp;
}
void Object::set_allocated_session(::coprocess::SessionState* session) {
  delete session_;
  session_ = session;
  if (session) {
    
  } else {
    
  }
  // @@protoc_insertion_point(field_set_allocated:coprocess.Object.session)
}

// map<string, string> metadata = 5;
int Object::metadata_size() const {
  return metadata_.size();
}
void Object::clear_metadata() {
  metadata_.Clear();
}
 const ::google::protobuf::Map< ::std::string, ::std::string >&
Object::metadata() const {
  // @@protoc_insertion_point(field_map:coprocess.Object.metadata)
  return metadata_.GetMap();
}
 ::google::protobuf::Map< ::std::string, ::std::string >*
Object::mutable_metadata() {
  // @@protoc_insertion_point(field_mutable_map:coprocess.Object.metadata)
  return metadata_.MutableMap();
}

// map<string, string> spec = 6;
int Object::spec_size() const {
  return spec_.size();
}
void Object::clear_spec() {
  spec_.Clear();
}
 const ::google::protobuf::Map< ::std::string, ::std::string >&
Object::spec() const {
  // @@protoc_insertion_point(field_map:coprocess.Object.spec)
  return spec_.GetMap();
}
 ::google::protobuf::Map< ::std::string, ::std::string >*
Object::mutable_spec() {
  // @@protoc_insertion_point(field_mutable_map:coprocess.Object.spec)
  return spec_.MutableMap();
}

inline const Object* Object::internal_default_instance() {
  return &Object_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Event::kPayloadFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Event::Event()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_coprocess_5fobject_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:coprocess.Event)
}

void Event::InitAsDefaultInstance() {
}

Event::Event(const Event& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:coprocess.Event)
}

void Event::SharedCtor() {
  payload_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  _cached_size_ = 0;
}

Event::~Event() {
  // @@protoc_insertion_point(destructor:coprocess.Event)
  SharedDtor();
}

void Event::SharedDtor() {
  payload_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void Event::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Event::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Event_descriptor_;
}

const Event& Event::default_instance() {
  protobuf_InitDefaults_coprocess_5fobject_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<Event> Event_default_instance_;

Event* Event::New(::google::protobuf::Arena* arena) const {
  Event* n = new Event;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Event::Clear() {
// @@protoc_insertion_point(message_clear_start:coprocess.Event)
  payload_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

bool Event::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:coprocess.Event)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string payload = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_payload()));
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
            this->payload().data(), this->payload().length(),
            ::google::protobuf::internal::WireFormatLite::PARSE,
            "coprocess.Event.payload"));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:coprocess.Event)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:coprocess.Event)
  return false;
#undef DO_
}

void Event::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:coprocess.Event)
  // optional string payload = 1;
  if (this->payload().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->payload().data(), this->payload().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "coprocess.Event.payload");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->payload(), output);
  }

  // @@protoc_insertion_point(serialize_end:coprocess.Event)
}

::google::protobuf::uint8* Event::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:coprocess.Event)
  // optional string payload = 1;
  if (this->payload().size() > 0) {
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->payload().data(), this->payload().length(),
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
      "coprocess.Event.payload");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->payload(), target);
  }

  // @@protoc_insertion_point(serialize_to_array_end:coprocess.Event)
  return target;
}

size_t Event::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:coprocess.Event)
  size_t total_size = 0;

  // optional string payload = 1;
  if (this->payload().size() > 0) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->payload());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Event::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:coprocess.Event)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const Event* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Event>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:coprocess.Event)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:coprocess.Event)
    UnsafeMergeFrom(*source);
  }
}

void Event::MergeFrom(const Event& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:coprocess.Event)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void Event::UnsafeMergeFrom(const Event& from) {
  GOOGLE_DCHECK(&from != this);
  if (from.payload().size() > 0) {

    payload_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.payload_);
  }
}

void Event::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:coprocess.Event)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Event::CopyFrom(const Event& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:coprocess.Event)
  if (&from == this) return;
  Clear();
  UnsafeMergeFrom(from);
}

bool Event::IsInitialized() const {

  return true;
}

void Event::Swap(Event* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Event::InternalSwap(Event* other) {
  payload_.Swap(&other->payload_);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Event::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Event_descriptor_;
  metadata.reflection = Event_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Event

// optional string payload = 1;
void Event::clear_payload() {
  payload_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
const ::std::string& Event::payload() const {
  // @@protoc_insertion_point(field_get:coprocess.Event.payload)
  return payload_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Event::set_payload(const ::std::string& value) {
  
  payload_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:coprocess.Event.payload)
}
void Event::set_payload(const char* value) {
  
  payload_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:coprocess.Event.payload)
}
void Event::set_payload(const char* value, size_t size) {
  
  payload_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:coprocess.Event.payload)
}
::std::string* Event::mutable_payload() {
  
  // @@protoc_insertion_point(field_mutable:coprocess.Event.payload)
  return payload_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Event::release_payload() {
  // @@protoc_insertion_point(field_release:coprocess.Event.payload)
  
  return payload_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Event::set_allocated_payload(::std::string* payload) {
  if (payload != NULL) {
    
  } else {
    
  }
  payload_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), payload);
  // @@protoc_insertion_point(field_set_allocated:coprocess.Event.payload)
}

inline const Event* Event::internal_default_instance() {
  return &Event_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

EventReply::EventReply()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_coprocess_5fobject_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:coprocess.EventReply)
}

void EventReply::InitAsDefaultInstance() {
}

EventReply::EventReply(const EventReply& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:coprocess.EventReply)
}

void EventReply::SharedCtor() {
  _cached_size_ = 0;
}

EventReply::~EventReply() {
  // @@protoc_insertion_point(destructor:coprocess.EventReply)
  SharedDtor();
}

void EventReply::SharedDtor() {
}

void EventReply::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* EventReply::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return EventReply_descriptor_;
}

const EventReply& EventReply::default_instance() {
  protobuf_InitDefaults_coprocess_5fobject_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<EventReply> EventReply_default_instance_;

EventReply* EventReply::New(::google::protobuf::Arena* arena) const {
  EventReply* n = new EventReply;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void EventReply::Clear() {
// @@protoc_insertion_point(message_clear_start:coprocess.EventReply)
}

bool EventReply::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:coprocess.EventReply)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
  handle_unusual:
    if (tag == 0 ||
        ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      goto success;
    }
    DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
  }
success:
  // @@protoc_insertion_point(parse_success:coprocess.EventReply)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:coprocess.EventReply)
  return false;
#undef DO_
}

void EventReply::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:coprocess.EventReply)
  // @@protoc_insertion_point(serialize_end:coprocess.EventReply)
}

::google::protobuf::uint8* EventReply::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:coprocess.EventReply)
  // @@protoc_insertion_point(serialize_to_array_end:coprocess.EventReply)
  return target;
}

size_t EventReply::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:coprocess.EventReply)
  size_t total_size = 0;

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void EventReply::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:coprocess.EventReply)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const EventReply* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const EventReply>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:coprocess.EventReply)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:coprocess.EventReply)
    UnsafeMergeFrom(*source);
  }
}

void EventReply::MergeFrom(const EventReply& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:coprocess.EventReply)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void EventReply::UnsafeMergeFrom(const EventReply& from) {
  GOOGLE_DCHECK(&from != this);
}

void EventReply::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:coprocess.EventReply)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void EventReply::CopyFrom(const EventReply& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:coprocess.EventReply)
  if (&from == this) return;
  Clear();
  UnsafeMergeFrom(from);
}

bool EventReply::IsInitialized() const {

  return true;
}

void EventReply::Swap(EventReply* other) {
  if (other == this) return;
  InternalSwap(other);
}
void EventReply::InternalSwap(EventReply* other) {
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata EventReply::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = EventReply_descriptor_;
  metadata.reflection = EventReply_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// EventReply

inline const EventReply* EventReply::internal_default_instance() {
  return &EventReply_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// @@protoc_insertion_point(namespace_scope)

}  // namespace coprocess

// @@protoc_insertion_point(global_scope)
