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

#include "headers.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 _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace mixxx {
namespace library {
PROTOBUF_CONSTEXPR HeaderViewState_HeaderState::HeaderViewState_HeaderState(
    ::_pbi::ConstantInitialized)
  : column_name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{})
  , hidden_(false)
  , size_(0)
  , logical_index_(0)
  , visual_index_(0){}
struct HeaderViewState_HeaderStateDefaultTypeInternal {
  PROTOBUF_CONSTEXPR HeaderViewState_HeaderStateDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~HeaderViewState_HeaderStateDefaultTypeInternal() {}
  union {
    HeaderViewState_HeaderState _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeaderViewState_HeaderStateDefaultTypeInternal _HeaderViewState_HeaderState_default_instance_;
PROTOBUF_CONSTEXPR HeaderViewState::HeaderViewState(
    ::_pbi::ConstantInitialized)
  : header_state_()
  , sort_indicator_shown_(false)
  , sort_indicator_section_(0)
  , sort_order_(0){}
struct HeaderViewStateDefaultTypeInternal {
  PROTOBUF_CONSTEXPR HeaderViewStateDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~HeaderViewStateDefaultTypeInternal() {}
  union {
    HeaderViewState _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeaderViewStateDefaultTypeInternal _HeaderViewState_default_instance_;
}  // namespace library
}  // namespace mixxx
namespace mixxx {
namespace library {

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

class HeaderViewState_HeaderState::_Internal {
 public:
  using HasBits = decltype(std::declval<HeaderViewState_HeaderState>()._has_bits_);
  static void set_has_hidden(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_size(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_logical_index(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_visual_index(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_column_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

HeaderViewState_HeaderState::HeaderViewState_HeaderState(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  // @@protoc_insertion_point(arena_constructor:mixxx.library.HeaderViewState.HeaderState)
}
HeaderViewState_HeaderState::HeaderViewState_HeaderState(const HeaderViewState_HeaderState& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  column_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    column_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_column_name()) {
    column_name_.Set(from._internal_column_name(), 
      GetArenaForAllocation());
  }
  ::memcpy(&hidden_, &from.hidden_,
    static_cast<size_t>(reinterpret_cast<char*>(&visual_index_) -
    reinterpret_cast<char*>(&hidden_)) + sizeof(visual_index_));
  // @@protoc_insertion_point(copy_constructor:mixxx.library.HeaderViewState.HeaderState)
}

inline void HeaderViewState_HeaderState::SharedCtor() {
column_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  column_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&hidden_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&visual_index_) -
    reinterpret_cast<char*>(&hidden_)) + sizeof(visual_index_));
}

HeaderViewState_HeaderState::~HeaderViewState_HeaderState() {
  // @@protoc_insertion_point(destructor:mixxx.library.HeaderViewState.HeaderState)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void HeaderViewState_HeaderState::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  column_name_.Destroy();
}

void HeaderViewState_HeaderState::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void HeaderViewState_HeaderState::Clear() {
// @@protoc_insertion_point(message_clear_start:mixxx.library.HeaderViewState.HeaderState)
  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) {
    column_name_.ClearNonDefaultToEmpty();
  }
  if (cached_has_bits & 0x0000001eu) {
    ::memset(&hidden_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&visual_index_) -
        reinterpret_cast<char*>(&hidden_)) + sizeof(visual_index_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* HeaderViewState_HeaderState::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool hidden = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_hidden(&has_bits);
          hidden_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 size = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_size(&has_bits);
          size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 logical_index = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_logical_index(&has_bits);
          logical_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 visual_index = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_visual_index(&has_bits);
          visual_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string column_name = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_column_name();
          ptr = ::_pbi::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* HeaderViewState_HeaderState::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mixxx.library.HeaderViewState.HeaderState)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional bool hidden = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_hidden(), target);
  }

  // optional int32 size = 2;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_size(), target);
  }

  // optional int32 logical_index = 3;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_logical_index(), target);
  }

  // optional int32 visual_index = 4;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_visual_index(), target);
  }

  // optional string column_name = 5;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteStringMaybeAliased(
        5, this->_internal_column_name(), 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:mixxx.library.HeaderViewState.HeaderState)
  return target;
}

size_t HeaderViewState_HeaderState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mixxx.library.HeaderViewState.HeaderState)
  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 & 0x0000001fu) {
    // optional string column_name = 5;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_column_name());
    }

    // optional bool hidden = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 1;
    }

    // optional int32 size = 2;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_size());
    }

    // optional int32 logical_index = 3;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_logical_index());
    }

    // optional int32 visual_index = 4;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_visual_index());
    }

  }
  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 = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

void HeaderViewState_HeaderState::MergeFrom(const HeaderViewState_HeaderState& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mixxx.library.HeaderViewState.HeaderState)
  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 & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_column_name(from._internal_column_name());
    }
    if (cached_has_bits & 0x00000002u) {
      hidden_ = from.hidden_;
    }
    if (cached_has_bits & 0x00000004u) {
      size_ = from.size_;
    }
    if (cached_has_bits & 0x00000008u) {
      logical_index_ = from.logical_index_;
    }
    if (cached_has_bits & 0x00000010u) {
      visual_index_ = from.visual_index_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void HeaderViewState_HeaderState::CopyFrom(const HeaderViewState_HeaderState& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mixxx.library.HeaderViewState.HeaderState)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void HeaderViewState_HeaderState::InternalSwap(HeaderViewState_HeaderState* 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(
      &column_name_, lhs_arena,
      &other->column_name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(HeaderViewState_HeaderState, visual_index_)
      + sizeof(HeaderViewState_HeaderState::visual_index_)
      - PROTOBUF_FIELD_OFFSET(HeaderViewState_HeaderState, hidden_)>(
          reinterpret_cast<char*>(&hidden_),
          reinterpret_cast<char*>(&other->hidden_));
}

std::string HeaderViewState_HeaderState::GetTypeName() const {
  return "mixxx.library.HeaderViewState.HeaderState";
}


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

class HeaderViewState::_Internal {
 public:
  using HasBits = decltype(std::declval<HeaderViewState>()._has_bits_);
  static void set_has_sort_indicator_shown(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_sort_indicator_section(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_sort_order(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

HeaderViewState::HeaderViewState(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  header_state_(arena) {
  SharedCtor();
  // @@protoc_insertion_point(arena_constructor:mixxx.library.HeaderViewState)
}
HeaderViewState::HeaderViewState(const HeaderViewState& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      header_state_(from.header_state_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::memcpy(&sort_indicator_shown_, &from.sort_indicator_shown_,
    static_cast<size_t>(reinterpret_cast<char*>(&sort_order_) -
    reinterpret_cast<char*>(&sort_indicator_shown_)) + sizeof(sort_order_));
  // @@protoc_insertion_point(copy_constructor:mixxx.library.HeaderViewState)
}

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

HeaderViewState::~HeaderViewState() {
  // @@protoc_insertion_point(destructor:mixxx.library.HeaderViewState)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

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

void HeaderViewState::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* HeaderViewState::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .mixxx.library.HeaderViewState.HeaderState header_state = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_header_state(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional bool sort_indicator_shown = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_sort_indicator_shown(&has_bits);
          sort_indicator_shown_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 sort_indicator_section = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_sort_indicator_section(&has_bits);
          sort_indicator_section_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 sort_order = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_sort_order(&has_bits);
          sort_order_ = ::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* HeaderViewState::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mixxx.library.HeaderViewState)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .mixxx.library.HeaderViewState.HeaderState header_state = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_header_state_size()); i < n; i++) {
    const auto& repfield = this->_internal_header_state(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

  cached_has_bits = _has_bits_[0];
  // optional bool sort_indicator_shown = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_sort_indicator_shown(), target);
  }

  // optional int32 sort_indicator_section = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_sort_indicator_section(), target);
  }

  // optional int32 sort_order = 4;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_sort_order(), 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:mixxx.library.HeaderViewState)
  return target;
}

size_t HeaderViewState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mixxx.library.HeaderViewState)
  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 .mixxx.library.HeaderViewState.HeaderState header_state = 1;
  total_size += 1UL * this->_internal_header_state_size();
  for (const auto& msg : this->header_state_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional bool sort_indicator_shown = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 1;
    }

    // optional int32 sort_indicator_section = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_sort_indicator_section());
    }

    // optional int32 sort_order = 4;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_sort_order());
    }

  }
  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 = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

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

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

  header_state_.MergeFrom(from.header_state_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      sort_indicator_shown_ = from.sort_indicator_shown_;
    }
    if (cached_has_bits & 0x00000002u) {
      sort_indicator_section_ = from.sort_indicator_section_;
    }
    if (cached_has_bits & 0x00000004u) {
      sort_order_ = from.sort_order_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string HeaderViewState::GetTypeName() const {
  return "mixxx.library.HeaderViewState";
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace library
}  // namespace mixxx
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::mixxx::library::HeaderViewState_HeaderState*
Arena::CreateMaybeMessage< ::mixxx::library::HeaderViewState_HeaderState >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mixxx::library::HeaderViewState_HeaderState >(arena);
}
template<> PROTOBUF_NOINLINE ::mixxx::library::HeaderViewState*
Arena::CreateMaybeMessage< ::mixxx::library::HeaderViewState >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mixxx::library::HeaderViewState >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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