// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: msgs/driver-station.proto

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "msgs/driver-station.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>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)

namespace gazebo {
namespace msgs {

namespace {

const ::google::protobuf::Descriptor* DriverStation_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DriverStation_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* DriverStation_State_descriptor_ = NULL;

}  // namespace


void protobuf_AssignDesc_msgs_2fdriver_2dstation_2eproto() {
  protobuf_AddDesc_msgs_2fdriver_2dstation_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "msgs/driver-station.proto");
  GOOGLE_CHECK(file != NULL);
  DriverStation_descriptor_ = file->message_type(0);
  static const int DriverStation_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DriverStation, enabled_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DriverStation, state_),
  };
  DriverStation_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      DriverStation_descriptor_,
      DriverStation::default_instance_,
      DriverStation_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DriverStation, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DriverStation, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(DriverStation));
  DriverStation_State_descriptor_ = DriverStation_descriptor_->enum_type(0);
}

namespace {

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

void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    DriverStation_descriptor_, &DriverStation::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_msgs_2fdriver_2dstation_2eproto() {
  delete DriverStation::default_instance_;
  delete DriverStation_reflection_;
}

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

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\031msgs/driver-station.proto\022\013gazebo.msgs"
    "\"z\n\rDriverStation\022\017\n\007enabled\030\001 \002(\010\022/\n\005st"
    "ate\030\002 \002(\0162 .gazebo.msgs.DriverStation.St"
    "ate\"\'\n\005State\022\010\n\004AUTO\020\000\022\n\n\006TELEOP\020\001\022\010\n\004TE"
    "ST\020\002B\021B\017GzDriverStation", 183);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "msgs/driver-station.proto", &protobuf_RegisterTypes);
  DriverStation::default_instance_ = new DriverStation();
  DriverStation::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_msgs_2fdriver_2dstation_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_msgs_2fdriver_2dstation_2eproto {
  StaticDescriptorInitializer_msgs_2fdriver_2dstation_2eproto() {
    protobuf_AddDesc_msgs_2fdriver_2dstation_2eproto();
  }
} static_descriptor_initializer_msgs_2fdriver_2dstation_2eproto_;

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

const ::google::protobuf::EnumDescriptor* DriverStation_State_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DriverStation_State_descriptor_;
}
bool DriverStation_State_IsValid(int value) {
  switch(value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
const DriverStation_State DriverStation::AUTO;
const DriverStation_State DriverStation::TELEOP;
const DriverStation_State DriverStation::TEST;
const DriverStation_State DriverStation::State_MIN;
const DriverStation_State DriverStation::State_MAX;
const int DriverStation::State_ARRAYSIZE;
#endif  // _MSC_VER
#ifndef _MSC_VER
const int DriverStation::kEnabledFieldNumber;
const int DriverStation::kStateFieldNumber;
#endif  // !_MSC_VER

DriverStation::DriverStation()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void DriverStation::InitAsDefaultInstance() {
}

DriverStation::DriverStation(const DriverStation& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void DriverStation::SharedCtor() {
  _cached_size_ = 0;
  enabled_ = false;
  state_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

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

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

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

const DriverStation& DriverStation::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_msgs_2fdriver_2dstation_2eproto();
  return *default_instance_;
}

DriverStation* DriverStation::default_instance_ = NULL;

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

void DriverStation::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    enabled_ = false;
    state_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool DriverStation::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)) {
      // required bool enabled = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &enabled_)));
          set_has_enabled();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_state;
        break;
      }

      // required .gazebo.msgs.DriverStation.State state = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_state:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::gazebo::msgs::DriverStation_State_IsValid(value)) {
            set_state(static_cast< ::gazebo::msgs::DriverStation_State >(value));
          } else {
            mutable_unknown_fields()->AddVarint(2, value);
          }
        } 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::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void DriverStation::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required bool enabled = 1;
  if (has_enabled()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->enabled(), output);
  }

  // required .gazebo.msgs.DriverStation.State state = 2;
  if (has_state()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->state(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* DriverStation::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // required bool enabled = 1;
  if (has_enabled()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->enabled(), target);
  }

  // required .gazebo.msgs.DriverStation.State state = 2;
  if (has_state()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->state(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

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

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required bool enabled = 1;
    if (has_enabled()) {
      total_size += 1 + 1;
    }

    // required .gazebo.msgs.DriverStation.State state = 2;
    if (has_state()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->state());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DriverStation::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const DriverStation* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const DriverStation*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void DriverStation::MergeFrom(const DriverStation& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_enabled()) {
      set_enabled(from.enabled());
    }
    if (from.has_state()) {
      set_state(from.state());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void DriverStation::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool DriverStation::IsInitialized() const {
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;

  return true;
}

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

::google::protobuf::Metadata DriverStation::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DriverStation_descriptor_;
  metadata.reflection = DriverStation_reflection_;
  return metadata;
}


// @@protoc_insertion_point(namespace_scope)

}  // namespace msgs
}  // namespace gazebo

// @@protoc_insertion_point(global_scope)
