mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 07:06:11 -04:00
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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 <algorithm>
|
||||
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/wire_format_lite.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/reflection_ops.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
|
||||
PROTOBUF_PRAGMA_INIT_SEG
|
||||
namespace nearby {
|
||||
namespace 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<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::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<DeviceMetadata>()._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<uint8_t>(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<uint8_t>(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<uint8_t>(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<uint8_t>(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<uint8_t>(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<uint8_t>(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<int>(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<int>(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<int>(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<int>(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<int>(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<DeviceMetadata *>(to)->MergeFrom(
|
||||
static_cast<const DeviceMetadata &>(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 <google/protobuf/port_undef.inc>
|
||||
@@ -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 <limits>
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#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 <google/protobuf/port_undef.inc>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/arena.h>
|
||||
#include <google/protobuf/arenastring.h>
|
||||
#include <google/protobuf/generated_message_table_driven.h>
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/metadata_lite.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
|
||||
#include <google/protobuf/extension_set.h> // IWYU pragma: export
|
||||
#include <google/protobuf/generated_enum_reflection.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
#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<int32_t>::min(),
|
||||
DeviceMetadata_DeviceType_DeviceMetadata_DeviceType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::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<typename T>
|
||||
inline const std::string& DeviceMetadata_DeviceType_Name(T enum_t_value) {
|
||||
static_assert(::std::is_same<T, DeviceMetadata_DeviceType>::value ||
|
||||
::std::is_integral<T>::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>(
|
||||
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<const DeviceMetadata*>(
|
||||
&_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<DeviceMetadata>(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<typename T>
|
||||
static inline const std::string& DeviceType_Name(T enum_t_value) {
|
||||
static_assert(::std::is_same<T, DeviceType>::value ||
|
||||
::std::is_integral<T>::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 <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
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 <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
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 <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
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 <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
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 <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
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 <typename T> 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 <typename ArgT0, typename... ArgT>
|
||||
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<ArgT0 &&>(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 <typename ArgT0, typename... ArgT>
|
||||
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<ArgT0 &&>(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 <typename ArgT0, typename... ArgT>
|
||||
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<ArgT0 &&>(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 <typename ArgT0, typename... ArgT>
|
||||
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<ArgT0 &&>(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 <typename ArgT0, typename... ArgT>
|
||||
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<ArgT0 &&>(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 <google/protobuf/port_undef.inc>
|
||||
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_internal_2fproto_2fdevice_5fmetadata_2eproto
|
||||
Reference in New Issue
Block a user