// 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/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
// @@protoc_insertion_point(includes)

namespace ClientBuffers {

void protobuf_ShutdownFile_userinput_2eproto() {
  delete UserMessage::default_instance_;
  delete Instruction::default_instance_;
  delete Keystroke::default_instance_;
  delete ResizeMessage::default_instance_;
}

void protobuf_AddDesc_userinput_2eproto() {
  static bool already_here = false;
  if (already_here) return;
  already_here = true;
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  UserMessage::default_instance_ = new UserMessage();
  Instruction::default_instance_ = new Instruction();
  Keystroke::default_instance_ = new Keystroke();
  ResizeMessage::default_instance_ = new ResizeMessage();
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::ClientBuffers::Instruction::default_instance(),
    2, 11, false, false,
    &::ClientBuffers::Keystroke::default_instance());
  ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
    &::ClientBuffers::Instruction::default_instance(),
    3, 11, false, false,
    &::ClientBuffers::ResizeMessage::default_instance());
  UserMessage::default_instance_->InitAsDefaultInstance();
  Instruction::default_instance_->InitAsDefaultInstance();
  Keystroke::default_instance_->InitAsDefaultInstance();
  ResizeMessage::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_userinput_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_userinput_2eproto {
  StaticDescriptorInitializer_userinput_2eproto() {
    protobuf_AddDesc_userinput_2eproto();
  }
} static_descriptor_initializer_userinput_2eproto_;

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

#ifndef _MSC_VER
const int UserMessage::kInstructionFieldNumber;
#endif  // !_MSC_VER

UserMessage::UserMessage()
  : ::google::protobuf::MessageLite() {
  SharedCtor();
}

void UserMessage::InitAsDefaultInstance() {
}

UserMessage::UserMessage(const UserMessage& from)
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  MergeFrom(from);
}

void UserMessage::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

UserMessage::~UserMessage() {
  SharedDtor();
}

void UserMessage::SharedDtor() {
  if (this != default_instance_) {
  }
}

void UserMessage::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const UserMessage& UserMessage::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_userinput_2eproto();
  return *default_instance_;
}

UserMessage* UserMessage::default_instance_ = NULL;

UserMessage* UserMessage::New() const {
  return new UserMessage;
}

void UserMessage::Clear() {
  instruction_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

bool UserMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .ClientBuffers.Instruction instruction = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_instruction:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_instruction()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(10)) goto parse_instruction;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void UserMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated .ClientBuffers.Instruction instruction = 1;
  for (int i = 0; i < this->instruction_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      1, this->instruction(i), output);
  }

}

int UserMessage::ByteSize() const {
  int total_size = 0;

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

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_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) {
  GOOGLE_CHECK_NE(&from, this);
  instruction_.MergeFrom(from.instruction_);
}

void UserMessage::CopyFrom(const UserMessage& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool UserMessage::IsInitialized() const {

  for (int i = 0; i < instruction_size(); i++) {
    if (!this->instruction(i).IsInitialized()) return false;
  }
  return true;
}

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

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


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

#ifndef _MSC_VER
#endif  // !_MSC_VER

Instruction::Instruction()
  : ::google::protobuf::MessageLite() {
  SharedCtor();
}

void Instruction::InitAsDefaultInstance() {
}

Instruction::Instruction(const Instruction& from)
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  MergeFrom(from);
}

void Instruction::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Instruction::~Instruction() {
  SharedDtor();
}

void Instruction::SharedDtor() {
  if (this != default_instance_) {
  }
}

void Instruction::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Instruction& Instruction::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_userinput_2eproto();
  return *default_instance_;
}

Instruction* Instruction::default_instance_ = NULL;

Instruction* Instruction::New() const {
  return new Instruction;
}

void Instruction::Clear() {
  _extensions_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

bool Instruction::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      return true;
    }
    if ((16u <= tag)) {
      DO_(_extensions_.ParseField(tag, input, default_instance_));
      continue;
    }
    DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
  }
  return true;
#undef DO_
}

void Instruction::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // Extension range [2, 536870912)
  _extensions_.SerializeWithCachedSizes(
      2, 536870912, output);

}

int Instruction::ByteSize() const {
  int total_size = 0;

  total_size += _extensions_.ByteSize();

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_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) {
  GOOGLE_CHECK_NE(&from, this);
  _extensions_.MergeFrom(from._extensions_);
}

void Instruction::CopyFrom(const Instruction& from) {
  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) {
    std::swap(_cached_size_, other->_cached_size_);
    _extensions_.Swap(&other->_extensions_);
  }
}

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


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

#ifndef _MSC_VER
const int Keystroke::kKeysFieldNumber;
#endif  // !_MSC_VER

Keystroke::Keystroke()
  : ::google::protobuf::MessageLite() {
  SharedCtor();
}

void Keystroke::InitAsDefaultInstance() {
}

Keystroke::Keystroke(const Keystroke& from)
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  MergeFrom(from);
}

void Keystroke::SharedCtor() {
  _cached_size_ = 0;
  keys_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Keystroke::~Keystroke() {
  SharedDtor();
}

void Keystroke::SharedDtor() {
  if (keys_ != &::google::protobuf::internal::kEmptyString) {
    delete keys_;
  }
  if (this != default_instance_) {
  }
}

void Keystroke::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Keystroke& Keystroke::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_userinput_2eproto();
  return *default_instance_;
}

Keystroke* Keystroke::default_instance_ = NULL;

Keystroke* Keystroke::New() const {
  return new Keystroke;
}

void Keystroke::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_keys()) {
      if (keys_ != &::google::protobuf::internal::kEmptyString) {
        keys_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

bool Keystroke::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional bytes keys = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_keys()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void Keystroke::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional bytes keys = 4;
  if (has_keys()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      4, this->keys(), output);
  }

}

int Keystroke::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional bytes keys = 4;
    if (has_keys()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->keys());
    }

  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_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) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_keys()) {
      set_keys(from.keys());
    }
  }
}

void Keystroke::CopyFrom(const Keystroke& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Keystroke::IsInitialized() const {

  return true;
}

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

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


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

#ifndef _MSC_VER
const int ResizeMessage::kWidthFieldNumber;
const int ResizeMessage::kHeightFieldNumber;
#endif  // !_MSC_VER

ResizeMessage::ResizeMessage()
  : ::google::protobuf::MessageLite() {
  SharedCtor();
}

void ResizeMessage::InitAsDefaultInstance() {
}

ResizeMessage::ResizeMessage(const ResizeMessage& from)
  : ::google::protobuf::MessageLite() {
  SharedCtor();
  MergeFrom(from);
}

void ResizeMessage::SharedCtor() {
  _cached_size_ = 0;
  width_ = 0;
  height_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ResizeMessage::~ResizeMessage() {
  SharedDtor();
}

void ResizeMessage::SharedDtor() {
  if (this != default_instance_) {
  }
}

void ResizeMessage::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ResizeMessage& ResizeMessage::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_userinput_2eproto();
  return *default_instance_;
}

ResizeMessage* ResizeMessage::default_instance_ = NULL;

ResizeMessage* ResizeMessage::New() const {
  return new ResizeMessage;
}

void ResizeMessage::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    width_ = 0;
    height_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

bool ResizeMessage::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 width = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &width_)));
          set_has_width();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(48)) goto parse_height;
        break;
      }

      // optional int32 height = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_height:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &height_)));
          set_has_height();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void ResizeMessage::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional int32 width = 5;
  if (has_width()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->width(), output);
  }

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

}

int ResizeMessage::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // 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());
    }

  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_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) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_width()) {
      set_width(from.width());
    }
    if (from.has_height()) {
      set_height(from.height());
    }
  }
}

void ResizeMessage::CopyFrom(const ResizeMessage& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ResizeMessage::IsInitialized() const {

  return true;
}

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

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

::google::protobuf::internal::ExtensionIdentifier< ::ClientBuffers::Instruction,
    ::google::protobuf::internal::MessageTypeTraits< ::ClientBuffers::Keystroke >, 11, false >
  keystroke(kKeystrokeFieldNumber, ::ClientBuffers::Keystroke::default_instance());
::google::protobuf::internal::ExtensionIdentifier< ::ClientBuffers::Instruction,
    ::google::protobuf::internal::MessageTypeTraits< ::ClientBuffers::ResizeMessage >, 11, false >
  resize(kResizeFieldNumber, ::ClientBuffers::ResizeMessage::default_instance());

// @@protoc_insertion_point(namespace_scope)

}  // namespace ClientBuffers

// @@protoc_insertion_point(global_scope)
