diff --git a/compiled_proto/internal/proto/credential.pb.cc b/compiled_proto/internal/proto/credential.pb.cc new file mode 100644 index 00000000..bad303e4 --- /dev/null +++ b/compiled_proto/internal/proto/credential.pb.cc @@ -0,0 +1,1339 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: internal/proto/credential.proto + +#include "internal/proto/credential.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace nearby { +namespace internal { +constexpr PrivateCredential_ConsumedSaltsEntry_DoNotUse::PrivateCredential_ConsumedSaltsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} +struct PrivateCredential_ConsumedSaltsEntry_DoNotUseDefaultTypeInternal { + constexpr PrivateCredential_ConsumedSaltsEntry_DoNotUseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PrivateCredential_ConsumedSaltsEntry_DoNotUseDefaultTypeInternal() {} + union { + PrivateCredential_ConsumedSaltsEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PrivateCredential_ConsumedSaltsEntry_DoNotUseDefaultTypeInternal _PrivateCredential_ConsumedSaltsEntry_DoNotUse_default_instance_; +constexpr PrivateCredential::PrivateCredential( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : consumed_salts_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) + , secret_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , authenticity_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , verification_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , metadata_encryption_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_metadata_(nullptr) + , start_time_millis_(uint64_t{0u}) + , end_time_millis_(uint64_t{0u}) + , identity_type_(0) +{} +struct PrivateCredentialDefaultTypeInternal { + constexpr PrivateCredentialDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PrivateCredentialDefaultTypeInternal() {} + union { + PrivateCredential _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PrivateCredentialDefaultTypeInternal _PrivateCredential_default_instance_; +constexpr PublicCredential::PublicCredential( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : secret_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , authenticity_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , verification_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , encrypted_metadata_bytes_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , metadata_encryption_key_tag_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , start_time_millis_(uint64_t{0u}) + , end_time_millis_(uint64_t{0u}) + , identity_type_(0) +{} +struct PublicCredentialDefaultTypeInternal { + constexpr PublicCredentialDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PublicCredentialDefaultTypeInternal() {} + union { + PublicCredential _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PublicCredentialDefaultTypeInternal _PublicCredential_default_instance_; +} // namespace internal +} // namespace nearby +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_internal_2fproto_2fcredential_2eproto[3]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_internal_2fproto_2fcredential_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_internal_2fproto_2fcredential_2eproto = nullptr; + +const uint32_t TableStruct_internal_2fproto_2fcredential_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential_ConsumedSaltsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential_ConsumedSaltsEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential_ConsumedSaltsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential_ConsumedSaltsEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, _has_bits_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, identity_type_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, secret_id_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, authenticity_key_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, verification_key_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, start_time_millis_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, end_time_millis_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, consumed_salts_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, metadata_encryption_key_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PrivateCredential, device_metadata_), + 7, + 0, + 1, + 2, + 5, + 6, + ~0u, + 3, + 4, + PROTOBUF_FIELD_OFFSET(::nearby::internal::PublicCredential, _has_bits_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PublicCredential, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::nearby::internal::PublicCredential, identity_type_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PublicCredential, secret_id_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PublicCredential, authenticity_key_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PublicCredential, verification_key_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PublicCredential, start_time_millis_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PublicCredential, end_time_millis_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PublicCredential, encrypted_metadata_bytes_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::PublicCredential, metadata_encryption_key_tag_), + 7, + 0, + 1, + 2, + 5, + 6, + 3, + 4, +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 8, -1, sizeof(::nearby::internal::PrivateCredential_ConsumedSaltsEntry_DoNotUse)}, + { 10, 25, -1, sizeof(::nearby::internal::PrivateCredential)}, + { 34, 48, -1, sizeof(::nearby::internal::PublicCredential)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::nearby::internal::_PrivateCredential_ConsumedSaltsEntry_DoNotUse_default_instance_), + reinterpret_cast(&::nearby::internal::_PrivateCredential_default_instance_), + reinterpret_cast(&::nearby::internal::_PublicCredential_default_instance_), +}; + +const char descriptor_table_protodef_internal_2fproto_2fcredential_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\037internal/proto/credential.proto\022\017nearb" + "y.internal\032$internal/proto/device_metada" + "ta.proto\"\360\004\n\021PrivateCredential\0229\n\ridenti" + "ty_type\030\001 \001(\0162\035.nearby.internal.Identity" + "TypeH\000\210\001\001\022\026\n\tsecret_id\030\002 \001(\014H\001\210\001\001\022\035\n\020aut" + "henticity_key\030\003 \001(\014H\002\210\001\001\022\035\n\020verification" + "_key\030\004 \001(\014H\003\210\001\001\022\036\n\021start_time_millis\030\005 \001" + "(\004H\004\210\001\001\022\034\n\017end_time_millis\030\006 \001(\004H\005\210\001\001\022M\n" + "\016consumed_salts\030\007 \003(\01325.nearby.internal." + "PrivateCredential.ConsumedSaltsEntry\022$\n\027" + "metadata_encryption_key\030\010 \001(\014H\006\210\001\001\022=\n\017de" + "vice_metadata\030\t \001(\0132\037.nearby.internal.De" + "viceMetadataH\007\210\001\001\0324\n\022ConsumedSaltsEntry\022" + "\013\n\003key\030\001 \001(\r\022\r\n\005value\030\002 \001(\010:\0028\001B\020\n\016_iden" + "tity_typeB\014\n\n_secret_idB\023\n\021_authenticity" + "_keyB\023\n\021_verification_keyB\024\n\022_start_time" + "_millisB\022\n\020_end_time_millisB\032\n\030_metadata" + "_encryption_keyB\022\n\020_device_metadata\"\343\003\n\020" + "PublicCredential\0229\n\ridentity_type\030\001 \001(\0162" + "\035.nearby.internal.IdentityTypeH\000\210\001\001\022\026\n\ts" + "ecret_id\030\002 \001(\014H\001\210\001\001\022\035\n\020authenticity_key\030" + "\003 \001(\014H\002\210\001\001\022\035\n\020verification_key\030\004 \001(\014H\003\210\001" + "\001\022\036\n\021start_time_millis\030\005 \001(\004H\004\210\001\001\022\034\n\017end" + "_time_millis\030\006 \001(\004H\005\210\001\001\022%\n\030encrypted_met" + "adata_bytes\030\007 \001(\014H\006\210\001\001\022(\n\033metadata_encry" + "ption_key_tag\030\010 \001(\014H\007\210\001\001B\020\n\016_identity_ty" + "peB\014\n\n_secret_idB\023\n\021_authenticity_keyB\023\n" + "\021_verification_keyB\024\n\022_start_time_millis" + "B\022\n\020_end_time_millisB\033\n\031_encrypted_metad" + "ata_bytesB\036\n\034_metadata_encryption_key_ta" + "g*\234\001\n\014IdentityType\022\035\n\031IDENTITY_TYPE_UNSP" + "ECIFIED\020\000\022\031\n\025IDENTITY_TYPE_PRIVATE\020\001\022\031\n\025" + "IDENTITY_TYPE_TRUSTED\020\002\022\030\n\024IDENTITY_TYPE" + "_PUBLIC\020\003\022\035\n\031IDENTITY_TYPE_PROVISIONED\020\004" + "B\034\n\032com.google.nearby.presenceb\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_internal_2fproto_2fcredential_2eproto_deps[1] = { + &::descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_internal_2fproto_2fcredential_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_internal_2fproto_2fcredential_2eproto = { + false, false, 1398, descriptor_table_protodef_internal_2fproto_2fcredential_2eproto, "internal/proto/credential.proto", + &descriptor_table_internal_2fproto_2fcredential_2eproto_once, descriptor_table_internal_2fproto_2fcredential_2eproto_deps, 1, 3, + schemas, file_default_instances, TableStruct_internal_2fproto_2fcredential_2eproto::offsets, + file_level_metadata_internal_2fproto_2fcredential_2eproto, file_level_enum_descriptors_internal_2fproto_2fcredential_2eproto, file_level_service_descriptors_internal_2fproto_2fcredential_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_internal_2fproto_2fcredential_2eproto_getter() { + return &descriptor_table_internal_2fproto_2fcredential_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_internal_2fproto_2fcredential_2eproto(&descriptor_table_internal_2fproto_2fcredential_2eproto); +namespace nearby { +namespace internal { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* IdentityType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_internal_2fproto_2fcredential_2eproto); + return file_level_enum_descriptors_internal_2fproto_2fcredential_2eproto[0]; +} +bool IdentityType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + + +// =================================================================== + +PrivateCredential_ConsumedSaltsEntry_DoNotUse::PrivateCredential_ConsumedSaltsEntry_DoNotUse() {} +PrivateCredential_ConsumedSaltsEntry_DoNotUse::PrivateCredential_ConsumedSaltsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void PrivateCredential_ConsumedSaltsEntry_DoNotUse::MergeFrom(const PrivateCredential_ConsumedSaltsEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata PrivateCredential_ConsumedSaltsEntry_DoNotUse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_internal_2fproto_2fcredential_2eproto_getter, &descriptor_table_internal_2fproto_2fcredential_2eproto_once, + file_level_metadata_internal_2fproto_2fcredential_2eproto[0]); +} + +// =================================================================== + +class PrivateCredential::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_identity_type(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_secret_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_authenticity_key(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_verification_key(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_start_time_millis(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_end_time_millis(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_metadata_encryption_key(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::nearby::internal::DeviceMetadata& device_metadata(const PrivateCredential* msg); + static void set_has_device_metadata(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } +}; + +const ::nearby::internal::DeviceMetadata& +PrivateCredential::_Internal::device_metadata(const PrivateCredential* msg) { + return *msg->device_metadata_; +} +void PrivateCredential::clear_device_metadata() { + if (device_metadata_ != nullptr) device_metadata_->Clear(); + _has_bits_[0] &= ~0x00000010u; +} +PrivateCredential::PrivateCredential(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + consumed_salts_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:nearby.internal.PrivateCredential) +} +PrivateCredential::PrivateCredential(const PrivateCredential& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + consumed_salts_.MergeFrom(from.consumed_salts_); + secret_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + secret_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_secret_id()) { + secret_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_secret_id(), + GetArenaForAllocation()); + } + authenticity_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + authenticity_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_authenticity_key()) { + authenticity_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_authenticity_key(), + GetArenaForAllocation()); + } + verification_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + verification_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_verification_key()) { + verification_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_verification_key(), + GetArenaForAllocation()); + } + metadata_encryption_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + metadata_encryption_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_metadata_encryption_key()) { + metadata_encryption_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_metadata_encryption_key(), + GetArenaForAllocation()); + } + if (from._internal_has_device_metadata()) { + device_metadata_ = new ::nearby::internal::DeviceMetadata(*from.device_metadata_); + } else { + device_metadata_ = nullptr; + } + ::memcpy(&start_time_millis_, &from.start_time_millis_, + static_cast(reinterpret_cast(&identity_type_) - + reinterpret_cast(&start_time_millis_)) + sizeof(identity_type_)); + // @@protoc_insertion_point(copy_constructor:nearby.internal.PrivateCredential) +} + +inline void PrivateCredential::SharedCtor() { +secret_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + secret_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +authenticity_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + authenticity_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +verification_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + verification_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +metadata_encryption_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + metadata_encryption_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&device_metadata_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&identity_type_) - + reinterpret_cast(&device_metadata_)) + sizeof(identity_type_)); +} + +PrivateCredential::~PrivateCredential() { + // @@protoc_insertion_point(destructor:nearby.internal.PrivateCredential) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void PrivateCredential::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + secret_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + authenticity_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + verification_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + metadata_encryption_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete device_metadata_; +} + +void PrivateCredential::ArenaDtor(void* object) { + PrivateCredential* _this = reinterpret_cast< PrivateCredential* >(object); + (void)_this; + _this->consumed_salts_. ~MapField(); +} +inline void PrivateCredential::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { + if (arena != nullptr) { + arena->OwnCustomDestructor(this, &PrivateCredential::ArenaDtor); + } +} +void PrivateCredential::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PrivateCredential::Clear() { +// @@protoc_insertion_point(message_clear_start:nearby.internal.PrivateCredential) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + consumed_salts_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + secret_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + authenticity_key_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + verification_key_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + metadata_encryption_key_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000010u) { + GOOGLE_DCHECK(device_metadata_ != nullptr); + device_metadata_->Clear(); + } + } + if (cached_has_bits & 0x000000e0u) { + ::memset(&start_time_millis_, 0, static_cast( + reinterpret_cast(&identity_type_) - + reinterpret_cast(&start_time_millis_)) + sizeof(identity_type_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* PrivateCredential::_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.internal.IdentityType identity_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_identity_type(static_cast<::nearby::internal::IdentityType>(val)); + } else + goto handle_unusual; + continue; + // optional bytes secret_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_secret_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes authenticity_key = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_authenticity_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes verification_key = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_verification_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional uint64 start_time_millis = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _Internal::set_has_start_time_millis(&has_bits); + start_time_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional uint64 end_time_millis = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_end_time_millis(&has_bits); + end_time_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // map consumed_salts = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&consumed_salts_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr)); + } else + goto handle_unusual; + continue; + // optional bytes metadata_encryption_key = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + auto str = _internal_mutable_metadata_encryption_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .nearby.internal.DeviceMetadata device_metadata = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr = ctx->ParseMessage(_internal_mutable_device_metadata(), 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* PrivateCredential::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:nearby.internal.PrivateCredential) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional .nearby.internal.IdentityType identity_type = 1; + if (_internal_has_identity_type()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_identity_type(), target); + } + + // optional bytes secret_id = 2; + if (_internal_has_secret_id()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_secret_id(), target); + } + + // optional bytes authenticity_key = 3; + if (_internal_has_authenticity_key()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_authenticity_key(), target); + } + + // optional bytes verification_key = 4; + if (_internal_has_verification_key()) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_verification_key(), target); + } + + // optional uint64 start_time_millis = 5; + if (_internal_has_start_time_millis()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(5, this->_internal_start_time_millis(), target); + } + + // optional uint64 end_time_millis = 6; + if (_internal_has_end_time_millis()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(6, this->_internal_end_time_millis(), target); + } + + // map consumed_salts = 7; + if (!this->_internal_consumed_salts().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >::const_pointer + ConstPtr; + typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< uint32_t, ConstPtr > SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField Less; + + if (stream->IsSerializationDeterministic() && + this->_internal_consumed_salts().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->_internal_consumed_salts().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >::const_iterator + it = this->_internal_consumed_salts().begin(); + it != this->_internal_consumed_salts().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = PrivateCredential_ConsumedSaltsEntry_DoNotUse::Funcs::InternalSerialize(7, items[static_cast(i)].second->first, items[static_cast(i)].second->second, target, stream); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >::const_iterator + it = this->_internal_consumed_salts().begin(); + it != this->_internal_consumed_salts().end(); ++it) { + target = PrivateCredential_ConsumedSaltsEntry_DoNotUse::Funcs::InternalSerialize(7, it->first, it->second, target, stream); + } + } + } + + // optional bytes metadata_encryption_key = 8; + if (_internal_has_metadata_encryption_key()) { + target = stream->WriteBytesMaybeAliased( + 8, this->_internal_metadata_encryption_key(), target); + } + + // optional .nearby.internal.DeviceMetadata device_metadata = 9; + if (_internal_has_device_metadata()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 9, _Internal::device_metadata(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.internal.PrivateCredential) + return target; +} + +size_t PrivateCredential::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:nearby.internal.PrivateCredential) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map consumed_salts = 7; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_consumed_salts_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >::const_iterator + it = this->_internal_consumed_salts().begin(); + it != this->_internal_consumed_salts().end(); ++it) { + total_size += PrivateCredential_ConsumedSaltsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional bytes secret_id = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_secret_id()); + } + + // optional bytes authenticity_key = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_authenticity_key()); + } + + // optional bytes verification_key = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_verification_key()); + } + + // optional bytes metadata_encryption_key = 8; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_metadata_encryption_key()); + } + + // optional .nearby.internal.DeviceMetadata device_metadata = 9; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *device_metadata_); + } + + // optional uint64 start_time_millis = 5; + if (cached_has_bits & 0x00000020u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_start_time_millis()); + } + + // optional uint64 end_time_millis = 6; + if (cached_has_bits & 0x00000040u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_end_time_millis()); + } + + // optional .nearby.internal.IdentityType identity_type = 1; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_identity_type()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PrivateCredential::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + PrivateCredential::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PrivateCredential::GetClassData() const { return &_class_data_; } + +void PrivateCredential::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void PrivateCredential::MergeFrom(const PrivateCredential& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:nearby.internal.PrivateCredential) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + consumed_salts_.MergeFrom(from.consumed_salts_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_secret_id(from._internal_secret_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_authenticity_key(from._internal_authenticity_key()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_verification_key(from._internal_verification_key()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_metadata_encryption_key(from._internal_metadata_encryption_key()); + } + if (cached_has_bits & 0x00000010u) { + _internal_mutable_device_metadata()->::nearby::internal::DeviceMetadata::MergeFrom(from._internal_device_metadata()); + } + if (cached_has_bits & 0x00000020u) { + start_time_millis_ = from.start_time_millis_; + } + if (cached_has_bits & 0x00000040u) { + end_time_millis_ = from.end_time_millis_; + } + if (cached_has_bits & 0x00000080u) { + identity_type_ = from.identity_type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void PrivateCredential::CopyFrom(const PrivateCredential& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:nearby.internal.PrivateCredential) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PrivateCredential::IsInitialized() const { + return true; +} + +void PrivateCredential::InternalSwap(PrivateCredential* 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]); + consumed_salts_.InternalSwap(&other->consumed_salts_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &secret_id_, lhs_arena, + &other->secret_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &authenticity_key_, lhs_arena, + &other->authenticity_key_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &verification_key_, lhs_arena, + &other->verification_key_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &metadata_encryption_key_, lhs_arena, + &other->metadata_encryption_key_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(PrivateCredential, identity_type_) + + sizeof(PrivateCredential::identity_type_) + - PROTOBUF_FIELD_OFFSET(PrivateCredential, device_metadata_)>( + reinterpret_cast(&device_metadata_), + reinterpret_cast(&other->device_metadata_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PrivateCredential::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_internal_2fproto_2fcredential_2eproto_getter, &descriptor_table_internal_2fproto_2fcredential_2eproto_once, + file_level_metadata_internal_2fproto_2fcredential_2eproto[1]); +} + +// =================================================================== + +class PublicCredential::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_identity_type(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_secret_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_authenticity_key(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_verification_key(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_start_time_millis(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_end_time_millis(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_encrypted_metadata_bytes(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_metadata_encryption_key_tag(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } +}; + +PublicCredential::PublicCredential(::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.internal.PublicCredential) +} +PublicCredential::PublicCredential(const PublicCredential& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + secret_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + secret_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_secret_id()) { + secret_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_secret_id(), + GetArenaForAllocation()); + } + authenticity_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + authenticity_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_authenticity_key()) { + authenticity_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_authenticity_key(), + GetArenaForAllocation()); + } + verification_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + verification_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_verification_key()) { + verification_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_verification_key(), + GetArenaForAllocation()); + } + encrypted_metadata_bytes_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + encrypted_metadata_bytes_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_encrypted_metadata_bytes()) { + encrypted_metadata_bytes_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_encrypted_metadata_bytes(), + GetArenaForAllocation()); + } + metadata_encryption_key_tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + metadata_encryption_key_tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_metadata_encryption_key_tag()) { + metadata_encryption_key_tag_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_metadata_encryption_key_tag(), + GetArenaForAllocation()); + } + ::memcpy(&start_time_millis_, &from.start_time_millis_, + static_cast(reinterpret_cast(&identity_type_) - + reinterpret_cast(&start_time_millis_)) + sizeof(identity_type_)); + // @@protoc_insertion_point(copy_constructor:nearby.internal.PublicCredential) +} + +inline void PublicCredential::SharedCtor() { +secret_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + secret_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +authenticity_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + authenticity_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +verification_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + verification_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +encrypted_metadata_bytes_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + encrypted_metadata_bytes_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +metadata_encryption_key_tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + metadata_encryption_key_tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&start_time_millis_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&identity_type_) - + reinterpret_cast(&start_time_millis_)) + sizeof(identity_type_)); +} + +PublicCredential::~PublicCredential() { + // @@protoc_insertion_point(destructor:nearby.internal.PublicCredential) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void PublicCredential::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + secret_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + authenticity_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + verification_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + encrypted_metadata_bytes_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + metadata_encryption_key_tag_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PublicCredential::ArenaDtor(void* object) { + PublicCredential* _this = reinterpret_cast< PublicCredential* >(object); + (void)_this; +} +void PublicCredential::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PublicCredential::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PublicCredential::Clear() { +// @@protoc_insertion_point(message_clear_start:nearby.internal.PublicCredential) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + secret_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + authenticity_key_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + verification_key_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + encrypted_metadata_bytes_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000010u) { + metadata_encryption_key_tag_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x000000e0u) { + ::memset(&start_time_millis_, 0, static_cast( + reinterpret_cast(&identity_type_) - + reinterpret_cast(&start_time_millis_)) + sizeof(identity_type_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* PublicCredential::_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.internal.IdentityType identity_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_identity_type(static_cast<::nearby::internal::IdentityType>(val)); + } else + goto handle_unusual; + continue; + // optional bytes secret_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_secret_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes authenticity_key = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_authenticity_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes verification_key = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_verification_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional uint64 start_time_millis = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _Internal::set_has_start_time_millis(&has_bits); + start_time_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional uint64 end_time_millis = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_end_time_millis(&has_bits); + end_time_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes encrypted_metadata_bytes = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + auto str = _internal_mutable_encrypted_metadata_bytes(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes metadata_encryption_key_tag = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + auto str = _internal_mutable_metadata_encryption_key_tag(); + 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* PublicCredential::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:nearby.internal.PublicCredential) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional .nearby.internal.IdentityType identity_type = 1; + if (_internal_has_identity_type()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_identity_type(), target); + } + + // optional bytes secret_id = 2; + if (_internal_has_secret_id()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_secret_id(), target); + } + + // optional bytes authenticity_key = 3; + if (_internal_has_authenticity_key()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_authenticity_key(), target); + } + + // optional bytes verification_key = 4; + if (_internal_has_verification_key()) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_verification_key(), target); + } + + // optional uint64 start_time_millis = 5; + if (_internal_has_start_time_millis()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(5, this->_internal_start_time_millis(), target); + } + + // optional uint64 end_time_millis = 6; + if (_internal_has_end_time_millis()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(6, this->_internal_end_time_millis(), target); + } + + // optional bytes encrypted_metadata_bytes = 7; + if (_internal_has_encrypted_metadata_bytes()) { + target = stream->WriteBytesMaybeAliased( + 7, this->_internal_encrypted_metadata_bytes(), target); + } + + // optional bytes metadata_encryption_key_tag = 8; + if (_internal_has_metadata_encryption_key_tag()) { + target = stream->WriteBytesMaybeAliased( + 8, this->_internal_metadata_encryption_key_tag(), 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.internal.PublicCredential) + return target; +} + +size_t PublicCredential::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:nearby.internal.PublicCredential) + 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 secret_id = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_secret_id()); + } + + // optional bytes authenticity_key = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_authenticity_key()); + } + + // optional bytes verification_key = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_verification_key()); + } + + // optional bytes encrypted_metadata_bytes = 7; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_encrypted_metadata_bytes()); + } + + // optional bytes metadata_encryption_key_tag = 8; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_metadata_encryption_key_tag()); + } + + // optional uint64 start_time_millis = 5; + if (cached_has_bits & 0x00000020u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_start_time_millis()); + } + + // optional uint64 end_time_millis = 6; + if (cached_has_bits & 0x00000040u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_end_time_millis()); + } + + // optional .nearby.internal.IdentityType identity_type = 1; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_identity_type()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PublicCredential::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + PublicCredential::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PublicCredential::GetClassData() const { return &_class_data_; } + +void PublicCredential::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void PublicCredential::MergeFrom(const PublicCredential& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:nearby.internal.PublicCredential) + 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_secret_id(from._internal_secret_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_authenticity_key(from._internal_authenticity_key()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_verification_key(from._internal_verification_key()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_encrypted_metadata_bytes(from._internal_encrypted_metadata_bytes()); + } + if (cached_has_bits & 0x00000010u) { + _internal_set_metadata_encryption_key_tag(from._internal_metadata_encryption_key_tag()); + } + if (cached_has_bits & 0x00000020u) { + start_time_millis_ = from.start_time_millis_; + } + if (cached_has_bits & 0x00000040u) { + end_time_millis_ = from.end_time_millis_; + } + if (cached_has_bits & 0x00000080u) { + identity_type_ = from.identity_type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void PublicCredential::CopyFrom(const PublicCredential& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:nearby.internal.PublicCredential) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PublicCredential::IsInitialized() const { + return true; +} + +void PublicCredential::InternalSwap(PublicCredential* 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(), + &secret_id_, lhs_arena, + &other->secret_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &authenticity_key_, lhs_arena, + &other->authenticity_key_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &verification_key_, lhs_arena, + &other->verification_key_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &encrypted_metadata_bytes_, lhs_arena, + &other->encrypted_metadata_bytes_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &metadata_encryption_key_tag_, lhs_arena, + &other->metadata_encryption_key_tag_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(PublicCredential, identity_type_) + + sizeof(PublicCredential::identity_type_) + - PROTOBUF_FIELD_OFFSET(PublicCredential, start_time_millis_)>( + reinterpret_cast(&start_time_millis_), + reinterpret_cast(&other->start_time_millis_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PublicCredential::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_internal_2fproto_2fcredential_2eproto_getter, &descriptor_table_internal_2fproto_2fcredential_2eproto_once, + file_level_metadata_internal_2fproto_2fcredential_2eproto[2]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace internal +} // namespace nearby +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::nearby::internal::PrivateCredential_ConsumedSaltsEntry_DoNotUse* Arena::CreateMaybeMessage< ::nearby::internal::PrivateCredential_ConsumedSaltsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::nearby::internal::PrivateCredential_ConsumedSaltsEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::nearby::internal::PrivateCredential* Arena::CreateMaybeMessage< ::nearby::internal::PrivateCredential >(Arena* arena) { + return Arena::CreateMessageInternal< ::nearby::internal::PrivateCredential >(arena); +} +template<> PROTOBUF_NOINLINE ::nearby::internal::PublicCredential* Arena::CreateMaybeMessage< ::nearby::internal::PublicCredential >(Arena* arena) { + return Arena::CreateMessageInternal< ::nearby::internal::PublicCredential >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/compiled_proto/internal/proto/credential.pb.h b/compiled_proto/internal/proto/credential.pb.h new file mode 100644 index 00000000..a13a981f --- /dev/null +++ b/compiled_proto/internal/proto/credential.pb.h @@ -0,0 +1,1668 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: internal/proto/credential.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_internal_2fproto_2fcredential_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_internal_2fproto_2fcredential_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3019001 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include +#include "internal/proto/device_metadata.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_internal_2fproto_2fcredential_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_internal_2fproto_2fcredential_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[3] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_internal_2fproto_2fcredential_2eproto; +namespace nearby { +namespace internal { +class PrivateCredential; +struct PrivateCredentialDefaultTypeInternal; +extern PrivateCredentialDefaultTypeInternal _PrivateCredential_default_instance_; +class PrivateCredential_ConsumedSaltsEntry_DoNotUse; +struct PrivateCredential_ConsumedSaltsEntry_DoNotUseDefaultTypeInternal; +extern PrivateCredential_ConsumedSaltsEntry_DoNotUseDefaultTypeInternal _PrivateCredential_ConsumedSaltsEntry_DoNotUse_default_instance_; +class PublicCredential; +struct PublicCredentialDefaultTypeInternal; +extern PublicCredentialDefaultTypeInternal _PublicCredential_default_instance_; +} // namespace internal +} // namespace nearby +PROTOBUF_NAMESPACE_OPEN +template<> ::nearby::internal::PrivateCredential* Arena::CreateMaybeMessage<::nearby::internal::PrivateCredential>(Arena*); +template<> ::nearby::internal::PrivateCredential_ConsumedSaltsEntry_DoNotUse* Arena::CreateMaybeMessage<::nearby::internal::PrivateCredential_ConsumedSaltsEntry_DoNotUse>(Arena*); +template<> ::nearby::internal::PublicCredential* Arena::CreateMaybeMessage<::nearby::internal::PublicCredential>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace nearby { +namespace internal { + +enum IdentityType : int { + IDENTITY_TYPE_UNSPECIFIED = 0, + IDENTITY_TYPE_PRIVATE = 1, + IDENTITY_TYPE_TRUSTED = 2, + IDENTITY_TYPE_PUBLIC = 3, + IDENTITY_TYPE_PROVISIONED = 4, + IdentityType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + IdentityType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool IdentityType_IsValid(int value); +constexpr IdentityType IdentityType_MIN = IDENTITY_TYPE_UNSPECIFIED; +constexpr IdentityType IdentityType_MAX = IDENTITY_TYPE_PROVISIONED; +constexpr int IdentityType_ARRAYSIZE = IdentityType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* IdentityType_descriptor(); +template +inline const std::string& IdentityType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function IdentityType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + IdentityType_descriptor(), enum_t_value); +} +inline bool IdentityType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, IdentityType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + IdentityType_descriptor(), name, value); +} +// =================================================================== + +class PrivateCredential_ConsumedSaltsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + PrivateCredential_ConsumedSaltsEntry_DoNotUse(); + explicit constexpr PrivateCredential_ConsumedSaltsEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit PrivateCredential_ConsumedSaltsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const PrivateCredential_ConsumedSaltsEntry_DoNotUse& other); + static const PrivateCredential_ConsumedSaltsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_PrivateCredential_ConsumedSaltsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; +}; + +// ------------------------------------------------------------------- + +class PrivateCredential final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:nearby.internal.PrivateCredential) */ { + public: + inline PrivateCredential() : PrivateCredential(nullptr) {} + ~PrivateCredential() override; + explicit constexpr PrivateCredential(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PrivateCredential(const PrivateCredential& from); + PrivateCredential(PrivateCredential&& from) noexcept + : PrivateCredential() { + *this = ::std::move(from); + } + + inline PrivateCredential& operator=(const PrivateCredential& from) { + CopyFrom(from); + return *this; + } + inline PrivateCredential& operator=(PrivateCredential&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PrivateCredential& default_instance() { + return *internal_default_instance(); + } + static inline const PrivateCredential* internal_default_instance() { + return reinterpret_cast( + &_PrivateCredential_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(PrivateCredential& a, PrivateCredential& b) { + a.Swap(&b); + } + inline void Swap(PrivateCredential* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PrivateCredential* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PrivateCredential* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PrivateCredential& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const PrivateCredential& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PrivateCredential* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "nearby.internal.PrivateCredential"; + } + protected: + explicit PrivateCredential(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kConsumedSaltsFieldNumber = 7, + kSecretIdFieldNumber = 2, + kAuthenticityKeyFieldNumber = 3, + kVerificationKeyFieldNumber = 4, + kMetadataEncryptionKeyFieldNumber = 8, + kDeviceMetadataFieldNumber = 9, + kStartTimeMillisFieldNumber = 5, + kEndTimeMillisFieldNumber = 6, + kIdentityTypeFieldNumber = 1, + }; + // map consumed_salts = 7; + int consumed_salts_size() const; + private: + int _internal_consumed_salts_size() const; + public: + void clear_consumed_salts(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >& + _internal_consumed_salts() const; + ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >* + _internal_mutable_consumed_salts(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >& + consumed_salts() const; + ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >* + mutable_consumed_salts(); + + // optional bytes secret_id = 2; + bool has_secret_id() const; + private: + bool _internal_has_secret_id() const; + public: + void clear_secret_id(); + const std::string& secret_id() const; + template + void set_secret_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_secret_id(); + PROTOBUF_NODISCARD std::string* release_secret_id(); + void set_allocated_secret_id(std::string* secret_id); + private: + const std::string& _internal_secret_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_secret_id(const std::string& value); + std::string* _internal_mutable_secret_id(); + public: + + // optional bytes authenticity_key = 3; + bool has_authenticity_key() const; + private: + bool _internal_has_authenticity_key() const; + public: + void clear_authenticity_key(); + const std::string& authenticity_key() const; + template + void set_authenticity_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_authenticity_key(); + PROTOBUF_NODISCARD std::string* release_authenticity_key(); + void set_allocated_authenticity_key(std::string* authenticity_key); + private: + const std::string& _internal_authenticity_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_authenticity_key(const std::string& value); + std::string* _internal_mutable_authenticity_key(); + public: + + // optional bytes verification_key = 4; + bool has_verification_key() const; + private: + bool _internal_has_verification_key() const; + public: + void clear_verification_key(); + const std::string& verification_key() const; + template + void set_verification_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_verification_key(); + PROTOBUF_NODISCARD std::string* release_verification_key(); + void set_allocated_verification_key(std::string* verification_key); + private: + const std::string& _internal_verification_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_verification_key(const std::string& value); + std::string* _internal_mutable_verification_key(); + public: + + // optional bytes metadata_encryption_key = 8; + bool has_metadata_encryption_key() const; + private: + bool _internal_has_metadata_encryption_key() const; + public: + void clear_metadata_encryption_key(); + const std::string& metadata_encryption_key() const; + template + void set_metadata_encryption_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_metadata_encryption_key(); + PROTOBUF_NODISCARD std::string* release_metadata_encryption_key(); + void set_allocated_metadata_encryption_key(std::string* metadata_encryption_key); + private: + const std::string& _internal_metadata_encryption_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_metadata_encryption_key(const std::string& value); + std::string* _internal_mutable_metadata_encryption_key(); + public: + + // optional .nearby.internal.DeviceMetadata device_metadata = 9; + bool has_device_metadata() const; + private: + bool _internal_has_device_metadata() const; + public: + void clear_device_metadata(); + const ::nearby::internal::DeviceMetadata& device_metadata() const; + PROTOBUF_NODISCARD ::nearby::internal::DeviceMetadata* release_device_metadata(); + ::nearby::internal::DeviceMetadata* mutable_device_metadata(); + void set_allocated_device_metadata(::nearby::internal::DeviceMetadata* device_metadata); + private: + const ::nearby::internal::DeviceMetadata& _internal_device_metadata() const; + ::nearby::internal::DeviceMetadata* _internal_mutable_device_metadata(); + public: + void unsafe_arena_set_allocated_device_metadata( + ::nearby::internal::DeviceMetadata* device_metadata); + ::nearby::internal::DeviceMetadata* unsafe_arena_release_device_metadata(); + + // optional uint64 start_time_millis = 5; + bool has_start_time_millis() const; + private: + bool _internal_has_start_time_millis() const; + public: + void clear_start_time_millis(); + uint64_t start_time_millis() const; + void set_start_time_millis(uint64_t value); + private: + uint64_t _internal_start_time_millis() const; + void _internal_set_start_time_millis(uint64_t value); + public: + + // optional uint64 end_time_millis = 6; + bool has_end_time_millis() const; + private: + bool _internal_has_end_time_millis() const; + public: + void clear_end_time_millis(); + uint64_t end_time_millis() const; + void set_end_time_millis(uint64_t value); + private: + uint64_t _internal_end_time_millis() const; + void _internal_set_end_time_millis(uint64_t value); + public: + + // optional .nearby.internal.IdentityType identity_type = 1; + bool has_identity_type() const; + private: + bool _internal_has_identity_type() const; + public: + void clear_identity_type(); + ::nearby::internal::IdentityType identity_type() const; + void set_identity_type(::nearby::internal::IdentityType value); + private: + ::nearby::internal::IdentityType _internal_identity_type() const; + void _internal_set_identity_type(::nearby::internal::IdentityType value); + public: + + // @@protoc_insertion_point(class_scope:nearby.internal.PrivateCredential) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + PrivateCredential_ConsumedSaltsEntry_DoNotUse, + uint32_t, bool, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL> consumed_salts_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr secret_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr authenticity_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verification_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr metadata_encryption_key_; + ::nearby::internal::DeviceMetadata* device_metadata_; + uint64_t start_time_millis_; + uint64_t end_time_millis_; + int identity_type_; + friend struct ::TableStruct_internal_2fproto_2fcredential_2eproto; +}; +// ------------------------------------------------------------------- + +class PublicCredential final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:nearby.internal.PublicCredential) */ { + public: + inline PublicCredential() : PublicCredential(nullptr) {} + ~PublicCredential() override; + explicit constexpr PublicCredential(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PublicCredential(const PublicCredential& from); + PublicCredential(PublicCredential&& from) noexcept + : PublicCredential() { + *this = ::std::move(from); + } + + inline PublicCredential& operator=(const PublicCredential& from) { + CopyFrom(from); + return *this; + } + inline PublicCredential& operator=(PublicCredential&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PublicCredential& default_instance() { + return *internal_default_instance(); + } + static inline const PublicCredential* internal_default_instance() { + return reinterpret_cast( + &_PublicCredential_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(PublicCredential& a, PublicCredential& b) { + a.Swap(&b); + } + inline void Swap(PublicCredential* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PublicCredential* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PublicCredential* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PublicCredential& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const PublicCredential& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PublicCredential* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "nearby.internal.PublicCredential"; + } + protected: + explicit PublicCredential(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSecretIdFieldNumber = 2, + kAuthenticityKeyFieldNumber = 3, + kVerificationKeyFieldNumber = 4, + kEncryptedMetadataBytesFieldNumber = 7, + kMetadataEncryptionKeyTagFieldNumber = 8, + kStartTimeMillisFieldNumber = 5, + kEndTimeMillisFieldNumber = 6, + kIdentityTypeFieldNumber = 1, + }; + // optional bytes secret_id = 2; + bool has_secret_id() const; + private: + bool _internal_has_secret_id() const; + public: + void clear_secret_id(); + const std::string& secret_id() const; + template + void set_secret_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_secret_id(); + PROTOBUF_NODISCARD std::string* release_secret_id(); + void set_allocated_secret_id(std::string* secret_id); + private: + const std::string& _internal_secret_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_secret_id(const std::string& value); + std::string* _internal_mutable_secret_id(); + public: + + // optional bytes authenticity_key = 3; + bool has_authenticity_key() const; + private: + bool _internal_has_authenticity_key() const; + public: + void clear_authenticity_key(); + const std::string& authenticity_key() const; + template + void set_authenticity_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_authenticity_key(); + PROTOBUF_NODISCARD std::string* release_authenticity_key(); + void set_allocated_authenticity_key(std::string* authenticity_key); + private: + const std::string& _internal_authenticity_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_authenticity_key(const std::string& value); + std::string* _internal_mutable_authenticity_key(); + public: + + // optional bytes verification_key = 4; + bool has_verification_key() const; + private: + bool _internal_has_verification_key() const; + public: + void clear_verification_key(); + const std::string& verification_key() const; + template + void set_verification_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_verification_key(); + PROTOBUF_NODISCARD std::string* release_verification_key(); + void set_allocated_verification_key(std::string* verification_key); + private: + const std::string& _internal_verification_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_verification_key(const std::string& value); + std::string* _internal_mutable_verification_key(); + public: + + // optional bytes encrypted_metadata_bytes = 7; + bool has_encrypted_metadata_bytes() const; + private: + bool _internal_has_encrypted_metadata_bytes() const; + public: + void clear_encrypted_metadata_bytes(); + const std::string& encrypted_metadata_bytes() const; + template + void set_encrypted_metadata_bytes(ArgT0&& arg0, ArgT... args); + std::string* mutable_encrypted_metadata_bytes(); + PROTOBUF_NODISCARD std::string* release_encrypted_metadata_bytes(); + void set_allocated_encrypted_metadata_bytes(std::string* encrypted_metadata_bytes); + private: + const std::string& _internal_encrypted_metadata_bytes() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encrypted_metadata_bytes(const std::string& value); + std::string* _internal_mutable_encrypted_metadata_bytes(); + public: + + // optional bytes metadata_encryption_key_tag = 8; + bool has_metadata_encryption_key_tag() const; + private: + bool _internal_has_metadata_encryption_key_tag() const; + public: + void clear_metadata_encryption_key_tag(); + const std::string& metadata_encryption_key_tag() const; + template + void set_metadata_encryption_key_tag(ArgT0&& arg0, ArgT... args); + std::string* mutable_metadata_encryption_key_tag(); + PROTOBUF_NODISCARD std::string* release_metadata_encryption_key_tag(); + void set_allocated_metadata_encryption_key_tag(std::string* metadata_encryption_key_tag); + private: + const std::string& _internal_metadata_encryption_key_tag() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_metadata_encryption_key_tag(const std::string& value); + std::string* _internal_mutable_metadata_encryption_key_tag(); + public: + + // optional uint64 start_time_millis = 5; + bool has_start_time_millis() const; + private: + bool _internal_has_start_time_millis() const; + public: + void clear_start_time_millis(); + uint64_t start_time_millis() const; + void set_start_time_millis(uint64_t value); + private: + uint64_t _internal_start_time_millis() const; + void _internal_set_start_time_millis(uint64_t value); + public: + + // optional uint64 end_time_millis = 6; + bool has_end_time_millis() const; + private: + bool _internal_has_end_time_millis() const; + public: + void clear_end_time_millis(); + uint64_t end_time_millis() const; + void set_end_time_millis(uint64_t value); + private: + uint64_t _internal_end_time_millis() const; + void _internal_set_end_time_millis(uint64_t value); + public: + + // optional .nearby.internal.IdentityType identity_type = 1; + bool has_identity_type() const; + private: + bool _internal_has_identity_type() const; + public: + void clear_identity_type(); + ::nearby::internal::IdentityType identity_type() const; + void set_identity_type(::nearby::internal::IdentityType value); + private: + ::nearby::internal::IdentityType _internal_identity_type() const; + void _internal_set_identity_type(::nearby::internal::IdentityType value); + public: + + // @@protoc_insertion_point(class_scope:nearby.internal.PublicCredential) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr secret_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr authenticity_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verification_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encrypted_metadata_bytes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr metadata_encryption_key_tag_; + uint64_t start_time_millis_; + uint64_t end_time_millis_; + int identity_type_; + friend struct ::TableStruct_internal_2fproto_2fcredential_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// PrivateCredential + +// optional .nearby.internal.IdentityType identity_type = 1; +inline bool PrivateCredential::_internal_has_identity_type() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool PrivateCredential::has_identity_type() const { + return _internal_has_identity_type(); +} +inline void PrivateCredential::clear_identity_type() { + identity_type_ = 0; + _has_bits_[0] &= ~0x00000080u; +} +inline ::nearby::internal::IdentityType PrivateCredential::_internal_identity_type() const { + return static_cast< ::nearby::internal::IdentityType >(identity_type_); +} +inline ::nearby::internal::IdentityType PrivateCredential::identity_type() const { + // @@protoc_insertion_point(field_get:nearby.internal.PrivateCredential.identity_type) + return _internal_identity_type(); +} +inline void PrivateCredential::_internal_set_identity_type(::nearby::internal::IdentityType value) { + _has_bits_[0] |= 0x00000080u; + identity_type_ = value; +} +inline void PrivateCredential::set_identity_type(::nearby::internal::IdentityType value) { + _internal_set_identity_type(value); + // @@protoc_insertion_point(field_set:nearby.internal.PrivateCredential.identity_type) +} + +// optional bytes secret_id = 2; +inline bool PrivateCredential::_internal_has_secret_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool PrivateCredential::has_secret_id() const { + return _internal_has_secret_id(); +} +inline void PrivateCredential::clear_secret_id() { + secret_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& PrivateCredential::secret_id() const { + // @@protoc_insertion_point(field_get:nearby.internal.PrivateCredential.secret_id) + return _internal_secret_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PrivateCredential::set_secret_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + secret_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.PrivateCredential.secret_id) +} +inline std::string* PrivateCredential::mutable_secret_id() { + std::string* _s = _internal_mutable_secret_id(); + // @@protoc_insertion_point(field_mutable:nearby.internal.PrivateCredential.secret_id) + return _s; +} +inline const std::string& PrivateCredential::_internal_secret_id() const { + return secret_id_.Get(); +} +inline void PrivateCredential::_internal_set_secret_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + secret_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PrivateCredential::_internal_mutable_secret_id() { + _has_bits_[0] |= 0x00000001u; + return secret_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PrivateCredential::release_secret_id() { + // @@protoc_insertion_point(field_release:nearby.internal.PrivateCredential.secret_id) + if (!_internal_has_secret_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = secret_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (secret_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + secret_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PrivateCredential::set_allocated_secret_id(std::string* secret_id) { + if (secret_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + secret_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), secret_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (secret_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + secret_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.PrivateCredential.secret_id) +} + +// optional bytes authenticity_key = 3; +inline bool PrivateCredential::_internal_has_authenticity_key() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool PrivateCredential::has_authenticity_key() const { + return _internal_has_authenticity_key(); +} +inline void PrivateCredential::clear_authenticity_key() { + authenticity_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& PrivateCredential::authenticity_key() const { + // @@protoc_insertion_point(field_get:nearby.internal.PrivateCredential.authenticity_key) + return _internal_authenticity_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PrivateCredential::set_authenticity_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + authenticity_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.PrivateCredential.authenticity_key) +} +inline std::string* PrivateCredential::mutable_authenticity_key() { + std::string* _s = _internal_mutable_authenticity_key(); + // @@protoc_insertion_point(field_mutable:nearby.internal.PrivateCredential.authenticity_key) + return _s; +} +inline const std::string& PrivateCredential::_internal_authenticity_key() const { + return authenticity_key_.Get(); +} +inline void PrivateCredential::_internal_set_authenticity_key(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + authenticity_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PrivateCredential::_internal_mutable_authenticity_key() { + _has_bits_[0] |= 0x00000002u; + return authenticity_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PrivateCredential::release_authenticity_key() { + // @@protoc_insertion_point(field_release:nearby.internal.PrivateCredential.authenticity_key) + if (!_internal_has_authenticity_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = authenticity_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (authenticity_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + authenticity_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PrivateCredential::set_allocated_authenticity_key(std::string* authenticity_key) { + if (authenticity_key != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + authenticity_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), authenticity_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (authenticity_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + authenticity_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.PrivateCredential.authenticity_key) +} + +// optional bytes verification_key = 4; +inline bool PrivateCredential::_internal_has_verification_key() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool PrivateCredential::has_verification_key() const { + return _internal_has_verification_key(); +} +inline void PrivateCredential::clear_verification_key() { + verification_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& PrivateCredential::verification_key() const { + // @@protoc_insertion_point(field_get:nearby.internal.PrivateCredential.verification_key) + return _internal_verification_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PrivateCredential::set_verification_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + verification_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.PrivateCredential.verification_key) +} +inline std::string* PrivateCredential::mutable_verification_key() { + std::string* _s = _internal_mutable_verification_key(); + // @@protoc_insertion_point(field_mutable:nearby.internal.PrivateCredential.verification_key) + return _s; +} +inline const std::string& PrivateCredential::_internal_verification_key() const { + return verification_key_.Get(); +} +inline void PrivateCredential::_internal_set_verification_key(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + verification_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PrivateCredential::_internal_mutable_verification_key() { + _has_bits_[0] |= 0x00000004u; + return verification_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PrivateCredential::release_verification_key() { + // @@protoc_insertion_point(field_release:nearby.internal.PrivateCredential.verification_key) + if (!_internal_has_verification_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = verification_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (verification_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + verification_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PrivateCredential::set_allocated_verification_key(std::string* verification_key) { + if (verification_key != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + verification_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), verification_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (verification_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + verification_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.PrivateCredential.verification_key) +} + +// optional uint64 start_time_millis = 5; +inline bool PrivateCredential::_internal_has_start_time_millis() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool PrivateCredential::has_start_time_millis() const { + return _internal_has_start_time_millis(); +} +inline void PrivateCredential::clear_start_time_millis() { + start_time_millis_ = uint64_t{0u}; + _has_bits_[0] &= ~0x00000020u; +} +inline uint64_t PrivateCredential::_internal_start_time_millis() const { + return start_time_millis_; +} +inline uint64_t PrivateCredential::start_time_millis() const { + // @@protoc_insertion_point(field_get:nearby.internal.PrivateCredential.start_time_millis) + return _internal_start_time_millis(); +} +inline void PrivateCredential::_internal_set_start_time_millis(uint64_t value) { + _has_bits_[0] |= 0x00000020u; + start_time_millis_ = value; +} +inline void PrivateCredential::set_start_time_millis(uint64_t value) { + _internal_set_start_time_millis(value); + // @@protoc_insertion_point(field_set:nearby.internal.PrivateCredential.start_time_millis) +} + +// optional uint64 end_time_millis = 6; +inline bool PrivateCredential::_internal_has_end_time_millis() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool PrivateCredential::has_end_time_millis() const { + return _internal_has_end_time_millis(); +} +inline void PrivateCredential::clear_end_time_millis() { + end_time_millis_ = uint64_t{0u}; + _has_bits_[0] &= ~0x00000040u; +} +inline uint64_t PrivateCredential::_internal_end_time_millis() const { + return end_time_millis_; +} +inline uint64_t PrivateCredential::end_time_millis() const { + // @@protoc_insertion_point(field_get:nearby.internal.PrivateCredential.end_time_millis) + return _internal_end_time_millis(); +} +inline void PrivateCredential::_internal_set_end_time_millis(uint64_t value) { + _has_bits_[0] |= 0x00000040u; + end_time_millis_ = value; +} +inline void PrivateCredential::set_end_time_millis(uint64_t value) { + _internal_set_end_time_millis(value); + // @@protoc_insertion_point(field_set:nearby.internal.PrivateCredential.end_time_millis) +} + +// map consumed_salts = 7; +inline int PrivateCredential::_internal_consumed_salts_size() const { + return consumed_salts_.size(); +} +inline int PrivateCredential::consumed_salts_size() const { + return _internal_consumed_salts_size(); +} +inline void PrivateCredential::clear_consumed_salts() { + consumed_salts_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >& +PrivateCredential::_internal_consumed_salts() const { + return consumed_salts_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >& +PrivateCredential::consumed_salts() const { + // @@protoc_insertion_point(field_map:nearby.internal.PrivateCredential.consumed_salts) + return _internal_consumed_salts(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >* +PrivateCredential::_internal_mutable_consumed_salts() { + return consumed_salts_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< uint32_t, bool >* +PrivateCredential::mutable_consumed_salts() { + // @@protoc_insertion_point(field_mutable_map:nearby.internal.PrivateCredential.consumed_salts) + return _internal_mutable_consumed_salts(); +} + +// optional bytes metadata_encryption_key = 8; +inline bool PrivateCredential::_internal_has_metadata_encryption_key() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool PrivateCredential::has_metadata_encryption_key() const { + return _internal_has_metadata_encryption_key(); +} +inline void PrivateCredential::clear_metadata_encryption_key() { + metadata_encryption_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& PrivateCredential::metadata_encryption_key() const { + // @@protoc_insertion_point(field_get:nearby.internal.PrivateCredential.metadata_encryption_key) + return _internal_metadata_encryption_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PrivateCredential::set_metadata_encryption_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + metadata_encryption_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.PrivateCredential.metadata_encryption_key) +} +inline std::string* PrivateCredential::mutable_metadata_encryption_key() { + std::string* _s = _internal_mutable_metadata_encryption_key(); + // @@protoc_insertion_point(field_mutable:nearby.internal.PrivateCredential.metadata_encryption_key) + return _s; +} +inline const std::string& PrivateCredential::_internal_metadata_encryption_key() const { + return metadata_encryption_key_.Get(); +} +inline void PrivateCredential::_internal_set_metadata_encryption_key(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + metadata_encryption_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PrivateCredential::_internal_mutable_metadata_encryption_key() { + _has_bits_[0] |= 0x00000008u; + return metadata_encryption_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PrivateCredential::release_metadata_encryption_key() { + // @@protoc_insertion_point(field_release:nearby.internal.PrivateCredential.metadata_encryption_key) + if (!_internal_has_metadata_encryption_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = metadata_encryption_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (metadata_encryption_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + metadata_encryption_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PrivateCredential::set_allocated_metadata_encryption_key(std::string* metadata_encryption_key) { + if (metadata_encryption_key != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + metadata_encryption_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), metadata_encryption_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (metadata_encryption_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + metadata_encryption_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.PrivateCredential.metadata_encryption_key) +} + +// optional .nearby.internal.DeviceMetadata device_metadata = 9; +inline bool PrivateCredential::_internal_has_device_metadata() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + PROTOBUF_ASSUME(!value || device_metadata_ != nullptr); + return value; +} +inline bool PrivateCredential::has_device_metadata() const { + return _internal_has_device_metadata(); +} +inline const ::nearby::internal::DeviceMetadata& PrivateCredential::_internal_device_metadata() const { + const ::nearby::internal::DeviceMetadata* p = device_metadata_; + return p != nullptr ? *p : reinterpret_cast( + ::nearby::internal::_DeviceMetadata_default_instance_); +} +inline const ::nearby::internal::DeviceMetadata& PrivateCredential::device_metadata() const { + // @@protoc_insertion_point(field_get:nearby.internal.PrivateCredential.device_metadata) + return _internal_device_metadata(); +} +inline void PrivateCredential::unsafe_arena_set_allocated_device_metadata( + ::nearby::internal::DeviceMetadata* device_metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(device_metadata_); + } + device_metadata_ = device_metadata; + if (device_metadata) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:nearby.internal.PrivateCredential.device_metadata) +} +inline ::nearby::internal::DeviceMetadata* PrivateCredential::release_device_metadata() { + _has_bits_[0] &= ~0x00000010u; + ::nearby::internal::DeviceMetadata* temp = device_metadata_; + device_metadata_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::nearby::internal::DeviceMetadata* PrivateCredential::unsafe_arena_release_device_metadata() { + // @@protoc_insertion_point(field_release:nearby.internal.PrivateCredential.device_metadata) + _has_bits_[0] &= ~0x00000010u; + ::nearby::internal::DeviceMetadata* temp = device_metadata_; + device_metadata_ = nullptr; + return temp; +} +inline ::nearby::internal::DeviceMetadata* PrivateCredential::_internal_mutable_device_metadata() { + _has_bits_[0] |= 0x00000010u; + if (device_metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::nearby::internal::DeviceMetadata>(GetArenaForAllocation()); + device_metadata_ = p; + } + return device_metadata_; +} +inline ::nearby::internal::DeviceMetadata* PrivateCredential::mutable_device_metadata() { + ::nearby::internal::DeviceMetadata* _msg = _internal_mutable_device_metadata(); + // @@protoc_insertion_point(field_mutable:nearby.internal.PrivateCredential.device_metadata) + return _msg; +} +inline void PrivateCredential::set_allocated_device_metadata(::nearby::internal::DeviceMetadata* device_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(device_metadata_); + } + if (device_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper< + ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(device_metadata)); + if (message_arena != submessage_arena) { + device_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, device_metadata, submessage_arena); + } + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + device_metadata_ = device_metadata; + // @@protoc_insertion_point(field_set_allocated:nearby.internal.PrivateCredential.device_metadata) +} + +// ------------------------------------------------------------------- + +// PublicCredential + +// optional .nearby.internal.IdentityType identity_type = 1; +inline bool PublicCredential::_internal_has_identity_type() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool PublicCredential::has_identity_type() const { + return _internal_has_identity_type(); +} +inline void PublicCredential::clear_identity_type() { + identity_type_ = 0; + _has_bits_[0] &= ~0x00000080u; +} +inline ::nearby::internal::IdentityType PublicCredential::_internal_identity_type() const { + return static_cast< ::nearby::internal::IdentityType >(identity_type_); +} +inline ::nearby::internal::IdentityType PublicCredential::identity_type() const { + // @@protoc_insertion_point(field_get:nearby.internal.PublicCredential.identity_type) + return _internal_identity_type(); +} +inline void PublicCredential::_internal_set_identity_type(::nearby::internal::IdentityType value) { + _has_bits_[0] |= 0x00000080u; + identity_type_ = value; +} +inline void PublicCredential::set_identity_type(::nearby::internal::IdentityType value) { + _internal_set_identity_type(value); + // @@protoc_insertion_point(field_set:nearby.internal.PublicCredential.identity_type) +} + +// optional bytes secret_id = 2; +inline bool PublicCredential::_internal_has_secret_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool PublicCredential::has_secret_id() const { + return _internal_has_secret_id(); +} +inline void PublicCredential::clear_secret_id() { + secret_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& PublicCredential::secret_id() const { + // @@protoc_insertion_point(field_get:nearby.internal.PublicCredential.secret_id) + return _internal_secret_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PublicCredential::set_secret_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + secret_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.PublicCredential.secret_id) +} +inline std::string* PublicCredential::mutable_secret_id() { + std::string* _s = _internal_mutable_secret_id(); + // @@protoc_insertion_point(field_mutable:nearby.internal.PublicCredential.secret_id) + return _s; +} +inline const std::string& PublicCredential::_internal_secret_id() const { + return secret_id_.Get(); +} +inline void PublicCredential::_internal_set_secret_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + secret_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PublicCredential::_internal_mutable_secret_id() { + _has_bits_[0] |= 0x00000001u; + return secret_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PublicCredential::release_secret_id() { + // @@protoc_insertion_point(field_release:nearby.internal.PublicCredential.secret_id) + if (!_internal_has_secret_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = secret_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (secret_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + secret_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PublicCredential::set_allocated_secret_id(std::string* secret_id) { + if (secret_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + secret_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), secret_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (secret_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + secret_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.PublicCredential.secret_id) +} + +// optional bytes authenticity_key = 3; +inline bool PublicCredential::_internal_has_authenticity_key() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool PublicCredential::has_authenticity_key() const { + return _internal_has_authenticity_key(); +} +inline void PublicCredential::clear_authenticity_key() { + authenticity_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& PublicCredential::authenticity_key() const { + // @@protoc_insertion_point(field_get:nearby.internal.PublicCredential.authenticity_key) + return _internal_authenticity_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PublicCredential::set_authenticity_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + authenticity_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.PublicCredential.authenticity_key) +} +inline std::string* PublicCredential::mutable_authenticity_key() { + std::string* _s = _internal_mutable_authenticity_key(); + // @@protoc_insertion_point(field_mutable:nearby.internal.PublicCredential.authenticity_key) + return _s; +} +inline const std::string& PublicCredential::_internal_authenticity_key() const { + return authenticity_key_.Get(); +} +inline void PublicCredential::_internal_set_authenticity_key(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + authenticity_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PublicCredential::_internal_mutable_authenticity_key() { + _has_bits_[0] |= 0x00000002u; + return authenticity_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PublicCredential::release_authenticity_key() { + // @@protoc_insertion_point(field_release:nearby.internal.PublicCredential.authenticity_key) + if (!_internal_has_authenticity_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = authenticity_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (authenticity_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + authenticity_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PublicCredential::set_allocated_authenticity_key(std::string* authenticity_key) { + if (authenticity_key != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + authenticity_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), authenticity_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (authenticity_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + authenticity_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.PublicCredential.authenticity_key) +} + +// optional bytes verification_key = 4; +inline bool PublicCredential::_internal_has_verification_key() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool PublicCredential::has_verification_key() const { + return _internal_has_verification_key(); +} +inline void PublicCredential::clear_verification_key() { + verification_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& PublicCredential::verification_key() const { + // @@protoc_insertion_point(field_get:nearby.internal.PublicCredential.verification_key) + return _internal_verification_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PublicCredential::set_verification_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + verification_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.PublicCredential.verification_key) +} +inline std::string* PublicCredential::mutable_verification_key() { + std::string* _s = _internal_mutable_verification_key(); + // @@protoc_insertion_point(field_mutable:nearby.internal.PublicCredential.verification_key) + return _s; +} +inline const std::string& PublicCredential::_internal_verification_key() const { + return verification_key_.Get(); +} +inline void PublicCredential::_internal_set_verification_key(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + verification_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PublicCredential::_internal_mutable_verification_key() { + _has_bits_[0] |= 0x00000004u; + return verification_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PublicCredential::release_verification_key() { + // @@protoc_insertion_point(field_release:nearby.internal.PublicCredential.verification_key) + if (!_internal_has_verification_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = verification_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (verification_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + verification_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PublicCredential::set_allocated_verification_key(std::string* verification_key) { + if (verification_key != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + verification_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), verification_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (verification_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + verification_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.PublicCredential.verification_key) +} + +// optional uint64 start_time_millis = 5; +inline bool PublicCredential::_internal_has_start_time_millis() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool PublicCredential::has_start_time_millis() const { + return _internal_has_start_time_millis(); +} +inline void PublicCredential::clear_start_time_millis() { + start_time_millis_ = uint64_t{0u}; + _has_bits_[0] &= ~0x00000020u; +} +inline uint64_t PublicCredential::_internal_start_time_millis() const { + return start_time_millis_; +} +inline uint64_t PublicCredential::start_time_millis() const { + // @@protoc_insertion_point(field_get:nearby.internal.PublicCredential.start_time_millis) + return _internal_start_time_millis(); +} +inline void PublicCredential::_internal_set_start_time_millis(uint64_t value) { + _has_bits_[0] |= 0x00000020u; + start_time_millis_ = value; +} +inline void PublicCredential::set_start_time_millis(uint64_t value) { + _internal_set_start_time_millis(value); + // @@protoc_insertion_point(field_set:nearby.internal.PublicCredential.start_time_millis) +} + +// optional uint64 end_time_millis = 6; +inline bool PublicCredential::_internal_has_end_time_millis() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool PublicCredential::has_end_time_millis() const { + return _internal_has_end_time_millis(); +} +inline void PublicCredential::clear_end_time_millis() { + end_time_millis_ = uint64_t{0u}; + _has_bits_[0] &= ~0x00000040u; +} +inline uint64_t PublicCredential::_internal_end_time_millis() const { + return end_time_millis_; +} +inline uint64_t PublicCredential::end_time_millis() const { + // @@protoc_insertion_point(field_get:nearby.internal.PublicCredential.end_time_millis) + return _internal_end_time_millis(); +} +inline void PublicCredential::_internal_set_end_time_millis(uint64_t value) { + _has_bits_[0] |= 0x00000040u; + end_time_millis_ = value; +} +inline void PublicCredential::set_end_time_millis(uint64_t value) { + _internal_set_end_time_millis(value); + // @@protoc_insertion_point(field_set:nearby.internal.PublicCredential.end_time_millis) +} + +// optional bytes encrypted_metadata_bytes = 7; +inline bool PublicCredential::_internal_has_encrypted_metadata_bytes() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool PublicCredential::has_encrypted_metadata_bytes() const { + return _internal_has_encrypted_metadata_bytes(); +} +inline void PublicCredential::clear_encrypted_metadata_bytes() { + encrypted_metadata_bytes_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& PublicCredential::encrypted_metadata_bytes() const { + // @@protoc_insertion_point(field_get:nearby.internal.PublicCredential.encrypted_metadata_bytes) + return _internal_encrypted_metadata_bytes(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PublicCredential::set_encrypted_metadata_bytes(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + encrypted_metadata_bytes_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.PublicCredential.encrypted_metadata_bytes) +} +inline std::string* PublicCredential::mutable_encrypted_metadata_bytes() { + std::string* _s = _internal_mutable_encrypted_metadata_bytes(); + // @@protoc_insertion_point(field_mutable:nearby.internal.PublicCredential.encrypted_metadata_bytes) + return _s; +} +inline const std::string& PublicCredential::_internal_encrypted_metadata_bytes() const { + return encrypted_metadata_bytes_.Get(); +} +inline void PublicCredential::_internal_set_encrypted_metadata_bytes(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + encrypted_metadata_bytes_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PublicCredential::_internal_mutable_encrypted_metadata_bytes() { + _has_bits_[0] |= 0x00000008u; + return encrypted_metadata_bytes_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PublicCredential::release_encrypted_metadata_bytes() { + // @@protoc_insertion_point(field_release:nearby.internal.PublicCredential.encrypted_metadata_bytes) + if (!_internal_has_encrypted_metadata_bytes()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = encrypted_metadata_bytes_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (encrypted_metadata_bytes_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + encrypted_metadata_bytes_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PublicCredential::set_allocated_encrypted_metadata_bytes(std::string* encrypted_metadata_bytes) { + if (encrypted_metadata_bytes != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + encrypted_metadata_bytes_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), encrypted_metadata_bytes, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (encrypted_metadata_bytes_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + encrypted_metadata_bytes_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.PublicCredential.encrypted_metadata_bytes) +} + +// optional bytes metadata_encryption_key_tag = 8; +inline bool PublicCredential::_internal_has_metadata_encryption_key_tag() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool PublicCredential::has_metadata_encryption_key_tag() const { + return _internal_has_metadata_encryption_key_tag(); +} +inline void PublicCredential::clear_metadata_encryption_key_tag() { + metadata_encryption_key_tag_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000010u; +} +inline const std::string& PublicCredential::metadata_encryption_key_tag() const { + // @@protoc_insertion_point(field_get:nearby.internal.PublicCredential.metadata_encryption_key_tag) + return _internal_metadata_encryption_key_tag(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PublicCredential::set_metadata_encryption_key_tag(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000010u; + metadata_encryption_key_tag_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.PublicCredential.metadata_encryption_key_tag) +} +inline std::string* PublicCredential::mutable_metadata_encryption_key_tag() { + std::string* _s = _internal_mutable_metadata_encryption_key_tag(); + // @@protoc_insertion_point(field_mutable:nearby.internal.PublicCredential.metadata_encryption_key_tag) + return _s; +} +inline const std::string& PublicCredential::_internal_metadata_encryption_key_tag() const { + return metadata_encryption_key_tag_.Get(); +} +inline void PublicCredential::_internal_set_metadata_encryption_key_tag(const std::string& value) { + _has_bits_[0] |= 0x00000010u; + metadata_encryption_key_tag_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PublicCredential::_internal_mutable_metadata_encryption_key_tag() { + _has_bits_[0] |= 0x00000010u; + return metadata_encryption_key_tag_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PublicCredential::release_metadata_encryption_key_tag() { + // @@protoc_insertion_point(field_release:nearby.internal.PublicCredential.metadata_encryption_key_tag) + if (!_internal_has_metadata_encryption_key_tag()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000010u; + auto* p = metadata_encryption_key_tag_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (metadata_encryption_key_tag_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + metadata_encryption_key_tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PublicCredential::set_allocated_metadata_encryption_key_tag(std::string* metadata_encryption_key_tag) { + if (metadata_encryption_key_tag != nullptr) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + metadata_encryption_key_tag_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), metadata_encryption_key_tag, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (metadata_encryption_key_tag_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + metadata_encryption_key_tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.PublicCredential.metadata_encryption_key_tag) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace internal +} // namespace nearby + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::nearby::internal::IdentityType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::nearby::internal::IdentityType>() { + return ::nearby::internal::IdentityType_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_internal_2fproto_2fcredential_2eproto diff --git a/compiled_proto/internal/proto/device_metadata.pb.cc b/compiled_proto/internal/proto/device_metadata.pb.cc new file mode 100644 index 00000000..1c3bc53d --- /dev/null +++ b/compiled_proto/internal/proto/device_metadata.pb.cc @@ -0,0 +1,617 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: internal/proto/device_metadata.proto + +#include "internal/proto/device_metadata.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace nearby { +namespace internal { +constexpr DeviceMetadata::DeviceMetadata( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : stable_device_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , account_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , icon_url_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , bluetooth_mac_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_type_(0) +{} +struct DeviceMetadataDefaultTypeInternal { + constexpr DeviceMetadataDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DeviceMetadataDefaultTypeInternal() {} + union { + DeviceMetadata _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DeviceMetadataDefaultTypeInternal _DeviceMetadata_default_instance_; +} // namespace internal +} // namespace nearby +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_internal_2fproto_2fdevice_5fmetadata_2eproto[1]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_internal_2fproto_2fdevice_5fmetadata_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_internal_2fproto_2fdevice_5fmetadata_2eproto = nullptr; + +const uint32_t TableStruct_internal_2fproto_2fdevice_5fmetadata_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::nearby::internal::DeviceMetadata, _has_bits_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::DeviceMetadata, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::nearby::internal::DeviceMetadata, stable_device_id_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::DeviceMetadata, account_name_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::DeviceMetadata, device_name_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::DeviceMetadata, icon_url_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::DeviceMetadata, bluetooth_mac_address_), + PROTOBUF_FIELD_OFFSET(::nearby::internal::DeviceMetadata, device_type_), + 0, + 1, + 2, + 3, + 4, + 5, +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 12, -1, sizeof(::nearby::internal::DeviceMetadata)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::nearby::internal::_DeviceMetadata_default_instance_), +}; + +const char descriptor_table_protodef_internal_2fproto_2fdevice_5fmetadata_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n$internal/proto/device_metadata.proto\022\017" + "nearby.internal\"\264\003\n\016DeviceMetadata\022\035\n\020st" + "able_device_id\030\001 \001(\tH\000\210\001\001\022\031\n\014account_nam" + "e\030\002 \001(\tH\001\210\001\001\022\030\n\013device_name\030\003 \001(\tH\002\210\001\001\022\025" + "\n\010icon_url\030\004 \001(\tH\003\210\001\001\022\"\n\025bluetooth_mac_a" + "ddress\030\005 \001(\tH\004\210\001\001\022D\n\013device_type\030\006 \001(\0162*" + ".nearby.internal.DeviceMetadata.DeviceTy" + "peH\005\210\001\001\"`\n\nDeviceType\022\017\n\013UNSPECIFIED\020\000\022\t" + "\n\005PHONE\020\001\022\n\n\006TABLET\020\002\022\013\n\007DISPLAY\020\003\022\n\n\006LA" + "PTOP\020\004\022\006\n\002TV\020\005\022\t\n\005WATCH\020\006B\023\n\021_stable_dev" + "ice_idB\017\n\r_account_nameB\016\n\014_device_nameB" + "\013\n\t_icon_urlB\030\n\026_bluetooth_mac_addressB\016" + "\n\014_device_typeb\006proto3" + ; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto = { + false, false, 502, descriptor_table_protodef_internal_2fproto_2fdevice_5fmetadata_2eproto, "internal/proto/device_metadata.proto", + &descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto_once, nullptr, 0, 1, + schemas, file_default_instances, TableStruct_internal_2fproto_2fdevice_5fmetadata_2eproto::offsets, + file_level_metadata_internal_2fproto_2fdevice_5fmetadata_2eproto, file_level_enum_descriptors_internal_2fproto_2fdevice_5fmetadata_2eproto, file_level_service_descriptors_internal_2fproto_2fdevice_5fmetadata_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto_getter() { + return &descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_internal_2fproto_2fdevice_5fmetadata_2eproto(&descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto); +namespace nearby { +namespace internal { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DeviceMetadata_DeviceType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto); + return file_level_enum_descriptors_internal_2fproto_2fdevice_5fmetadata_2eproto[0]; +} +bool DeviceMetadata_DeviceType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr DeviceMetadata_DeviceType DeviceMetadata::UNSPECIFIED; +constexpr DeviceMetadata_DeviceType DeviceMetadata::PHONE; +constexpr DeviceMetadata_DeviceType DeviceMetadata::TABLET; +constexpr DeviceMetadata_DeviceType DeviceMetadata::DISPLAY; +constexpr DeviceMetadata_DeviceType DeviceMetadata::LAPTOP; +constexpr DeviceMetadata_DeviceType DeviceMetadata::TV; +constexpr DeviceMetadata_DeviceType DeviceMetadata::WATCH; +constexpr DeviceMetadata_DeviceType DeviceMetadata::DeviceType_MIN; +constexpr DeviceMetadata_DeviceType DeviceMetadata::DeviceType_MAX; +constexpr int DeviceMetadata::DeviceType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +// =================================================================== + +class DeviceMetadata::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_stable_device_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_account_name(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_device_name(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_icon_url(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_bluetooth_mac_address(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_device_type(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } +}; + +DeviceMetadata::DeviceMetadata(::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.internal.DeviceMetadata) +} +DeviceMetadata::DeviceMetadata(const DeviceMetadata& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + stable_device_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + stable_device_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_stable_device_id()) { + stable_device_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_stable_device_id(), + GetArenaForAllocation()); + } + account_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + account_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_account_name()) { + account_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_account_name(), + GetArenaForAllocation()); + } + 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()); + } + icon_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + icon_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_icon_url()) { + icon_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_icon_url(), + 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_type_ = from.device_type_; + // @@protoc_insertion_point(copy_constructor:nearby.internal.DeviceMetadata) +} + +inline void DeviceMetadata::SharedCtor() { +stable_device_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + stable_device_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +account_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + account_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +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 +icon_url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + icon_url_.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_type_ = 0; +} + +DeviceMetadata::~DeviceMetadata() { + // @@protoc_insertion_point(destructor:nearby.internal.DeviceMetadata) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void DeviceMetadata::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + stable_device_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + account_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + device_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + icon_url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + bluetooth_mac_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DeviceMetadata::ArenaDtor(void* object) { + DeviceMetadata* _this = reinterpret_cast< DeviceMetadata* >(object); + (void)_this; +} +void DeviceMetadata::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DeviceMetadata::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DeviceMetadata::Clear() { +// @@protoc_insertion_point(message_clear_start:nearby.internal.DeviceMetadata) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + stable_device_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + account_name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + device_name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + icon_url_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000010u) { + bluetooth_mac_address_.ClearNonDefaultToEmpty(); + } + } + device_type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* DeviceMetadata::_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 stable_device_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_stable_device_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "nearby.internal.DeviceMetadata.stable_device_id")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string account_name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_account_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "nearby.internal.DeviceMetadata.account_name")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string device_name = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_device_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "nearby.internal.DeviceMetadata.device_name")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string icon_url = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_icon_url(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "nearby.internal.DeviceMetadata.icon_url")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string bluetooth_mac_address = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_bluetooth_mac_address(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "nearby.internal.DeviceMetadata.bluetooth_mac_address")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .nearby.internal.DeviceMetadata.DeviceType device_type = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_device_type(static_cast<::nearby::internal::DeviceMetadata_DeviceType>(val)); + } 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* DeviceMetadata::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:nearby.internal.DeviceMetadata) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional string stable_device_id = 1; + if (_internal_has_stable_device_id()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_stable_device_id().data(), static_cast(this->_internal_stable_device_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "nearby.internal.DeviceMetadata.stable_device_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_stable_device_id(), target); + } + + // optional string account_name = 2; + if (_internal_has_account_name()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_account_name().data(), static_cast(this->_internal_account_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "nearby.internal.DeviceMetadata.account_name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_account_name(), target); + } + + // optional string device_name = 3; + if (_internal_has_device_name()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_device_name().data(), static_cast(this->_internal_device_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "nearby.internal.DeviceMetadata.device_name"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_device_name(), target); + } + + // optional string icon_url = 4; + if (_internal_has_icon_url()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_icon_url().data(), static_cast(this->_internal_icon_url().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "nearby.internal.DeviceMetadata.icon_url"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_icon_url(), target); + } + + // optional string bluetooth_mac_address = 5; + if (_internal_has_bluetooth_mac_address()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_bluetooth_mac_address().data(), static_cast(this->_internal_bluetooth_mac_address().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "nearby.internal.DeviceMetadata.bluetooth_mac_address"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_bluetooth_mac_address(), target); + } + + // optional .nearby.internal.DeviceMetadata.DeviceType device_type = 6; + if (_internal_has_device_type()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 6, 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.internal.DeviceMetadata) + return target; +} + +size_t DeviceMetadata::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:nearby.internal.DeviceMetadata) + 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 & 0x0000003fu) { + // optional string stable_device_id = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_stable_device_id()); + } + + // optional string account_name = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_account_name()); + } + + // optional string device_name = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_device_name()); + } + + // optional string icon_url = 4; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_icon_url()); + } + + // optional string bluetooth_mac_address = 5; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_bluetooth_mac_address()); + } + + // optional .nearby.internal.DeviceMetadata.DeviceType device_type = 6; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_device_type()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DeviceMetadata::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + DeviceMetadata::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DeviceMetadata::GetClassData() const { return &_class_data_; } + +void DeviceMetadata::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void DeviceMetadata::MergeFrom(const DeviceMetadata& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:nearby.internal.DeviceMetadata) + 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 & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_stable_device_id(from._internal_stable_device_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_account_name(from._internal_account_name()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_device_name(from._internal_device_name()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_icon_url(from._internal_icon_url()); + } + if (cached_has_bits & 0x00000010u) { + _internal_set_bluetooth_mac_address(from._internal_bluetooth_mac_address()); + } + 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 DeviceMetadata::CopyFrom(const DeviceMetadata& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:nearby.internal.DeviceMetadata) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DeviceMetadata::IsInitialized() const { + return true; +} + +void DeviceMetadata::InternalSwap(DeviceMetadata* 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(), + &stable_device_id_, lhs_arena, + &other->stable_device_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &account_name_, lhs_arena, + &other->account_name_, rhs_arena + ); + ::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(), + &icon_url_, lhs_arena, + &other->icon_url_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &bluetooth_mac_address_, lhs_arena, + &other->bluetooth_mac_address_, rhs_arena + ); + swap(device_type_, other->device_type_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DeviceMetadata::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto_getter, &descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto_once, + file_level_metadata_internal_2fproto_2fdevice_5fmetadata_2eproto[0]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace internal +} // namespace nearby +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::nearby::internal::DeviceMetadata* Arena::CreateMaybeMessage< ::nearby::internal::DeviceMetadata >(Arena* arena) { + return Arena::CreateMessageInternal< ::nearby::internal::DeviceMetadata >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/compiled_proto/internal/proto/device_metadata.pb.h b/compiled_proto/internal/proto/device_metadata.pb.h new file mode 100644 index 00000000..6876bec5 --- /dev/null +++ b/compiled_proto/internal/proto/device_metadata.pb.h @@ -0,0 +1,797 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: internal/proto/device_metadata.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_internal_2fproto_2fdevice_5fmetadata_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_internal_2fproto_2fdevice_5fmetadata_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3019001 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_internal_2fproto_2fdevice_5fmetadata_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_internal_2fproto_2fdevice_5fmetadata_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_internal_2fproto_2fdevice_5fmetadata_2eproto; +namespace nearby { +namespace internal { +class DeviceMetadata; +struct DeviceMetadataDefaultTypeInternal; +extern DeviceMetadataDefaultTypeInternal _DeviceMetadata_default_instance_; +} // namespace internal +} // namespace nearby +PROTOBUF_NAMESPACE_OPEN +template<> ::nearby::internal::DeviceMetadata* Arena::CreateMaybeMessage<::nearby::internal::DeviceMetadata>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace nearby { +namespace internal { + +enum DeviceMetadata_DeviceType : int { + DeviceMetadata_DeviceType_UNSPECIFIED = 0, + DeviceMetadata_DeviceType_PHONE = 1, + DeviceMetadata_DeviceType_TABLET = 2, + DeviceMetadata_DeviceType_DISPLAY = 3, + DeviceMetadata_DeviceType_LAPTOP = 4, + DeviceMetadata_DeviceType_TV = 5, + DeviceMetadata_DeviceType_WATCH = 6, + DeviceMetadata_DeviceType_DeviceMetadata_DeviceType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + DeviceMetadata_DeviceType_DeviceMetadata_DeviceType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool DeviceMetadata_DeviceType_IsValid(int value); +constexpr DeviceMetadata_DeviceType DeviceMetadata_DeviceType_DeviceType_MIN = DeviceMetadata_DeviceType_UNSPECIFIED; +constexpr DeviceMetadata_DeviceType DeviceMetadata_DeviceType_DeviceType_MAX = DeviceMetadata_DeviceType_WATCH; +constexpr int DeviceMetadata_DeviceType_DeviceType_ARRAYSIZE = DeviceMetadata_DeviceType_DeviceType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DeviceMetadata_DeviceType_descriptor(); +template +inline const std::string& DeviceMetadata_DeviceType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DeviceMetadata_DeviceType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + DeviceMetadata_DeviceType_descriptor(), enum_t_value); +} +inline bool DeviceMetadata_DeviceType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeviceMetadata_DeviceType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + DeviceMetadata_DeviceType_descriptor(), name, value); +} +// =================================================================== + +class DeviceMetadata final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:nearby.internal.DeviceMetadata) */ { + public: + inline DeviceMetadata() : DeviceMetadata(nullptr) {} + ~DeviceMetadata() override; + explicit constexpr DeviceMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeviceMetadata(const DeviceMetadata& from); + DeviceMetadata(DeviceMetadata&& from) noexcept + : DeviceMetadata() { + *this = ::std::move(from); + } + + inline DeviceMetadata& operator=(const DeviceMetadata& from) { + CopyFrom(from); + return *this; + } + inline DeviceMetadata& operator=(DeviceMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeviceMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const DeviceMetadata* internal_default_instance() { + return reinterpret_cast( + &_DeviceMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(DeviceMetadata& a, DeviceMetadata& b) { + a.Swap(&b); + } + inline void Swap(DeviceMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeviceMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeviceMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DeviceMetadata& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const DeviceMetadata& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DeviceMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "nearby.internal.DeviceMetadata"; + } + protected: + explicit DeviceMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef DeviceMetadata_DeviceType DeviceType; + static constexpr DeviceType UNSPECIFIED = + DeviceMetadata_DeviceType_UNSPECIFIED; + static constexpr DeviceType PHONE = + DeviceMetadata_DeviceType_PHONE; + static constexpr DeviceType TABLET = + DeviceMetadata_DeviceType_TABLET; + static constexpr DeviceType DISPLAY = + DeviceMetadata_DeviceType_DISPLAY; + static constexpr DeviceType LAPTOP = + DeviceMetadata_DeviceType_LAPTOP; + static constexpr DeviceType TV = + DeviceMetadata_DeviceType_TV; + static constexpr DeviceType WATCH = + DeviceMetadata_DeviceType_WATCH; + static inline bool DeviceType_IsValid(int value) { + return DeviceMetadata_DeviceType_IsValid(value); + } + static constexpr DeviceType DeviceType_MIN = + DeviceMetadata_DeviceType_DeviceType_MIN; + static constexpr DeviceType DeviceType_MAX = + DeviceMetadata_DeviceType_DeviceType_MAX; + static constexpr int DeviceType_ARRAYSIZE = + DeviceMetadata_DeviceType_DeviceType_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + DeviceType_descriptor() { + return DeviceMetadata_DeviceType_descriptor(); + } + template + static inline const std::string& DeviceType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DeviceType_Name."); + return DeviceMetadata_DeviceType_Name(enum_t_value); + } + static inline bool DeviceType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + DeviceType* value) { + return DeviceMetadata_DeviceType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kStableDeviceIdFieldNumber = 1, + kAccountNameFieldNumber = 2, + kDeviceNameFieldNumber = 3, + kIconUrlFieldNumber = 4, + kBluetoothMacAddressFieldNumber = 5, + kDeviceTypeFieldNumber = 6, + }; + // optional string stable_device_id = 1; + bool has_stable_device_id() const; + private: + bool _internal_has_stable_device_id() const; + public: + void clear_stable_device_id(); + const std::string& stable_device_id() const; + template + void set_stable_device_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_stable_device_id(); + PROTOBUF_NODISCARD std::string* release_stable_device_id(); + void set_allocated_stable_device_id(std::string* stable_device_id); + private: + const std::string& _internal_stable_device_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_stable_device_id(const std::string& value); + std::string* _internal_mutable_stable_device_id(); + public: + + // optional string account_name = 2; + bool has_account_name() const; + private: + bool _internal_has_account_name() const; + public: + void clear_account_name(); + const std::string& account_name() const; + template + void set_account_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_account_name(); + PROTOBUF_NODISCARD std::string* release_account_name(); + void set_allocated_account_name(std::string* account_name); + private: + const std::string& _internal_account_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_account_name(const std::string& value); + std::string* _internal_mutable_account_name(); + public: + + // optional string device_name = 3; + bool has_device_name() const; + private: + bool _internal_has_device_name() const; + public: + void clear_device_name(); + const std::string& device_name() const; + template + void set_device_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_name(); + PROTOBUF_NODISCARD std::string* release_device_name(); + void set_allocated_device_name(std::string* device_name); + private: + const std::string& _internal_device_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_name(const std::string& value); + std::string* _internal_mutable_device_name(); + public: + + // optional string icon_url = 4; + bool has_icon_url() const; + private: + bool _internal_has_icon_url() const; + public: + void clear_icon_url(); + const std::string& icon_url() const; + template + void set_icon_url(ArgT0&& arg0, ArgT... args); + std::string* mutable_icon_url(); + PROTOBUF_NODISCARD std::string* release_icon_url(); + void set_allocated_icon_url(std::string* icon_url); + private: + const std::string& _internal_icon_url() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_icon_url(const std::string& value); + std::string* _internal_mutable_icon_url(); + public: + + // optional string bluetooth_mac_address = 5; + bool has_bluetooth_mac_address() const; + private: + bool _internal_has_bluetooth_mac_address() const; + public: + void clear_bluetooth_mac_address(); + const std::string& bluetooth_mac_address() const; + template + void set_bluetooth_mac_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_bluetooth_mac_address(); + PROTOBUF_NODISCARD std::string* release_bluetooth_mac_address(); + void set_allocated_bluetooth_mac_address(std::string* bluetooth_mac_address); + private: + const std::string& _internal_bluetooth_mac_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_bluetooth_mac_address(const std::string& value); + std::string* _internal_mutable_bluetooth_mac_address(); + public: + + // optional .nearby.internal.DeviceMetadata.DeviceType device_type = 6; + bool has_device_type() const; + private: + bool _internal_has_device_type() const; + public: + void clear_device_type(); + ::nearby::internal::DeviceMetadata_DeviceType device_type() const; + void set_device_type(::nearby::internal::DeviceMetadata_DeviceType value); + private: + ::nearby::internal::DeviceMetadata_DeviceType _internal_device_type() const; + void _internal_set_device_type(::nearby::internal::DeviceMetadata_DeviceType value); + public: + + // @@protoc_insertion_point(class_scope:nearby.internal.DeviceMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr stable_device_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr account_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr icon_url_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bluetooth_mac_address_; + int device_type_; + friend struct ::TableStruct_internal_2fproto_2fdevice_5fmetadata_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// DeviceMetadata + +// optional string stable_device_id = 1; +inline bool DeviceMetadata::_internal_has_stable_device_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool DeviceMetadata::has_stable_device_id() const { + return _internal_has_stable_device_id(); +} +inline void DeviceMetadata::clear_stable_device_id() { + stable_device_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& DeviceMetadata::stable_device_id() const { + // @@protoc_insertion_point(field_get:nearby.internal.DeviceMetadata.stable_device_id) + return _internal_stable_device_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceMetadata::set_stable_device_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + stable_device_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.DeviceMetadata.stable_device_id) +} +inline std::string* DeviceMetadata::mutable_stable_device_id() { + std::string* _s = _internal_mutable_stable_device_id(); + // @@protoc_insertion_point(field_mutable:nearby.internal.DeviceMetadata.stable_device_id) + return _s; +} +inline const std::string& DeviceMetadata::_internal_stable_device_id() const { + return stable_device_id_.Get(); +} +inline void DeviceMetadata::_internal_set_stable_device_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + stable_device_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DeviceMetadata::_internal_mutable_stable_device_id() { + _has_bits_[0] |= 0x00000001u; + return stable_device_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DeviceMetadata::release_stable_device_id() { + // @@protoc_insertion_point(field_release:nearby.internal.DeviceMetadata.stable_device_id) + if (!_internal_has_stable_device_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = stable_device_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (stable_device_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + stable_device_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DeviceMetadata::set_allocated_stable_device_id(std::string* stable_device_id) { + if (stable_device_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + stable_device_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), stable_device_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (stable_device_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + stable_device_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.DeviceMetadata.stable_device_id) +} + +// optional string account_name = 2; +inline bool DeviceMetadata::_internal_has_account_name() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool DeviceMetadata::has_account_name() const { + return _internal_has_account_name(); +} +inline void DeviceMetadata::clear_account_name() { + account_name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& DeviceMetadata::account_name() const { + // @@protoc_insertion_point(field_get:nearby.internal.DeviceMetadata.account_name) + return _internal_account_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceMetadata::set_account_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + account_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.DeviceMetadata.account_name) +} +inline std::string* DeviceMetadata::mutable_account_name() { + std::string* _s = _internal_mutable_account_name(); + // @@protoc_insertion_point(field_mutable:nearby.internal.DeviceMetadata.account_name) + return _s; +} +inline const std::string& DeviceMetadata::_internal_account_name() const { + return account_name_.Get(); +} +inline void DeviceMetadata::_internal_set_account_name(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + account_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DeviceMetadata::_internal_mutable_account_name() { + _has_bits_[0] |= 0x00000002u; + return account_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DeviceMetadata::release_account_name() { + // @@protoc_insertion_point(field_release:nearby.internal.DeviceMetadata.account_name) + if (!_internal_has_account_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = account_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (account_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + account_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DeviceMetadata::set_allocated_account_name(std::string* account_name) { + if (account_name != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + account_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), account_name, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (account_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + account_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.DeviceMetadata.account_name) +} + +// optional string device_name = 3; +inline bool DeviceMetadata::_internal_has_device_name() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool DeviceMetadata::has_device_name() const { + return _internal_has_device_name(); +} +inline void DeviceMetadata::clear_device_name() { + device_name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& DeviceMetadata::device_name() const { + // @@protoc_insertion_point(field_get:nearby.internal.DeviceMetadata.device_name) + return _internal_device_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceMetadata::set_device_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + device_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.DeviceMetadata.device_name) +} +inline std::string* DeviceMetadata::mutable_device_name() { + std::string* _s = _internal_mutable_device_name(); + // @@protoc_insertion_point(field_mutable:nearby.internal.DeviceMetadata.device_name) + return _s; +} +inline const std::string& DeviceMetadata::_internal_device_name() const { + return device_name_.Get(); +} +inline void DeviceMetadata::_internal_set_device_name(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + device_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DeviceMetadata::_internal_mutable_device_name() { + _has_bits_[0] |= 0x00000004u; + return device_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DeviceMetadata::release_device_name() { + // @@protoc_insertion_point(field_release:nearby.internal.DeviceMetadata.device_name) + if (!_internal_has_device_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = device_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DeviceMetadata::set_allocated_device_name(std::string* device_name) { + if (device_name != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + device_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device_name, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.DeviceMetadata.device_name) +} + +// optional string icon_url = 4; +inline bool DeviceMetadata::_internal_has_icon_url() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool DeviceMetadata::has_icon_url() const { + return _internal_has_icon_url(); +} +inline void DeviceMetadata::clear_icon_url() { + icon_url_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& DeviceMetadata::icon_url() const { + // @@protoc_insertion_point(field_get:nearby.internal.DeviceMetadata.icon_url) + return _internal_icon_url(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceMetadata::set_icon_url(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + icon_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.DeviceMetadata.icon_url) +} +inline std::string* DeviceMetadata::mutable_icon_url() { + std::string* _s = _internal_mutable_icon_url(); + // @@protoc_insertion_point(field_mutable:nearby.internal.DeviceMetadata.icon_url) + return _s; +} +inline const std::string& DeviceMetadata::_internal_icon_url() const { + return icon_url_.Get(); +} +inline void DeviceMetadata::_internal_set_icon_url(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + icon_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DeviceMetadata::_internal_mutable_icon_url() { + _has_bits_[0] |= 0x00000008u; + return icon_url_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DeviceMetadata::release_icon_url() { + // @@protoc_insertion_point(field_release:nearby.internal.DeviceMetadata.icon_url) + if (!_internal_has_icon_url()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = icon_url_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (icon_url_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + icon_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DeviceMetadata::set_allocated_icon_url(std::string* icon_url) { + if (icon_url != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + icon_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), icon_url, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (icon_url_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + icon_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.DeviceMetadata.icon_url) +} + +// optional string bluetooth_mac_address = 5; +inline bool DeviceMetadata::_internal_has_bluetooth_mac_address() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool DeviceMetadata::has_bluetooth_mac_address() const { + return _internal_has_bluetooth_mac_address(); +} +inline void DeviceMetadata::clear_bluetooth_mac_address() { + bluetooth_mac_address_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000010u; +} +inline const std::string& DeviceMetadata::bluetooth_mac_address() const { + // @@protoc_insertion_point(field_get:nearby.internal.DeviceMetadata.bluetooth_mac_address) + return _internal_bluetooth_mac_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceMetadata::set_bluetooth_mac_address(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000010u; + bluetooth_mac_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:nearby.internal.DeviceMetadata.bluetooth_mac_address) +} +inline std::string* DeviceMetadata::mutable_bluetooth_mac_address() { + std::string* _s = _internal_mutable_bluetooth_mac_address(); + // @@protoc_insertion_point(field_mutable:nearby.internal.DeviceMetadata.bluetooth_mac_address) + return _s; +} +inline const std::string& DeviceMetadata::_internal_bluetooth_mac_address() const { + return bluetooth_mac_address_.Get(); +} +inline void DeviceMetadata::_internal_set_bluetooth_mac_address(const std::string& value) { + _has_bits_[0] |= 0x00000010u; + bluetooth_mac_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DeviceMetadata::_internal_mutable_bluetooth_mac_address() { + _has_bits_[0] |= 0x00000010u; + return bluetooth_mac_address_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DeviceMetadata::release_bluetooth_mac_address() { + // @@protoc_insertion_point(field_release:nearby.internal.DeviceMetadata.bluetooth_mac_address) + if (!_internal_has_bluetooth_mac_address()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000010u; + auto* p = bluetooth_mac_address_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (bluetooth_mac_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + bluetooth_mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DeviceMetadata::set_allocated_bluetooth_mac_address(std::string* bluetooth_mac_address) { + if (bluetooth_mac_address != nullptr) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + bluetooth_mac_address_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bluetooth_mac_address, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (bluetooth_mac_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + bluetooth_mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:nearby.internal.DeviceMetadata.bluetooth_mac_address) +} + +// optional .nearby.internal.DeviceMetadata.DeviceType device_type = 6; +inline bool DeviceMetadata::_internal_has_device_type() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool DeviceMetadata::has_device_type() const { + return _internal_has_device_type(); +} +inline void DeviceMetadata::clear_device_type() { + device_type_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline ::nearby::internal::DeviceMetadata_DeviceType DeviceMetadata::_internal_device_type() const { + return static_cast< ::nearby::internal::DeviceMetadata_DeviceType >(device_type_); +} +inline ::nearby::internal::DeviceMetadata_DeviceType DeviceMetadata::device_type() const { + // @@protoc_insertion_point(field_get:nearby.internal.DeviceMetadata.device_type) + return _internal_device_type(); +} +inline void DeviceMetadata::_internal_set_device_type(::nearby::internal::DeviceMetadata_DeviceType value) { + _has_bits_[0] |= 0x00000020u; + device_type_ = value; +} +inline void DeviceMetadata::set_device_type(::nearby::internal::DeviceMetadata_DeviceType value) { + _internal_set_device_type(value); + // @@protoc_insertion_point(field_set:nearby.internal.DeviceMetadata.device_type) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace internal +} // namespace nearby + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::nearby::internal::DeviceMetadata_DeviceType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::nearby::internal::DeviceMetadata_DeviceType>() { + return ::nearby::internal::DeviceMetadata_DeviceType_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_internal_2fproto_2fdevice_5fmetadata_2eproto