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

#include "hostinput.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG
namespace HostBuffers {
constexpr HostMessage::HostMessage(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : instruction_(){}
struct HostMessageDefaultTypeInternal {
  constexpr HostMessageDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~HostMessageDefaultTypeInternal() {}
  union {
    HostMessage _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HostMessageDefaultTypeInternal _HostMessage_default_instance_;
constexpr Instruction::Instruction(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
struct InstructionDefaultTypeInternal {
  constexpr InstructionDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~InstructionDefaultTypeInternal() {}
  union {
    Instruction _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT InstructionDefaultTypeInternal _Instruction_default_instance_;
constexpr HostBytes::HostBytes(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : hoststring_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct HostBytesDefaultTypeInternal {
  constexpr HostBytesDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~HostBytesDefaultTypeInternal() {}
  union {
    HostBytes _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HostBytesDefaultTypeInternal _HostBytes_default_instance_;
constexpr ResizeMessage::ResizeMessage(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : width_(0)
  , height_(0){}
struct ResizeMessageDefaultTypeInternal {
  constexpr ResizeMessageDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ResizeMessageDefaultTypeInternal() {}
  union {
    ResizeMessage _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ResizeMessageDefaultTypeInternal _ResizeMessage_default_instance_;
constexpr EchoAck::EchoAck(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : echo_ack_num_(uint64_t{0u}){}
struct EchoAckDefaultTypeInternal {
  constexpr EchoAckDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~EchoAckDefaultTypeInternal() {}
  union {
    EchoAck _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EchoAckDefaultTypeInternal _EchoAck_default_instance_;
}  // namespace HostBuffers
namespace HostBuffers {

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

class HostMessage::_Internal {
 public:
};

HostMessage::HostMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  instruction_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:HostBuffers.HostMessage)
}
HostMessage::HostMessage(const HostMessage& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      instruction_(from.instruction_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:HostBuffers.HostMessage)
}

inline void HostMessage::SharedCtor() {
}

HostMessage::~HostMessage() {
  // @@protoc_insertion_point(destructor:HostBuffers.HostMessage)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void HostMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void HostMessage::ArenaDtor(void* object) {
  HostMessage* _this = reinterpret_cast< HostMessage* >(object);
  (void)_this;
}
void HostMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void HostMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void HostMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:HostBuffers.HostMessage)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  instruction_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* HostMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .HostBuffers.Instruction instruction = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_instruction(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* HostMessage::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:HostBuffers.HostMessage)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .HostBuffers.Instruction instruction = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_instruction_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_instruction(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:HostBuffers.HostMessage)
  return target;
}

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

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .HostBuffers.Instruction instruction = 1;
  total_size += 1UL * this->_internal_instruction_size();
  for (const auto& msg : this->instruction_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void HostMessage::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const HostMessage*>(
      &from));
}

void HostMessage::MergeFrom(const HostMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:HostBuffers.HostMessage)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  instruction_.MergeFrom(from.instruction_);
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void HostMessage::CopyFrom(const HostMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:HostBuffers.HostMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool HostMessage::IsInitialized() const {
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(instruction_))
    return false;
  return true;
}

void HostMessage::InternalSwap(HostMessage* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  instruction_.InternalSwap(&other->instruction_);
}

std::string HostMessage::GetTypeName() const {
  return "HostBuffers.HostMessage";
}


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

class Instruction::_Internal {
 public:
};

Instruction::Instruction(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  _extensions_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:HostBuffers.Instruction)
}
Instruction::Instruction(const Instruction& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
  // @@protoc_insertion_point(copy_constructor:HostBuffers.Instruction)
}

inline void Instruction::SharedCtor() {
}

Instruction::~Instruction() {
  // @@protoc_insertion_point(destructor:HostBuffers.Instruction)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void Instruction::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void Instruction::ArenaDtor(void* object) {
  Instruction* _this = reinterpret_cast< Instruction* >(object);
  (void)_this;
}
void Instruction::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Instruction::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void Instruction::Clear() {
// @@protoc_insertion_point(message_clear_start:HostBuffers.Instruction)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _extensions_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Instruction::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    if ((16u <= tag)) {
      ptr = _extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx);
      CHK_(ptr != nullptr);
      continue;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Instruction::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:HostBuffers.Instruction)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // Extension range [2, 536870912)
  target = _extensions_._InternalSerialize(
  internal_default_instance(), 2, 536870912, target, stream);

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:HostBuffers.Instruction)
  return target;
}

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

  total_size += _extensions_.ByteSize();

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Instruction::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const Instruction*>(
      &from));
}

void Instruction::MergeFrom(const Instruction& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:HostBuffers.Instruction)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _extensions_.MergeFrom(internal_default_instance(), from._extensions_);
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Instruction::CopyFrom(const Instruction& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:HostBuffers.Instruction)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Instruction::IsInitialized() const {
  if (!_extensions_.IsInitialized()) {
    return false;
  }

  return true;
}

void Instruction::InternalSwap(Instruction* other) {
  using std::swap;
  _extensions_.InternalSwap(&other->_extensions_);
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string Instruction::GetTypeName() const {
  return "HostBuffers.Instruction";
}


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

class HostBytes::_Internal {
 public:
  using HasBits = decltype(std::declval<HostBytes>()._has_bits_);
  static void set_has_hoststring(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

HostBytes::HostBytes(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:HostBuffers.HostBytes)
}
HostBytes::HostBytes(const HostBytes& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  hoststring_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    hoststring_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_hoststring()) {
    hoststring_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_hoststring(), 
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:HostBuffers.HostBytes)
}

inline void HostBytes::SharedCtor() {
hoststring_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  hoststring_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

HostBytes::~HostBytes() {
  // @@protoc_insertion_point(destructor:HostBuffers.HostBytes)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void HostBytes::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  hoststring_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void HostBytes::ArenaDtor(void* object) {
  HostBytes* _this = reinterpret_cast< HostBytes* >(object);
  (void)_this;
}
void HostBytes::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void HostBytes::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void HostBytes::Clear() {
// @@protoc_insertion_point(message_clear_start:HostBuffers.HostBytes)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    hoststring_.ClearNonDefaultToEmpty();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* HostBytes::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bytes hoststring = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_hoststring();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* HostBytes::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:HostBuffers.HostBytes)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional bytes hoststring = 4;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteBytesMaybeAliased(
        4, this->_internal_hoststring(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:HostBuffers.HostBytes)
  return target;
}

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

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // optional bytes hoststring = 4;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_hoststring());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void HostBytes::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const HostBytes*>(
      &from));
}

void HostBytes::MergeFrom(const HostBytes& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:HostBuffers.HostBytes)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_hoststring()) {
    _internal_set_hoststring(from._internal_hoststring());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void HostBytes::CopyFrom(const HostBytes& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:HostBuffers.HostBytes)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool HostBytes::IsInitialized() const {
  return true;
}

void HostBytes::InternalSwap(HostBytes* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &hoststring_, lhs_arena,
      &other->hoststring_, rhs_arena
  );
}

std::string HostBytes::GetTypeName() const {
  return "HostBuffers.HostBytes";
}


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

class ResizeMessage::_Internal {
 public:
  using HasBits = decltype(std::declval<ResizeMessage>()._has_bits_);
  static void set_has_width(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_height(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

ResizeMessage::ResizeMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:HostBuffers.ResizeMessage)
}
ResizeMessage::ResizeMessage(const ResizeMessage& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::memcpy(&width_, &from.width_,
    static_cast<size_t>(reinterpret_cast<char*>(&height_) -
    reinterpret_cast<char*>(&width_)) + sizeof(height_));
  // @@protoc_insertion_point(copy_constructor:HostBuffers.ResizeMessage)
}

inline void ResizeMessage::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&width_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&height_) -
    reinterpret_cast<char*>(&width_)) + sizeof(height_));
}

ResizeMessage::~ResizeMessage() {
  // @@protoc_insertion_point(destructor:HostBuffers.ResizeMessage)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void ResizeMessage::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void ResizeMessage::ArenaDtor(void* object) {
  ResizeMessage* _this = reinterpret_cast< ResizeMessage* >(object);
  (void)_this;
}
void ResizeMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ResizeMessage::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void ResizeMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:HostBuffers.ResizeMessage)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    ::memset(&width_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&height_) -
        reinterpret_cast<char*>(&width_)) + sizeof(height_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* ResizeMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 width = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_width(&has_bits);
          width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 height = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_height(&has_bits);
          height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ResizeMessage::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:HostBuffers.ResizeMessage)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 width = 5;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_width(), target);
  }

  // optional int32 height = 6;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_height(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:HostBuffers.ResizeMessage)
  return target;
}

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

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional int32 width = 5;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_width());
    }

    // optional int32 height = 6;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_height());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ResizeMessage::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const ResizeMessage*>(
      &from));
}

void ResizeMessage::MergeFrom(const ResizeMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:HostBuffers.ResizeMessage)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      width_ = from.width_;
    }
    if (cached_has_bits & 0x00000002u) {
      height_ = from.height_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void ResizeMessage::CopyFrom(const ResizeMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:HostBuffers.ResizeMessage)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ResizeMessage::IsInitialized() const {
  return true;
}

void ResizeMessage::InternalSwap(ResizeMessage* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ResizeMessage, height_)
      + sizeof(ResizeMessage::height_)
      - PROTOBUF_FIELD_OFFSET(ResizeMessage, width_)>(
          reinterpret_cast<char*>(&width_),
          reinterpret_cast<char*>(&other->width_));
}

std::string ResizeMessage::GetTypeName() const {
  return "HostBuffers.ResizeMessage";
}


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

class EchoAck::_Internal {
 public:
  using HasBits = decltype(std::declval<EchoAck>()._has_bits_);
  static void set_has_echo_ack_num(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

EchoAck::EchoAck(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:HostBuffers.EchoAck)
}
EchoAck::EchoAck(const EchoAck& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  echo_ack_num_ = from.echo_ack_num_;
  // @@protoc_insertion_point(copy_constructor:HostBuffers.EchoAck)
}

inline void EchoAck::SharedCtor() {
echo_ack_num_ = uint64_t{0u};
}

EchoAck::~EchoAck() {
  // @@protoc_insertion_point(destructor:HostBuffers.EchoAck)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void EchoAck::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void EchoAck::ArenaDtor(void* object) {
  EchoAck* _this = reinterpret_cast< EchoAck* >(object);
  (void)_this;
}
void EchoAck::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void EchoAck::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void EchoAck::Clear() {
// @@protoc_insertion_point(message_clear_start:HostBuffers.EchoAck)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  echo_ack_num_ = uint64_t{0u};
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* EchoAck::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional uint64 echo_ack_num = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_echo_ack_num(&has_bits);
          echo_ack_num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* EchoAck::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:HostBuffers.EchoAck)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint64 echo_ack_num = 8;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(8, this->_internal_echo_ack_num(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:HostBuffers.EchoAck)
  return target;
}

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

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // optional uint64 echo_ack_num = 8;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_echo_ack_num());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void EchoAck::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const EchoAck*>(
      &from));
}

void EchoAck::MergeFrom(const EchoAck& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:HostBuffers.EchoAck)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_echo_ack_num()) {
    _internal_set_echo_ack_num(from._internal_echo_ack_num());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void EchoAck::CopyFrom(const EchoAck& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:HostBuffers.EchoAck)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool EchoAck::IsInitialized() const {
  return true;
}

void EchoAck::InternalSwap(EchoAck* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(echo_ack_num_, other->echo_ack_num_);
}

std::string EchoAck::GetTypeName() const {
  return "HostBuffers.EchoAck";
}

PROTOBUF_ATTRIBUTE_INIT_PRIORITY ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::HostBuffers::Instruction,
    ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::HostBuffers::HostBytes >, 11, false >
  hostbytes(kHostbytesFieldNumber, ::HostBuffers::HostBytes::default_instance());
PROTOBUF_ATTRIBUTE_INIT_PRIORITY ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::HostBuffers::Instruction,
    ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::HostBuffers::ResizeMessage >, 11, false >
  resize(kResizeFieldNumber, ::HostBuffers::ResizeMessage::default_instance());
PROTOBUF_ATTRIBUTE_INIT_PRIORITY ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::HostBuffers::Instruction,
    ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::HostBuffers::EchoAck >, 11, false >
  echoack(kEchoackFieldNumber, ::HostBuffers::EchoAck::default_instance());

// @@protoc_insertion_point(namespace_scope)
}  // namespace HostBuffers
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::HostBuffers::HostMessage* Arena::CreateMaybeMessage< ::HostBuffers::HostMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::HostBuffers::HostMessage >(arena);
}
template<> PROTOBUF_NOINLINE ::HostBuffers::Instruction* Arena::CreateMaybeMessage< ::HostBuffers::Instruction >(Arena* arena) {
  return Arena::CreateMessageInternal< ::HostBuffers::Instruction >(arena);
}
template<> PROTOBUF_NOINLINE ::HostBuffers::HostBytes* Arena::CreateMaybeMessage< ::HostBuffers::HostBytes >(Arena* arena) {
  return Arena::CreateMessageInternal< ::HostBuffers::HostBytes >(arena);
}
template<> PROTOBUF_NOINLINE ::HostBuffers::ResizeMessage* Arena::CreateMaybeMessage< ::HostBuffers::ResizeMessage >(Arena* arena) {
  return Arena::CreateMessageInternal< ::HostBuffers::ResizeMessage >(arena);
}
template<> PROTOBUF_NOINLINE ::HostBuffers::EchoAck* Arena::CreateMaybeMessage< ::HostBuffers::EchoAck >(Arena* arena) {
  return Arena::CreateMessageInternal< ::HostBuffers::EchoAck >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
