mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
1197 lines
51 KiB
C++
1197 lines
51 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// NO CHECKED-IN PROTOBUF GENCODE
|
|
// source: internal/proto/local_credential.proto
|
|
// Protobuf C++ Version: 6.33.3
|
|
|
|
#include "internal/proto/local_credential.pb.h"
|
|
|
|
#include <algorithm>
|
|
#include <type_traits>
|
|
#include "google/protobuf/io/coded_stream.h"
|
|
#include "google/protobuf/generated_message_tctable_impl.h"
|
|
#include "google/protobuf/extension_set.h"
|
|
#include "google/protobuf/generated_message_util.h"
|
|
#include "google/protobuf/wire_format_lite.h"
|
|
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
// Must be included last.
|
|
#include "google/protobuf/port_def.inc"
|
|
PROTOBUF_PRAGMA_INIT_SEG
|
|
namespace _pb = ::google::protobuf;
|
|
namespace _pbi = ::google::protobuf::internal;
|
|
namespace _fl = ::google::protobuf::internal::field_layout;
|
|
namespace nearby {
|
|
namespace internal {
|
|
|
|
inline constexpr LocalCredential_PrivateKey::Impl_::Impl_(
|
|
::_pbi::ConstantInitialized) noexcept
|
|
: _cached_size_{0},
|
|
certificate_alias_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
key_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
encrypted_key_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()) {}
|
|
|
|
template <typename>
|
|
PROTOBUF_CONSTEXPR LocalCredential_PrivateKey::LocalCredential_PrivateKey(::_pbi::ConstantInitialized)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::MessageLite(LocalCredential_PrivateKey_class_data_.base()),
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::MessageLite(),
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
_impl_(::_pbi::ConstantInitialized()) {
|
|
}
|
|
struct LocalCredential_PrivateKeyDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR LocalCredential_PrivateKeyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
|
|
~LocalCredential_PrivateKeyDefaultTypeInternal() {}
|
|
union {
|
|
LocalCredential_PrivateKey _instance;
|
|
};
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LocalCredential_PrivateKeyDefaultTypeInternal _LocalCredential_PrivateKey_default_instance_;
|
|
|
|
inline constexpr LocalCredential::Impl_::Impl_(
|
|
::_pbi::ConstantInitialized) noexcept
|
|
: _cached_size_{0},
|
|
secret_id_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
key_seed_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
metadata_encryption_key_v0_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
identity_token_v1_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
signature_version_(
|
|
&::google::protobuf::internal::fixed_address_empty_string,
|
|
::_pbi::ConstantInitialized()),
|
|
advertisement_signing_key_{nullptr},
|
|
connection_signing_key_{nullptr},
|
|
start_time_millis_{::int64_t{0}},
|
|
end_time_millis_{::int64_t{0}},
|
|
id_{::int64_t{0}},
|
|
credential_version_{::int64_t{0}},
|
|
identity_type_{static_cast< ::nearby::internal::IdentityType >(0)},
|
|
consumed_salts_{} {}
|
|
|
|
template <typename>
|
|
PROTOBUF_CONSTEXPR LocalCredential::LocalCredential(::_pbi::ConstantInitialized)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::MessageLite(LocalCredential_class_data_.base()),
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::MessageLite(),
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
_impl_(::_pbi::ConstantInitialized()) {
|
|
}
|
|
struct LocalCredentialDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR LocalCredentialDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
|
|
~LocalCredentialDefaultTypeInternal() {}
|
|
union {
|
|
LocalCredential _instance;
|
|
};
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LocalCredentialDefaultTypeInternal _LocalCredential_default_instance_;
|
|
} // namespace internal
|
|
} // namespace nearby
|
|
namespace nearby {
|
|
namespace internal {
|
|
// ===================================================================
|
|
|
|
class LocalCredential_PrivateKey::_Internal {
|
|
public:
|
|
using HasBits =
|
|
decltype(::std::declval<LocalCredential_PrivateKey>()._impl_._has_bits_);
|
|
static constexpr ::int32_t kHasBitsOffset =
|
|
8 * PROTOBUF_FIELD_OFFSET(LocalCredential_PrivateKey, _impl_._has_bits_);
|
|
};
|
|
|
|
LocalCredential_PrivateKey::LocalCredential_PrivateKey(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::MessageLite(arena, LocalCredential_PrivateKey_class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::MessageLite(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
SharedCtor(arena);
|
|
// @@protoc_insertion_point(arena_constructor:nearby.internal.LocalCredential.PrivateKey)
|
|
}
|
|
PROTOBUF_NDEBUG_INLINE LocalCredential_PrivateKey::Impl_::Impl_(
|
|
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
|
|
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
|
|
[[maybe_unused]] const ::nearby::internal::LocalCredential_PrivateKey& from_msg)
|
|
: _has_bits_{from._has_bits_},
|
|
_cached_size_{0},
|
|
certificate_alias_(arena, from.certificate_alias_),
|
|
key_(arena, from.key_),
|
|
encrypted_key_(arena, from.encrypted_key_) {}
|
|
|
|
LocalCredential_PrivateKey::LocalCredential_PrivateKey(
|
|
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
|
|
const LocalCredential_PrivateKey& from)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::MessageLite(arena, LocalCredential_PrivateKey_class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::MessageLite(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
LocalCredential_PrivateKey* const _this = this;
|
|
(void)_this;
|
|
_internal_metadata_.MergeFrom<::std::string>(
|
|
from._internal_metadata_);
|
|
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
|
|
|
|
// @@protoc_insertion_point(copy_constructor:nearby.internal.LocalCredential.PrivateKey)
|
|
}
|
|
PROTOBUF_NDEBUG_INLINE LocalCredential_PrivateKey::Impl_::Impl_(
|
|
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
|
|
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
|
|
: _cached_size_{0},
|
|
certificate_alias_(arena),
|
|
key_(arena),
|
|
encrypted_key_(arena) {}
|
|
|
|
inline void LocalCredential_PrivateKey::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
|
|
new (&_impl_) Impl_(internal_visibility(), arena);
|
|
}
|
|
LocalCredential_PrivateKey::~LocalCredential_PrivateKey() {
|
|
// @@protoc_insertion_point(destructor:nearby.internal.LocalCredential.PrivateKey)
|
|
SharedDtor(*this);
|
|
}
|
|
inline void LocalCredential_PrivateKey::SharedDtor(MessageLite& self) {
|
|
LocalCredential_PrivateKey& this_ = static_cast<LocalCredential_PrivateKey&>(self);
|
|
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
|
|
this_.CheckHasBitConsistency();
|
|
}
|
|
this_._internal_metadata_.Delete<::std::string>();
|
|
ABSL_DCHECK(this_.GetArena() == nullptr);
|
|
this_._impl_.certificate_alias_.Destroy();
|
|
this_._impl_.key_.Destroy();
|
|
this_._impl_.encrypted_key_.Destroy();
|
|
this_._impl_.~Impl_();
|
|
}
|
|
|
|
inline void* PROTOBUF_NONNULL LocalCredential_PrivateKey::PlacementNew_(
|
|
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
|
|
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
|
|
return ::new (mem) LocalCredential_PrivateKey(arena);
|
|
}
|
|
constexpr auto LocalCredential_PrivateKey::InternalNewImpl_() {
|
|
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(LocalCredential_PrivateKey),
|
|
alignof(LocalCredential_PrivateKey));
|
|
}
|
|
constexpr auto LocalCredential_PrivateKey::InternalGenerateClassData_() {
|
|
return ::google::protobuf::internal::ClassDataLite<43>{
|
|
{
|
|
&_LocalCredential_PrivateKey_default_instance_._instance,
|
|
&_table_.header,
|
|
nullptr, // OnDemandRegisterArenaDtor
|
|
nullptr, // IsInitialized
|
|
&LocalCredential_PrivateKey::MergeImpl,
|
|
::google::protobuf::MessageLite::GetNewImpl<LocalCredential_PrivateKey>(),
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
&LocalCredential_PrivateKey::SharedDtor,
|
|
::google::protobuf::MessageLite::GetClearImpl<LocalCredential_PrivateKey>(), &LocalCredential_PrivateKey::ByteSizeLong,
|
|
&LocalCredential_PrivateKey::_InternalSerialize,
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential_PrivateKey, _impl_._cached_size_),
|
|
true,
|
|
},
|
|
"nearby.internal.LocalCredential.PrivateKey",
|
|
};
|
|
}
|
|
|
|
PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::google::protobuf::internal::ClassDataLite<43> LocalCredential_PrivateKey_class_data_ =
|
|
LocalCredential_PrivateKey::InternalGenerateClassData_();
|
|
|
|
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
|
|
LocalCredential_PrivateKey::GetClassData() const {
|
|
return LocalCredential_PrivateKey_class_data_.base();
|
|
}
|
|
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::_pbi::TcParseTable<2, 3, 0, 68, 2>
|
|
LocalCredential_PrivateKey::_table_ = {
|
|
{
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential_PrivateKey, _impl_._has_bits_),
|
|
0, // no _extensions_
|
|
3, 24, // max_field_number, fast_idx_mask
|
|
offsetof(decltype(_table_), field_lookup_table),
|
|
4294967288, // skipmap
|
|
offsetof(decltype(_table_), field_entries),
|
|
3, // num_field_entries
|
|
0, // num_aux_entries
|
|
offsetof(decltype(_table_), field_names), // no aux_entries
|
|
LocalCredential_PrivateKey_class_data_.base(),
|
|
nullptr, // post_loop_handler
|
|
::_pbi::TcParser::GenericFallbackLite, // fallback
|
|
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
|
|
::_pbi::TcParser::GetTable<::nearby::internal::LocalCredential_PrivateKey>(), // to_prefetch
|
|
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
|
|
}, {{
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
// string certificate_alias = 1;
|
|
{::_pbi::TcParser::FastUS1,
|
|
{10, 0, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential_PrivateKey, _impl_.certificate_alias_)}},
|
|
// bytes key = 2;
|
|
{::_pbi::TcParser::FastBS1,
|
|
{18, 1, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential_PrivateKey, _impl_.key_)}},
|
|
// bytes encrypted_key = 3;
|
|
{::_pbi::TcParser::FastBS1,
|
|
{26, 2, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential_PrivateKey, _impl_.encrypted_key_)}},
|
|
}}, {{
|
|
65535, 65535
|
|
}}, {{
|
|
// string certificate_alias = 1;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential_PrivateKey, _impl_.certificate_alias_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
|
|
// bytes key = 2;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential_PrivateKey, _impl_.key_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
|
|
// bytes encrypted_key = 3;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential_PrivateKey, _impl_.encrypted_key_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
|
|
}},
|
|
// no aux_entries
|
|
{{
|
|
"\52\21\0\0\0\0\0\0"
|
|
"nearby.internal.LocalCredential.PrivateKey"
|
|
"certificate_alias"
|
|
}},
|
|
};
|
|
PROTOBUF_NOINLINE void LocalCredential_PrivateKey::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:nearby.internal.LocalCredential.PrivateKey)
|
|
::google::protobuf::internal::TSanWrite(&_impl_);
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
|
|
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
|
|
_impl_.certificate_alias_.ClearNonDefaultToEmpty();
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
|
|
_impl_.key_.ClearNonDefaultToEmpty();
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
|
|
_impl_.encrypted_key_.ClearNonDefaultToEmpty();
|
|
}
|
|
}
|
|
_impl_._has_bits_.Clear();
|
|
_internal_metadata_.Clear<::std::string>();
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::uint8_t* PROTOBUF_NONNULL LocalCredential_PrivateKey::_InternalSerialize(
|
|
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
|
|
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
|
|
const LocalCredential_PrivateKey& this_ = static_cast<const LocalCredential_PrivateKey&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::uint8_t* PROTOBUF_NONNULL LocalCredential_PrivateKey::_InternalSerialize(
|
|
::uint8_t* PROTOBUF_NONNULL target,
|
|
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
|
|
const LocalCredential_PrivateKey& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
|
|
this_.CheckHasBitConsistency();
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_start:nearby.internal.LocalCredential.PrivateKey)
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
cached_has_bits = this_._impl_._has_bits_[0];
|
|
// string certificate_alias = 1;
|
|
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
|
|
if (!this_._internal_certificate_alias().empty()) {
|
|
const ::std::string& _s = this_._internal_certificate_alias();
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "nearby.internal.LocalCredential.PrivateKey.certificate_alias");
|
|
target = stream->WriteStringMaybeAliased(1, _s, target);
|
|
}
|
|
}
|
|
|
|
// bytes key = 2;
|
|
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
|
|
if (!this_._internal_key().empty()) {
|
|
const ::std::string& _s = this_._internal_key();
|
|
target = stream->WriteBytesMaybeAliased(2, _s, target);
|
|
}
|
|
}
|
|
|
|
// bytes encrypted_key = 3;
|
|
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
|
|
if (!this_._internal_encrypted_key().empty()) {
|
|
const ::std::string& _s = this_._internal_encrypted_key();
|
|
target = stream->WriteBytesMaybeAliased(3, _s, target);
|
|
}
|
|
}
|
|
|
|
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
|
|
target = stream->WriteRaw(
|
|
this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
|
|
static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:nearby.internal.LocalCredential.PrivateKey)
|
|
return target;
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::size_t LocalCredential_PrivateKey::ByteSizeLong(const MessageLite& base) {
|
|
const LocalCredential_PrivateKey& this_ = static_cast<const LocalCredential_PrivateKey&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::size_t LocalCredential_PrivateKey::ByteSizeLong() const {
|
|
const LocalCredential_PrivateKey& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
// @@protoc_insertion_point(message_byte_size_start:nearby.internal.LocalCredential.PrivateKey)
|
|
::size_t total_size = 0;
|
|
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void)cached_has_bits;
|
|
|
|
::_pbi::Prefetch5LinesFrom7Lines(&this_);
|
|
cached_has_bits = this_._impl_._has_bits_[0];
|
|
if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
|
|
// string certificate_alias = 1;
|
|
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
|
|
if (!this_._internal_certificate_alias().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this_._internal_certificate_alias());
|
|
}
|
|
}
|
|
// bytes key = 2;
|
|
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
|
|
if (!this_._internal_key().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this_._internal_key());
|
|
}
|
|
}
|
|
// bytes encrypted_key = 3;
|
|
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
|
|
if (!this_._internal_encrypted_key().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this_._internal_encrypted_key());
|
|
}
|
|
}
|
|
}
|
|
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
|
|
total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
|
|
}
|
|
this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
|
|
return total_size;
|
|
}
|
|
|
|
void LocalCredential_PrivateKey::MergeImpl(::google::protobuf::MessageLite& to_msg,
|
|
const ::google::protobuf::MessageLite& from_msg) {
|
|
auto* const _this =
|
|
static_cast<LocalCredential_PrivateKey*>(&to_msg);
|
|
auto& from = static_cast<const LocalCredential_PrivateKey&>(from_msg);
|
|
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
|
|
from.CheckHasBitConsistency();
|
|
}
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.internal.LocalCredential.PrivateKey)
|
|
ABSL_DCHECK_NE(&from, _this);
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
cached_has_bits = from._impl_._has_bits_[0];
|
|
if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
|
|
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
|
|
if (!from._internal_certificate_alias().empty()) {
|
|
_this->_internal_set_certificate_alias(from._internal_certificate_alias());
|
|
} else {
|
|
if (_this->_impl_.certificate_alias_.IsDefault()) {
|
|
_this->_internal_set_certificate_alias("");
|
|
}
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
|
|
if (!from._internal_key().empty()) {
|
|
_this->_internal_set_key(from._internal_key());
|
|
} else {
|
|
if (_this->_impl_.key_.IsDefault()) {
|
|
_this->_internal_set_key("");
|
|
}
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
|
|
if (!from._internal_encrypted_key().empty()) {
|
|
_this->_internal_set_encrypted_key(from._internal_encrypted_key());
|
|
} else {
|
|
if (_this->_impl_.encrypted_key_.IsDefault()) {
|
|
_this->_internal_set_encrypted_key("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
_this->_impl_._has_bits_[0] |= cached_has_bits;
|
|
_this->_internal_metadata_.MergeFrom<::std::string>(
|
|
from._internal_metadata_);
|
|
}
|
|
|
|
void LocalCredential_PrivateKey::CopyFrom(const LocalCredential_PrivateKey& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:nearby.internal.LocalCredential.PrivateKey)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
|
|
void LocalCredential_PrivateKey::InternalSwap(LocalCredential_PrivateKey* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
|
|
using ::std::swap;
|
|
auto* arena = GetArena();
|
|
ABSL_DCHECK_EQ(arena, other->GetArena());
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.certificate_alias_, &other->_impl_.certificate_alias_, arena);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.encrypted_key_, &other->_impl_.encrypted_key_, arena);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
// ===================================================================
|
|
|
|
class LocalCredential::_Internal {
|
|
public:
|
|
using HasBits =
|
|
decltype(::std::declval<LocalCredential>()._impl_._has_bits_);
|
|
static constexpr ::int32_t kHasBitsOffset =
|
|
8 * PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_._has_bits_);
|
|
};
|
|
|
|
LocalCredential::LocalCredential(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::MessageLite(arena, LocalCredential_class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::MessageLite(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
SharedCtor(arena);
|
|
// @@protoc_insertion_point(arena_constructor:nearby.internal.LocalCredential)
|
|
}
|
|
PROTOBUF_NDEBUG_INLINE LocalCredential::Impl_::Impl_(
|
|
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
|
|
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
|
|
[[maybe_unused]] const ::nearby::internal::LocalCredential& from_msg)
|
|
: _has_bits_{from._has_bits_},
|
|
_cached_size_{0},
|
|
secret_id_(arena, from.secret_id_),
|
|
key_seed_(arena, from.key_seed_),
|
|
metadata_encryption_key_v0_(arena, from.metadata_encryption_key_v0_),
|
|
identity_token_v1_(arena, from.identity_token_v1_),
|
|
signature_version_(arena, from.signature_version_),
|
|
consumed_salts_{visibility, arena, from.consumed_salts_} {}
|
|
|
|
LocalCredential::LocalCredential(
|
|
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
|
|
const LocalCredential& from)
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
: ::google::protobuf::MessageLite(arena, LocalCredential_class_data_.base()) {
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
: ::google::protobuf::MessageLite(arena) {
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
LocalCredential* const _this = this;
|
|
(void)_this;
|
|
_internal_metadata_.MergeFrom<::std::string>(
|
|
from._internal_metadata_);
|
|
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
|
|
::uint32_t cached_has_bits = _impl_._has_bits_[0];
|
|
_impl_.advertisement_signing_key_ = (CheckHasBit(cached_has_bits, 0x00000020U))
|
|
? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.advertisement_signing_key_)
|
|
: nullptr;
|
|
_impl_.connection_signing_key_ = (CheckHasBit(cached_has_bits, 0x00000040U))
|
|
? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.connection_signing_key_)
|
|
: nullptr;
|
|
::memcpy(reinterpret_cast<char*>(&_impl_) +
|
|
offsetof(Impl_, start_time_millis_),
|
|
reinterpret_cast<const char*>(&from._impl_) +
|
|
offsetof(Impl_, start_time_millis_),
|
|
offsetof(Impl_, identity_type_) -
|
|
offsetof(Impl_, start_time_millis_) +
|
|
sizeof(Impl_::identity_type_));
|
|
|
|
// @@protoc_insertion_point(copy_constructor:nearby.internal.LocalCredential)
|
|
}
|
|
PROTOBUF_NDEBUG_INLINE LocalCredential::Impl_::Impl_(
|
|
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
|
|
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
|
|
: _cached_size_{0},
|
|
secret_id_(arena),
|
|
key_seed_(arena),
|
|
metadata_encryption_key_v0_(arena),
|
|
identity_token_v1_(arena),
|
|
signature_version_(arena),
|
|
consumed_salts_{visibility, arena} {}
|
|
|
|
inline void LocalCredential::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
|
|
new (&_impl_) Impl_(internal_visibility(), arena);
|
|
::memset(reinterpret_cast<char*>(&_impl_) +
|
|
offsetof(Impl_, advertisement_signing_key_),
|
|
0,
|
|
offsetof(Impl_, identity_type_) -
|
|
offsetof(Impl_, advertisement_signing_key_) +
|
|
sizeof(Impl_::identity_type_));
|
|
}
|
|
LocalCredential::~LocalCredential() {
|
|
// @@protoc_insertion_point(destructor:nearby.internal.LocalCredential)
|
|
SharedDtor(*this);
|
|
}
|
|
inline void LocalCredential::SharedDtor(MessageLite& self) {
|
|
LocalCredential& this_ = static_cast<LocalCredential&>(self);
|
|
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
|
|
this_.CheckHasBitConsistency();
|
|
}
|
|
this_._internal_metadata_.Delete<::std::string>();
|
|
ABSL_DCHECK(this_.GetArena() == nullptr);
|
|
this_._impl_.secret_id_.Destroy();
|
|
this_._impl_.key_seed_.Destroy();
|
|
this_._impl_.metadata_encryption_key_v0_.Destroy();
|
|
this_._impl_.identity_token_v1_.Destroy();
|
|
this_._impl_.signature_version_.Destroy();
|
|
delete this_._impl_.advertisement_signing_key_;
|
|
delete this_._impl_.connection_signing_key_;
|
|
this_._impl_.~Impl_();
|
|
}
|
|
|
|
inline void* PROTOBUF_NONNULL LocalCredential::PlacementNew_(
|
|
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
|
|
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
|
|
return ::new (mem) LocalCredential(arena);
|
|
}
|
|
constexpr auto LocalCredential::InternalNewImpl_() {
|
|
constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.consumed_salts_) +
|
|
decltype(LocalCredential::_impl_.consumed_salts_)::
|
|
InternalGetArenaOffset(
|
|
::google::protobuf::MessageLite::internal_visibility()),
|
|
});
|
|
if (arena_bits.has_value()) {
|
|
return ::google::protobuf::internal::MessageCreator::CopyInit(
|
|
sizeof(LocalCredential), alignof(LocalCredential), *arena_bits);
|
|
} else {
|
|
return ::google::protobuf::internal::MessageCreator(&LocalCredential::PlacementNew_,
|
|
sizeof(LocalCredential),
|
|
alignof(LocalCredential));
|
|
}
|
|
}
|
|
constexpr auto LocalCredential::InternalGenerateClassData_() {
|
|
return ::google::protobuf::internal::ClassDataLite<32>{
|
|
{
|
|
&_LocalCredential_default_instance_._instance,
|
|
&_table_.header,
|
|
nullptr, // OnDemandRegisterArenaDtor
|
|
nullptr, // IsInitialized
|
|
&LocalCredential::MergeImpl,
|
|
::google::protobuf::MessageLite::GetNewImpl<LocalCredential>(),
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
&LocalCredential::SharedDtor,
|
|
::google::protobuf::MessageLite::GetClearImpl<LocalCredential>(), &LocalCredential::ByteSizeLong,
|
|
&LocalCredential::_InternalSerialize,
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_._cached_size_),
|
|
true,
|
|
},
|
|
"nearby.internal.LocalCredential",
|
|
};
|
|
}
|
|
|
|
PROTOBUF_CONSTINIT
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::google::protobuf::internal::ClassDataLite<32> LocalCredential_class_data_ =
|
|
LocalCredential::InternalGenerateClassData_();
|
|
|
|
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
|
|
LocalCredential::GetClassData() const {
|
|
return LocalCredential_class_data_.base();
|
|
}
|
|
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
|
|
const ::_pbi::TcParseTable<4, 13, 3, 65, 2>
|
|
LocalCredential::_table_ = {
|
|
{
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_._has_bits_),
|
|
0, // no _extensions_
|
|
13, 120, // max_field_number, fast_idx_mask
|
|
offsetof(decltype(_table_), field_lookup_table),
|
|
4294959104, // skipmap
|
|
offsetof(decltype(_table_), field_entries),
|
|
13, // num_field_entries
|
|
3, // num_aux_entries
|
|
offsetof(decltype(_table_), aux_entries),
|
|
LocalCredential_class_data_.base(),
|
|
nullptr, // post_loop_handler
|
|
::_pbi::TcParser::GenericFallbackLite, // fallback
|
|
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
|
|
::_pbi::TcParser::GetTable<::nearby::internal::LocalCredential>(), // to_prefetch
|
|
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
|
|
}, {{
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
// bytes secret_id = 1 [deprecated = true];
|
|
{::_pbi::TcParser::FastBS1,
|
|
{10, 0, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.secret_id_)}},
|
|
// bytes key_seed = 2;
|
|
{::_pbi::TcParser::FastBS1,
|
|
{18, 1, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.key_seed_)}},
|
|
// int64 start_time_millis = 3;
|
|
{::_pbi::TcParser::FastV64S1,
|
|
{24, 7, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.start_time_millis_)}},
|
|
// int64 end_time_millis = 4;
|
|
{::_pbi::TcParser::FastV64S1,
|
|
{32, 8, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.end_time_millis_)}},
|
|
// bytes metadata_encryption_key_v0 = 5;
|
|
{::_pbi::TcParser::FastBS1,
|
|
{42, 2, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.metadata_encryption_key_v0_)}},
|
|
// .nearby.internal.LocalCredential.PrivateKey advertisement_signing_key = 6;
|
|
{::_pbi::TcParser::FastMtS1,
|
|
{50, 5, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.advertisement_signing_key_)}},
|
|
// .nearby.internal.LocalCredential.PrivateKey connection_signing_key = 7;
|
|
{::_pbi::TcParser::FastMtS1,
|
|
{58, 6, 1,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.connection_signing_key_)}},
|
|
// .nearby.internal.IdentityType identity_type = 8;
|
|
{::_pbi::TcParser::FastV32S1,
|
|
{64, 11, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.identity_type_)}},
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
// bytes identity_token_v1 = 10;
|
|
{::_pbi::TcParser::FastBS1,
|
|
{82, 3, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.identity_token_v1_)}},
|
|
// int64 id = 11;
|
|
{::_pbi::TcParser::FastV64S1,
|
|
{88, 9, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.id_)}},
|
|
// string signature_version = 12 [deprecated = true];
|
|
{::_pbi::TcParser::FastUS1,
|
|
{98, 4, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.signature_version_)}},
|
|
// int64 credential_version = 13;
|
|
{::_pbi::TcParser::FastV64S1,
|
|
{104, 10, 0,
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.credential_version_)}},
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
{::_pbi::TcParser::MiniParse, {}},
|
|
}}, {{
|
|
65535, 65535
|
|
}}, {{
|
|
// bytes secret_id = 1 [deprecated = true];
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.secret_id_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
|
|
// bytes key_seed = 2;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.key_seed_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
|
|
// int64 start_time_millis = 3;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.start_time_millis_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
|
|
// int64 end_time_millis = 4;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.end_time_millis_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
|
|
// bytes metadata_encryption_key_v0 = 5;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.metadata_encryption_key_v0_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
|
|
// .nearby.internal.LocalCredential.PrivateKey advertisement_signing_key = 6;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.advertisement_signing_key_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
|
|
// .nearby.internal.LocalCredential.PrivateKey connection_signing_key = 7;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.connection_signing_key_), _Internal::kHasBitsOffset + 6, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
|
|
// .nearby.internal.IdentityType identity_type = 8;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.identity_type_), _Internal::kHasBitsOffset + 11, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
|
|
// map<uint32, bool> consumed_salts = 9;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.consumed_salts_), _Internal::kHasBitsOffset + 12, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMap)},
|
|
// bytes identity_token_v1 = 10;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.identity_token_v1_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
|
|
// int64 id = 11;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.id_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
|
|
// string signature_version = 12 [deprecated = true];
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.signature_version_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
|
|
// int64 credential_version = 13;
|
|
{PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.credential_version_), _Internal::kHasBitsOffset + 10, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
|
|
}},
|
|
{{
|
|
{::_pbi::TcParser::GetTable<::nearby::internal::LocalCredential_PrivateKey>()},
|
|
{::_pbi::TcParser::GetTable<::nearby::internal::LocalCredential_PrivateKey>()},
|
|
{::_pbi::TcParser::GetMapAuxInfo(
|
|
0, 0, 13, 8, 1)},
|
|
}},
|
|
{{
|
|
"\37\0\0\0\0\0\0\0\0\0\0\0\21\0\0\0"
|
|
"nearby.internal.LocalCredential"
|
|
"signature_version"
|
|
}},
|
|
};
|
|
PROTOBUF_NOINLINE void LocalCredential::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:nearby.internal.LocalCredential)
|
|
::google::protobuf::internal::TSanWrite(&_impl_);
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _impl_._has_bits_[0];
|
|
if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) {
|
|
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
|
|
_impl_.secret_id_.ClearNonDefaultToEmpty();
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
|
|
_impl_.key_seed_.ClearNonDefaultToEmpty();
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
|
|
_impl_.metadata_encryption_key_v0_.ClearNonDefaultToEmpty();
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
|
|
_impl_.identity_token_v1_.ClearNonDefaultToEmpty();
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
|
|
_impl_.signature_version_.ClearNonDefaultToEmpty();
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
|
|
ABSL_DCHECK(_impl_.advertisement_signing_key_ != nullptr);
|
|
_impl_.advertisement_signing_key_->Clear();
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000040U)) {
|
|
ABSL_DCHECK(_impl_.connection_signing_key_ != nullptr);
|
|
_impl_.connection_signing_key_->Clear();
|
|
}
|
|
}
|
|
_impl_.start_time_millis_ = ::int64_t{0};
|
|
if (BatchCheckHasBit(cached_has_bits, 0x00001f00U)) {
|
|
::memset(&_impl_.end_time_millis_, 0, static_cast<::size_t>(
|
|
reinterpret_cast<char*>(&_impl_.identity_type_) -
|
|
reinterpret_cast<char*>(&_impl_.end_time_millis_)) + sizeof(_impl_.identity_type_));
|
|
if (CheckHasBitForRepeated(cached_has_bits, 0x00001000U)) {
|
|
_impl_.consumed_salts_.Clear();
|
|
}
|
|
}
|
|
_impl_._has_bits_.Clear();
|
|
_internal_metadata_.Clear<::std::string>();
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::uint8_t* PROTOBUF_NONNULL LocalCredential::_InternalSerialize(
|
|
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
|
|
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
|
|
const LocalCredential& this_ = static_cast<const LocalCredential&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::uint8_t* PROTOBUF_NONNULL LocalCredential::_InternalSerialize(
|
|
::uint8_t* PROTOBUF_NONNULL target,
|
|
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
|
|
const LocalCredential& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
|
|
this_.CheckHasBitConsistency();
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_start:nearby.internal.LocalCredential)
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
cached_has_bits = this_._impl_._has_bits_[0];
|
|
// bytes secret_id = 1 [deprecated = true];
|
|
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
|
|
if (!this_._internal_secret_id().empty()) {
|
|
const ::std::string& _s = this_._internal_secret_id();
|
|
target = stream->WriteBytesMaybeAliased(1, _s, target);
|
|
}
|
|
}
|
|
|
|
// bytes key_seed = 2;
|
|
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
|
|
if (!this_._internal_key_seed().empty()) {
|
|
const ::std::string& _s = this_._internal_key_seed();
|
|
target = stream->WriteBytesMaybeAliased(2, _s, target);
|
|
}
|
|
}
|
|
|
|
// int64 start_time_millis = 3;
|
|
if (CheckHasBit(cached_has_bits, 0x00000080U)) {
|
|
if (this_._internal_start_time_millis() != 0) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>(
|
|
stream, this_._internal_start_time_millis(), target);
|
|
}
|
|
}
|
|
|
|
// int64 end_time_millis = 4;
|
|
if (CheckHasBit(cached_has_bits, 0x00000100U)) {
|
|
if (this_._internal_end_time_millis() != 0) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<4>(
|
|
stream, this_._internal_end_time_millis(), target);
|
|
}
|
|
}
|
|
|
|
// bytes metadata_encryption_key_v0 = 5;
|
|
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
|
|
if (!this_._internal_metadata_encryption_key_v0().empty()) {
|
|
const ::std::string& _s = this_._internal_metadata_encryption_key_v0();
|
|
target = stream->WriteBytesMaybeAliased(5, _s, target);
|
|
}
|
|
}
|
|
|
|
// .nearby.internal.LocalCredential.PrivateKey advertisement_signing_key = 6;
|
|
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
|
|
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
|
|
6, *this_._impl_.advertisement_signing_key_, this_._impl_.advertisement_signing_key_->GetCachedSize(), target,
|
|
stream);
|
|
}
|
|
|
|
// .nearby.internal.LocalCredential.PrivateKey connection_signing_key = 7;
|
|
if (CheckHasBit(cached_has_bits, 0x00000040U)) {
|
|
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
|
|
7, *this_._impl_.connection_signing_key_, this_._impl_.connection_signing_key_->GetCachedSize(), target,
|
|
stream);
|
|
}
|
|
|
|
// .nearby.internal.IdentityType identity_type = 8;
|
|
if (CheckHasBit(cached_has_bits, 0x00000800U)) {
|
|
if (this_._internal_identity_type() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteEnumToArray(
|
|
8, this_._internal_identity_type(), target);
|
|
}
|
|
}
|
|
|
|
// map<uint32, bool> consumed_salts = 9;
|
|
if (CheckHasBitForRepeated(cached_has_bits, 0x00001000U)) {
|
|
if (!this_._internal_consumed_salts().empty()) {
|
|
using MapType = ::google::protobuf::Map<::uint32_t, bool>;
|
|
using WireHelper = _pbi::MapEntryFuncs<::uint32_t, bool,
|
|
_pbi::WireFormatLite::TYPE_UINT32,
|
|
_pbi::WireFormatLite::TYPE_BOOL>;
|
|
const auto& field = this_._internal_consumed_salts();
|
|
|
|
if (stream->IsSerializationDeterministic() && field.size() > 1) {
|
|
for (const auto& entry : ::google::protobuf::internal::MapSorterFlat<MapType>(field)) {
|
|
target = WireHelper::InternalSerialize(
|
|
9, entry.first, entry.second, target, stream);
|
|
}
|
|
} else {
|
|
for (const auto& entry : field) {
|
|
target = WireHelper::InternalSerialize(
|
|
9, entry.first, entry.second, target, stream);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// bytes identity_token_v1 = 10;
|
|
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
|
|
if (!this_._internal_identity_token_v1().empty()) {
|
|
const ::std::string& _s = this_._internal_identity_token_v1();
|
|
target = stream->WriteBytesMaybeAliased(10, _s, target);
|
|
}
|
|
}
|
|
|
|
// int64 id = 11;
|
|
if (CheckHasBit(cached_has_bits, 0x00000200U)) {
|
|
if (this_._internal_id() != 0) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<11>(
|
|
stream, this_._internal_id(), target);
|
|
}
|
|
}
|
|
|
|
// string signature_version = 12 [deprecated = true];
|
|
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
|
|
if (!this_._internal_signature_version().empty()) {
|
|
const ::std::string& _s = this_._internal_signature_version();
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
|
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "nearby.internal.LocalCredential.signature_version");
|
|
target = stream->WriteStringMaybeAliased(12, _s, target);
|
|
}
|
|
}
|
|
|
|
// int64 credential_version = 13;
|
|
if (CheckHasBit(cached_has_bits, 0x00000400U)) {
|
|
if (this_._internal_credential_version() != 0) {
|
|
target =
|
|
::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<13>(
|
|
stream, this_._internal_credential_version(), target);
|
|
}
|
|
}
|
|
|
|
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
|
|
target = stream->WriteRaw(
|
|
this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
|
|
static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:nearby.internal.LocalCredential)
|
|
return target;
|
|
}
|
|
|
|
#if defined(PROTOBUF_CUSTOM_VTABLE)
|
|
::size_t LocalCredential::ByteSizeLong(const MessageLite& base) {
|
|
const LocalCredential& this_ = static_cast<const LocalCredential&>(base);
|
|
#else // PROTOBUF_CUSTOM_VTABLE
|
|
::size_t LocalCredential::ByteSizeLong() const {
|
|
const LocalCredential& this_ = *this;
|
|
#endif // PROTOBUF_CUSTOM_VTABLE
|
|
// @@protoc_insertion_point(message_byte_size_start:nearby.internal.LocalCredential)
|
|
::size_t total_size = 0;
|
|
|
|
::uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void)cached_has_bits;
|
|
|
|
::_pbi::Prefetch5LinesFrom7Lines(&this_);
|
|
cached_has_bits = this_._impl_._has_bits_[0];
|
|
if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
|
|
// bytes secret_id = 1 [deprecated = true];
|
|
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
|
|
if (!this_._internal_secret_id().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this_._internal_secret_id());
|
|
}
|
|
}
|
|
// bytes key_seed = 2;
|
|
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
|
|
if (!this_._internal_key_seed().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this_._internal_key_seed());
|
|
}
|
|
}
|
|
// bytes metadata_encryption_key_v0 = 5;
|
|
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
|
|
if (!this_._internal_metadata_encryption_key_v0().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this_._internal_metadata_encryption_key_v0());
|
|
}
|
|
}
|
|
// bytes identity_token_v1 = 10;
|
|
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
|
|
if (!this_._internal_identity_token_v1().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this_._internal_identity_token_v1());
|
|
}
|
|
}
|
|
// string signature_version = 12 [deprecated = true];
|
|
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
|
|
if (!this_._internal_signature_version().empty()) {
|
|
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this_._internal_signature_version());
|
|
}
|
|
}
|
|
// .nearby.internal.LocalCredential.PrivateKey advertisement_signing_key = 6;
|
|
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.advertisement_signing_key_);
|
|
}
|
|
// .nearby.internal.LocalCredential.PrivateKey connection_signing_key = 7;
|
|
if (CheckHasBit(cached_has_bits, 0x00000040U)) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.connection_signing_key_);
|
|
}
|
|
// int64 start_time_millis = 3;
|
|
if (CheckHasBit(cached_has_bits, 0x00000080U)) {
|
|
if (this_._internal_start_time_millis() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
|
|
this_._internal_start_time_millis());
|
|
}
|
|
}
|
|
}
|
|
if (BatchCheckHasBit(cached_has_bits, 0x00001f00U)) {
|
|
// int64 end_time_millis = 4;
|
|
if (CheckHasBit(cached_has_bits, 0x00000100U)) {
|
|
if (this_._internal_end_time_millis() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
|
|
this_._internal_end_time_millis());
|
|
}
|
|
}
|
|
// int64 id = 11;
|
|
if (CheckHasBit(cached_has_bits, 0x00000200U)) {
|
|
if (this_._internal_id() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
|
|
this_._internal_id());
|
|
}
|
|
}
|
|
// int64 credential_version = 13;
|
|
if (CheckHasBit(cached_has_bits, 0x00000400U)) {
|
|
if (this_._internal_credential_version() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
|
|
this_._internal_credential_version());
|
|
}
|
|
}
|
|
// .nearby.internal.IdentityType identity_type = 8;
|
|
if (CheckHasBit(cached_has_bits, 0x00000800U)) {
|
|
if (this_._internal_identity_type() != 0) {
|
|
total_size += 1 +
|
|
::_pbi::WireFormatLite::EnumSize(this_._internal_identity_type());
|
|
}
|
|
}
|
|
// map<uint32, bool> consumed_salts = 9;
|
|
if (CheckHasBitForRepeated(cached_has_bits, 0x00001000U)) {
|
|
total_size +=
|
|
1 * ::google::protobuf::internal::FromIntSize(this_._internal_consumed_salts_size());
|
|
for (const auto& entry : this_._internal_consumed_salts()) {
|
|
total_size += _pbi::MapEntryFuncs<::uint32_t, bool,
|
|
_pbi::WireFormatLite::TYPE_UINT32,
|
|
_pbi::WireFormatLite::TYPE_BOOL>::ByteSizeLong(entry.first, entry.second);
|
|
}
|
|
}
|
|
}
|
|
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
|
|
total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
|
|
}
|
|
this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
|
|
return total_size;
|
|
}
|
|
|
|
void LocalCredential::MergeImpl(::google::protobuf::MessageLite& to_msg,
|
|
const ::google::protobuf::MessageLite& from_msg) {
|
|
auto* const _this =
|
|
static_cast<LocalCredential*>(&to_msg);
|
|
auto& from = static_cast<const LocalCredential&>(from_msg);
|
|
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
|
|
from.CheckHasBitConsistency();
|
|
}
|
|
::google::protobuf::Arena* arena = _this->GetArena();
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.internal.LocalCredential)
|
|
ABSL_DCHECK_NE(&from, _this);
|
|
::uint32_t cached_has_bits = 0;
|
|
(void)cached_has_bits;
|
|
|
|
cached_has_bits = from._impl_._has_bits_[0];
|
|
if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
|
|
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
|
|
if (!from._internal_secret_id().empty()) {
|
|
_this->_internal_set_secret_id(from._internal_secret_id());
|
|
} else {
|
|
if (_this->_impl_.secret_id_.IsDefault()) {
|
|
_this->_internal_set_secret_id("");
|
|
}
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
|
|
if (!from._internal_key_seed().empty()) {
|
|
_this->_internal_set_key_seed(from._internal_key_seed());
|
|
} else {
|
|
if (_this->_impl_.key_seed_.IsDefault()) {
|
|
_this->_internal_set_key_seed("");
|
|
}
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
|
|
if (!from._internal_metadata_encryption_key_v0().empty()) {
|
|
_this->_internal_set_metadata_encryption_key_v0(from._internal_metadata_encryption_key_v0());
|
|
} else {
|
|
if (_this->_impl_.metadata_encryption_key_v0_.IsDefault()) {
|
|
_this->_internal_set_metadata_encryption_key_v0("");
|
|
}
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
|
|
if (!from._internal_identity_token_v1().empty()) {
|
|
_this->_internal_set_identity_token_v1(from._internal_identity_token_v1());
|
|
} else {
|
|
if (_this->_impl_.identity_token_v1_.IsDefault()) {
|
|
_this->_internal_set_identity_token_v1("");
|
|
}
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
|
|
if (!from._internal_signature_version().empty()) {
|
|
_this->_internal_set_signature_version(from._internal_signature_version());
|
|
} else {
|
|
if (_this->_impl_.signature_version_.IsDefault()) {
|
|
_this->_internal_set_signature_version("");
|
|
}
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
|
|
ABSL_DCHECK(from._impl_.advertisement_signing_key_ != nullptr);
|
|
if (_this->_impl_.advertisement_signing_key_ == nullptr) {
|
|
_this->_impl_.advertisement_signing_key_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.advertisement_signing_key_);
|
|
} else {
|
|
_this->_impl_.advertisement_signing_key_->MergeFrom(*from._impl_.advertisement_signing_key_);
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000040U)) {
|
|
ABSL_DCHECK(from._impl_.connection_signing_key_ != nullptr);
|
|
if (_this->_impl_.connection_signing_key_ == nullptr) {
|
|
_this->_impl_.connection_signing_key_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.connection_signing_key_);
|
|
} else {
|
|
_this->_impl_.connection_signing_key_->MergeFrom(*from._impl_.connection_signing_key_);
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000080U)) {
|
|
if (from._internal_start_time_millis() != 0) {
|
|
_this->_impl_.start_time_millis_ = from._impl_.start_time_millis_;
|
|
}
|
|
}
|
|
}
|
|
if (BatchCheckHasBit(cached_has_bits, 0x00001f00U)) {
|
|
if (CheckHasBit(cached_has_bits, 0x00000100U)) {
|
|
if (from._internal_end_time_millis() != 0) {
|
|
_this->_impl_.end_time_millis_ = from._impl_.end_time_millis_;
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000200U)) {
|
|
if (from._internal_id() != 0) {
|
|
_this->_impl_.id_ = from._impl_.id_;
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000400U)) {
|
|
if (from._internal_credential_version() != 0) {
|
|
_this->_impl_.credential_version_ = from._impl_.credential_version_;
|
|
}
|
|
}
|
|
if (CheckHasBit(cached_has_bits, 0x00000800U)) {
|
|
if (from._internal_identity_type() != 0) {
|
|
_this->_impl_.identity_type_ = from._impl_.identity_type_;
|
|
}
|
|
}
|
|
if (CheckHasBitForRepeated(cached_has_bits, 0x00001000U)) {
|
|
_this->_impl_.consumed_salts_.MergeFrom(from._impl_.consumed_salts_);
|
|
}
|
|
}
|
|
_this->_impl_._has_bits_[0] |= cached_has_bits;
|
|
_this->_internal_metadata_.MergeFrom<::std::string>(
|
|
from._internal_metadata_);
|
|
}
|
|
|
|
void LocalCredential::CopyFrom(const LocalCredential& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:nearby.internal.LocalCredential)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
|
|
void LocalCredential::InternalSwap(LocalCredential* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
|
|
using ::std::swap;
|
|
auto* arena = GetArena();
|
|
ABSL_DCHECK_EQ(arena, other->GetArena());
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.secret_id_, &other->_impl_.secret_id_, arena);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_seed_, &other->_impl_.key_seed_, arena);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.metadata_encryption_key_v0_, &other->_impl_.metadata_encryption_key_v0_, arena);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.identity_token_v1_, &other->_impl_.identity_token_v1_, arena);
|
|
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.signature_version_, &other->_impl_.signature_version_, arena);
|
|
::google::protobuf::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.identity_type_)
|
|
+ sizeof(LocalCredential::_impl_.identity_type_)
|
|
- PROTOBUF_FIELD_OFFSET(LocalCredential, _impl_.advertisement_signing_key_)>(
|
|
reinterpret_cast<char*>(&_impl_.advertisement_signing_key_),
|
|
reinterpret_cast<char*>(&other->_impl_.advertisement_signing_key_));
|
|
_impl_.consumed_salts_.InternalSwap(&other->_impl_.consumed_salts_);
|
|
}
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
} // namespace internal
|
|
} // namespace nearby
|
|
namespace google {
|
|
namespace protobuf {
|
|
} // namespace protobuf
|
|
} // namespace google
|
|
// @@protoc_insertion_point(global_scope)
|
|
#include "google/protobuf/port_undef.inc"
|