// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: stream_out/chromecast/cast_channel.proto
// Protobuf C++ Version: 7.34.0

#include "stream_out/chromecast/cast_channel.pb.h"

#include <algorithm>
#include <type_traits>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/internal_visibility.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace castchannel {

inline constexpr CastMessage::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        source_id_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        destination_id_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        namespace__(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        payload_utf8_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        payload_binary_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        protocol_version_{static_cast< ::castchannel::CastMessage_ProtocolVersion >(0)},
        payload_type_{static_cast< ::castchannel::CastMessage_PayloadType >(0)} {}

template <typename>
constexpr CastMessage::CastMessage(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(CastMessage_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
struct CastMessageDefaultTypeInternal {
  constexpr CastMessageDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~CastMessageDefaultTypeInternal() {}
  union {
    CastMessage _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CastMessageDefaultTypeInternal _CastMessage_default_instance_;

inline constexpr AuthResponse::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        signature_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        client_auth_certificate_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()) {}

template <typename>
constexpr AuthResponse::AuthResponse(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(AuthResponse_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
struct AuthResponseDefaultTypeInternal {
  constexpr AuthResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~AuthResponseDefaultTypeInternal() {}
  union {
    AuthResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AuthResponseDefaultTypeInternal _AuthResponse_default_instance_;

inline constexpr AuthError::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        error_type_{static_cast< ::castchannel::AuthError_ErrorType >(0)} {}

template <typename>
constexpr AuthError::AuthError(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(AuthError_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
struct AuthErrorDefaultTypeInternal {
  constexpr AuthErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~AuthErrorDefaultTypeInternal() {}
  union {
    AuthError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AuthErrorDefaultTypeInternal _AuthError_default_instance_;

inline constexpr AuthChallenge::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0} {}

template <typename>
constexpr AuthChallenge::AuthChallenge(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(AuthChallenge_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
struct AuthChallengeDefaultTypeInternal {
  constexpr AuthChallengeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~AuthChallengeDefaultTypeInternal() {}
  union {
    AuthChallenge _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AuthChallengeDefaultTypeInternal _AuthChallenge_default_instance_;

inline constexpr DeviceAuthMessage::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        challenge_{nullptr},
        response_{nullptr},
        error_{nullptr} {}

template <typename>
constexpr DeviceAuthMessage::DeviceAuthMessage(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(DeviceAuthMessage_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
struct DeviceAuthMessageDefaultTypeInternal {
  constexpr DeviceAuthMessageDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeviceAuthMessageDefaultTypeInternal() {}
  union {
    DeviceAuthMessage _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceAuthMessageDefaultTypeInternal _DeviceAuthMessage_default_instance_;
}  // namespace castchannel
namespace castchannel {
PROTOBUF_CONSTINIT const uint32_t CastMessage_ProtocolVersion_internal_data_[] = {
    65536u, 0u, };
static const char CastMessage_ProtocolVersion_names[] = {
    "CASTV2_1_0"
};

static const ::google::protobuf::internal::EnumEntry CastMessage_ProtocolVersion_entries[] = {
    {{&CastMessage_ProtocolVersion_names[0], 10}, 0},
};

static const int CastMessage_ProtocolVersion_entries_by_number[] = {
    0,  // 0 -> CASTV2_1_0
};

[[nodiscard]] bool CastMessage_ProtocolVersion_Parse(::absl::string_view name,
                                  CastMessage_ProtocolVersion* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      CastMessage_ProtocolVersion_entries, 1, name, &int_value);
  if (success) {
    *value = static_cast<CastMessage_ProtocolVersion>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    CastMessage_ProtocolVersion_strings[1] = {};

[[nodiscard]] const ::std::string& CastMessage_ProtocolVersion_Name(CastMessage_ProtocolVersion value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      CastMessage_ProtocolVersion_entries, CastMessage_ProtocolVersion_entries_by_number, 1,
      CastMessage_ProtocolVersion_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(CastMessage_ProtocolVersion_entries,
                                  CastMessage_ProtocolVersion_entries_by_number,
                                  1, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : CastMessage_ProtocolVersion_strings[idx].get();
}
PROTOBUF_CONSTINIT const uint32_t CastMessage_PayloadType_internal_data_[] = {
    131072u, 0u, };
static const char CastMessage_PayloadType_names[] = {
    "BINARY"
    "STRING"
};

static const ::google::protobuf::internal::EnumEntry CastMessage_PayloadType_entries[] = {
    {{&CastMessage_PayloadType_names[0], 6}, 1},
    {{&CastMessage_PayloadType_names[6], 6}, 0},
};

static const int CastMessage_PayloadType_entries_by_number[] = {
    1,  // 0 -> STRING
    0,  // 1 -> BINARY
};

[[nodiscard]] bool CastMessage_PayloadType_Parse(::absl::string_view name,
                                  CastMessage_PayloadType* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      CastMessage_PayloadType_entries, 2, name, &int_value);
  if (success) {
    *value = static_cast<CastMessage_PayloadType>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    CastMessage_PayloadType_strings[2] = {};

[[nodiscard]] const ::std::string& CastMessage_PayloadType_Name(CastMessage_PayloadType value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      CastMessage_PayloadType_entries, CastMessage_PayloadType_entries_by_number, 2,
      CastMessage_PayloadType_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(CastMessage_PayloadType_entries,
                                  CastMessage_PayloadType_entries_by_number,
                                  2, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : CastMessage_PayloadType_strings[idx].get();
}
PROTOBUF_CONSTINIT const uint32_t AuthError_ErrorType_internal_data_[] = {
    131072u, 0u, };
static const char AuthError_ErrorType_names[] = {
    "INTERNAL_ERROR"
    "NO_TLS"
};

static const ::google::protobuf::internal::EnumEntry AuthError_ErrorType_entries[] = {
    {{&AuthError_ErrorType_names[0], 14}, 0},
    {{&AuthError_ErrorType_names[14], 6}, 1},
};

static const int AuthError_ErrorType_entries_by_number[] = {
    0,  // 0 -> INTERNAL_ERROR
    1,  // 1 -> NO_TLS
};

[[nodiscard]] bool AuthError_ErrorType_Parse(::absl::string_view name,
                                  AuthError_ErrorType* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      AuthError_ErrorType_entries, 2, name, &int_value);
  if (success) {
    *value = static_cast<AuthError_ErrorType>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    AuthError_ErrorType_strings[2] = {};

[[nodiscard]] const ::std::string& AuthError_ErrorType_Name(AuthError_ErrorType value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      AuthError_ErrorType_entries, AuthError_ErrorType_entries_by_number, 2,
      AuthError_ErrorType_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(AuthError_ErrorType_entries,
                                  AuthError_ErrorType_entries_by_number,
                                  2, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : AuthError_ErrorType_strings[idx].get();
}
// ===================================================================

class CastMessage::_Internal {
 public:
  using HasBits =
      decltype(::std::declval<CastMessage>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(CastMessage, _impl_._has_bits_);
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000067) ^ 0x00000067) != 0;
  }
};

CastMessage::CastMessage(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, CastMessage_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:castchannel.CastMessage)
}
PROTOBUF_NDEBUG_INLINE CastMessage::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::castchannel::CastMessage& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        source_id_(arena, from.source_id_),
        destination_id_(arena, from.destination_id_),
        namespace__(arena, from.namespace__),
        payload_utf8_(arena, from.payload_utf8_),
        payload_binary_(arena, from.payload_binary_) {}

CastMessage::CastMessage(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const CastMessage& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, CastMessage_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  CastMessage* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, protocol_version_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, protocol_version_),
           offsetof(Impl_, payload_type_) -
               offsetof(Impl_, protocol_version_) +
               sizeof(Impl_::payload_type_));

  // @@protoc_insertion_point(copy_constructor:castchannel.CastMessage)
}
PROTOBUF_NDEBUG_INLINE CastMessage::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        source_id_(arena),
        destination_id_(arena),
        namespace__(arena),
        payload_utf8_(arena),
        payload_binary_(arena) {}

inline void CastMessage::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, protocol_version_),
           0,
           offsetof(Impl_, payload_type_) -
               offsetof(Impl_, protocol_version_) +
               sizeof(Impl_::payload_type_));
}
CastMessage::~CastMessage() {
  // @@protoc_insertion_point(destructor:castchannel.CastMessage)
  SharedDtor(*this);
}
inline void CastMessage::SharedDtor(MessageLite& self) {
  CastMessage& this_ = static_cast<CastMessage&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.source_id_.Destroy();
  this_._impl_.destination_id_.Destroy();
  this_._impl_.namespace__.Destroy();
  this_._impl_.payload_utf8_.Destroy();
  this_._impl_.payload_binary_.Destroy();
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL CastMessage::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) CastMessage(arena);
}
constexpr auto CastMessage::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(CastMessage),
                                            alignof(CastMessage));
}
constexpr auto CastMessage::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataLite<24>{
      {
          &_CastMessage_default_instance_._instance,
          &_table_.header,
          CastMessage::IsInitializedImpl,
          &CastMessage::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<CastMessage>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &CastMessage::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<CastMessage>(), &CastMessage::ByteSizeLong,
              &CastMessage::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(CastMessage, _impl_._cached_size_),
          true,
      },
      "castchannel.CastMessage",
  };
}

PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<24> CastMessage_class_data_ =
    CastMessage::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
CastMessage::GetClassData() const {
  return CastMessage_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<3, 7, 2, 0, 2>
CastMessage::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(CastMessage, _impl_._has_bits_),
    0, // no _extensions_
    7, 56,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967168,  // skipmap
    offsetof(decltype(_table_), field_entries),
    7,  // num_field_entries
    2,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    CastMessage_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallbackLite,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::castchannel::CastMessage>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    {::_pbi::TcParser::MiniParse, {}},
    // required .castchannel.CastMessage.ProtocolVersion protocol_version = 1;
    {::_pbi::TcParser::FastEr0S1,
     {8, 5, 0,
      PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.protocol_version_)}},
    // required string source_id = 2;
    {::_pbi::TcParser::FastBS1,
     {18, 0, 0,
      PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.source_id_)}},
    // required string destination_id = 3;
    {::_pbi::TcParser::FastBS1,
     {26, 1, 0,
      PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.destination_id_)}},
    // required string namespace = 4;
    {::_pbi::TcParser::FastBS1,
     {34, 2, 0,
      PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.namespace__)}},
    // required .castchannel.CastMessage.PayloadType payload_type = 5;
    {::_pbi::TcParser::FastEr0S1,
     {40, 6, 1,
      PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.payload_type_)}},
    // optional string payload_utf8 = 6;
    {::_pbi::TcParser::FastBS1,
     {50, 3, 0,
      PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.payload_utf8_)}},
    // optional bytes payload_binary = 7;
    {::_pbi::TcParser::FastBS1,
     {58, 4, 0,
      PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.payload_binary_)}},
  }}, {{
    65535, 65535
  }}, {{
    // required .castchannel.CastMessage.ProtocolVersion protocol_version = 1;
    {PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.protocol_version_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
    // required string source_id = 2;
    {PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.source_id_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    // required string destination_id = 3;
    {PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.destination_id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    // required string namespace = 4;
    {PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.namespace__), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    // required .castchannel.CastMessage.PayloadType payload_type = 5;
    {PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.payload_type_), _Internal::kHasBitsOffset + 6, 1, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
    // optional string payload_utf8 = 6;
    {PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.payload_utf8_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    // optional bytes payload_binary = 7;
    {PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.payload_binary_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
  }},
  {{
      {0, 0},
      {0, 1},
  }},
  {{
  }},
};
PROTOBUF_NOINLINE void CastMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:castchannel.CastMessage)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.source_id_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.destination_id_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.namespace__.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _impl_.payload_utf8_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _impl_.payload_binary_.ClearNonDefaultToEmpty();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000060U)) {
    ::memset(&_impl_.protocol_version_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.payload_type_) -
        reinterpret_cast<char*>(&_impl_.protocol_version_)) + sizeof(_impl_.payload_type_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL CastMessage::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const CastMessage& this_ = static_cast<const CastMessage&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL CastMessage::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const CastMessage& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:castchannel.CastMessage)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // required .castchannel.CastMessage.ProtocolVersion protocol_version = 1;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this_._internal_protocol_version(), target);
  }

  // required string source_id = 2;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_source_id();
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // required string destination_id = 3;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    const ::std::string& _s = this_._internal_destination_id();
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

  // required string namespace = 4;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    const ::std::string& _s = this_._internal_namespace_();
    target = stream->WriteStringMaybeAliased(4, _s, target);
  }

  // required .castchannel.CastMessage.PayloadType payload_type = 5;
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        5, this_._internal_payload_type(), target);
  }

  // optional string payload_utf8 = 6;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    const ::std::string& _s = this_._internal_payload_utf8();
    target = stream->WriteStringMaybeAliased(6, _s, target);
  }

  // optional bytes payload_binary = 7;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    const ::std::string& _s = this_._internal_payload_binary();
    target = stream->WriteBytesMaybeAliased(7, _s, target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:castchannel.CastMessage)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t CastMessage::ByteSizeLong(const MessageLite& base) {
  const CastMessage& this_ = static_cast<const CastMessage&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t CastMessage::ByteSizeLong() const {
  const CastMessage& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:castchannel.CastMessage)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    // required string source_id = 2;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_source_id());
    }
    // required string destination_id = 3;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_destination_id());
    }
    // required string namespace = 4;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_namespace_());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000018U)) {
    // optional string payload_utf8 = 6;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_payload_utf8());
    }
    // optional bytes payload_binary = 7;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                      this_._internal_payload_binary());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000060U)) {
    // required .castchannel.CastMessage.ProtocolVersion protocol_version = 1;
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_protocol_version());
    }
    // required .castchannel.CastMessage.PayloadType payload_type = 5;
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_payload_type());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void CastMessage::MergeImpl(::google::protobuf::MessageLite& to_msg,
                            const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this =
      static_cast<CastMessage*>(&to_msg);
  auto& from = static_cast<const CastMessage&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:castchannel.CastMessage)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_source_id(from._internal_source_id());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_set_destination_id(from._internal_destination_id());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_set_namespace_(from._internal_namespace_());
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_internal_set_payload_utf8(from._internal_payload_utf8());
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_internal_set_payload_binary(from._internal_payload_binary());
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.protocol_version_ = from._impl_.protocol_version_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.payload_type_ = from._impl_.payload_type_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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

PROTOBUF_NOINLINE bool CastMessage::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const CastMessage&>(msg);
  if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
    return false;
  }
  return true;
}

void CastMessage::InternalSwap(CastMessage* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.source_id_, &other->_impl_.source_id_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.destination_id_, &other->_impl_.destination_id_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.namespace__, &other->_impl_.namespace__, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.payload_utf8_, &other->_impl_.payload_utf8_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.payload_binary_, &other->_impl_.payload_binary_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.payload_type_)
      + sizeof(CastMessage::_impl_.payload_type_)
      - PROTOBUF_FIELD_OFFSET(CastMessage, _impl_.protocol_version_)>(
          reinterpret_cast<char*>(&_impl_.protocol_version_),
          reinterpret_cast<char*>(&other->_impl_.protocol_version_));
}

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

class AuthChallenge::_Internal {
 public:
};

AuthChallenge::AuthChallenge(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AuthChallenge_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:castchannel.AuthChallenge)
}
AuthChallenge::AuthChallenge(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const AuthChallenge& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AuthChallenge_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}
PROTOBUF_NDEBUG_INLINE AuthChallenge::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void AuthChallenge::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
AuthChallenge::~AuthChallenge() {
  // @@protoc_insertion_point(destructor:castchannel.AuthChallenge)
  SharedDtor(*this);
}
inline void AuthChallenge::SharedDtor(MessageLite& self) {
  AuthChallenge& this_ = static_cast<AuthChallenge&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL AuthChallenge::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) AuthChallenge(arena);
}
constexpr auto AuthChallenge::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(AuthChallenge),
                                            alignof(AuthChallenge));
}
constexpr auto AuthChallenge::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataLite<26>{
      {
          &_AuthChallenge_default_instance_._instance,
          &_table_.header,
          nullptr,  // IsInitialized
          &AuthChallenge::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<AuthChallenge>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &AuthChallenge::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<AuthChallenge>(), &AuthChallenge::ByteSizeLong,
              &AuthChallenge::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(AuthChallenge, _impl_._cached_size_),
          true,
      },
      "castchannel.AuthChallenge",
  };
}

PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<26> AuthChallenge_class_data_ =
    AuthChallenge::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AuthChallenge::GetClassData() const {
  return AuthChallenge_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<0, 0, 0, 0, 2>
AuthChallenge::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(AuthChallenge,
                          _impl_._cached_size_),  // no hasbits
    0, // no _extensions_
    0, 0,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967295,  // skipmap
    offsetof(decltype(_table_), field_names),  // no field_entries
    0,  // num_field_entries
    0,  // num_aux_entries
    offsetof(decltype(_table_), field_names),  // no aux_entries
    AuthChallenge_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallbackLite,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::castchannel::AuthChallenge>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    {::_pbi::TcParser::MiniParse, {}},
  }}, {{
    65535, 65535
  }}, // no field_entries, or aux_entries
  {{
  }},
};
PROTOBUF_NOINLINE void AuthChallenge::Clear() {
// @@protoc_insertion_point(message_clear_start:castchannel.AuthChallenge)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL AuthChallenge::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const AuthChallenge& this_ = static_cast<const AuthChallenge&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL AuthChallenge::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const AuthChallenge& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:castchannel.AuthChallenge)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:castchannel.AuthChallenge)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t AuthChallenge::ByteSizeLong(const MessageLite& base) {
  const AuthChallenge& this_ = static_cast<const AuthChallenge&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t AuthChallenge::ByteSizeLong() const {
  const AuthChallenge& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:castchannel.AuthChallenge)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void AuthChallenge::MergeImpl(::google::protobuf::MessageLite& to_msg,
                            const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this =
      static_cast<AuthChallenge*>(&to_msg);
  auto& from = static_cast<const AuthChallenge&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:castchannel.AuthChallenge)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void AuthChallenge::InternalSwap(AuthChallenge* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

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

class AuthResponse::_Internal {
 public:
  using HasBits =
      decltype(::std::declval<AuthResponse>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(AuthResponse, _impl_._has_bits_);
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0;
  }
};

AuthResponse::AuthResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AuthResponse_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:castchannel.AuthResponse)
}
PROTOBUF_NDEBUG_INLINE AuthResponse::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::castchannel::AuthResponse& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        signature_(arena, from.signature_),
        client_auth_certificate_(arena, from.client_auth_certificate_) {}

AuthResponse::AuthResponse(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const AuthResponse& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AuthResponse_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  AuthResponse* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

  // @@protoc_insertion_point(copy_constructor:castchannel.AuthResponse)
}
PROTOBUF_NDEBUG_INLINE AuthResponse::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        signature_(arena),
        client_auth_certificate_(arena) {}

inline void AuthResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
AuthResponse::~AuthResponse() {
  // @@protoc_insertion_point(destructor:castchannel.AuthResponse)
  SharedDtor(*this);
}
inline void AuthResponse::SharedDtor(MessageLite& self) {
  AuthResponse& this_ = static_cast<AuthResponse&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.signature_.Destroy();
  this_._impl_.client_auth_certificate_.Destroy();
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL AuthResponse::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) AuthResponse(arena);
}
constexpr auto AuthResponse::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(AuthResponse),
                                            alignof(AuthResponse));
}
constexpr auto AuthResponse::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataLite<25>{
      {
          &_AuthResponse_default_instance_._instance,
          &_table_.header,
          AuthResponse::IsInitializedImpl,
          &AuthResponse::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<AuthResponse>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &AuthResponse::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<AuthResponse>(), &AuthResponse::ByteSizeLong,
              &AuthResponse::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(AuthResponse, _impl_._cached_size_),
          true,
      },
      "castchannel.AuthResponse",
  };
}

PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<25> AuthResponse_class_data_ =
    AuthResponse::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AuthResponse::GetClassData() const {
  return AuthResponse_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
AuthResponse::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(AuthResponse, _impl_._has_bits_),
    0, // no _extensions_
    2, 8,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967292,  // skipmap
    offsetof(decltype(_table_), field_entries),
    2,  // num_field_entries
    0,  // num_aux_entries
    offsetof(decltype(_table_), field_names),  // no aux_entries
    AuthResponse_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallbackLite,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::castchannel::AuthResponse>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // required bytes client_auth_certificate = 2;
    {::_pbi::TcParser::FastBS1,
     {18, 1, 0,
      PROTOBUF_FIELD_OFFSET(AuthResponse, _impl_.client_auth_certificate_)}},
    // required bytes signature = 1;
    {::_pbi::TcParser::FastBS1,
     {10, 0, 0,
      PROTOBUF_FIELD_OFFSET(AuthResponse, _impl_.signature_)}},
  }}, {{
    65535, 65535
  }}, {{
    // required bytes signature = 1;
    {PROTOBUF_FIELD_OFFSET(AuthResponse, _impl_.signature_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    // required bytes client_auth_certificate = 2;
    {PROTOBUF_FIELD_OFFSET(AuthResponse, _impl_.client_auth_certificate_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
  }},
  // no aux_entries
  {{
  }},
};
PROTOBUF_NOINLINE void AuthResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:castchannel.AuthResponse)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.signature_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.client_auth_certificate_.ClearNonDefaultToEmpty();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL AuthResponse::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const AuthResponse& this_ = static_cast<const AuthResponse&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL AuthResponse::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const AuthResponse& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:castchannel.AuthResponse)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // required bytes signature = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_signature();
    target = stream->WriteBytesMaybeAliased(1, _s, target);
  }

  // required bytes client_auth_certificate = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    const ::std::string& _s = this_._internal_client_auth_certificate();
    target = stream->WriteBytesMaybeAliased(2, _s, target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:castchannel.AuthResponse)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t AuthResponse::ByteSizeLong(const MessageLite& base) {
  const AuthResponse& this_ = static_cast<const AuthResponse&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t AuthResponse::ByteSizeLong() const {
  const AuthResponse& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:castchannel.AuthResponse)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    // required bytes signature = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                      this_._internal_signature());
    }
    // required bytes client_auth_certificate = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                      this_._internal_client_auth_certificate());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void AuthResponse::MergeImpl(::google::protobuf::MessageLite& to_msg,
                            const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this =
      static_cast<AuthResponse*>(&to_msg);
  auto& from = static_cast<const AuthResponse&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:castchannel.AuthResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_signature(from._internal_signature());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_set_client_auth_certificate(from._internal_client_auth_certificate());
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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

PROTOBUF_NOINLINE bool AuthResponse::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const AuthResponse&>(msg);
  if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
    return false;
  }
  return true;
}

void AuthResponse::InternalSwap(AuthResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.signature_, &other->_impl_.signature_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.client_auth_certificate_, &other->_impl_.client_auth_certificate_, arena);
}

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

class AuthError::_Internal {
 public:
  using HasBits =
      decltype(::std::declval<AuthError>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(AuthError, _impl_._has_bits_);
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0;
  }
};

AuthError::AuthError(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AuthError_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:castchannel.AuthError)
}
AuthError::AuthError(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const AuthError& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, AuthError_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}
PROTOBUF_NDEBUG_INLINE AuthError::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void AuthError::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.error_type_ = {};
}
AuthError::~AuthError() {
  // @@protoc_insertion_point(destructor:castchannel.AuthError)
  SharedDtor(*this);
}
inline void AuthError::SharedDtor(MessageLite& self) {
  AuthError& this_ = static_cast<AuthError&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL AuthError::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) AuthError(arena);
}
constexpr auto AuthError::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(AuthError),
                                            alignof(AuthError));
}
constexpr auto AuthError::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataLite<22>{
      {
          &_AuthError_default_instance_._instance,
          &_table_.header,
          AuthError::IsInitializedImpl,
          &AuthError::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<AuthError>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &AuthError::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<AuthError>(), &AuthError::ByteSizeLong,
              &AuthError::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(AuthError, _impl_._cached_size_),
          true,
      },
      "castchannel.AuthError",
  };
}

PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<22> AuthError_class_data_ =
    AuthError::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
AuthError::GetClassData() const {
  return AuthError_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<0, 1, 1, 0, 2>
AuthError::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(AuthError, _impl_._has_bits_),
    0, // no _extensions_
    1, 0,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967294,  // skipmap
    offsetof(decltype(_table_), field_entries),
    1,  // num_field_entries
    1,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    AuthError_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallbackLite,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::castchannel::AuthError>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    // required .castchannel.AuthError.ErrorType error_type = 1;
    {::_pbi::TcParser::FastEr0S1,
     {8, 0, 1,
      PROTOBUF_FIELD_OFFSET(AuthError, _impl_.error_type_)}},
  }}, {{
    65535, 65535
  }}, {{
    // required .castchannel.AuthError.ErrorType error_type = 1;
    {PROTOBUF_FIELD_OFFSET(AuthError, _impl_.error_type_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
  }},
  {{
      {0, 1},
  }},
  {{
  }},
};
PROTOBUF_NOINLINE void AuthError::Clear() {
// @@protoc_insertion_point(message_clear_start:castchannel.AuthError)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.error_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL AuthError::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const AuthError& this_ = static_cast<const AuthError&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL AuthError::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const AuthError& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:castchannel.AuthError)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // required .castchannel.AuthError.ErrorType error_type = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this_._internal_error_type(), target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:castchannel.AuthError)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t AuthError::ByteSizeLong(const MessageLite& base) {
  const AuthError& this_ = static_cast<const AuthError&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t AuthError::ByteSizeLong() const {
  const AuthError& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:castchannel.AuthError)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

   {
    // required .castchannel.AuthError.ErrorType error_type = 1;
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_error_type());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void AuthError::MergeImpl(::google::protobuf::MessageLite& to_msg,
                            const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this =
      static_cast<AuthError*>(&to_msg);
  auto& from = static_cast<const AuthError&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:castchannel.AuthError)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _this->_impl_.error_type_ = from._impl_.error_type_;
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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

PROTOBUF_NOINLINE bool AuthError::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const AuthError&>(msg);
  if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
    return false;
  }
  return true;
}

void AuthError::InternalSwap(AuthError* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.error_type_, other->_impl_.error_type_);
}

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

class DeviceAuthMessage::_Internal {
 public:
  using HasBits =
      decltype(::std::declval<DeviceAuthMessage>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_._has_bits_);
};

DeviceAuthMessage::DeviceAuthMessage(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, DeviceAuthMessage_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:castchannel.DeviceAuthMessage)
}
PROTOBUF_NDEBUG_INLINE DeviceAuthMessage::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::castchannel::DeviceAuthMessage& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

DeviceAuthMessage::DeviceAuthMessage(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const DeviceAuthMessage& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, DeviceAuthMessage_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  DeviceAuthMessage* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.challenge_ = (CheckHasBit(cached_has_bits, 0x00000001U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.challenge_)
                : nullptr;
  _impl_.response_ = (CheckHasBit(cached_has_bits, 0x00000002U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.response_)
                : nullptr;
  _impl_.error_ = (CheckHasBit(cached_has_bits, 0x00000004U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.error_)
                : nullptr;

  // @@protoc_insertion_point(copy_constructor:castchannel.DeviceAuthMessage)
}
PROTOBUF_NDEBUG_INLINE DeviceAuthMessage::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void DeviceAuthMessage::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, challenge_),
           0,
           offsetof(Impl_, error_) -
               offsetof(Impl_, challenge_) +
               sizeof(Impl_::error_));
}
DeviceAuthMessage::~DeviceAuthMessage() {
  // @@protoc_insertion_point(destructor:castchannel.DeviceAuthMessage)
  SharedDtor(*this);
}
inline void DeviceAuthMessage::SharedDtor(MessageLite& self) {
  DeviceAuthMessage& this_ = static_cast<DeviceAuthMessage&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.challenge_;
  delete this_._impl_.response_;
  delete this_._impl_.error_;
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL DeviceAuthMessage::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) DeviceAuthMessage(arena);
}
constexpr auto DeviceAuthMessage::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(DeviceAuthMessage),
                                            alignof(DeviceAuthMessage));
}
constexpr auto DeviceAuthMessage::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataLite<30>{
      {
          &_DeviceAuthMessage_default_instance_._instance,
          &_table_.header,
          DeviceAuthMessage::IsInitializedImpl,
          &DeviceAuthMessage::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<DeviceAuthMessage>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &DeviceAuthMessage::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<DeviceAuthMessage>(), &DeviceAuthMessage::ByteSizeLong,
              &DeviceAuthMessage::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_._cached_size_),
          true,
      },
      "castchannel.DeviceAuthMessage",
  };
}

PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<30> DeviceAuthMessage_class_data_ =
    DeviceAuthMessage::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
DeviceAuthMessage::GetClassData() const {
  return DeviceAuthMessage_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 3, 3, 0, 2>
DeviceAuthMessage::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_._has_bits_),
    0, // no _extensions_
    3, 24,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967288,  // skipmap
    offsetof(decltype(_table_), field_entries),
    3,  // num_field_entries
    3,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    DeviceAuthMessage_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallbackLite,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::castchannel::DeviceAuthMessage>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    {::_pbi::TcParser::MiniParse, {}},
    // optional .castchannel.AuthChallenge challenge = 1;
    {::_pbi::TcParser::FastMtS1,
     {10, 0, 0,
      PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_.challenge_)}},
    // optional .castchannel.AuthResponse response = 2;
    {::_pbi::TcParser::FastMtS1,
     {18, 1, 1,
      PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_.response_)}},
    // optional .castchannel.AuthError error = 3;
    {::_pbi::TcParser::FastMtS1,
     {26, 2, 2,
      PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_.error_)}},
  }}, {{
    65535, 65535
  }}, {{
    // optional .castchannel.AuthChallenge challenge = 1;
    {PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_.challenge_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    // optional .castchannel.AuthResponse response = 2;
    {PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_.response_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    // optional .castchannel.AuthError error = 3;
    {PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_.error_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  }},
  {{
      {::_pbi::TcParser::GetTable<::castchannel::AuthChallenge>()},
      {::_pbi::TcParser::GetTable<::castchannel::AuthResponse>()},
      {::_pbi::TcParser::GetTable<::castchannel::AuthError>()},
  }},
  {{
  }},
};
PROTOBUF_NOINLINE void DeviceAuthMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:castchannel.DeviceAuthMessage)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      ABSL_DCHECK(_impl_.challenge_ != nullptr);
      _impl_.challenge_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(_impl_.response_ != nullptr);
      _impl_.response_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(_impl_.error_ != nullptr);
      _impl_.error_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL DeviceAuthMessage::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const DeviceAuthMessage& this_ = static_cast<const DeviceAuthMessage&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL DeviceAuthMessage::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const DeviceAuthMessage& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:castchannel.DeviceAuthMessage)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional .castchannel.AuthChallenge challenge = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *this_._impl_.challenge_, this_._impl_.challenge_->GetCachedSize(), target,
        stream);
  }

  // optional .castchannel.AuthResponse response = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *this_._impl_.response_, this_._impl_.response_->GetCachedSize(), target,
        stream);
  }

  // optional .castchannel.AuthError error = 3;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        3, *this_._impl_.error_, this_._impl_.error_->GetCachedSize(), target,
        stream);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:castchannel.DeviceAuthMessage)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t DeviceAuthMessage::ByteSizeLong(const MessageLite& base) {
  const DeviceAuthMessage& this_ = static_cast<const DeviceAuthMessage&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t DeviceAuthMessage::ByteSizeLong() const {
  const DeviceAuthMessage& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:castchannel.DeviceAuthMessage)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    // optional .castchannel.AuthChallenge challenge = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.challenge_);
    }
    // optional .castchannel.AuthResponse response = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.response_);
    }
    // optional .castchannel.AuthError error = 3;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.error_);
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void DeviceAuthMessage::MergeImpl(::google::protobuf::MessageLite& to_msg,
                            const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this =
      static_cast<DeviceAuthMessage*>(&to_msg);
  auto& from = static_cast<const DeviceAuthMessage&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:castchannel.DeviceAuthMessage)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      ABSL_DCHECK(from._impl_.challenge_ != nullptr);
      if (_this->_impl_.challenge_ == nullptr) {
        _this->_impl_.challenge_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.challenge_);
      } else {
        _this->_impl_.challenge_->MergeFrom(*from._impl_.challenge_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(from._impl_.response_ != nullptr);
      if (_this->_impl_.response_ == nullptr) {
        _this->_impl_.response_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.response_);
      } else {
        _this->_impl_.response_->MergeFrom(*from._impl_.response_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(from._impl_.error_ != nullptr);
      if (_this->_impl_.error_ == nullptr) {
        _this->_impl_.error_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.error_);
      } else {
        _this->_impl_.error_->MergeFrom(*from._impl_.error_);
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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

PROTOBUF_NOINLINE bool DeviceAuthMessage::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const DeviceAuthMessage&>(msg);
  if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000002U)) {
    if (!this_._impl_.response_->IsInitialized()) return false;
  }
  if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000004U)) {
    if (!this_._impl_.error_->IsInitialized()) return false;
  }
  return true;
}

void DeviceAuthMessage::InternalSwap(DeviceAuthMessage* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_.error_)
      + sizeof(DeviceAuthMessage::_impl_.error_)
      - PROTOBUF_FIELD_OFFSET(DeviceAuthMessage, _impl_.challenge_)>(
          reinterpret_cast<char*>(&_impl_.challenge_),
          reinterpret_cast<char*>(&other->_impl_.challenge_));
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace castchannel
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
