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

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "transportinstruction.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 TransportBuffers {

void protobuf_ShutdownFile_transportinstruction_2eproto() {
  delete Instruction::default_instance_;
}

#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
void protobuf_AddDesc_transportinstruction_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#else
void protobuf_AddDesc_transportinstruction_2eproto() {
  static bool already_here = false;
  if (already_here) return;
  already_here = true;
  GOOGLE_PROTOBUF_VERIFY_VERSION;

#endif
  Instruction::default_instance_ = new Instruction();
  Instruction::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_transportinstruction_2eproto);
}

#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_transportinstruction_2eproto_once_);
void protobuf_AddDesc_transportinstruction_2eproto() {
  ::google::protobuf::::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_transportinstruction_2eproto_once_,
                 &protobuf_AddDesc_transportinstruction_2eproto_impl);
}
#else
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_transportinstruction_2eproto {
  StaticDescriptorInitializer_transportinstruction_2eproto() {
    protobuf_AddDesc_transportinstruction_2eproto();
  }
} static_descriptor_initializer_transportinstruction_2eproto_;
#endif

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

#ifndef _MSC_VER
const int Instruction::kProtocolVersionFieldNumber;
const int Instruction::kOldNumFieldNumber;
const int Instruction::kNewNumFieldNumber;
const int Instruction::kAckNumFieldNumber;
const int Instruction::kThrowawayNumFieldNumber;
const int Instruction::kDiffFieldNumber;
const int Instruction::kChaffFieldNumber;
#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;
  protocol_version_ = 0u;
  old_num_ = GOOGLE_ULONGLONG(0);
  new_num_ = GOOGLE_ULONGLONG(0);
  ack_num_ = GOOGLE_ULONGLONG(0);
  throwaway_num_ = GOOGLE_ULONGLONG(0);
  diff_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  chaff_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

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

void Instruction::SharedDtor() {
  if (diff_ != &::google::protobuf::internal::kEmptyString) {
    delete diff_;
  }
  if (chaff_ != &::google::protobuf::internal::kEmptyString) {
    delete chaff_;
  }
  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  if (this != &default_instance()) {
  #else
  if (this != default_instance_) {
  #endif
  }
}

void Instruction::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Instruction& Instruction::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  protobuf_AddDesc_transportinstruction_2eproto();
#else
  if (default_instance_ == NULL) protobuf_AddDesc_transportinstruction_2eproto();
#endif
  return *default_instance_;
}

Instruction* Instruction::default_instance_ = NULL;

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

void Instruction::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    protocol_version_ = 0u;
    old_num_ = GOOGLE_ULONGLONG(0);
    new_num_ = GOOGLE_ULONGLONG(0);
    ack_num_ = GOOGLE_ULONGLONG(0);
    throwaway_num_ = GOOGLE_ULONGLONG(0);
    if (has_diff()) {
      if (diff_ != &::google::protobuf::internal::kEmptyString) {
        diff_->clear();
      }
    }
    if (has_chaff()) {
      if (chaff_ != &::google::protobuf::internal::kEmptyString) {
        chaff_->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) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint32 protocol_version = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &protocol_version_)));
          set_has_protocol_version();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_old_num;
        break;
      }

      // optional uint64 old_num = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_old_num:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &old_num_)));
          set_has_old_num();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_new_num;
        break;
      }

      // optional uint64 new_num = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_new_num:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &new_num_)));
          set_has_new_num();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(32)) goto parse_ack_num;
        break;
      }

      // optional uint64 ack_num = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_ack_num:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &ack_num_)));
          set_has_ack_num();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(40)) goto parse_throwaway_num;
        break;
      }

      // optional uint64 throwaway_num = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_throwaway_num:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &throwaway_num_)));
          set_has_throwaway_num();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(50)) goto parse_diff;
        break;
      }

      // optional bytes diff = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_diff:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_diff()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(58)) goto parse_chaff;
        break;
      }

      // optional bytes chaff = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_chaff:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_chaff()));
        } 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 Instruction::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional uint32 protocol_version = 1;
  if (has_protocol_version()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->protocol_version(), output);
  }

  // optional uint64 old_num = 2;
  if (has_old_num()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->old_num(), output);
  }

  // optional uint64 new_num = 3;
  if (has_new_num()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->new_num(), output);
  }

  // optional uint64 ack_num = 4;
  if (has_ack_num()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->ack_num(), output);
  }

  // optional uint64 throwaway_num = 5;
  if (has_throwaway_num()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(5, this->throwaway_num(), output);
  }

  // optional bytes diff = 6;
  if (has_diff()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      6, this->diff(), output);
  }

  // optional bytes chaff = 7;
  if (has_chaff()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      7, this->chaff(), output);
  }

}

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

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional uint32 protocol_version = 1;
    if (has_protocol_version()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->protocol_version());
    }

    // optional uint64 old_num = 2;
    if (has_old_num()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->old_num());
    }

    // optional uint64 new_num = 3;
    if (has_new_num()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->new_num());
    }

    // optional uint64 ack_num = 4;
    if (has_ack_num()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->ack_num());
    }

    // optional uint64 throwaway_num = 5;
    if (has_throwaway_num()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->throwaway_num());
    }

    // optional bytes diff = 6;
    if (has_diff()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->diff());
    }

    // optional bytes chaff = 7;
    if (has_chaff()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->chaff());
    }

  }
  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);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_protocol_version()) {
      set_protocol_version(from.protocol_version());
    }
    if (from.has_old_num()) {
      set_old_num(from.old_num());
    }
    if (from.has_new_num()) {
      set_new_num(from.new_num());
    }
    if (from.has_ack_num()) {
      set_ack_num(from.ack_num());
    }
    if (from.has_throwaway_num()) {
      set_throwaway_num(from.throwaway_num());
    }
    if (from.has_diff()) {
      set_diff(from.diff());
    }
    if (from.has_chaff()) {
      set_chaff(from.chaff());
    }
  }
}

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

bool Instruction::IsInitialized() const {

  return true;
}

void Instruction::Swap(Instruction* other) {
  if (other != this) {
    std::swap(protocol_version_, other->protocol_version_);
    std::swap(old_num_, other->old_num_);
    std::swap(new_num_, other->new_num_);
    std::swap(ack_num_, other->ack_num_);
    std::swap(throwaway_num_, other->throwaway_num_);
    std::swap(diff_, other->diff_);
    std::swap(chaff_, other->chaff_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

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


// @@protoc_insertion_point(namespace_scope)

}  // namespace TransportBuffers

// @@protoc_insertion_point(global_scope)
