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

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "userinput.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/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)

namespace ClientBuffers {
class UserMessageDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<UserMessage> {
} _UserMessage_default_instance_;
class InstructionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Instruction> {
} _Instruction_default_instance_;
class KeystrokeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<Keystroke> {
} _Keystroke_default_instance_;
class ResizeMessageDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ResizeMessage> {
} _ResizeMessage_default_instance_;

namespace protobuf_userinput_2eproto {

PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField
    const TableStruct::entries[] = {
  {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0},
};

PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField
    const TableStruct::aux[] = {
  ::google::protobuf::internal::AuxillaryParseTableField(),
};
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const
    TableStruct::schema[] = {
  { NULL, NULL, 0, -1, -1, false },
  { NULL, NULL, 0, -1, -1, false },
  { NULL, NULL, 0, -1, -1, false },
  { NULL, NULL, 0, -1, -1, false },
};


void TableStruct::Shutdown() {
  _UserMessage_default_instance_.Shutdown();
  _Instruction_default_instance_.Shutdown();
  _Keystroke_default_instance_.Shutdown();
  _ResizeMessage_default_instance_.Shutdown();
}

void TableStruct::InitDefaultsImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::protobuf::internal::InitProtobufDefaults();
  _UserMessage_default_instance_.DefaultConstruct();
  _Instruction_default_instance_.DefaultConstruct();
  _Keystroke_default_instance_.DefaultConstruct();
  _ResizeMessage_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::ClientBuffers::Instruction::internal_default_instance(),
    2, 11, false, false,
    ::ClientBuffers::Keystroke::internal_default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    ::ClientBuffers::Instruction::internal_default_instance(),
    3, 11, false, false,
    ::ClientBuffers::ResizeMessage::internal_default_instance());
}

void InitDefaults() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl);
}
void AddDescriptorsImpl() {
  InitDefaults();
  ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown);
}

void AddDescriptors() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer {
  StaticDescriptorInitializer() {
    AddDescriptors();
  }
} static_descriptor_initializer;

}  // namespace protobuf_userinput_2eproto


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

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

UserMessage::UserMessage()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_userinput_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:ClientBuffers.UserMessage)
}
UserMessage::UserMessage(const UserMessage& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0),
      instruction_(from.instruction_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:ClientBuffers.UserMessage)
}

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

UserMessage::~UserMessage() {
  // @@protoc_insertion_point(destructor:ClientBuffers.UserMessage)
  SharedDtor();
}

void UserMessage::SharedDtor() {
}

void UserMessage::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const UserMessage& UserMessage::default_instance() {
  protobuf_userinput_2eproto::InitDefaults();
  return *internal_default_instance();
}

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

void UserMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:ClientBuffers.UserMessage)
  instruction_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool UserMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:ClientBuffers.UserMessage)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .ClientBuffers.Instruction instruction = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_instruction()));
        } else {
          goto handle_unusual;
        }
        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, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:ClientBuffers.UserMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:ClientBuffers.UserMessage)
  return false;
#undef DO_
}

void UserMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:ClientBuffers.UserMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .ClientBuffers.Instruction instruction = 1;
  for (unsigned int i = 0, n = this->instruction_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      1, this->instruction(i), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:ClientBuffers.UserMessage)
}

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

  total_size += unknown_fields().size();

  // repeated .ClientBuffers.Instruction instruction = 1;
  {
    unsigned int count = this->instruction_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->instruction(i));
    }
  }

  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 UserMessage::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const UserMessage*>(&from));
}

void UserMessage::MergeFrom(const UserMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:ClientBuffers.UserMessage)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  instruction_.MergeFrom(from.instruction_);
}

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

bool UserMessage::IsInitialized() const {
  if (!::google::protobuf::internal::AllAreInitialized(this->instruction())) return false;
  return true;
}

void UserMessage::Swap(UserMessage* other) {
  if (other == this) return;
  InternalSwap(other);
}
void UserMessage::InternalSwap(UserMessage* other) {
  instruction_.InternalSwap(&other->instruction_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::std::string UserMessage::GetTypeName() const {
  return "ClientBuffers.UserMessage";
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// UserMessage

// repeated .ClientBuffers.Instruction instruction = 1;
int UserMessage::instruction_size() const {
  return instruction_.size();
}
void UserMessage::clear_instruction() {
  instruction_.Clear();
}
const ::ClientBuffers::Instruction& UserMessage::instruction(int index) const {
  // @@protoc_insertion_point(field_get:ClientBuffers.UserMessage.instruction)
  return instruction_.Get(index);
}
::ClientBuffers::Instruction* UserMessage::mutable_instruction(int index) {
  // @@protoc_insertion_point(field_mutable:ClientBuffers.UserMessage.instruction)
  return instruction_.Mutable(index);
}
::ClientBuffers::Instruction* UserMessage::add_instruction() {
  // @@protoc_insertion_point(field_add:ClientBuffers.UserMessage.instruction)
  return instruction_.Add();
}
::google::protobuf::RepeatedPtrField< ::ClientBuffers::Instruction >*
UserMessage::mutable_instruction() {
  // @@protoc_insertion_point(field_mutable_list:ClientBuffers.UserMessage.instruction)
  return &instruction_;
}
const ::google::protobuf::RepeatedPtrField< ::ClientBuffers::Instruction >&
UserMessage::instruction() const {
  // @@protoc_insertion_point(field_list:ClientBuffers.UserMessage.instruction)
  return instruction_;
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

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

Instruction::Instruction()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_userinput_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:ClientBuffers.Instruction)
}
Instruction::Instruction(const Instruction& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  _extensions_.MergeFrom(from._extensions_);
  // @@protoc_insertion_point(copy_constructor:ClientBuffers.Instruction)
}

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

Instruction::~Instruction() {
  // @@protoc_insertion_point(destructor:ClientBuffers.Instruction)
  SharedDtor();
}

void Instruction::SharedDtor() {
}

void Instruction::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Instruction& Instruction::default_instance() {
  protobuf_userinput_2eproto::InitDefaults();
  return *internal_default_instance();
}

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

void Instruction::Clear() {
// @@protoc_insertion_point(message_clear_start:ClientBuffers.Instruction)
  _extensions_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool Instruction::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:ClientBuffers.Instruction)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    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;
    }
    if ((16u <= tag)) {
      DO_(_extensions_.ParseField(tag, input, internal_default_instance(),
                                  &unknown_fields_stream));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormatLite::SkipField(
        input, tag, &unknown_fields_stream));
  }
success:
  // @@protoc_insertion_point(parse_success:ClientBuffers.Instruction)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:ClientBuffers.Instruction)
  return false;
#undef DO_
}

void Instruction::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:ClientBuffers.Instruction)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // Extension range [2, 536870912)
  _extensions_.SerializeWithCachedSizes(
      2, 536870912, output);

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:ClientBuffers.Instruction)
}

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

  total_size += _extensions_.ByteSize();

  total_size += unknown_fields().size();

  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 Instruction::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const Instruction*>(&from));
}

void Instruction::MergeFrom(const Instruction& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:ClientBuffers.Instruction)
  GOOGLE_DCHECK_NE(&from, this);
  _extensions_.MergeFrom(from._extensions_);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

}

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

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

  return true;
}

void Instruction::Swap(Instruction* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Instruction::InternalSwap(Instruction* other) {
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
  _extensions_.Swap(&other->_extensions_);
}

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

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Instruction

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

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

Keystroke::Keystroke()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_userinput_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:ClientBuffers.Keystroke)
}
Keystroke::Keystroke(const Keystroke& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  keys_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_keys()) {
    keys_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.keys_);
  }
  // @@protoc_insertion_point(copy_constructor:ClientBuffers.Keystroke)
}

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

Keystroke::~Keystroke() {
  // @@protoc_insertion_point(destructor:ClientBuffers.Keystroke)
  SharedDtor();
}

void Keystroke::SharedDtor() {
  keys_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void Keystroke::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Keystroke& Keystroke::default_instance() {
  protobuf_userinput_2eproto::InitDefaults();
  return *internal_default_instance();
}

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

void Keystroke::Clear() {
// @@protoc_insertion_point(message_clear_start:ClientBuffers.Keystroke)
  if (has_keys()) {
    GOOGLE_DCHECK(!keys_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
    (*keys_.UnsafeRawStringPointer())->clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool Keystroke::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:ClientBuffers.Keystroke)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional bytes keys = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_keys()));
        } else {
          goto handle_unusual;
        }
        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, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:ClientBuffers.Keystroke)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:ClientBuffers.Keystroke)
  return false;
#undef DO_
}

void Keystroke::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:ClientBuffers.Keystroke)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional bytes keys = 4;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      4, this->keys(), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:ClientBuffers.Keystroke)
}

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

  total_size += unknown_fields().size();

  // optional bytes keys = 4;
  if (has_keys()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::BytesSize(
        this->keys());
  }

  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 Keystroke::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const Keystroke*>(&from));
}

void Keystroke::MergeFrom(const Keystroke& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:ClientBuffers.Keystroke)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_keys()) {
    set_has_keys();
    keys_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.keys_);
  }
}

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

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

void Keystroke::Swap(Keystroke* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Keystroke::InternalSwap(Keystroke* other) {
  keys_.Swap(&other->keys_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::std::string Keystroke::GetTypeName() const {
  return "ClientBuffers.Keystroke";
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Keystroke

// optional bytes keys = 4;
bool Keystroke::has_keys() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void Keystroke::set_has_keys() {
  _has_bits_[0] |= 0x00000001u;
}
void Keystroke::clear_has_keys() {
  _has_bits_[0] &= ~0x00000001u;
}
void Keystroke::clear_keys() {
  keys_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_keys();
}
const ::std::string& Keystroke::keys() const {
  // @@protoc_insertion_point(field_get:ClientBuffers.Keystroke.keys)
  return keys_.GetNoArena();
}
void Keystroke::set_keys(const ::std::string& value) {
  set_has_keys();
  keys_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:ClientBuffers.Keystroke.keys)
}
#if LANG_CXX11
void Keystroke::set_keys(::std::string&& value) {
  set_has_keys();
  keys_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:ClientBuffers.Keystroke.keys)
}
#endif
void Keystroke::set_keys(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_keys();
  keys_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:ClientBuffers.Keystroke.keys)
}
void Keystroke::set_keys(const void* value, size_t size) {
  set_has_keys();
  keys_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:ClientBuffers.Keystroke.keys)
}
::std::string* Keystroke::mutable_keys() {
  set_has_keys();
  // @@protoc_insertion_point(field_mutable:ClientBuffers.Keystroke.keys)
  return keys_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Keystroke::release_keys() {
  // @@protoc_insertion_point(field_release:ClientBuffers.Keystroke.keys)
  clear_has_keys();
  return keys_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Keystroke::set_allocated_keys(::std::string* keys) {
  if (keys != NULL) {
    set_has_keys();
  } else {
    clear_has_keys();
  }
  keys_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), keys);
  // @@protoc_insertion_point(field_set_allocated:ClientBuffers.Keystroke.keys)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ResizeMessage::kWidthFieldNumber;
const int ResizeMessage::kHeightFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ResizeMessage::ResizeMessage()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_userinput_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:ClientBuffers.ResizeMessage)
}
ResizeMessage::ResizeMessage(const ResizeMessage& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&width_, &from.width_,
    reinterpret_cast<char*>(&height_) -
    reinterpret_cast<char*>(&width_) + sizeof(height_));
  // @@protoc_insertion_point(copy_constructor:ClientBuffers.ResizeMessage)
}

void ResizeMessage::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&width_, 0, reinterpret_cast<char*>(&height_) -
    reinterpret_cast<char*>(&width_) + sizeof(height_));
}

ResizeMessage::~ResizeMessage() {
  // @@protoc_insertion_point(destructor:ClientBuffers.ResizeMessage)
  SharedDtor();
}

void ResizeMessage::SharedDtor() {
}

void ResizeMessage::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ResizeMessage& ResizeMessage::default_instance() {
  protobuf_userinput_2eproto::InitDefaults();
  return *internal_default_instance();
}

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

void ResizeMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:ClientBuffers.ResizeMessage)
  if (_has_bits_[0 / 32] & 3u) {
    ::memset(&width_, 0, reinterpret_cast<char*>(&height_) -
      reinterpret_cast<char*>(&width_) + sizeof(height_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ResizeMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:ClientBuffers.ResizeMessage)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 width = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(40u)) {
          set_has_width();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &width_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 height = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u)) {
          set_has_height();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &height_)));
        } else {
          goto handle_unusual;
        }
        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, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:ClientBuffers.ResizeMessage)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:ClientBuffers.ResizeMessage)
  return false;
#undef DO_
}

void ResizeMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:ClientBuffers.ResizeMessage)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 width = 5;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->width(), output);
  }

  // optional int32 height = 6;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->height(), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:ClientBuffers.ResizeMessage)
}

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

  total_size += unknown_fields().size();

  if (_has_bits_[0 / 32] & 3u) {
    // optional int32 width = 5;
    if (has_width()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->width());
    }

    // optional int32 height = 6;
    if (has_height()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->height());
    }

  }
  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 ResizeMessage::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const ResizeMessage*>(&from));
}

void ResizeMessage::MergeFrom(const ResizeMessage& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:ClientBuffers.ResizeMessage)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      width_ = from.width_;
    }
    if (cached_has_bits & 0x00000002u) {
      height_ = from.height_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

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

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

void ResizeMessage::Swap(ResizeMessage* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ResizeMessage::InternalSwap(ResizeMessage* other) {
  std::swap(width_, other->width_);
  std::swap(height_, other->height_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

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

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ResizeMessage

// optional int32 width = 5;
bool ResizeMessage::has_width() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ResizeMessage::set_has_width() {
  _has_bits_[0] |= 0x00000001u;
}
void ResizeMessage::clear_has_width() {
  _has_bits_[0] &= ~0x00000001u;
}
void ResizeMessage::clear_width() {
  width_ = 0;
  clear_has_width();
}
::google::protobuf::int32 ResizeMessage::width() const {
  // @@protoc_insertion_point(field_get:ClientBuffers.ResizeMessage.width)
  return width_;
}
void ResizeMessage::set_width(::google::protobuf::int32 value) {
  set_has_width();
  width_ = value;
  // @@protoc_insertion_point(field_set:ClientBuffers.ResizeMessage.width)
}

// optional int32 height = 6;
bool ResizeMessage::has_height() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ResizeMessage::set_has_height() {
  _has_bits_[0] |= 0x00000002u;
}
void ResizeMessage::clear_has_height() {
  _has_bits_[0] &= ~0x00000002u;
}
void ResizeMessage::clear_height() {
  height_ = 0;
  clear_has_height();
}
::google::protobuf::int32 ResizeMessage::height() const {
  // @@protoc_insertion_point(field_get:ClientBuffers.ResizeMessage.height)
  return height_;
}
void ResizeMessage::set_height(::google::protobuf::int32 value) {
  set_has_height();
  height_ = value;
  // @@protoc_insertion_point(field_set:ClientBuffers.ResizeMessage.height)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS
::google::protobuf::internal::ExtensionIdentifier< ::ClientBuffers::Instruction,
    ::google::protobuf::internal::MessageTypeTraits< ::ClientBuffers::Keystroke >, 11, false >
  keystroke(kKeystrokeFieldNumber, *::ClientBuffers::Keystroke::internal_default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::ClientBuffers::Instruction,
    ::google::protobuf::internal::MessageTypeTraits< ::ClientBuffers::ResizeMessage >, 11, false >
  resize(kResizeFieldNumber, *::ClientBuffers::ResizeMessage::internal_default_instance());

// @@protoc_insertion_point(namespace_scope)

}  // namespace ClientBuffers

// @@protoc_insertion_point(global_scope)
