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

#include "presence/proto/presence_frame.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/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG
namespace nearby {
namespace presence {
constexpr PresenceFrame::PresenceFrame(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : v1_frame_(nullptr){}
struct PresenceFrameDefaultTypeInternal {
  constexpr PresenceFrameDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~PresenceFrameDefaultTypeInternal() {}
  union {
    PresenceFrame _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PresenceFrameDefaultTypeInternal _PresenceFrame_default_instance_;
constexpr V1Frame::V1Frame(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : _oneof_case_{}{}
struct V1FrameDefaultTypeInternal {
  constexpr V1FrameDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~V1FrameDefaultTypeInternal() {}
  union {
    V1Frame _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT V1FrameDefaultTypeInternal _V1Frame_default_instance_;
constexpr DeviceIdentityFrame::DeviceIdentityFrame(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : action_()
  , _action_cached_byte_size_(0)
  , device_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , bluetooth_mac_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , device_image_url_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , model_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , device_model_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , device_type_(0){}
struct DeviceIdentityFrameDefaultTypeInternal {
  constexpr DeviceIdentityFrameDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DeviceIdentityFrameDefaultTypeInternal() {}
  union {
    DeviceIdentityFrame _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DeviceIdentityFrameDefaultTypeInternal _DeviceIdentityFrame_default_instance_;
constexpr ConnectionInitFrame::ConnectionInitFrame(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : actions_()
  , _actions_cached_byte_size_(0)
  , identity_type_(0)
  , uwb_enable_(false)
  , device_unique_id_(int64_t{0}){}
struct ConnectionInitFrameDefaultTypeInternal {
  constexpr ConnectionInitFrameDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ConnectionInitFrameDefaultTypeInternal() {}
  union {
    ConnectionInitFrame _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionInitFrameDefaultTypeInternal _ConnectionInitFrame_default_instance_;
constexpr UwbControleeCapabilities::UwbControleeCapabilities(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : supported_config_ids_()
  , _supported_config_ids_cached_byte_size_(0)
  , supported_channels_()
  , _supported_channels_cached_byte_size_(0)
  , supported_ntf_configs_()
  , _supported_ntf_configs_cached_byte_size_(0)
  , supported_slot_durations_()
  , _supported_slot_durations_cached_byte_size_(0)
  , supported_ranging_update_rates_()
  , _supported_ranging_update_rates_cached_byte_size_(0)
  , multi_chip_info_()
  , controlee_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , sub_session_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , sub_session_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , device_unique_id_(int64_t{0})
  , min_ranging_interval_ms_(0)
  , ranging_disabled_(false)
  , is_elevation_supported_(false)
  , is_ranging_interval_reconfigure_supported_(false)
  , chip_count_(1)
  , is_distance_supported_(true)
  , is_azimuth_supported_(true)
  , min_slot_duration_ms_(2){}
struct UwbControleeCapabilitiesDefaultTypeInternal {
  constexpr UwbControleeCapabilitiesDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~UwbControleeCapabilitiesDefaultTypeInternal() {}
  union {
    UwbControleeCapabilities _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UwbControleeCapabilitiesDefaultTypeInternal _UwbControleeCapabilities_default_instance_;
constexpr UwbMultiChipInfo::UwbMultiChipInfo(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : controlee_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , chip_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct UwbMultiChipInfoDefaultTypeInternal {
  constexpr UwbMultiChipInfoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~UwbMultiChipInfoDefaultTypeInternal() {}
  union {
    UwbMultiChipInfo _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UwbMultiChipInfoDefaultTypeInternal _UwbMultiChipInfo_default_instance_;
constexpr UwbConnectionInfo::UwbConnectionInfo(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : controller_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , vendor_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , static_sts_iv_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , session_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , channel_(0)
  , preamble_index_(0)
  , config_id_(0)
  , ranging_interval_ms_(0)
  , session_id_(0)
  , ranging_disabled_(false){}
struct UwbConnectionInfoDefaultTypeInternal {
  constexpr UwbConnectionInfoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~UwbConnectionInfoDefaultTypeInternal() {}
  union {
    UwbConnectionInfo _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UwbConnectionInfoDefaultTypeInternal _UwbConnectionInfo_default_instance_;
constexpr ControlFrame::ControlFrame(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : type_(0)
{}
struct ControlFrameDefaultTypeInternal {
  constexpr ControlFrameDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ControlFrameDefaultTypeInternal() {}
  union {
    ControlFrame _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ControlFrameDefaultTypeInternal _ControlFrame_default_instance_;
constexpr PresenceAuthenticationFrame::PresenceAuthenticationFrame(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : private_key_signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , shared_credential_id_hash_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , credential_id_hash_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , version_(0){}
struct PresenceAuthenticationFrameDefaultTypeInternal {
  constexpr PresenceAuthenticationFrameDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~PresenceAuthenticationFrameDefaultTypeInternal() {}
  union {
    PresenceAuthenticationFrame _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PresenceAuthenticationFrameDefaultTypeInternal _PresenceAuthenticationFrame_default_instance_;
}  // namespace presence
}  // namespace nearby
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto[9];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_presence_2fproto_2fpresence_5fframe_2eproto[2];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_presence_2fproto_2fpresence_5fframe_2eproto = nullptr;

const uint32_t TableStruct_presence_2fproto_2fpresence_5fframe_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::nearby::presence::PresenceFrame, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::PresenceFrame, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::nearby::presence::PresenceFrame, v1_frame_),
  0,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::nearby::presence::V1Frame, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::nearby::presence::V1Frame, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::nearby::presence::V1Frame, Message_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::DeviceIdentityFrame, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::DeviceIdentityFrame, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::nearby::presence::DeviceIdentityFrame, device_name_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::DeviceIdentityFrame, bluetooth_mac_address_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::DeviceIdentityFrame, device_image_url_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::DeviceIdentityFrame, model_id_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::DeviceIdentityFrame, action_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::DeviceIdentityFrame, device_model_name_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::DeviceIdentityFrame, device_type_),
  0,
  1,
  2,
  3,
  ~0u,
  4,
  5,
  PROTOBUF_FIELD_OFFSET(::nearby::presence::ConnectionInitFrame, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::ConnectionInitFrame, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::nearby::presence::ConnectionInitFrame, actions_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::ConnectionInitFrame, identity_type_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::ConnectionInitFrame, uwb_enable_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::ConnectionInitFrame, device_unique_id_),
  ~0u,
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, controlee_address_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, supported_config_ids_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, supported_channels_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, min_ranging_interval_ms_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, sub_session_id_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, sub_session_key_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, ranging_disabled_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, device_unique_id_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, is_distance_supported_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, is_azimuth_supported_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, is_elevation_supported_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, min_slot_duration_ms_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, supported_ntf_configs_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, is_ranging_interval_reconfigure_supported_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, supported_slot_durations_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, supported_ranging_update_rates_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, chip_count_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbControleeCapabilities, multi_chip_info_),
  0,
  ~0u,
  ~0u,
  4,
  1,
  2,
  5,
  3,
  9,
  10,
  6,
  11,
  ~0u,
  7,
  ~0u,
  ~0u,
  8,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbMultiChipInfo, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbMultiChipInfo, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbMultiChipInfo, controlee_address_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbMultiChipInfo, chip_id_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, controller_address_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, channel_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, preamble_index_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, config_id_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, ranging_interval_ms_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, session_id_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, vendor_id_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, static_sts_iv_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, session_key_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::UwbConnectionInfo, ranging_disabled_),
  0,
  4,
  5,
  6,
  7,
  8,
  1,
  2,
  3,
  9,
  PROTOBUF_FIELD_OFFSET(::nearby::presence::ControlFrame, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::ControlFrame, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::nearby::presence::ControlFrame, type_),
  0,
  PROTOBUF_FIELD_OFFSET(::nearby::presence::PresenceAuthenticationFrame, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::PresenceAuthenticationFrame, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::nearby::presence::PresenceAuthenticationFrame, version_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::PresenceAuthenticationFrame, private_key_signature_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::PresenceAuthenticationFrame, shared_credential_id_hash_),
  PROTOBUF_FIELD_OFFSET(::nearby::presence::PresenceAuthenticationFrame, credential_id_hash_),
  3,
  0,
  1,
  2,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 7, -1, sizeof(::nearby::presence::PresenceFrame)},
  { 8, -1, -1, sizeof(::nearby::presence::V1Frame)},
  { 21, 34, -1, sizeof(::nearby::presence::DeviceIdentityFrame)},
  { 41, 51, -1, sizeof(::nearby::presence::ConnectionInitFrame)},
  { 55, 79, -1, sizeof(::nearby::presence::UwbControleeCapabilities)},
  { 97, 105, -1, sizeof(::nearby::presence::UwbMultiChipInfo)},
  { 107, 123, -1, sizeof(::nearby::presence::UwbConnectionInfo)},
  { 133, 140, -1, sizeof(::nearby::presence::ControlFrame)},
  { 141, 151, -1, sizeof(::nearby::presence::PresenceAuthenticationFrame)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::nearby::presence::_PresenceFrame_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::nearby::presence::_V1Frame_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::nearby::presence::_DeviceIdentityFrame_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::nearby::presence::_ConnectionInitFrame_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::nearby::presence::_UwbControleeCapabilities_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::nearby::presence::_UwbMultiChipInfo_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::nearby::presence::_UwbConnectionInfo_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::nearby::presence::_ControlFrame_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::nearby::presence::_PresenceAuthenticationFrame_default_instance_),
};

const char descriptor_table_protodef_presence_2fproto_2fpresence_5fframe_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n#presence/proto/presence_frame.proto\022\017n"
  "earby.presence\"j\n\rPresenceFrame\022*\n\010v1_fr"
  "ame\030\001 \001(\0132\030.nearby.presence.V1Frame\"-\n\007V"
  "ersion\022\023\n\017UNKNOWN_VERSION\020\000\022\r\n\tVERSION_1"
  "\020\001\"\302\003\n\007V1Frame\0226\n\rcontrol_frame\030\001 \001(\0132\035."
  "nearby.presence.ControlFrameH\000\022E\n\025device"
  "_identity_frame\030\002 \001(\0132$.nearby.presence."
  "DeviceIdentityFrameH\000\022E\n\025connection_init"
  "_frame\030\003 \001(\0132$.nearby.presence.Connectio"
  "nInitFrameH\000\022U\n uwb_controlee_capabiliti"
  "es_frame\030\004 \001(\0132).nearby.presence.UwbCont"
  "roleeCapabilitiesH\000\022A\n\023uwb_connection_in"
  "fo\030\005 \001(\0132\".nearby.presence.UwbConnection"
  "InfoH\000\022L\n\024authentication_frame\030\006 \001(\0132,.n"
  "earby.presence.PresenceAuthenticationFra"
  "meH\000B\t\n\007Message\"\271\001\n\023DeviceIdentityFrame\022"
  "\023\n\013device_name\030\001 \001(\t\022\035\n\025bluetooth_mac_ad"
  "dress\030\002 \001(\014\022\030\n\020device_image_url\030\003 \001(\t\022\020\n"
  "\010model_id\030\004 \001(\t\022\022\n\006action\030\005 \003(\005B\002\020\001\022\031\n\021d"
  "evice_model_name\030\006 \001(\t\022\023\n\013device_type\030\007 "
  "\001(\005\"o\n\023ConnectionInitFrame\022\023\n\007actions\030\001 "
  "\003(\005B\002\020\001\022\025\n\ridentity_type\030\002 \001(\005\022\022\n\nuwb_en"
  "able\030\003 \001(\010\022\030\n\020device_unique_id\030\004 \001(\003\"\220\005\n"
  "\030UwbControleeCapabilities\022\031\n\021controlee_a"
  "ddress\030\001 \001(\014\022 \n\024supported_config_ids\030\002 \003"
  "(\005B\002\020\001\022\036\n\022supported_channels\030\003 \003(\005B\002\020\001\022\037"
  "\n\027min_ranging_interval_ms\030\004 \001(\005\022\026\n\016sub_s"
  "ession_id\030\005 \001(\014\022\027\n\017sub_session_key\030\006 \001(\014"
  "\022\030\n\020ranging_disabled\030\007 \001(\010\022\030\n\020device_uni"
  "que_id\030\010 \001(\003\022#\n\025is_distance_supported\030\t "
  "\001(\010:\004true\022\"\n\024is_azimuth_supported\030\n \001(\010:"
  "\004true\022%\n\026is_elevation_supported\030\013 \001(\010:\005f"
  "alse\022\037\n\024min_slot_duration_ms\030\014 \001(\002:\0012\022!\n"
  "\025supported_ntf_configs\030\r \003(\005B\002\020\001\0228\n)is_r"
  "anging_interval_reconfigure_supported\030\016 "
  "\001(\010:\005false\022$\n\030supported_slot_durations\030\017"
  " \003(\005B\002\020\001\022*\n\036supported_ranging_update_rat"
  "es\030\020 \003(\005B\002\020\001\022\025\n\nchip_count\030\021 \001(\005:\0011\022:\n\017m"
  "ulti_chip_info\030\022 \003(\0132!.nearby.presence.U"
  "wbMultiChipInfo\">\n\020UwbMultiChipInfo\022\031\n\021c"
  "ontrolee_address\030\001 \001(\014\022\017\n\007chip_id\030\002 \001(\t\""
  "\365\001\n\021UwbConnectionInfo\022\032\n\022controller_addr"
  "ess\030\001 \001(\014\022\017\n\007channel\030\002 \001(\005\022\026\n\016preamble_i"
  "ndex\030\003 \001(\005\022\021\n\tconfig_id\030\004 \001(\005\022\033\n\023ranging"
  "_interval_ms\030\005 \001(\005\022\022\n\nsession_id\030\006 \001(\005\022\021"
  "\n\tvendor_id\030\007 \001(\014\022\025\n\rstatic_sts_iv\030\010 \001(\014"
  "\022\023\n\013session_key\030\t \001(\014\022\030\n\020ranging_disable"
  "d\030\n \001(\010\"\210\001\n\014ControlFrame\0227\n\004type\030\001 \001(\0162)"
  ".nearby.presence.ControlFrame.ControlTyp"
  "e\"\?\n\013ControlType\022\020\n\014UNKNOWN_TYPE\020\000\022\016\n\nKE"
  "EP_ALIVE\020\001\022\016\n\nDISCONNECT\020\002\"\220\001\n\033PresenceA"
  "uthenticationFrame\022\017\n\007version\030\001 \001(\005\022\035\n\025p"
  "rivate_key_signature\030\002 \001(\014\022!\n\031shared_cre"
  "dential_id_hash\030\003 \001(\014\022\036\n\022credential_id_h"
  "ash\030\004 \001(\014B\002\030\001B\?\n&com.google.android.gms."
  "nearby.presenceB\025PresenceFrameProtocol"
  ;
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto = {
  false, false, 2238, descriptor_table_protodef_presence_2fproto_2fpresence_5fframe_2eproto, "presence/proto/presence_frame.proto", 
  &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once, nullptr, 0, 9,
  schemas, file_default_instances, TableStruct_presence_2fproto_2fpresence_5fframe_2eproto::offsets,
  file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto, file_level_enum_descriptors_presence_2fproto_2fpresence_5fframe_2eproto, file_level_service_descriptors_presence_2fproto_2fpresence_5fframe_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_getter() {
  return &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_presence_2fproto_2fpresence_5fframe_2eproto(&descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto);
namespace nearby {
namespace presence {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PresenceFrame_Version_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto);
  return file_level_enum_descriptors_presence_2fproto_2fpresence_5fframe_2eproto[0];
}
bool PresenceFrame_Version_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr PresenceFrame_Version PresenceFrame::UNKNOWN_VERSION;
constexpr PresenceFrame_Version PresenceFrame::VERSION_1;
constexpr PresenceFrame_Version PresenceFrame::Version_MIN;
constexpr PresenceFrame_Version PresenceFrame::Version_MAX;
constexpr int PresenceFrame::Version_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ControlFrame_ControlType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto);
  return file_level_enum_descriptors_presence_2fproto_2fpresence_5fframe_2eproto[1];
}
bool ControlFrame_ControlType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ControlFrame_ControlType ControlFrame::UNKNOWN_TYPE;
constexpr ControlFrame_ControlType ControlFrame::KEEP_ALIVE;
constexpr ControlFrame_ControlType ControlFrame::DISCONNECT;
constexpr ControlFrame_ControlType ControlFrame::ControlType_MIN;
constexpr ControlFrame_ControlType ControlFrame::ControlType_MAX;
constexpr int ControlFrame::ControlType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

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

class PresenceFrame::_Internal {
 public:
  using HasBits = decltype(std::declval<PresenceFrame>()._has_bits_);
  static const ::nearby::presence::V1Frame& v1_frame(const PresenceFrame* msg);
  static void set_has_v1_frame(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::nearby::presence::V1Frame&
PresenceFrame::_Internal::v1_frame(const PresenceFrame* msg) {
  return *msg->v1_frame_;
}
PresenceFrame::PresenceFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:nearby.presence.PresenceFrame)
}
PresenceFrame::PresenceFrame(const PresenceFrame& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_v1_frame()) {
    v1_frame_ = new ::nearby::presence::V1Frame(*from.v1_frame_);
  } else {
    v1_frame_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:nearby.presence.PresenceFrame)
}

inline void PresenceFrame::SharedCtor() {
v1_frame_ = nullptr;
}

PresenceFrame::~PresenceFrame() {
  // @@protoc_insertion_point(destructor:nearby.presence.PresenceFrame)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void PresenceFrame::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete v1_frame_;
}

void PresenceFrame::ArenaDtor(void* object) {
  PresenceFrame* _this = reinterpret_cast< PresenceFrame* >(object);
  (void)_this;
}
void PresenceFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PresenceFrame::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void PresenceFrame::Clear() {
// @@protoc_insertion_point(message_clear_start:nearby.presence.PresenceFrame)
  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) {
    GOOGLE_DCHECK(v1_frame_ != nullptr);
    v1_frame_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PresenceFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .nearby.presence.V1Frame v1_frame = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_v1_frame(), 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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        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* PresenceFrame::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:nearby.presence.PresenceFrame)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .nearby.presence.V1Frame v1_frame = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::v1_frame(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:nearby.presence.PresenceFrame)
  return target;
}

size_t PresenceFrame::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:nearby.presence.PresenceFrame)
  size_t total_size = 0;

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

  // optional .nearby.presence.V1Frame v1_frame = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *v1_frame_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PresenceFrame::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    PresenceFrame::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PresenceFrame::GetClassData() const { return &_class_data_; }

void PresenceFrame::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<PresenceFrame *>(to)->MergeFrom(
      static_cast<const PresenceFrame &>(from));
}


void PresenceFrame::MergeFrom(const PresenceFrame& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.presence.PresenceFrame)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_v1_frame()) {
    _internal_mutable_v1_frame()->::nearby::presence::V1Frame::MergeFrom(from._internal_v1_frame());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void PresenceFrame::InternalSwap(PresenceFrame* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(v1_frame_, other->v1_frame_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PresenceFrame::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_getter, &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once,
      file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto[0]);
}

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

class V1Frame::_Internal {
 public:
  static const ::nearby::presence::ControlFrame& control_frame(const V1Frame* msg);
  static const ::nearby::presence::DeviceIdentityFrame& device_identity_frame(const V1Frame* msg);
  static const ::nearby::presence::ConnectionInitFrame& connection_init_frame(const V1Frame* msg);
  static const ::nearby::presence::UwbControleeCapabilities& uwb_controlee_capabilities_frame(const V1Frame* msg);
  static const ::nearby::presence::UwbConnectionInfo& uwb_connection_info(const V1Frame* msg);
  static const ::nearby::presence::PresenceAuthenticationFrame& authentication_frame(const V1Frame* msg);
};

const ::nearby::presence::ControlFrame&
V1Frame::_Internal::control_frame(const V1Frame* msg) {
  return *msg->Message_.control_frame_;
}
const ::nearby::presence::DeviceIdentityFrame&
V1Frame::_Internal::device_identity_frame(const V1Frame* msg) {
  return *msg->Message_.device_identity_frame_;
}
const ::nearby::presence::ConnectionInitFrame&
V1Frame::_Internal::connection_init_frame(const V1Frame* msg) {
  return *msg->Message_.connection_init_frame_;
}
const ::nearby::presence::UwbControleeCapabilities&
V1Frame::_Internal::uwb_controlee_capabilities_frame(const V1Frame* msg) {
  return *msg->Message_.uwb_controlee_capabilities_frame_;
}
const ::nearby::presence::UwbConnectionInfo&
V1Frame::_Internal::uwb_connection_info(const V1Frame* msg) {
  return *msg->Message_.uwb_connection_info_;
}
const ::nearby::presence::PresenceAuthenticationFrame&
V1Frame::_Internal::authentication_frame(const V1Frame* msg) {
  return *msg->Message_.authentication_frame_;
}
void V1Frame::set_allocated_control_frame(::nearby::presence::ControlFrame* control_frame) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_Message();
  if (control_frame) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::nearby::presence::ControlFrame>::GetOwningArena(control_frame);
    if (message_arena != submessage_arena) {
      control_frame = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, control_frame, submessage_arena);
    }
    set_has_control_frame();
    Message_.control_frame_ = control_frame;
  }
  // @@protoc_insertion_point(field_set_allocated:nearby.presence.V1Frame.control_frame)
}
void V1Frame::set_allocated_device_identity_frame(::nearby::presence::DeviceIdentityFrame* device_identity_frame) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_Message();
  if (device_identity_frame) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::nearby::presence::DeviceIdentityFrame>::GetOwningArena(device_identity_frame);
    if (message_arena != submessage_arena) {
      device_identity_frame = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, device_identity_frame, submessage_arena);
    }
    set_has_device_identity_frame();
    Message_.device_identity_frame_ = device_identity_frame;
  }
  // @@protoc_insertion_point(field_set_allocated:nearby.presence.V1Frame.device_identity_frame)
}
void V1Frame::set_allocated_connection_init_frame(::nearby::presence::ConnectionInitFrame* connection_init_frame) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_Message();
  if (connection_init_frame) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::nearby::presence::ConnectionInitFrame>::GetOwningArena(connection_init_frame);
    if (message_arena != submessage_arena) {
      connection_init_frame = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, connection_init_frame, submessage_arena);
    }
    set_has_connection_init_frame();
    Message_.connection_init_frame_ = connection_init_frame;
  }
  // @@protoc_insertion_point(field_set_allocated:nearby.presence.V1Frame.connection_init_frame)
}
void V1Frame::set_allocated_uwb_controlee_capabilities_frame(::nearby::presence::UwbControleeCapabilities* uwb_controlee_capabilities_frame) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_Message();
  if (uwb_controlee_capabilities_frame) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::nearby::presence::UwbControleeCapabilities>::GetOwningArena(uwb_controlee_capabilities_frame);
    if (message_arena != submessage_arena) {
      uwb_controlee_capabilities_frame = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, uwb_controlee_capabilities_frame, submessage_arena);
    }
    set_has_uwb_controlee_capabilities_frame();
    Message_.uwb_controlee_capabilities_frame_ = uwb_controlee_capabilities_frame;
  }
  // @@protoc_insertion_point(field_set_allocated:nearby.presence.V1Frame.uwb_controlee_capabilities_frame)
}
void V1Frame::set_allocated_uwb_connection_info(::nearby::presence::UwbConnectionInfo* uwb_connection_info) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_Message();
  if (uwb_connection_info) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::nearby::presence::UwbConnectionInfo>::GetOwningArena(uwb_connection_info);
    if (message_arena != submessage_arena) {
      uwb_connection_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, uwb_connection_info, submessage_arena);
    }
    set_has_uwb_connection_info();
    Message_.uwb_connection_info_ = uwb_connection_info;
  }
  // @@protoc_insertion_point(field_set_allocated:nearby.presence.V1Frame.uwb_connection_info)
}
void V1Frame::set_allocated_authentication_frame(::nearby::presence::PresenceAuthenticationFrame* authentication_frame) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_Message();
  if (authentication_frame) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::nearby::presence::PresenceAuthenticationFrame>::GetOwningArena(authentication_frame);
    if (message_arena != submessage_arena) {
      authentication_frame = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, authentication_frame, submessage_arena);
    }
    set_has_authentication_frame();
    Message_.authentication_frame_ = authentication_frame;
  }
  // @@protoc_insertion_point(field_set_allocated:nearby.presence.V1Frame.authentication_frame)
}
V1Frame::V1Frame(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:nearby.presence.V1Frame)
}
V1Frame::V1Frame(const V1Frame& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  clear_has_Message();
  switch (from.Message_case()) {
    case kControlFrame: {
      _internal_mutable_control_frame()->::nearby::presence::ControlFrame::MergeFrom(from._internal_control_frame());
      break;
    }
    case kDeviceIdentityFrame: {
      _internal_mutable_device_identity_frame()->::nearby::presence::DeviceIdentityFrame::MergeFrom(from._internal_device_identity_frame());
      break;
    }
    case kConnectionInitFrame: {
      _internal_mutable_connection_init_frame()->::nearby::presence::ConnectionInitFrame::MergeFrom(from._internal_connection_init_frame());
      break;
    }
    case kUwbControleeCapabilitiesFrame: {
      _internal_mutable_uwb_controlee_capabilities_frame()->::nearby::presence::UwbControleeCapabilities::MergeFrom(from._internal_uwb_controlee_capabilities_frame());
      break;
    }
    case kUwbConnectionInfo: {
      _internal_mutable_uwb_connection_info()->::nearby::presence::UwbConnectionInfo::MergeFrom(from._internal_uwb_connection_info());
      break;
    }
    case kAuthenticationFrame: {
      _internal_mutable_authentication_frame()->::nearby::presence::PresenceAuthenticationFrame::MergeFrom(from._internal_authentication_frame());
      break;
    }
    case MESSAGE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:nearby.presence.V1Frame)
}

inline void V1Frame::SharedCtor() {
clear_has_Message();
}

V1Frame::~V1Frame() {
  // @@protoc_insertion_point(destructor:nearby.presence.V1Frame)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void V1Frame::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_Message()) {
    clear_Message();
  }
}

void V1Frame::ArenaDtor(void* object) {
  V1Frame* _this = reinterpret_cast< V1Frame* >(object);
  (void)_this;
}
void V1Frame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void V1Frame::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void V1Frame::clear_Message() {
// @@protoc_insertion_point(one_of_clear_start:nearby.presence.V1Frame)
  switch (Message_case()) {
    case kControlFrame: {
      if (GetArenaForAllocation() == nullptr) {
        delete Message_.control_frame_;
      }
      break;
    }
    case kDeviceIdentityFrame: {
      if (GetArenaForAllocation() == nullptr) {
        delete Message_.device_identity_frame_;
      }
      break;
    }
    case kConnectionInitFrame: {
      if (GetArenaForAllocation() == nullptr) {
        delete Message_.connection_init_frame_;
      }
      break;
    }
    case kUwbControleeCapabilitiesFrame: {
      if (GetArenaForAllocation() == nullptr) {
        delete Message_.uwb_controlee_capabilities_frame_;
      }
      break;
    }
    case kUwbConnectionInfo: {
      if (GetArenaForAllocation() == nullptr) {
        delete Message_.uwb_connection_info_;
      }
      break;
    }
    case kAuthenticationFrame: {
      if (GetArenaForAllocation() == nullptr) {
        delete Message_.authentication_frame_;
      }
      break;
    }
    case MESSAGE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = MESSAGE_NOT_SET;
}


void V1Frame::Clear() {
// @@protoc_insertion_point(message_clear_start:nearby.presence.V1Frame)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_Message();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* V1Frame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .nearby.presence.ControlFrame control_frame = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_control_frame(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .nearby.presence.DeviceIdentityFrame device_identity_frame = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_device_identity_frame(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .nearby.presence.ConnectionInitFrame connection_init_frame = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_connection_init_frame(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .nearby.presence.UwbControleeCapabilities uwb_controlee_capabilities_frame = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_uwb_controlee_capabilities_frame(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .nearby.presence.UwbConnectionInfo uwb_connection_info = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_uwb_connection_info(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .nearby.presence.PresenceAuthenticationFrame authentication_frame = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_authentication_frame(), 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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* V1Frame::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:nearby.presence.V1Frame)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (Message_case()) {
    case kControlFrame: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          1, _Internal::control_frame(this), target, stream);
      break;
    }
    case kDeviceIdentityFrame: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          2, _Internal::device_identity_frame(this), target, stream);
      break;
    }
    case kConnectionInitFrame: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          3, _Internal::connection_init_frame(this), target, stream);
      break;
    }
    case kUwbControleeCapabilitiesFrame: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          4, _Internal::uwb_controlee_capabilities_frame(this), target, stream);
      break;
    }
    case kUwbConnectionInfo: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          5, _Internal::uwb_connection_info(this), target, stream);
      break;
    }
    case kAuthenticationFrame: {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          6, _Internal::authentication_frame(this), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:nearby.presence.V1Frame)
  return target;
}

size_t V1Frame::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:nearby.presence.V1Frame)
  size_t total_size = 0;

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

  switch (Message_case()) {
    // .nearby.presence.ControlFrame control_frame = 1;
    case kControlFrame: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *Message_.control_frame_);
      break;
    }
    // .nearby.presence.DeviceIdentityFrame device_identity_frame = 2;
    case kDeviceIdentityFrame: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *Message_.device_identity_frame_);
      break;
    }
    // .nearby.presence.ConnectionInitFrame connection_init_frame = 3;
    case kConnectionInitFrame: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *Message_.connection_init_frame_);
      break;
    }
    // .nearby.presence.UwbControleeCapabilities uwb_controlee_capabilities_frame = 4;
    case kUwbControleeCapabilitiesFrame: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *Message_.uwb_controlee_capabilities_frame_);
      break;
    }
    // .nearby.presence.UwbConnectionInfo uwb_connection_info = 5;
    case kUwbConnectionInfo: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *Message_.uwb_connection_info_);
      break;
    }
    // .nearby.presence.PresenceAuthenticationFrame authentication_frame = 6;
    case kAuthenticationFrame: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *Message_.authentication_frame_);
      break;
    }
    case MESSAGE_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData V1Frame::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    V1Frame::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*V1Frame::GetClassData() const { return &_class_data_; }

void V1Frame::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<V1Frame *>(to)->MergeFrom(
      static_cast<const V1Frame &>(from));
}


void V1Frame::MergeFrom(const V1Frame& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.presence.V1Frame)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.Message_case()) {
    case kControlFrame: {
      _internal_mutable_control_frame()->::nearby::presence::ControlFrame::MergeFrom(from._internal_control_frame());
      break;
    }
    case kDeviceIdentityFrame: {
      _internal_mutable_device_identity_frame()->::nearby::presence::DeviceIdentityFrame::MergeFrom(from._internal_device_identity_frame());
      break;
    }
    case kConnectionInitFrame: {
      _internal_mutable_connection_init_frame()->::nearby::presence::ConnectionInitFrame::MergeFrom(from._internal_connection_init_frame());
      break;
    }
    case kUwbControleeCapabilitiesFrame: {
      _internal_mutable_uwb_controlee_capabilities_frame()->::nearby::presence::UwbControleeCapabilities::MergeFrom(from._internal_uwb_controlee_capabilities_frame());
      break;
    }
    case kUwbConnectionInfo: {
      _internal_mutable_uwb_connection_info()->::nearby::presence::UwbConnectionInfo::MergeFrom(from._internal_uwb_connection_info());
      break;
    }
    case kAuthenticationFrame: {
      _internal_mutable_authentication_frame()->::nearby::presence::PresenceAuthenticationFrame::MergeFrom(from._internal_authentication_frame());
      break;
    }
    case MESSAGE_NOT_SET: {
      break;
    }
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void V1Frame::InternalSwap(V1Frame* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(Message_, other->Message_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata V1Frame::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_getter, &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once,
      file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto[1]);
}

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

class DeviceIdentityFrame::_Internal {
 public:
  using HasBits = decltype(std::declval<DeviceIdentityFrame>()._has_bits_);
  static void set_has_device_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_bluetooth_mac_address(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_device_image_url(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_model_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_device_model_name(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_device_type(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

DeviceIdentityFrame::DeviceIdentityFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  action_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:nearby.presence.DeviceIdentityFrame)
}
DeviceIdentityFrame::DeviceIdentityFrame(const DeviceIdentityFrame& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      action_(from.action_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  device_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    device_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_device_name()) {
    device_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_name(), 
      GetArenaForAllocation());
  }
  bluetooth_mac_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    bluetooth_mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_bluetooth_mac_address()) {
    bluetooth_mac_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_bluetooth_mac_address(), 
      GetArenaForAllocation());
  }
  device_image_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    device_image_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_device_image_url()) {
    device_image_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_image_url(), 
      GetArenaForAllocation());
  }
  model_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    model_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_model_id()) {
    model_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_model_id(), 
      GetArenaForAllocation());
  }
  device_model_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    device_model_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_device_model_name()) {
    device_model_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_model_name(), 
      GetArenaForAllocation());
  }
  device_type_ = from.device_type_;
  // @@protoc_insertion_point(copy_constructor:nearby.presence.DeviceIdentityFrame)
}

inline void DeviceIdentityFrame::SharedCtor() {
device_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  device_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
bluetooth_mac_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  bluetooth_mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
device_image_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  device_image_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
model_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  model_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
device_model_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  device_model_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
device_type_ = 0;
}

DeviceIdentityFrame::~DeviceIdentityFrame() {
  // @@protoc_insertion_point(destructor:nearby.presence.DeviceIdentityFrame)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void DeviceIdentityFrame::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  device_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  bluetooth_mac_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  device_image_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  model_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  device_model_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void DeviceIdentityFrame::ArenaDtor(void* object) {
  DeviceIdentityFrame* _this = reinterpret_cast< DeviceIdentityFrame* >(object);
  (void)_this;
}
void DeviceIdentityFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DeviceIdentityFrame::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void DeviceIdentityFrame::Clear() {
// @@protoc_insertion_point(message_clear_start:nearby.presence.DeviceIdentityFrame)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  action_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      device_name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      bluetooth_mac_address_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      device_image_url_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      model_id_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      device_model_name_.ClearNonDefaultToEmpty();
    }
  }
  device_type_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DeviceIdentityFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional string device_name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_device_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "nearby.presence.DeviceIdentityFrame.device_name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes bluetooth_mac_address = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_bluetooth_mac_address();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string device_image_url = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_device_image_url();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "nearby.presence.DeviceIdentityFrame.device_image_url");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string model_id = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_model_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "nearby.presence.DeviceIdentityFrame.model_id");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 action = 5 [packed = true];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_action(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 40) {
          _internal_add_action(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string device_model_name = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_device_model_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "nearby.presence.DeviceIdentityFrame.device_model_name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 device_type = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_device_type(&has_bits);
          device_type_ = ::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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        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* DeviceIdentityFrame::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:nearby.presence.DeviceIdentityFrame)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string device_name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_device_name().data(), static_cast<int>(this->_internal_device_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "nearby.presence.DeviceIdentityFrame.device_name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_device_name(), target);
  }

  // optional bytes bluetooth_mac_address = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteBytesMaybeAliased(
        2, this->_internal_bluetooth_mac_address(), target);
  }

  // optional string device_image_url = 3;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_device_image_url().data(), static_cast<int>(this->_internal_device_image_url().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "nearby.presence.DeviceIdentityFrame.device_image_url");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_device_image_url(), target);
  }

  // optional string model_id = 4;
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_model_id().data(), static_cast<int>(this->_internal_model_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "nearby.presence.DeviceIdentityFrame.model_id");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_model_id(), target);
  }

  // repeated int32 action = 5 [packed = true];
  {
    int byte_size = _action_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          5, _internal_action(), byte_size, target);
    }
  }

  // optional string device_model_name = 6;
  if (cached_has_bits & 0x00000010u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_device_model_name().data(), static_cast<int>(this->_internal_device_model_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "nearby.presence.DeviceIdentityFrame.device_model_name");
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_device_model_name(), target);
  }

  // optional int32 device_type = 7;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_device_type(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:nearby.presence.DeviceIdentityFrame)
  return target;
}

size_t DeviceIdentityFrame::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:nearby.presence.DeviceIdentityFrame)
  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 int32 action = 5 [packed = true];
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->action_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _action_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional string device_name = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_device_name());
    }

    // optional bytes bluetooth_mac_address = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_bluetooth_mac_address());
    }

    // optional string device_image_url = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_device_image_url());
    }

    // optional string model_id = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_model_id());
    }

    // optional string device_model_name = 6;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_device_model_name());
    }

    // optional int32 device_type = 7;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_device_type());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DeviceIdentityFrame::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    DeviceIdentityFrame::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DeviceIdentityFrame::GetClassData() const { return &_class_data_; }

void DeviceIdentityFrame::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<DeviceIdentityFrame *>(to)->MergeFrom(
      static_cast<const DeviceIdentityFrame &>(from));
}


void DeviceIdentityFrame::MergeFrom(const DeviceIdentityFrame& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.presence.DeviceIdentityFrame)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  action_.MergeFrom(from.action_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_device_name(from._internal_device_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_bluetooth_mac_address(from._internal_bluetooth_mac_address());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_device_image_url(from._internal_device_image_url());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_set_model_id(from._internal_model_id());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_set_device_model_name(from._internal_device_model_name());
    }
    if (cached_has_bits & 0x00000020u) {
      device_type_ = from.device_type_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void DeviceIdentityFrame::InternalSwap(DeviceIdentityFrame* 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]);
  action_.InternalSwap(&other->action_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &device_name_, lhs_arena,
      &other->device_name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &bluetooth_mac_address_, lhs_arena,
      &other->bluetooth_mac_address_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &device_image_url_, lhs_arena,
      &other->device_image_url_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &model_id_, lhs_arena,
      &other->model_id_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &device_model_name_, lhs_arena,
      &other->device_model_name_, rhs_arena
  );
  swap(device_type_, other->device_type_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DeviceIdentityFrame::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_getter, &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once,
      file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto[2]);
}

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

class ConnectionInitFrame::_Internal {
 public:
  using HasBits = decltype(std::declval<ConnectionInitFrame>()._has_bits_);
  static void set_has_identity_type(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_uwb_enable(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_device_unique_id(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

ConnectionInitFrame::ConnectionInitFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  actions_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:nearby.presence.ConnectionInitFrame)
}
ConnectionInitFrame::ConnectionInitFrame(const ConnectionInitFrame& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      actions_(from.actions_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&identity_type_, &from.identity_type_,
    static_cast<size_t>(reinterpret_cast<char*>(&device_unique_id_) -
    reinterpret_cast<char*>(&identity_type_)) + sizeof(device_unique_id_));
  // @@protoc_insertion_point(copy_constructor:nearby.presence.ConnectionInitFrame)
}

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

ConnectionInitFrame::~ConnectionInitFrame() {
  // @@protoc_insertion_point(destructor:nearby.presence.ConnectionInitFrame)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ConnectionInitFrame::ArenaDtor(void* object) {
  ConnectionInitFrame* _this = reinterpret_cast< ConnectionInitFrame* >(object);
  (void)_this;
}
void ConnectionInitFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ConnectionInitFrame::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void ConnectionInitFrame::Clear() {
// @@protoc_insertion_point(message_clear_start:nearby.presence.ConnectionInitFrame)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  actions_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    ::memset(&identity_type_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&device_unique_id_) -
        reinterpret_cast<char*>(&identity_type_)) + sizeof(device_unique_id_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ConnectionInitFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated int32 actions = 1 [packed = true];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_actions(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 8) {
          _internal_add_actions(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 identity_type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_identity_type(&has_bits);
          identity_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool uwb_enable = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_uwb_enable(&has_bits);
          uwb_enable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 device_unique_id = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_device_unique_id(&has_bits);
          device_unique_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        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* ConnectionInitFrame::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:nearby.presence.ConnectionInitFrame)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int32 actions = 1 [packed = true];
  {
    int byte_size = _actions_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          1, _internal_actions(), byte_size, target);
    }
  }

  cached_has_bits = _has_bits_[0];
  // optional int32 identity_type = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_identity_type(), target);
  }

  // optional bool uwb_enable = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_uwb_enable(), target);
  }

  // optional int64 device_unique_id = 4;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_device_unique_id(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:nearby.presence.ConnectionInitFrame)
  return target;
}

size_t ConnectionInitFrame::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:nearby.presence.ConnectionInitFrame)
  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 int32 actions = 1 [packed = true];
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->actions_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _actions_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional int32 identity_type = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_identity_type());
    }

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

    // optional int64 device_unique_id = 4;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_device_unique_id());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ConnectionInitFrame::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    ConnectionInitFrame::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ConnectionInitFrame::GetClassData() const { return &_class_data_; }

void ConnectionInitFrame::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ConnectionInitFrame *>(to)->MergeFrom(
      static_cast<const ConnectionInitFrame &>(from));
}


void ConnectionInitFrame::MergeFrom(const ConnectionInitFrame& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.presence.ConnectionInitFrame)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  actions_.MergeFrom(from.actions_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      identity_type_ = from.identity_type_;
    }
    if (cached_has_bits & 0x00000002u) {
      uwb_enable_ = from.uwb_enable_;
    }
    if (cached_has_bits & 0x00000004u) {
      device_unique_id_ = from.device_unique_id_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata ConnectionInitFrame::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_getter, &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once,
      file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto[3]);
}

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

class UwbControleeCapabilities::_Internal {
 public:
  using HasBits = decltype(std::declval<UwbControleeCapabilities>()._has_bits_);
  static void set_has_controlee_address(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_min_ranging_interval_ms(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_sub_session_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_sub_session_key(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_ranging_disabled(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_device_unique_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_is_distance_supported(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_is_azimuth_supported(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_is_elevation_supported(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_min_slot_duration_ms(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_is_ranging_interval_reconfigure_supported(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_chip_count(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
};

UwbControleeCapabilities::UwbControleeCapabilities(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  supported_config_ids_(arena),
  supported_channels_(arena),
  supported_ntf_configs_(arena),
  supported_slot_durations_(arena),
  supported_ranging_update_rates_(arena),
  multi_chip_info_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:nearby.presence.UwbControleeCapabilities)
}
UwbControleeCapabilities::UwbControleeCapabilities(const UwbControleeCapabilities& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      supported_config_ids_(from.supported_config_ids_),
      supported_channels_(from.supported_channels_),
      supported_ntf_configs_(from.supported_ntf_configs_),
      supported_slot_durations_(from.supported_slot_durations_),
      supported_ranging_update_rates_(from.supported_ranging_update_rates_),
      multi_chip_info_(from.multi_chip_info_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  controlee_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    controlee_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_controlee_address()) {
    controlee_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_controlee_address(), 
      GetArenaForAllocation());
  }
  sub_session_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    sub_session_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_sub_session_id()) {
    sub_session_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sub_session_id(), 
      GetArenaForAllocation());
  }
  sub_session_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    sub_session_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_sub_session_key()) {
    sub_session_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sub_session_key(), 
      GetArenaForAllocation());
  }
  ::memcpy(&device_unique_id_, &from.device_unique_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&min_slot_duration_ms_) -
    reinterpret_cast<char*>(&device_unique_id_)) + sizeof(min_slot_duration_ms_));
  // @@protoc_insertion_point(copy_constructor:nearby.presence.UwbControleeCapabilities)
}

inline void UwbControleeCapabilities::SharedCtor() {
controlee_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  controlee_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
sub_session_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  sub_session_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
sub_session_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  sub_session_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&device_unique_id_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&is_ranging_interval_reconfigure_supported_) -
    reinterpret_cast<char*>(&device_unique_id_)) + sizeof(is_ranging_interval_reconfigure_supported_));
chip_count_ = 1;
is_distance_supported_ = true;
is_azimuth_supported_ = true;
min_slot_duration_ms_ = 2;
}

UwbControleeCapabilities::~UwbControleeCapabilities() {
  // @@protoc_insertion_point(destructor:nearby.presence.UwbControleeCapabilities)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void UwbControleeCapabilities::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  controlee_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  sub_session_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  sub_session_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void UwbControleeCapabilities::ArenaDtor(void* object) {
  UwbControleeCapabilities* _this = reinterpret_cast< UwbControleeCapabilities* >(object);
  (void)_this;
}
void UwbControleeCapabilities::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void UwbControleeCapabilities::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void UwbControleeCapabilities::Clear() {
// @@protoc_insertion_point(message_clear_start:nearby.presence.UwbControleeCapabilities)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  supported_config_ids_.Clear();
  supported_channels_.Clear();
  supported_ntf_configs_.Clear();
  supported_slot_durations_.Clear();
  supported_ranging_update_rates_.Clear();
  multi_chip_info_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      controlee_address_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      sub_session_id_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      sub_session_key_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x000000f8u) {
    ::memset(&device_unique_id_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&is_ranging_interval_reconfigure_supported_) -
        reinterpret_cast<char*>(&device_unique_id_)) + sizeof(is_ranging_interval_reconfigure_supported_));
  }
  if (cached_has_bits & 0x00000f00u) {
    chip_count_ = 1;
    is_distance_supported_ = true;
    is_azimuth_supported_ = true;
    min_slot_duration_ms_ = 2;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* UwbControleeCapabilities::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bytes controlee_address = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_controlee_address();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 supported_config_ids = 2 [packed = true];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_supported_config_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 16) {
          _internal_add_supported_config_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 supported_channels = 3 [packed = true];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_supported_channels(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 24) {
          _internal_add_supported_channels(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 min_ranging_interval_ms = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_min_ranging_interval_ms(&has_bits);
          min_ranging_interval_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes sub_session_id = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_sub_session_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes sub_session_key = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_sub_session_key();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool ranging_disabled = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_ranging_disabled(&has_bits);
          ranging_disabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 device_unique_id = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_device_unique_id(&has_bits);
          device_unique_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool is_distance_supported = 9 [default = true];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_is_distance_supported(&has_bits);
          is_distance_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool is_azimuth_supported = 10 [default = true];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_is_azimuth_supported(&has_bits);
          is_azimuth_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool is_elevation_supported = 11 [default = false];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_is_elevation_supported(&has_bits);
          is_elevation_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float min_slot_duration_ms = 12 [default = 2];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 101)) {
          _Internal::set_has_min_slot_duration_ms(&has_bits);
          min_slot_duration_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 supported_ntf_configs = 13 [packed = true];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_supported_ntf_configs(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 104) {
          _internal_add_supported_ntf_configs(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool is_ranging_interval_reconfigure_supported = 14 [default = false];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
          _Internal::set_has_is_ranging_interval_reconfigure_supported(&has_bits);
          is_ranging_interval_reconfigure_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 supported_slot_durations = 15 [packed = true];
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_supported_slot_durations(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 120) {
          _internal_add_supported_slot_durations(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 supported_ranging_update_rates = 16 [packed = true];
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_supported_ranging_update_rates(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 128) {
          _internal_add_supported_ranging_update_rates(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 chip_count = 17 [default = 1];
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
          _Internal::set_has_chip_count(&has_bits);
          chip_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .nearby.presence.UwbMultiChipInfo multi_chip_info = 18;
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_multi_chip_info(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<146>(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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        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* UwbControleeCapabilities::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:nearby.presence.UwbControleeCapabilities)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional bytes controlee_address = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteBytesMaybeAliased(
        1, this->_internal_controlee_address(), target);
  }

  // repeated int32 supported_config_ids = 2 [packed = true];
  {
    int byte_size = _supported_config_ids_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          2, _internal_supported_config_ids(), byte_size, target);
    }
  }

  // repeated int32 supported_channels = 3 [packed = true];
  {
    int byte_size = _supported_channels_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          3, _internal_supported_channels(), byte_size, target);
    }
  }

  // optional int32 min_ranging_interval_ms = 4;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_min_ranging_interval_ms(), target);
  }

  // optional bytes sub_session_id = 5;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteBytesMaybeAliased(
        5, this->_internal_sub_session_id(), target);
  }

  // optional bytes sub_session_key = 6;
  if (cached_has_bits & 0x00000004u) {
    target = stream->WriteBytesMaybeAliased(
        6, this->_internal_sub_session_key(), target);
  }

  // optional bool ranging_disabled = 7;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_ranging_disabled(), target);
  }

  // optional int64 device_unique_id = 8;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->_internal_device_unique_id(), target);
  }

  // optional bool is_distance_supported = 9 [default = true];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_is_distance_supported(), target);
  }

  // optional bool is_azimuth_supported = 10 [default = true];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_is_azimuth_supported(), target);
  }

  // optional bool is_elevation_supported = 11 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_is_elevation_supported(), target);
  }

  // optional float min_slot_duration_ms = 12 [default = 2];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(12, this->_internal_min_slot_duration_ms(), target);
  }

  // repeated int32 supported_ntf_configs = 13 [packed = true];
  {
    int byte_size = _supported_ntf_configs_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          13, _internal_supported_ntf_configs(), byte_size, target);
    }
  }

  // optional bool is_ranging_interval_reconfigure_supported = 14 [default = false];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(14, this->_internal_is_ranging_interval_reconfigure_supported(), target);
  }

  // repeated int32 supported_slot_durations = 15 [packed = true];
  {
    int byte_size = _supported_slot_durations_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          15, _internal_supported_slot_durations(), byte_size, target);
    }
  }

  // repeated int32 supported_ranging_update_rates = 16 [packed = true];
  {
    int byte_size = _supported_ranging_update_rates_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          16, _internal_supported_ranging_update_rates(), byte_size, target);
    }
  }

  // optional int32 chip_count = 17 [default = 1];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(17, this->_internal_chip_count(), target);
  }

  // repeated .nearby.presence.UwbMultiChipInfo multi_chip_info = 18;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_multi_chip_info_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(18, this->_internal_multi_chip_info(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:nearby.presence.UwbControleeCapabilities)
  return target;
}

size_t UwbControleeCapabilities::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:nearby.presence.UwbControleeCapabilities)
  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 int32 supported_config_ids = 2 [packed = true];
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->supported_config_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _supported_config_ids_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated int32 supported_channels = 3 [packed = true];
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->supported_channels_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _supported_channels_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated int32 supported_ntf_configs = 13 [packed = true];
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->supported_ntf_configs_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _supported_ntf_configs_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated int32 supported_slot_durations = 15 [packed = true];
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->supported_slot_durations_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _supported_slot_durations_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated int32 supported_ranging_update_rates = 16 [packed = true];
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->supported_ranging_update_rates_);
    if (data_size > 0) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _supported_ranging_update_rates_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated .nearby.presence.UwbMultiChipInfo multi_chip_info = 18;
  total_size += 2UL * this->_internal_multi_chip_info_size();
  for (const auto& msg : this->multi_chip_info_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional bytes controlee_address = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_controlee_address());
    }

    // optional bytes sub_session_id = 5;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_sub_session_id());
    }

    // optional bytes sub_session_key = 6;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_sub_session_key());
    }

    // optional int64 device_unique_id = 8;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_device_unique_id());
    }

    // optional int32 min_ranging_interval_ms = 4;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_min_ranging_interval_ms());
    }

    // optional bool ranging_disabled = 7;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 1;
    }

    // optional bool is_elevation_supported = 11 [default = false];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 1;
    }

    // optional bool is_ranging_interval_reconfigure_supported = 14 [default = false];
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 + 1;
    }

  }
  if (cached_has_bits & 0x00000f00u) {
    // optional int32 chip_count = 17 [default = 1];
    if (cached_has_bits & 0x00000100u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_chip_count());
    }

    // optional bool is_distance_supported = 9 [default = true];
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 + 1;
    }

    // optional bool is_azimuth_supported = 10 [default = true];
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 + 1;
    }

    // optional float min_slot_duration_ms = 12 [default = 2];
    if (cached_has_bits & 0x00000800u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UwbControleeCapabilities::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    UwbControleeCapabilities::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UwbControleeCapabilities::GetClassData() const { return &_class_data_; }

void UwbControleeCapabilities::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<UwbControleeCapabilities *>(to)->MergeFrom(
      static_cast<const UwbControleeCapabilities &>(from));
}


void UwbControleeCapabilities::MergeFrom(const UwbControleeCapabilities& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.presence.UwbControleeCapabilities)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  supported_config_ids_.MergeFrom(from.supported_config_ids_);
  supported_channels_.MergeFrom(from.supported_channels_);
  supported_ntf_configs_.MergeFrom(from.supported_ntf_configs_);
  supported_slot_durations_.MergeFrom(from.supported_slot_durations_);
  supported_ranging_update_rates_.MergeFrom(from.supported_ranging_update_rates_);
  multi_chip_info_.MergeFrom(from.multi_chip_info_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_controlee_address(from._internal_controlee_address());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_sub_session_id(from._internal_sub_session_id());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_sub_session_key(from._internal_sub_session_key());
    }
    if (cached_has_bits & 0x00000008u) {
      device_unique_id_ = from.device_unique_id_;
    }
    if (cached_has_bits & 0x00000010u) {
      min_ranging_interval_ms_ = from.min_ranging_interval_ms_;
    }
    if (cached_has_bits & 0x00000020u) {
      ranging_disabled_ = from.ranging_disabled_;
    }
    if (cached_has_bits & 0x00000040u) {
      is_elevation_supported_ = from.is_elevation_supported_;
    }
    if (cached_has_bits & 0x00000080u) {
      is_ranging_interval_reconfigure_supported_ = from.is_ranging_interval_reconfigure_supported_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000f00u) {
    if (cached_has_bits & 0x00000100u) {
      chip_count_ = from.chip_count_;
    }
    if (cached_has_bits & 0x00000200u) {
      is_distance_supported_ = from.is_distance_supported_;
    }
    if (cached_has_bits & 0x00000400u) {
      is_azimuth_supported_ = from.is_azimuth_supported_;
    }
    if (cached_has_bits & 0x00000800u) {
      min_slot_duration_ms_ = from.min_slot_duration_ms_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void UwbControleeCapabilities::InternalSwap(UwbControleeCapabilities* 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]);
  supported_config_ids_.InternalSwap(&other->supported_config_ids_);
  supported_channels_.InternalSwap(&other->supported_channels_);
  supported_ntf_configs_.InternalSwap(&other->supported_ntf_configs_);
  supported_slot_durations_.InternalSwap(&other->supported_slot_durations_);
  supported_ranging_update_rates_.InternalSwap(&other->supported_ranging_update_rates_);
  multi_chip_info_.InternalSwap(&other->multi_chip_info_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &controlee_address_, lhs_arena,
      &other->controlee_address_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &sub_session_id_, lhs_arena,
      &other->sub_session_id_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &sub_session_key_, lhs_arena,
      &other->sub_session_key_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(UwbControleeCapabilities, is_ranging_interval_reconfigure_supported_)
      + sizeof(UwbControleeCapabilities::is_ranging_interval_reconfigure_supported_)
      - PROTOBUF_FIELD_OFFSET(UwbControleeCapabilities, device_unique_id_)>(
          reinterpret_cast<char*>(&device_unique_id_),
          reinterpret_cast<char*>(&other->device_unique_id_));
  swap(chip_count_, other->chip_count_);
  swap(is_distance_supported_, other->is_distance_supported_);
  swap(is_azimuth_supported_, other->is_azimuth_supported_);
  swap(min_slot_duration_ms_, other->min_slot_duration_ms_);
}

::PROTOBUF_NAMESPACE_ID::Metadata UwbControleeCapabilities::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_getter, &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once,
      file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto[4]);
}

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

class UwbMultiChipInfo::_Internal {
 public:
  using HasBits = decltype(std::declval<UwbMultiChipInfo>()._has_bits_);
  static void set_has_controlee_address(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_chip_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

UwbMultiChipInfo::UwbMultiChipInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:nearby.presence.UwbMultiChipInfo)
}
UwbMultiChipInfo::UwbMultiChipInfo(const UwbMultiChipInfo& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  controlee_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    controlee_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_controlee_address()) {
    controlee_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_controlee_address(), 
      GetArenaForAllocation());
  }
  chip_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    chip_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_chip_id()) {
    chip_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_chip_id(), 
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:nearby.presence.UwbMultiChipInfo)
}

inline void UwbMultiChipInfo::SharedCtor() {
controlee_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  controlee_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
chip_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  chip_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

UwbMultiChipInfo::~UwbMultiChipInfo() {
  // @@protoc_insertion_point(destructor:nearby.presence.UwbMultiChipInfo)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void UwbMultiChipInfo::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  controlee_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  chip_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void UwbMultiChipInfo::ArenaDtor(void* object) {
  UwbMultiChipInfo* _this = reinterpret_cast< UwbMultiChipInfo* >(object);
  (void)_this;
}
void UwbMultiChipInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void UwbMultiChipInfo::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void UwbMultiChipInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:nearby.presence.UwbMultiChipInfo)
  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 & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      controlee_address_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      chip_id_.ClearNonDefaultToEmpty();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* UwbMultiChipInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bytes controlee_address = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_controlee_address();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string chip_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_chip_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "nearby.presence.UwbMultiChipInfo.chip_id");
          #endif  // !NDEBUG
          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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        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* UwbMultiChipInfo::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:nearby.presence.UwbMultiChipInfo)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional bytes controlee_address = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteBytesMaybeAliased(
        1, this->_internal_controlee_address(), target);
  }

  // optional string chip_id = 2;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_chip_id().data(), static_cast<int>(this->_internal_chip_id().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "nearby.presence.UwbMultiChipInfo.chip_id");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_chip_id(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:nearby.presence.UwbMultiChipInfo)
  return target;
}

size_t UwbMultiChipInfo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:nearby.presence.UwbMultiChipInfo)
  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 & 0x00000003u) {
    // optional bytes controlee_address = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_controlee_address());
    }

    // optional string chip_id = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_chip_id());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UwbMultiChipInfo::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    UwbMultiChipInfo::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UwbMultiChipInfo::GetClassData() const { return &_class_data_; }

void UwbMultiChipInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<UwbMultiChipInfo *>(to)->MergeFrom(
      static_cast<const UwbMultiChipInfo &>(from));
}


void UwbMultiChipInfo::MergeFrom(const UwbMultiChipInfo& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.presence.UwbMultiChipInfo)
  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 & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_controlee_address(from._internal_controlee_address());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_chip_id(from._internal_chip_id());
    }
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void UwbMultiChipInfo::InternalSwap(UwbMultiChipInfo* 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(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &controlee_address_, lhs_arena,
      &other->controlee_address_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &chip_id_, lhs_arena,
      &other->chip_id_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata UwbMultiChipInfo::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_getter, &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once,
      file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto[5]);
}

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

class UwbConnectionInfo::_Internal {
 public:
  using HasBits = decltype(std::declval<UwbConnectionInfo>()._has_bits_);
  static void set_has_controller_address(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_channel(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_preamble_index(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_config_id(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_ranging_interval_ms(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_session_id(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_vendor_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_static_sts_iv(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_session_key(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_ranging_disabled(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
};

UwbConnectionInfo::UwbConnectionInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:nearby.presence.UwbConnectionInfo)
}
UwbConnectionInfo::UwbConnectionInfo(const UwbConnectionInfo& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  controller_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    controller_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_controller_address()) {
    controller_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_controller_address(), 
      GetArenaForAllocation());
  }
  vendor_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    vendor_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_vendor_id()) {
    vendor_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_vendor_id(), 
      GetArenaForAllocation());
  }
  static_sts_iv_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    static_sts_iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_static_sts_iv()) {
    static_sts_iv_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_static_sts_iv(), 
      GetArenaForAllocation());
  }
  session_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    session_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_session_key()) {
    session_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_session_key(), 
      GetArenaForAllocation());
  }
  ::memcpy(&channel_, &from.channel_,
    static_cast<size_t>(reinterpret_cast<char*>(&ranging_disabled_) -
    reinterpret_cast<char*>(&channel_)) + sizeof(ranging_disabled_));
  // @@protoc_insertion_point(copy_constructor:nearby.presence.UwbConnectionInfo)
}

inline void UwbConnectionInfo::SharedCtor() {
controller_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  controller_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
vendor_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  vendor_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
static_sts_iv_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  static_sts_iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
session_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  session_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&channel_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&ranging_disabled_) -
    reinterpret_cast<char*>(&channel_)) + sizeof(ranging_disabled_));
}

UwbConnectionInfo::~UwbConnectionInfo() {
  // @@protoc_insertion_point(destructor:nearby.presence.UwbConnectionInfo)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void UwbConnectionInfo::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  controller_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  vendor_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  static_sts_iv_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  session_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void UwbConnectionInfo::ArenaDtor(void* object) {
  UwbConnectionInfo* _this = reinterpret_cast< UwbConnectionInfo* >(object);
  (void)_this;
}
void UwbConnectionInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void UwbConnectionInfo::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void UwbConnectionInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:nearby.presence.UwbConnectionInfo)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      controller_address_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      vendor_id_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      static_sts_iv_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      session_key_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x000000f0u) {
    ::memset(&channel_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&ranging_interval_ms_) -
        reinterpret_cast<char*>(&channel_)) + sizeof(ranging_interval_ms_));
  }
  if (cached_has_bits & 0x00000300u) {
    ::memset(&session_id_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&ranging_disabled_) -
        reinterpret_cast<char*>(&session_id_)) + sizeof(ranging_disabled_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* UwbConnectionInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bytes controller_address = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_controller_address();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 channel = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_channel(&has_bits);
          channel_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 preamble_index = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_preamble_index(&has_bits);
          preamble_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 config_id = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_config_id(&has_bits);
          config_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 ranging_interval_ms = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_ranging_interval_ms(&has_bits);
          ranging_interval_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 session_id = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_session_id(&has_bits);
          session_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes vendor_id = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          auto str = _internal_mutable_vendor_id();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes static_sts_iv = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_static_sts_iv();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes session_key = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          auto str = _internal_mutable_session_key();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool ranging_disabled = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_ranging_disabled(&has_bits);
          ranging_disabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        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* UwbConnectionInfo::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:nearby.presence.UwbConnectionInfo)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional bytes controller_address = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteBytesMaybeAliased(
        1, this->_internal_controller_address(), target);
  }

  // optional int32 channel = 2;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_channel(), target);
  }

  // optional int32 preamble_index = 3;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_preamble_index(), target);
  }

  // optional int32 config_id = 4;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_config_id(), target);
  }

  // optional int32 ranging_interval_ms = 5;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_ranging_interval_ms(), target);
  }

  // optional int32 session_id = 6;
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_session_id(), target);
  }

  // optional bytes vendor_id = 7;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteBytesMaybeAliased(
        7, this->_internal_vendor_id(), target);
  }

  // optional bytes static_sts_iv = 8;
  if (cached_has_bits & 0x00000004u) {
    target = stream->WriteBytesMaybeAliased(
        8, this->_internal_static_sts_iv(), target);
  }

  // optional bytes session_key = 9;
  if (cached_has_bits & 0x00000008u) {
    target = stream->WriteBytesMaybeAliased(
        9, this->_internal_session_key(), target);
  }

  // optional bool ranging_disabled = 10;
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_ranging_disabled(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:nearby.presence.UwbConnectionInfo)
  return target;
}

size_t UwbConnectionInfo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:nearby.presence.UwbConnectionInfo)
  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 & 0x000000ffu) {
    // optional bytes controller_address = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_controller_address());
    }

    // optional bytes vendor_id = 7;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_vendor_id());
    }

    // optional bytes static_sts_iv = 8;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_static_sts_iv());
    }

    // optional bytes session_key = 9;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_session_key());
    }

    // optional int32 channel = 2;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_channel());
    }

    // optional int32 preamble_index = 3;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_preamble_index());
    }

    // optional int32 config_id = 4;
    if (cached_has_bits & 0x00000040u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_config_id());
    }

    // optional int32 ranging_interval_ms = 5;
    if (cached_has_bits & 0x00000080u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_ranging_interval_ms());
    }

  }
  if (cached_has_bits & 0x00000300u) {
    // optional int32 session_id = 6;
    if (cached_has_bits & 0x00000100u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_session_id());
    }

    // optional bool ranging_disabled = 10;
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 + 1;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UwbConnectionInfo::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    UwbConnectionInfo::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UwbConnectionInfo::GetClassData() const { return &_class_data_; }

void UwbConnectionInfo::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<UwbConnectionInfo *>(to)->MergeFrom(
      static_cast<const UwbConnectionInfo &>(from));
}


void UwbConnectionInfo::MergeFrom(const UwbConnectionInfo& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.presence.UwbConnectionInfo)
  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 & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_controller_address(from._internal_controller_address());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_vendor_id(from._internal_vendor_id());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_static_sts_iv(from._internal_static_sts_iv());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_set_session_key(from._internal_session_key());
    }
    if (cached_has_bits & 0x00000010u) {
      channel_ = from.channel_;
    }
    if (cached_has_bits & 0x00000020u) {
      preamble_index_ = from.preamble_index_;
    }
    if (cached_has_bits & 0x00000040u) {
      config_id_ = from.config_id_;
    }
    if (cached_has_bits & 0x00000080u) {
      ranging_interval_ms_ = from.ranging_interval_ms_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000300u) {
    if (cached_has_bits & 0x00000100u) {
      session_id_ = from.session_id_;
    }
    if (cached_has_bits & 0x00000200u) {
      ranging_disabled_ = from.ranging_disabled_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void UwbConnectionInfo::InternalSwap(UwbConnectionInfo* 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(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &controller_address_, lhs_arena,
      &other->controller_address_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &vendor_id_, lhs_arena,
      &other->vendor_id_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &static_sts_iv_, lhs_arena,
      &other->static_sts_iv_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &session_key_, lhs_arena,
      &other->session_key_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(UwbConnectionInfo, ranging_disabled_)
      + sizeof(UwbConnectionInfo::ranging_disabled_)
      - PROTOBUF_FIELD_OFFSET(UwbConnectionInfo, channel_)>(
          reinterpret_cast<char*>(&channel_),
          reinterpret_cast<char*>(&other->channel_));
}

::PROTOBUF_NAMESPACE_ID::Metadata UwbConnectionInfo::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_getter, &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once,
      file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto[6]);
}

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

class ControlFrame::_Internal {
 public:
  using HasBits = decltype(std::declval<ControlFrame>()._has_bits_);
  static void set_has_type(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

ControlFrame::ControlFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:nearby.presence.ControlFrame)
}
ControlFrame::ControlFrame(const ControlFrame& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  type_ = from.type_;
  // @@protoc_insertion_point(copy_constructor:nearby.presence.ControlFrame)
}

inline void ControlFrame::SharedCtor() {
type_ = 0;
}

ControlFrame::~ControlFrame() {
  // @@protoc_insertion_point(destructor:nearby.presence.ControlFrame)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ControlFrame::ArenaDtor(void* object) {
  ControlFrame* _this = reinterpret_cast< ControlFrame* >(object);
  (void)_this;
}
void ControlFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ControlFrame::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void ControlFrame::Clear() {
// @@protoc_insertion_point(message_clear_start:nearby.presence.ControlFrame)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  type_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ControlFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .nearby.presence.ControlFrame.ControlType type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::nearby::presence::ControlFrame_ControlType_IsValid(val))) {
            _internal_set_type(static_cast<::nearby::presence::ControlFrame_ControlType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } 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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        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* ControlFrame::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:nearby.presence.ControlFrame)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .nearby.presence.ControlFrame.ControlType type = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_type(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:nearby.presence.ControlFrame)
  return target;
}

size_t ControlFrame::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:nearby.presence.ControlFrame)
  size_t total_size = 0;

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

  // optional .nearby.presence.ControlFrame.ControlType type = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ControlFrame::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    ControlFrame::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ControlFrame::GetClassData() const { return &_class_data_; }

void ControlFrame::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ControlFrame *>(to)->MergeFrom(
      static_cast<const ControlFrame &>(from));
}


void ControlFrame::MergeFrom(const ControlFrame& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.presence.ControlFrame)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_type()) {
    _internal_set_type(from._internal_type());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ControlFrame::InternalSwap(ControlFrame* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(type_, other->type_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ControlFrame::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_getter, &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once,
      file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto[7]);
}

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

class PresenceAuthenticationFrame::_Internal {
 public:
  using HasBits = decltype(std::declval<PresenceAuthenticationFrame>()._has_bits_);
  static void set_has_version(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_private_key_signature(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_shared_credential_id_hash(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_credential_id_hash(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

PresenceAuthenticationFrame::PresenceAuthenticationFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:nearby.presence.PresenceAuthenticationFrame)
}
PresenceAuthenticationFrame::PresenceAuthenticationFrame(const PresenceAuthenticationFrame& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  private_key_signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    private_key_signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_private_key_signature()) {
    private_key_signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_private_key_signature(), 
      GetArenaForAllocation());
  }
  shared_credential_id_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    shared_credential_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_shared_credential_id_hash()) {
    shared_credential_id_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_shared_credential_id_hash(), 
      GetArenaForAllocation());
  }
  credential_id_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    credential_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_credential_id_hash()) {
    credential_id_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_credential_id_hash(), 
      GetArenaForAllocation());
  }
  version_ = from.version_;
  // @@protoc_insertion_point(copy_constructor:nearby.presence.PresenceAuthenticationFrame)
}

inline void PresenceAuthenticationFrame::SharedCtor() {
private_key_signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  private_key_signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
shared_credential_id_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  shared_credential_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
credential_id_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  credential_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
version_ = 0;
}

PresenceAuthenticationFrame::~PresenceAuthenticationFrame() {
  // @@protoc_insertion_point(destructor:nearby.presence.PresenceAuthenticationFrame)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void PresenceAuthenticationFrame::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  private_key_signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  shared_credential_id_hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  credential_id_hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void PresenceAuthenticationFrame::ArenaDtor(void* object) {
  PresenceAuthenticationFrame* _this = reinterpret_cast< PresenceAuthenticationFrame* >(object);
  (void)_this;
}
void PresenceAuthenticationFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PresenceAuthenticationFrame::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void PresenceAuthenticationFrame::Clear() {
// @@protoc_insertion_point(message_clear_start:nearby.presence.PresenceAuthenticationFrame)
  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 & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      private_key_signature_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      shared_credential_id_hash_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      credential_id_hash_.ClearNonDefaultToEmpty();
    }
  }
  version_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PresenceAuthenticationFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 version = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_version(&has_bits);
          version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes private_key_signature = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_private_key_signature();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes shared_credential_id_hash = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_shared_credential_id_hash();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes credential_id_hash = 4 [deprecated = true];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_credential_id_hash();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        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* PresenceAuthenticationFrame::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:nearby.presence.PresenceAuthenticationFrame)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 version = 1;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_version(), target);
  }

  // optional bytes private_key_signature = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteBytesMaybeAliased(
        2, this->_internal_private_key_signature(), target);
  }

  // optional bytes shared_credential_id_hash = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteBytesMaybeAliased(
        3, this->_internal_shared_credential_id_hash(), target);
  }

  // optional bytes credential_id_hash = 4 [deprecated = true];
  if (cached_has_bits & 0x00000004u) {
    target = stream->WriteBytesMaybeAliased(
        4, this->_internal_credential_id_hash(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:nearby.presence.PresenceAuthenticationFrame)
  return target;
}

size_t PresenceAuthenticationFrame::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:nearby.presence.PresenceAuthenticationFrame)
  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 & 0x0000000fu) {
    // optional bytes private_key_signature = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_private_key_signature());
    }

    // optional bytes shared_credential_id_hash = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_shared_credential_id_hash());
    }

    // optional bytes credential_id_hash = 4 [deprecated = true];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_credential_id_hash());
    }

    // optional int32 version = 1;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_version());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PresenceAuthenticationFrame::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    PresenceAuthenticationFrame::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PresenceAuthenticationFrame::GetClassData() const { return &_class_data_; }

void PresenceAuthenticationFrame::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<PresenceAuthenticationFrame *>(to)->MergeFrom(
      static_cast<const PresenceAuthenticationFrame &>(from));
}


void PresenceAuthenticationFrame::MergeFrom(const PresenceAuthenticationFrame& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.presence.PresenceAuthenticationFrame)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_private_key_signature(from._internal_private_key_signature());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_shared_credential_id_hash(from._internal_shared_credential_id_hash());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_credential_id_hash(from._internal_credential_id_hash());
    }
    if (cached_has_bits & 0x00000008u) {
      version_ = from.version_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void PresenceAuthenticationFrame::InternalSwap(PresenceAuthenticationFrame* 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(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &private_key_signature_, lhs_arena,
      &other->private_key_signature_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &shared_credential_id_hash_, lhs_arena,
      &other->shared_credential_id_hash_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &credential_id_hash_, lhs_arena,
      &other->credential_id_hash_, rhs_arena
  );
  swap(version_, other->version_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PresenceAuthenticationFrame::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_getter, &descriptor_table_presence_2fproto_2fpresence_5fframe_2eproto_once,
      file_level_metadata_presence_2fproto_2fpresence_5fframe_2eproto[8]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace presence
}  // namespace nearby
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::nearby::presence::PresenceFrame* Arena::CreateMaybeMessage< ::nearby::presence::PresenceFrame >(Arena* arena) {
  return Arena::CreateMessageInternal< ::nearby::presence::PresenceFrame >(arena);
}
template<> PROTOBUF_NOINLINE ::nearby::presence::V1Frame* Arena::CreateMaybeMessage< ::nearby::presence::V1Frame >(Arena* arena) {
  return Arena::CreateMessageInternal< ::nearby::presence::V1Frame >(arena);
}
template<> PROTOBUF_NOINLINE ::nearby::presence::DeviceIdentityFrame* Arena::CreateMaybeMessage< ::nearby::presence::DeviceIdentityFrame >(Arena* arena) {
  return Arena::CreateMessageInternal< ::nearby::presence::DeviceIdentityFrame >(arena);
}
template<> PROTOBUF_NOINLINE ::nearby::presence::ConnectionInitFrame* Arena::CreateMaybeMessage< ::nearby::presence::ConnectionInitFrame >(Arena* arena) {
  return Arena::CreateMessageInternal< ::nearby::presence::ConnectionInitFrame >(arena);
}
template<> PROTOBUF_NOINLINE ::nearby::presence::UwbControleeCapabilities* Arena::CreateMaybeMessage< ::nearby::presence::UwbControleeCapabilities >(Arena* arena) {
  return Arena::CreateMessageInternal< ::nearby::presence::UwbControleeCapabilities >(arena);
}
template<> PROTOBUF_NOINLINE ::nearby::presence::UwbMultiChipInfo* Arena::CreateMaybeMessage< ::nearby::presence::UwbMultiChipInfo >(Arena* arena) {
  return Arena::CreateMessageInternal< ::nearby::presence::UwbMultiChipInfo >(arena);
}
template<> PROTOBUF_NOINLINE ::nearby::presence::UwbConnectionInfo* Arena::CreateMaybeMessage< ::nearby::presence::UwbConnectionInfo >(Arena* arena) {
  return Arena::CreateMessageInternal< ::nearby::presence::UwbConnectionInfo >(arena);
}
template<> PROTOBUF_NOINLINE ::nearby::presence::ControlFrame* Arena::CreateMaybeMessage< ::nearby::presence::ControlFrame >(Arena* arena) {
  return Arena::CreateMessageInternal< ::nearby::presence::ControlFrame >(arena);
}
template<> PROTOBUF_NOINLINE ::nearby::presence::PresenceAuthenticationFrame* Arena::CreateMaybeMessage< ::nearby::presence::PresenceAuthenticationFrame >(Arena* arena) {
  return Arena::CreateMessageInternal< ::nearby::presence::PresenceAuthenticationFrame >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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