Files
p2pool-monero/external/src/Tari/proto/gRPC/network.pb.cc
T
2024-06-12 21:16:54 +02:00

2662 lines
102 KiB
C++

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: network.proto
// Protobuf C++ Version: 5.26.1
#include "network.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"
#include "google/protobuf/generated_message_tctable_impl.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 tari {
namespace rpc {
inline constexpr SoftwareUpdate::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: version_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
sha_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
download_url_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
has_update_{false},
_cached_size_{0} {}
template <typename>
PROTOBUF_CONSTEXPR SoftwareUpdate::SoftwareUpdate(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct SoftwareUpdateDefaultTypeInternal {
PROTOBUF_CONSTEXPR SoftwareUpdateDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~SoftwareUpdateDefaultTypeInternal() {}
union {
SoftwareUpdate _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SoftwareUpdateDefaultTypeInternal _SoftwareUpdate_default_instance_;
inline constexpr NodeIdentity::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: public_addresses_{},
public_key_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
node_id_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
_cached_size_{0} {}
template <typename>
PROTOBUF_CONSTEXPR NodeIdentity::NodeIdentity(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct NodeIdentityDefaultTypeInternal {
PROTOBUF_CONSTEXPR NodeIdentityDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~NodeIdentityDefaultTypeInternal() {}
union {
NodeIdentity _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NodeIdentityDefaultTypeInternal _NodeIdentity_default_instance_;
inline constexpr NetworkStatusResponse::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: status_{static_cast< ::tari::rpc::ConnectivityStatus >(0)},
avg_latency_ms_{0u},
num_node_connections_{0u},
_cached_size_{0} {}
template <typename>
PROTOBUF_CONSTEXPR NetworkStatusResponse::NetworkStatusResponse(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct NetworkStatusResponseDefaultTypeInternal {
PROTOBUF_CONSTEXPR NetworkStatusResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~NetworkStatusResponseDefaultTypeInternal() {}
union {
NetworkStatusResponse _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NetworkStatusResponseDefaultTypeInternal _NetworkStatusResponse_default_instance_;
inline constexpr GetIdentityResponse::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: public_key_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
public_address_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
node_id_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
_cached_size_{0} {}
template <typename>
PROTOBUF_CONSTEXPR GetIdentityResponse::GetIdentityResponse(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct GetIdentityResponseDefaultTypeInternal {
PROTOBUF_CONSTEXPR GetIdentityResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~GetIdentityResponseDefaultTypeInternal() {}
union {
GetIdentityResponse _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetIdentityResponseDefaultTypeInternal _GetIdentityResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetIdentityRequest::GetIdentityRequest(::_pbi::ConstantInitialized) {}
struct GetIdentityRequestDefaultTypeInternal {
PROTOBUF_CONSTEXPR GetIdentityRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~GetIdentityRequestDefaultTypeInternal() {}
union {
GetIdentityRequest _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetIdentityRequestDefaultTypeInternal _GetIdentityRequest_default_instance_;
inline constexpr AverageLatency::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: latency_{::uint64_t{0u}},
_cached_size_{0} {}
template <typename>
PROTOBUF_CONSTEXPR AverageLatency::AverageLatency(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct AverageLatencyDefaultTypeInternal {
PROTOBUF_CONSTEXPR AverageLatencyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~AverageLatencyDefaultTypeInternal() {}
union {
AverageLatency _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AverageLatencyDefaultTypeInternal _AverageLatency_default_instance_;
inline constexpr Address::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
address_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
last_seen_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
avg_latency_{nullptr},
connection_attempts_{0u} {}
template <typename>
PROTOBUF_CONSTEXPR Address::Address(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct AddressDefaultTypeInternal {
PROTOBUF_CONSTEXPR AddressDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~AddressDefaultTypeInternal() {}
union {
Address _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AddressDefaultTypeInternal _Address_default_instance_;
inline constexpr Peer::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: addresses_{},
supported_protocols_{},
public_key_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
node_id_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
banned_reason_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
user_agent_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
last_connection_{::uint64_t{0u}},
banned_until_{::uint64_t{0u}},
flags_{0u},
features_{0u},
offline_at_{::uint64_t{0u}},
_cached_size_{0} {}
template <typename>
PROTOBUF_CONSTEXPR Peer::Peer(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct PeerDefaultTypeInternal {
PROTOBUF_CONSTEXPR PeerDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~PeerDefaultTypeInternal() {}
union {
Peer _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PeerDefaultTypeInternal _Peer_default_instance_;
inline constexpr ListConnectedPeersResponse::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: connected_peers_{},
_cached_size_{0} {}
template <typename>
PROTOBUF_CONSTEXPR ListConnectedPeersResponse::ListConnectedPeersResponse(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct ListConnectedPeersResponseDefaultTypeInternal {
PROTOBUF_CONSTEXPR ListConnectedPeersResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~ListConnectedPeersResponseDefaultTypeInternal() {}
union {
ListConnectedPeersResponse _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListConnectedPeersResponseDefaultTypeInternal _ListConnectedPeersResponse_default_instance_;
} // namespace rpc
} // namespace tari
static ::_pb::Metadata file_level_metadata_network_2eproto[9];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_network_2eproto[1];
static constexpr const ::_pb::ServiceDescriptor**
file_level_service_descriptors_network_2eproto = nullptr;
const ::uint32_t
TableStruct_network_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::tari::rpc::NodeIdentity, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::tari::rpc::NodeIdentity, _impl_.public_key_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::NodeIdentity, _impl_.public_addresses_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::NodeIdentity, _impl_.node_id_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.public_key_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.node_id_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.addresses_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.last_connection_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.flags_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.banned_until_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.banned_reason_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.offline_at_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.features_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.supported_protocols_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Peer, _impl_.user_agent_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::tari::rpc::NetworkStatusResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::tari::rpc::NetworkStatusResponse, _impl_.status_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::NetworkStatusResponse, _impl_.avg_latency_ms_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::NetworkStatusResponse, _impl_.num_node_connections_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Address, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Address, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::tari::rpc::Address, _impl_.address_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Address, _impl_.last_seen_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Address, _impl_.connection_attempts_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::Address, _impl_.avg_latency_),
~0u,
~0u,
~0u,
0,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::tari::rpc::AverageLatency, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::tari::rpc::AverageLatency, _impl_.latency_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::tari::rpc::ListConnectedPeersResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::tari::rpc::ListConnectedPeersResponse, _impl_.connected_peers_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::tari::rpc::SoftwareUpdate, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::tari::rpc::SoftwareUpdate, _impl_.has_update_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::SoftwareUpdate, _impl_.version_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::SoftwareUpdate, _impl_.sha_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::SoftwareUpdate, _impl_.download_url_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::tari::rpc::GetIdentityRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::tari::rpc::GetIdentityResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
~0u, // no _split_
~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::tari::rpc::GetIdentityResponse, _impl_.public_key_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::GetIdentityResponse, _impl_.public_address_),
PROTOBUF_FIELD_OFFSET(::tari::rpc::GetIdentityResponse, _impl_.node_id_),
};
static const ::_pbi::MigrationSchema
schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{0, -1, -1, sizeof(::tari::rpc::NodeIdentity)},
{11, -1, -1, sizeof(::tari::rpc::Peer)},
{30, -1, -1, sizeof(::tari::rpc::NetworkStatusResponse)},
{41, 53, -1, sizeof(::tari::rpc::Address)},
{57, -1, -1, sizeof(::tari::rpc::AverageLatency)},
{66, -1, -1, sizeof(::tari::rpc::ListConnectedPeersResponse)},
{75, -1, -1, sizeof(::tari::rpc::SoftwareUpdate)},
{87, -1, -1, sizeof(::tari::rpc::GetIdentityRequest)},
{95, -1, -1, sizeof(::tari::rpc::GetIdentityResponse)},
};
static const ::_pb::Message* const file_default_instances[] = {
&::tari::rpc::_NodeIdentity_default_instance_._instance,
&::tari::rpc::_Peer_default_instance_._instance,
&::tari::rpc::_NetworkStatusResponse_default_instance_._instance,
&::tari::rpc::_Address_default_instance_._instance,
&::tari::rpc::_AverageLatency_default_instance_._instance,
&::tari::rpc::_ListConnectedPeersResponse_default_instance_._instance,
&::tari::rpc::_SoftwareUpdate_default_instance_._instance,
&::tari::rpc::_GetIdentityRequest_default_instance_._instance,
&::tari::rpc::_GetIdentityResponse_default_instance_._instance,
};
const char descriptor_table_protodef_network_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
protodesc_cold) = {
"\n\rnetwork.proto\022\010tari.rpc\032\037google/protob"
"uf/timestamp.proto\"M\n\014NodeIdentity\022\022\n\npu"
"blic_key\030\001 \001(\014\022\030\n\020public_addresses\030\002 \003(\t"
"\022\017\n\007node_id\030\003 \001(\014\"\375\001\n\004Peer\022\022\n\npublic_key"
"\030\001 \001(\014\022\017\n\007node_id\030\002 \001(\014\022$\n\taddresses\030\003 \003"
"(\0132\021.tari.rpc.Address\022\027\n\017last_connection"
"\030\004 \001(\004\022\r\n\005flags\030\005 \001(\r\022\024\n\014banned_until\030\006 "
"\001(\004\022\025\n\rbanned_reason\030\007 \001(\t\022\022\n\noffline_at"
"\030\010 \001(\004\022\020\n\010features\030\t \001(\r\022\033\n\023supported_pr"
"otocols\030\013 \003(\014\022\022\n\nuser_agent\030\014 \001(\t\"{\n\025Net"
"workStatusResponse\022,\n\006status\030\001 \001(\0162\034.tar"
"i.rpc.ConnectivityStatus\022\026\n\016avg_latency_"
"ms\030\002 \001(\r\022\034\n\024num_node_connections\030\003 \001(\r\"y"
"\n\007Address\022\017\n\007address\030\001 \001(\014\022\021\n\tlast_seen\030"
"\002 \001(\t\022\033\n\023connection_attempts\030\003 \001(\r\022-\n\013av"
"g_latency\030\005 \001(\0132\030.tari.rpc.AverageLatenc"
"y\"!\n\016AverageLatency\022\017\n\007latency\030\001 \001(\004\"E\n\032"
"ListConnectedPeersResponse\022\'\n\017connected_"
"peers\030\001 \003(\0132\016.tari.rpc.Peer\"X\n\016SoftwareU"
"pdate\022\022\n\nhas_update\030\001 \001(\010\022\017\n\007version\030\002 \001"
"(\t\022\013\n\003sha\030\003 \001(\t\022\024\n\014download_url\030\004 \001(\t\"\024\n"
"\022GetIdentityRequest\"R\n\023GetIdentityRespon"
"se\022\022\n\npublic_key\030\001 \001(\014\022\026\n\016public_address"
"\030\002 \001(\t\022\017\n\007node_id\030\003 \001(\014*M\n\022ConnectivityS"
"tatus\022\020\n\014Initializing\020\000\022\n\n\006Online\020\001\022\014\n\010D"
"egraded\020\002\022\013\n\007Offline\020\003b\006proto3"
};
static const ::_pbi::DescriptorTable* const descriptor_table_network_2eproto_deps[1] =
{
&::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
};
static ::absl::once_flag descriptor_table_network_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_network_2eproto = {
false,
false,
1030,
descriptor_table_protodef_network_2eproto,
"network.proto",
&descriptor_table_network_2eproto_once,
descriptor_table_network_2eproto_deps,
1,
9,
schemas,
file_default_instances,
TableStruct_network_2eproto::offsets,
file_level_metadata_network_2eproto,
file_level_enum_descriptors_network_2eproto,
file_level_service_descriptors_network_2eproto,
};
// This function exists to be marked as weak.
// It can significantly speed up compilation by breaking up LLVM's SCC
// in the .pb.cc translation units. Large translation units see a
// reduction of more than 35% of walltime for optimized builds. Without
// the weak attribute all the messages in the file, including all the
// vtables and everything they use become part of the same SCC through
// a cycle like:
// GetMetadata -> descriptor table -> default instances ->
// vtables -> GetMetadata
// By adding a weak function here we break the connection from the
// individual vtables back into the descriptor table.
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_network_2eproto_getter() {
return &descriptor_table_network_2eproto;
}
namespace tari {
namespace rpc {
const ::google::protobuf::EnumDescriptor* ConnectivityStatus_descriptor() {
::google::protobuf::internal::AssignDescriptors(&descriptor_table_network_2eproto);
return file_level_enum_descriptors_network_2eproto[0];
}
PROTOBUF_CONSTINIT const uint32_t ConnectivityStatus_internal_data_[] = {
262144u, 0u, };
bool ConnectivityStatus_IsValid(int value) {
return 0 <= value && value <= 3;
}
// ===================================================================
class NodeIdentity::_Internal {
public:
};
NodeIdentity::NodeIdentity(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:tari.rpc.NodeIdentity)
}
inline PROTOBUF_NDEBUG_INLINE NodeIdentity::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: public_addresses_{visibility, arena, from.public_addresses_},
public_key_(arena, from.public_key_),
node_id_(arena, from.node_id_),
_cached_size_{0} {}
NodeIdentity::NodeIdentity(
::google::protobuf::Arena* arena,
const NodeIdentity& from)
: ::google::protobuf::Message(arena) {
NodeIdentity* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
// @@protoc_insertion_point(copy_constructor:tari.rpc.NodeIdentity)
}
inline PROTOBUF_NDEBUG_INLINE NodeIdentity::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: public_addresses_{visibility, arena},
public_key_(arena),
node_id_(arena),
_cached_size_{0} {}
inline void NodeIdentity::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
NodeIdentity::~NodeIdentity() {
// @@protoc_insertion_point(destructor:tari.rpc.NodeIdentity)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void NodeIdentity::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.public_key_.Destroy();
_impl_.node_id_.Destroy();
_impl_.~Impl_();
}
const ::google::protobuf::MessageLite::ClassData*
NodeIdentity::GetClassData() const {
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
ClassDataFull _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(NodeIdentity, _impl_._cached_size_),
false,
},
&NodeIdentity::MergeImpl,
&NodeIdentity::kDescriptorMethods,
};
return &_data_;
}
PROTOBUF_NOINLINE void NodeIdentity::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.NodeIdentity)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.public_addresses_.Clear();
_impl_.public_key_.ClearToEmpty();
_impl_.node_id_.ClearToEmpty();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* NodeIdentity::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 3, 0, 46, 2> NodeIdentity::_table_ = {
{
0, // no _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
&_NodeIdentity_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::tari::rpc::NodeIdentity>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
{::_pbi::TcParser::MiniParse, {}},
// bytes public_key = 1;
{::_pbi::TcParser::FastBS1,
{10, 63, 0, PROTOBUF_FIELD_OFFSET(NodeIdentity, _impl_.public_key_)}},
// repeated string public_addresses = 2;
{::_pbi::TcParser::FastUR1,
{18, 63, 0, PROTOBUF_FIELD_OFFSET(NodeIdentity, _impl_.public_addresses_)}},
// bytes node_id = 3;
{::_pbi::TcParser::FastBS1,
{26, 63, 0, PROTOBUF_FIELD_OFFSET(NodeIdentity, _impl_.node_id_)}},
}}, {{
65535, 65535
}}, {{
// bytes public_key = 1;
{PROTOBUF_FIELD_OFFSET(NodeIdentity, _impl_.public_key_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
// repeated string public_addresses = 2;
{PROTOBUF_FIELD_OFFSET(NodeIdentity, _impl_.public_addresses_), 0, 0,
(0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
// bytes node_id = 3;
{PROTOBUF_FIELD_OFFSET(NodeIdentity, _impl_.node_id_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
}},
// no aux_entries
{{
"\25\0\20\0\0\0\0\0"
"tari.rpc.NodeIdentity"
"public_addresses"
}},
};
::uint8_t* NodeIdentity::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:tari.rpc.NodeIdentity)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// bytes public_key = 1;
if (!this->_internal_public_key().empty()) {
const std::string& _s = this->_internal_public_key();
target = stream->WriteBytesMaybeAliased(1, _s, target);
}
// repeated string public_addresses = 2;
for (int i = 0, n = this->_internal_public_addresses_size(); i < n; ++i) {
const auto& s = this->_internal_public_addresses().Get(i);
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tari.rpc.NodeIdentity.public_addresses");
target = stream->WriteString(2, s, target);
}
// bytes node_id = 3;
if (!this->_internal_node_id().empty()) {
const std::string& _s = this->_internal_node_id();
target = stream->WriteBytesMaybeAliased(3, _s, target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:tari.rpc.NodeIdentity)
return target;
}
::size_t NodeIdentity::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.NodeIdentity)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string public_addresses = 2;
total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_public_addresses().size());
for (int i = 0, n = _internal_public_addresses().size(); i < n; ++i) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
_internal_public_addresses().Get(i));
}
// bytes public_key = 1;
if (!this->_internal_public_key().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this->_internal_public_key());
}
// bytes node_id = 3;
if (!this->_internal_node_id().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this->_internal_node_id());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
void NodeIdentity::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
auto* const _this = static_cast<NodeIdentity*>(&to_msg);
auto& from = static_cast<const NodeIdentity&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.NodeIdentity)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_internal_mutable_public_addresses()->MergeFrom(from._internal_public_addresses());
if (!from._internal_public_key().empty()) {
_this->_internal_set_public_key(from._internal_public_key());
}
if (!from._internal_node_id().empty()) {
_this->_internal_set_node_id(from._internal_node_id());
}
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void NodeIdentity::CopyFrom(const NodeIdentity& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.NodeIdentity)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool NodeIdentity::IsInitialized() const {
return true;
}
void NodeIdentity::InternalSwap(NodeIdentity* PROTOBUF_RESTRICT other) {
using std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.public_addresses_.InternalSwap(&other->_impl_.public_addresses_);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.public_key_, &other->_impl_.public_key_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.node_id_, &other->_impl_.node_id_, arena);
}
::google::protobuf::Metadata NodeIdentity::GetMetadata() const {
return ::_pbi::AssignDescriptors(&descriptor_table_network_2eproto_getter,
&descriptor_table_network_2eproto_once,
file_level_metadata_network_2eproto[0]);
}
// ===================================================================
class Peer::_Internal {
public:
};
Peer::Peer(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:tari.rpc.Peer)
}
inline PROTOBUF_NDEBUG_INLINE Peer::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: addresses_{visibility, arena, from.addresses_},
supported_protocols_{visibility, arena, from.supported_protocols_},
public_key_(arena, from.public_key_),
node_id_(arena, from.node_id_),
banned_reason_(arena, from.banned_reason_),
user_agent_(arena, from.user_agent_),
_cached_size_{0} {}
Peer::Peer(
::google::protobuf::Arena* arena,
const Peer& from)
: ::google::protobuf::Message(arena) {
Peer* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
::memcpy(reinterpret_cast<char *>(&_impl_) +
offsetof(Impl_, last_connection_),
reinterpret_cast<const char *>(&from._impl_) +
offsetof(Impl_, last_connection_),
offsetof(Impl_, offline_at_) -
offsetof(Impl_, last_connection_) +
sizeof(Impl_::offline_at_));
// @@protoc_insertion_point(copy_constructor:tari.rpc.Peer)
}
inline PROTOBUF_NDEBUG_INLINE Peer::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: addresses_{visibility, arena},
supported_protocols_{visibility, arena},
public_key_(arena),
node_id_(arena),
banned_reason_(arena),
user_agent_(arena),
_cached_size_{0} {}
inline void Peer::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
::memset(reinterpret_cast<char *>(&_impl_) +
offsetof(Impl_, last_connection_),
0,
offsetof(Impl_, offline_at_) -
offsetof(Impl_, last_connection_) +
sizeof(Impl_::offline_at_));
}
Peer::~Peer() {
// @@protoc_insertion_point(destructor:tari.rpc.Peer)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void Peer::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.public_key_.Destroy();
_impl_.node_id_.Destroy();
_impl_.banned_reason_.Destroy();
_impl_.user_agent_.Destroy();
_impl_.~Impl_();
}
const ::google::protobuf::MessageLite::ClassData*
Peer::GetClassData() const {
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
ClassDataFull _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(Peer, _impl_._cached_size_),
false,
},
&Peer::MergeImpl,
&Peer::kDescriptorMethods,
};
return &_data_;
}
PROTOBUF_NOINLINE void Peer::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.Peer)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.addresses_.Clear();
_impl_.supported_protocols_.Clear();
_impl_.public_key_.ClearToEmpty();
_impl_.node_id_.ClearToEmpty();
_impl_.banned_reason_.ClearToEmpty();
_impl_.user_agent_.ClearToEmpty();
::memset(&_impl_.last_connection_, 0, static_cast<::size_t>(
reinterpret_cast<char*>(&_impl_.offline_at_) -
reinterpret_cast<char*>(&_impl_.last_connection_)) + sizeof(_impl_.offline_at_));
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* Peer::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<4, 11, 1, 53, 2> Peer::_table_ = {
{
0, // no _has_bits_
0, // no _extensions_
12, 120, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294963712, // skipmap
offsetof(decltype(_table_), field_entries),
11, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_Peer_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::tari::rpc::Peer>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
{::_pbi::TcParser::MiniParse, {}},
// bytes public_key = 1;
{::_pbi::TcParser::FastBS1,
{10, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.public_key_)}},
// bytes node_id = 2;
{::_pbi::TcParser::FastBS1,
{18, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.node_id_)}},
// repeated .tari.rpc.Address addresses = 3;
{::_pbi::TcParser::FastMtR1,
{26, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.addresses_)}},
// uint64 last_connection = 4;
{::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Peer, _impl_.last_connection_), 63>(),
{32, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.last_connection_)}},
// uint32 flags = 5;
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Peer, _impl_.flags_), 63>(),
{40, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.flags_)}},
// uint64 banned_until = 6;
{::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Peer, _impl_.banned_until_), 63>(),
{48, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.banned_until_)}},
// string banned_reason = 7;
{::_pbi::TcParser::FastUS1,
{58, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.banned_reason_)}},
// uint64 offline_at = 8;
{::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Peer, _impl_.offline_at_), 63>(),
{64, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.offline_at_)}},
// uint32 features = 9;
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Peer, _impl_.features_), 63>(),
{72, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.features_)}},
{::_pbi::TcParser::MiniParse, {}},
// repeated bytes supported_protocols = 11;
{::_pbi::TcParser::FastBR1,
{90, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.supported_protocols_)}},
// string user_agent = 12;
{::_pbi::TcParser::FastUS1,
{98, 63, 0, PROTOBUF_FIELD_OFFSET(Peer, _impl_.user_agent_)}},
{::_pbi::TcParser::MiniParse, {}},
{::_pbi::TcParser::MiniParse, {}},
{::_pbi::TcParser::MiniParse, {}},
}}, {{
65535, 65535
}}, {{
// bytes public_key = 1;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.public_key_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
// bytes node_id = 2;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.node_id_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
// repeated .tari.rpc.Address addresses = 3;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.addresses_), 0, 0,
(0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
// uint64 last_connection = 4;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.last_connection_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
// uint32 flags = 5;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.flags_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
// uint64 banned_until = 6;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.banned_until_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
// string banned_reason = 7;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.banned_reason_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
// uint64 offline_at = 8;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.offline_at_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
// uint32 features = 9;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.features_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
// repeated bytes supported_protocols = 11;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.supported_protocols_), 0, 0,
(0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)},
// string user_agent = 12;
{PROTOBUF_FIELD_OFFSET(Peer, _impl_.user_agent_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
}}, {{
{::_pbi::TcParser::GetTable<::tari::rpc::Address>()},
}}, {{
"\15\0\0\0\0\0\0\15\0\0\0\12\0\0\0\0"
"tari.rpc.Peer"
"banned_reason"
"user_agent"
}},
};
::uint8_t* Peer::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:tari.rpc.Peer)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// bytes public_key = 1;
if (!this->_internal_public_key().empty()) {
const std::string& _s = this->_internal_public_key();
target = stream->WriteBytesMaybeAliased(1, _s, target);
}
// bytes node_id = 2;
if (!this->_internal_node_id().empty()) {
const std::string& _s = this->_internal_node_id();
target = stream->WriteBytesMaybeAliased(2, _s, target);
}
// repeated .tari.rpc.Address addresses = 3;
for (unsigned i = 0, n = static_cast<unsigned>(
this->_internal_addresses_size());
i < n; i++) {
const auto& repfield = this->_internal_addresses().Get(i);
target =
::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
3, repfield, repfield.GetCachedSize(),
target, stream);
}
// uint64 last_connection = 4;
if (this->_internal_last_connection() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
4, this->_internal_last_connection(), target);
}
// uint32 flags = 5;
if (this->_internal_flags() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
5, this->_internal_flags(), target);
}
// uint64 banned_until = 6;
if (this->_internal_banned_until() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
6, this->_internal_banned_until(), target);
}
// string banned_reason = 7;
if (!this->_internal_banned_reason().empty()) {
const std::string& _s = this->_internal_banned_reason();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tari.rpc.Peer.banned_reason");
target = stream->WriteStringMaybeAliased(7, _s, target);
}
// uint64 offline_at = 8;
if (this->_internal_offline_at() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
8, this->_internal_offline_at(), target);
}
// uint32 features = 9;
if (this->_internal_features() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
9, this->_internal_features(), target);
}
// repeated bytes supported_protocols = 11;
for (int i = 0, n = this->_internal_supported_protocols_size(); i < n; ++i) {
const auto& s = this->_internal_supported_protocols().Get(i);
target = stream->WriteBytes(11, s, target);
}
// string user_agent = 12;
if (!this->_internal_user_agent().empty()) {
const std::string& _s = this->_internal_user_agent();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tari.rpc.Peer.user_agent");
target = stream->WriteStringMaybeAliased(12, _s, target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:tari.rpc.Peer)
return target;
}
::size_t Peer::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.Peer)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .tari.rpc.Address addresses = 3;
total_size += 1UL * this->_internal_addresses_size();
for (const auto& msg : this->_internal_addresses()) {
total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
}
// repeated bytes supported_protocols = 11;
total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_supported_protocols().size());
for (int i = 0, n = _internal_supported_protocols().size(); i < n; ++i) {
total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
_internal_supported_protocols().Get(i));
}
// bytes public_key = 1;
if (!this->_internal_public_key().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this->_internal_public_key());
}
// bytes node_id = 2;
if (!this->_internal_node_id().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this->_internal_node_id());
}
// string banned_reason = 7;
if (!this->_internal_banned_reason().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this->_internal_banned_reason());
}
// string user_agent = 12;
if (!this->_internal_user_agent().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this->_internal_user_agent());
}
// uint64 last_connection = 4;
if (this->_internal_last_connection() != 0) {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
this->_internal_last_connection());
}
// uint64 banned_until = 6;
if (this->_internal_banned_until() != 0) {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
this->_internal_banned_until());
}
// uint32 flags = 5;
if (this->_internal_flags() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
this->_internal_flags());
}
// uint32 features = 9;
if (this->_internal_features() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
this->_internal_features());
}
// uint64 offline_at = 8;
if (this->_internal_offline_at() != 0) {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
this->_internal_offline_at());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
void Peer::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
auto* const _this = static_cast<Peer*>(&to_msg);
auto& from = static_cast<const Peer&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.Peer)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_internal_mutable_addresses()->MergeFrom(
from._internal_addresses());
_this->_internal_mutable_supported_protocols()->MergeFrom(from._internal_supported_protocols());
if (!from._internal_public_key().empty()) {
_this->_internal_set_public_key(from._internal_public_key());
}
if (!from._internal_node_id().empty()) {
_this->_internal_set_node_id(from._internal_node_id());
}
if (!from._internal_banned_reason().empty()) {
_this->_internal_set_banned_reason(from._internal_banned_reason());
}
if (!from._internal_user_agent().empty()) {
_this->_internal_set_user_agent(from._internal_user_agent());
}
if (from._internal_last_connection() != 0) {
_this->_impl_.last_connection_ = from._impl_.last_connection_;
}
if (from._internal_banned_until() != 0) {
_this->_impl_.banned_until_ = from._impl_.banned_until_;
}
if (from._internal_flags() != 0) {
_this->_impl_.flags_ = from._impl_.flags_;
}
if (from._internal_features() != 0) {
_this->_impl_.features_ = from._impl_.features_;
}
if (from._internal_offline_at() != 0) {
_this->_impl_.offline_at_ = from._impl_.offline_at_;
}
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void Peer::CopyFrom(const Peer& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.Peer)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool Peer::IsInitialized() const {
return true;
}
void Peer::InternalSwap(Peer* PROTOBUF_RESTRICT other) {
using std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.addresses_.InternalSwap(&other->_impl_.addresses_);
_impl_.supported_protocols_.InternalSwap(&other->_impl_.supported_protocols_);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.public_key_, &other->_impl_.public_key_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.node_id_, &other->_impl_.node_id_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.banned_reason_, &other->_impl_.banned_reason_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.user_agent_, &other->_impl_.user_agent_, arena);
::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(Peer, _impl_.offline_at_)
+ sizeof(Peer::_impl_.offline_at_)
- PROTOBUF_FIELD_OFFSET(Peer, _impl_.last_connection_)>(
reinterpret_cast<char*>(&_impl_.last_connection_),
reinterpret_cast<char*>(&other->_impl_.last_connection_));
}
::google::protobuf::Metadata Peer::GetMetadata() const {
return ::_pbi::AssignDescriptors(&descriptor_table_network_2eproto_getter,
&descriptor_table_network_2eproto_once,
file_level_metadata_network_2eproto[1]);
}
// ===================================================================
class NetworkStatusResponse::_Internal {
public:
};
NetworkStatusResponse::NetworkStatusResponse(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:tari.rpc.NetworkStatusResponse)
}
NetworkStatusResponse::NetworkStatusResponse(
::google::protobuf::Arena* arena, const NetworkStatusResponse& from)
: NetworkStatusResponse(arena) {
MergeFrom(from);
}
inline PROTOBUF_NDEBUG_INLINE NetworkStatusResponse::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: _cached_size_{0} {}
inline void NetworkStatusResponse::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
::memset(reinterpret_cast<char *>(&_impl_) +
offsetof(Impl_, status_),
0,
offsetof(Impl_, num_node_connections_) -
offsetof(Impl_, status_) +
sizeof(Impl_::num_node_connections_));
}
NetworkStatusResponse::~NetworkStatusResponse() {
// @@protoc_insertion_point(destructor:tari.rpc.NetworkStatusResponse)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void NetworkStatusResponse::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.~Impl_();
}
const ::google::protobuf::MessageLite::ClassData*
NetworkStatusResponse::GetClassData() const {
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
ClassDataFull _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(NetworkStatusResponse, _impl_._cached_size_),
false,
},
&NetworkStatusResponse::MergeImpl,
&NetworkStatusResponse::kDescriptorMethods,
};
return &_data_;
}
PROTOBUF_NOINLINE void NetworkStatusResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.NetworkStatusResponse)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
::memset(&_impl_.status_, 0, static_cast<::size_t>(
reinterpret_cast<char*>(&_impl_.num_node_connections_) -
reinterpret_cast<char*>(&_impl_.status_)) + sizeof(_impl_.num_node_connections_));
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* NetworkStatusResponse::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 3, 0, 0, 2> NetworkStatusResponse::_table_ = {
{
0, // no _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
&_NetworkStatusResponse_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::tari::rpc::NetworkStatusResponse>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
{::_pbi::TcParser::MiniParse, {}},
// .tari.rpc.ConnectivityStatus status = 1;
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(NetworkStatusResponse, _impl_.status_), 63>(),
{8, 63, 0, PROTOBUF_FIELD_OFFSET(NetworkStatusResponse, _impl_.status_)}},
// uint32 avg_latency_ms = 2;
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(NetworkStatusResponse, _impl_.avg_latency_ms_), 63>(),
{16, 63, 0, PROTOBUF_FIELD_OFFSET(NetworkStatusResponse, _impl_.avg_latency_ms_)}},
// uint32 num_node_connections = 3;
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(NetworkStatusResponse, _impl_.num_node_connections_), 63>(),
{24, 63, 0, PROTOBUF_FIELD_OFFSET(NetworkStatusResponse, _impl_.num_node_connections_)}},
}}, {{
65535, 65535
}}, {{
// .tari.rpc.ConnectivityStatus status = 1;
{PROTOBUF_FIELD_OFFSET(NetworkStatusResponse, _impl_.status_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)},
// uint32 avg_latency_ms = 2;
{PROTOBUF_FIELD_OFFSET(NetworkStatusResponse, _impl_.avg_latency_ms_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
// uint32 num_node_connections = 3;
{PROTOBUF_FIELD_OFFSET(NetworkStatusResponse, _impl_.num_node_connections_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
}},
// no aux_entries
{{
}},
};
::uint8_t* NetworkStatusResponse::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:tari.rpc.NetworkStatusResponse)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// .tari.rpc.ConnectivityStatus status = 1;
if (this->_internal_status() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
1, this->_internal_status(), target);
}
// uint32 avg_latency_ms = 2;
if (this->_internal_avg_latency_ms() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
2, this->_internal_avg_latency_ms(), target);
}
// uint32 num_node_connections = 3;
if (this->_internal_num_node_connections() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
3, this->_internal_num_node_connections(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:tari.rpc.NetworkStatusResponse)
return target;
}
::size_t NetworkStatusResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.NetworkStatusResponse)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// .tari.rpc.ConnectivityStatus status = 1;
if (this->_internal_status() != 0) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_status());
}
// uint32 avg_latency_ms = 2;
if (this->_internal_avg_latency_ms() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
this->_internal_avg_latency_ms());
}
// uint32 num_node_connections = 3;
if (this->_internal_num_node_connections() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
this->_internal_num_node_connections());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
void NetworkStatusResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
auto* const _this = static_cast<NetworkStatusResponse*>(&to_msg);
auto& from = static_cast<const NetworkStatusResponse&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.NetworkStatusResponse)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_status() != 0) {
_this->_impl_.status_ = from._impl_.status_;
}
if (from._internal_avg_latency_ms() != 0) {
_this->_impl_.avg_latency_ms_ = from._impl_.avg_latency_ms_;
}
if (from._internal_num_node_connections() != 0) {
_this->_impl_.num_node_connections_ = from._impl_.num_node_connections_;
}
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void NetworkStatusResponse::CopyFrom(const NetworkStatusResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.NetworkStatusResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool NetworkStatusResponse::IsInitialized() const {
return true;
}
void NetworkStatusResponse::InternalSwap(NetworkStatusResponse* PROTOBUF_RESTRICT other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(NetworkStatusResponse, _impl_.num_node_connections_)
+ sizeof(NetworkStatusResponse::_impl_.num_node_connections_)
- PROTOBUF_FIELD_OFFSET(NetworkStatusResponse, _impl_.status_)>(
reinterpret_cast<char*>(&_impl_.status_),
reinterpret_cast<char*>(&other->_impl_.status_));
}
::google::protobuf::Metadata NetworkStatusResponse::GetMetadata() const {
return ::_pbi::AssignDescriptors(&descriptor_table_network_2eproto_getter,
&descriptor_table_network_2eproto_once,
file_level_metadata_network_2eproto[2]);
}
// ===================================================================
class Address::_Internal {
public:
using HasBits = decltype(std::declval<Address>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(Address, _impl_._has_bits_);
};
Address::Address(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:tari.rpc.Address)
}
inline PROTOBUF_NDEBUG_INLINE Address::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: _has_bits_{from._has_bits_},
_cached_size_{0},
address_(arena, from.address_),
last_seen_(arena, from.last_seen_) {}
Address::Address(
::google::protobuf::Arena* arena,
const Address& from)
: ::google::protobuf::Message(arena) {
Address* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
::uint32_t cached_has_bits = _impl_._has_bits_[0];
_impl_.avg_latency_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::tari::rpc::AverageLatency>(
arena, *from._impl_.avg_latency_)
: nullptr;
_impl_.connection_attempts_ = from._impl_.connection_attempts_;
// @@protoc_insertion_point(copy_constructor:tari.rpc.Address)
}
inline PROTOBUF_NDEBUG_INLINE Address::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: _cached_size_{0},
address_(arena),
last_seen_(arena) {}
inline void Address::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
::memset(reinterpret_cast<char *>(&_impl_) +
offsetof(Impl_, avg_latency_),
0,
offsetof(Impl_, connection_attempts_) -
offsetof(Impl_, avg_latency_) +
sizeof(Impl_::connection_attempts_));
}
Address::~Address() {
// @@protoc_insertion_point(destructor:tari.rpc.Address)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void Address::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.address_.Destroy();
_impl_.last_seen_.Destroy();
delete _impl_.avg_latency_;
_impl_.~Impl_();
}
const ::google::protobuf::MessageLite::ClassData*
Address::GetClassData() const {
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
ClassDataFull _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(Address, _impl_._cached_size_),
false,
},
&Address::MergeImpl,
&Address::kDescriptorMethods,
};
return &_data_;
}
PROTOBUF_NOINLINE void Address::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.Address)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.address_.ClearToEmpty();
_impl_.last_seen_.ClearToEmpty();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
ABSL_DCHECK(_impl_.avg_latency_ != nullptr);
_impl_.avg_latency_->Clear();
}
_impl_.connection_attempts_ = 0u;
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* Address::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<3, 4, 1, 34, 2> Address::_table_ = {
{
PROTOBUF_FIELD_OFFSET(Address, _impl_._has_bits_),
0, // no _extensions_
5, 56, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967272, // skipmap
offsetof(decltype(_table_), field_entries),
4, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_Address_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::tari::rpc::Address>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
{::_pbi::TcParser::MiniParse, {}},
// bytes address = 1;
{::_pbi::TcParser::FastBS1,
{10, 63, 0, PROTOBUF_FIELD_OFFSET(Address, _impl_.address_)}},
// string last_seen = 2;
{::_pbi::TcParser::FastUS1,
{18, 63, 0, PROTOBUF_FIELD_OFFSET(Address, _impl_.last_seen_)}},
// uint32 connection_attempts = 3;
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Address, _impl_.connection_attempts_), 63>(),
{24, 63, 0, PROTOBUF_FIELD_OFFSET(Address, _impl_.connection_attempts_)}},
{::_pbi::TcParser::MiniParse, {}},
// .tari.rpc.AverageLatency avg_latency = 5;
{::_pbi::TcParser::FastMtS1,
{42, 0, 0, PROTOBUF_FIELD_OFFSET(Address, _impl_.avg_latency_)}},
{::_pbi::TcParser::MiniParse, {}},
{::_pbi::TcParser::MiniParse, {}},
}}, {{
65535, 65535
}}, {{
// bytes address = 1;
{PROTOBUF_FIELD_OFFSET(Address, _impl_.address_), -1, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
// string last_seen = 2;
{PROTOBUF_FIELD_OFFSET(Address, _impl_.last_seen_), -1, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
// uint32 connection_attempts = 3;
{PROTOBUF_FIELD_OFFSET(Address, _impl_.connection_attempts_), -1, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUInt32)},
// .tari.rpc.AverageLatency avg_latency = 5;
{PROTOBUF_FIELD_OFFSET(Address, _impl_.avg_latency_), _Internal::kHasBitsOffset + 0, 0,
(0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
}}, {{
{::_pbi::TcParser::GetTable<::tari::rpc::AverageLatency>()},
}}, {{
"\20\0\11\0\0\0\0\0"
"tari.rpc.Address"
"last_seen"
}},
};
::uint8_t* Address::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:tari.rpc.Address)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// bytes address = 1;
if (!this->_internal_address().empty()) {
const std::string& _s = this->_internal_address();
target = stream->WriteBytesMaybeAliased(1, _s, target);
}
// string last_seen = 2;
if (!this->_internal_last_seen().empty()) {
const std::string& _s = this->_internal_last_seen();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tari.rpc.Address.last_seen");
target = stream->WriteStringMaybeAliased(2, _s, target);
}
// uint32 connection_attempts = 3;
if (this->_internal_connection_attempts() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
3, this->_internal_connection_attempts(), target);
}
cached_has_bits = _impl_._has_bits_[0];
// .tari.rpc.AverageLatency avg_latency = 5;
if (cached_has_bits & 0x00000001u) {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
5, *_impl_.avg_latency_, _impl_.avg_latency_->GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:tari.rpc.Address)
return target;
}
::size_t Address::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.Address)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// bytes address = 1;
if (!this->_internal_address().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this->_internal_address());
}
// string last_seen = 2;
if (!this->_internal_last_seen().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this->_internal_last_seen());
}
// .tari.rpc.AverageLatency avg_latency = 5;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size +=
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.avg_latency_);
}
// uint32 connection_attempts = 3;
if (this->_internal_connection_attempts() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
this->_internal_connection_attempts());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
void Address::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
auto* const _this = static_cast<Address*>(&to_msg);
auto& from = static_cast<const Address&>(from_msg);
::google::protobuf::Arena* arena = _this->GetArena();
// @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.Address)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_address().empty()) {
_this->_internal_set_address(from._internal_address());
}
if (!from._internal_last_seen().empty()) {
_this->_internal_set_last_seen(from._internal_last_seen());
}
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
ABSL_DCHECK(from._impl_.avg_latency_ != nullptr);
if (_this->_impl_.avg_latency_ == nullptr) {
_this->_impl_.avg_latency_ =
::google::protobuf::Message::CopyConstruct<::tari::rpc::AverageLatency>(arena, *from._impl_.avg_latency_);
} else {
_this->_impl_.avg_latency_->MergeFrom(*from._impl_.avg_latency_);
}
}
if (from._internal_connection_attempts() != 0) {
_this->_impl_.connection_attempts_ = from._impl_.connection_attempts_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void Address::CopyFrom(const Address& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.Address)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool Address::IsInitialized() const {
return true;
}
void Address::InternalSwap(Address* PROTOBUF_RESTRICT 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_.address_, &other->_impl_.address_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.last_seen_, &other->_impl_.last_seen_, arena);
::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(Address, _impl_.connection_attempts_)
+ sizeof(Address::_impl_.connection_attempts_)
- PROTOBUF_FIELD_OFFSET(Address, _impl_.avg_latency_)>(
reinterpret_cast<char*>(&_impl_.avg_latency_),
reinterpret_cast<char*>(&other->_impl_.avg_latency_));
}
::google::protobuf::Metadata Address::GetMetadata() const {
return ::_pbi::AssignDescriptors(&descriptor_table_network_2eproto_getter,
&descriptor_table_network_2eproto_once,
file_level_metadata_network_2eproto[3]);
}
// ===================================================================
class AverageLatency::_Internal {
public:
};
AverageLatency::AverageLatency(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:tari.rpc.AverageLatency)
}
AverageLatency::AverageLatency(
::google::protobuf::Arena* arena, const AverageLatency& from)
: AverageLatency(arena) {
MergeFrom(from);
}
inline PROTOBUF_NDEBUG_INLINE AverageLatency::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: _cached_size_{0} {}
inline void AverageLatency::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.latency_ = {};
}
AverageLatency::~AverageLatency() {
// @@protoc_insertion_point(destructor:tari.rpc.AverageLatency)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void AverageLatency::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.~Impl_();
}
const ::google::protobuf::MessageLite::ClassData*
AverageLatency::GetClassData() const {
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
ClassDataFull _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(AverageLatency, _impl_._cached_size_),
false,
},
&AverageLatency::MergeImpl,
&AverageLatency::kDescriptorMethods,
};
return &_data_;
}
PROTOBUF_NOINLINE void AverageLatency::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.AverageLatency)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.latency_ = ::uint64_t{0u};
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* AverageLatency::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<0, 1, 0, 0, 2> AverageLatency::_table_ = {
{
0, // no _has_bits_
0, // no _extensions_
1, 0, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967294, // skipmap
offsetof(decltype(_table_), field_entries),
1, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
&_AverageLatency_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::tari::rpc::AverageLatency>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// uint64 latency = 1;
{::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(AverageLatency, _impl_.latency_), 63>(),
{8, 63, 0, PROTOBUF_FIELD_OFFSET(AverageLatency, _impl_.latency_)}},
}}, {{
65535, 65535
}}, {{
// uint64 latency = 1;
{PROTOBUF_FIELD_OFFSET(AverageLatency, _impl_.latency_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUInt64)},
}},
// no aux_entries
{{
}},
};
::uint8_t* AverageLatency::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:tari.rpc.AverageLatency)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// uint64 latency = 1;
if (this->_internal_latency() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
1, this->_internal_latency(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:tari.rpc.AverageLatency)
return target;
}
::size_t AverageLatency::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.AverageLatency)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// uint64 latency = 1;
if (this->_internal_latency() != 0) {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
this->_internal_latency());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
void AverageLatency::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
auto* const _this = static_cast<AverageLatency*>(&to_msg);
auto& from = static_cast<const AverageLatency&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.AverageLatency)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_latency() != 0) {
_this->_impl_.latency_ = from._impl_.latency_;
}
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void AverageLatency::CopyFrom(const AverageLatency& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.AverageLatency)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool AverageLatency::IsInitialized() const {
return true;
}
void AverageLatency::InternalSwap(AverageLatency* PROTOBUF_RESTRICT other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_.latency_, other->_impl_.latency_);
}
::google::protobuf::Metadata AverageLatency::GetMetadata() const {
return ::_pbi::AssignDescriptors(&descriptor_table_network_2eproto_getter,
&descriptor_table_network_2eproto_once,
file_level_metadata_network_2eproto[4]);
}
// ===================================================================
class ListConnectedPeersResponse::_Internal {
public:
};
ListConnectedPeersResponse::ListConnectedPeersResponse(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:tari.rpc.ListConnectedPeersResponse)
}
inline PROTOBUF_NDEBUG_INLINE ListConnectedPeersResponse::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: connected_peers_{visibility, arena, from.connected_peers_},
_cached_size_{0} {}
ListConnectedPeersResponse::ListConnectedPeersResponse(
::google::protobuf::Arena* arena,
const ListConnectedPeersResponse& from)
: ::google::protobuf::Message(arena) {
ListConnectedPeersResponse* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
// @@protoc_insertion_point(copy_constructor:tari.rpc.ListConnectedPeersResponse)
}
inline PROTOBUF_NDEBUG_INLINE ListConnectedPeersResponse::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: connected_peers_{visibility, arena},
_cached_size_{0} {}
inline void ListConnectedPeersResponse::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
ListConnectedPeersResponse::~ListConnectedPeersResponse() {
// @@protoc_insertion_point(destructor:tari.rpc.ListConnectedPeersResponse)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void ListConnectedPeersResponse::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.~Impl_();
}
const ::google::protobuf::MessageLite::ClassData*
ListConnectedPeersResponse::GetClassData() const {
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
ClassDataFull _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(ListConnectedPeersResponse, _impl_._cached_size_),
false,
},
&ListConnectedPeersResponse::MergeImpl,
&ListConnectedPeersResponse::kDescriptorMethods,
};
return &_data_;
}
PROTOBUF_NOINLINE void ListConnectedPeersResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.ListConnectedPeersResponse)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.connected_peers_.Clear();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* ListConnectedPeersResponse::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<0, 1, 1, 0, 2> ListConnectedPeersResponse::_table_ = {
{
0, // no _has_bits_
0, // no _extensions_
1, 0, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967294, // skipmap
offsetof(decltype(_table_), field_entries),
1, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_ListConnectedPeersResponse_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::tari::rpc::ListConnectedPeersResponse>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// repeated .tari.rpc.Peer connected_peers = 1;
{::_pbi::TcParser::FastMtR1,
{10, 63, 0, PROTOBUF_FIELD_OFFSET(ListConnectedPeersResponse, _impl_.connected_peers_)}},
}}, {{
65535, 65535
}}, {{
// repeated .tari.rpc.Peer connected_peers = 1;
{PROTOBUF_FIELD_OFFSET(ListConnectedPeersResponse, _impl_.connected_peers_), 0, 0,
(0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
}}, {{
{::_pbi::TcParser::GetTable<::tari::rpc::Peer>()},
}}, {{
}},
};
::uint8_t* ListConnectedPeersResponse::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:tari.rpc.ListConnectedPeersResponse)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// repeated .tari.rpc.Peer connected_peers = 1;
for (unsigned i = 0, n = static_cast<unsigned>(
this->_internal_connected_peers_size());
i < n; i++) {
const auto& repfield = this->_internal_connected_peers().Get(i);
target =
::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1, repfield, repfield.GetCachedSize(),
target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:tari.rpc.ListConnectedPeersResponse)
return target;
}
::size_t ListConnectedPeersResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.ListConnectedPeersResponse)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .tari.rpc.Peer connected_peers = 1;
total_size += 1UL * this->_internal_connected_peers_size();
for (const auto& msg : this->_internal_connected_peers()) {
total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
void ListConnectedPeersResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
auto* const _this = static_cast<ListConnectedPeersResponse*>(&to_msg);
auto& from = static_cast<const ListConnectedPeersResponse&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.ListConnectedPeersResponse)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_internal_mutable_connected_peers()->MergeFrom(
from._internal_connected_peers());
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void ListConnectedPeersResponse::CopyFrom(const ListConnectedPeersResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.ListConnectedPeersResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool ListConnectedPeersResponse::IsInitialized() const {
return true;
}
void ListConnectedPeersResponse::InternalSwap(ListConnectedPeersResponse* PROTOBUF_RESTRICT other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.connected_peers_.InternalSwap(&other->_impl_.connected_peers_);
}
::google::protobuf::Metadata ListConnectedPeersResponse::GetMetadata() const {
return ::_pbi::AssignDescriptors(&descriptor_table_network_2eproto_getter,
&descriptor_table_network_2eproto_once,
file_level_metadata_network_2eproto[5]);
}
// ===================================================================
class SoftwareUpdate::_Internal {
public:
};
SoftwareUpdate::SoftwareUpdate(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:tari.rpc.SoftwareUpdate)
}
inline PROTOBUF_NDEBUG_INLINE SoftwareUpdate::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: version_(arena, from.version_),
sha_(arena, from.sha_),
download_url_(arena, from.download_url_),
_cached_size_{0} {}
SoftwareUpdate::SoftwareUpdate(
::google::protobuf::Arena* arena,
const SoftwareUpdate& from)
: ::google::protobuf::Message(arena) {
SoftwareUpdate* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
_impl_.has_update_ = from._impl_.has_update_;
// @@protoc_insertion_point(copy_constructor:tari.rpc.SoftwareUpdate)
}
inline PROTOBUF_NDEBUG_INLINE SoftwareUpdate::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: version_(arena),
sha_(arena),
download_url_(arena),
_cached_size_{0} {}
inline void SoftwareUpdate::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.has_update_ = {};
}
SoftwareUpdate::~SoftwareUpdate() {
// @@protoc_insertion_point(destructor:tari.rpc.SoftwareUpdate)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void SoftwareUpdate::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.version_.Destroy();
_impl_.sha_.Destroy();
_impl_.download_url_.Destroy();
_impl_.~Impl_();
}
const ::google::protobuf::MessageLite::ClassData*
SoftwareUpdate::GetClassData() const {
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
ClassDataFull _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(SoftwareUpdate, _impl_._cached_size_),
false,
},
&SoftwareUpdate::MergeImpl,
&SoftwareUpdate::kDescriptorMethods,
};
return &_data_;
}
PROTOBUF_NOINLINE void SoftwareUpdate::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.SoftwareUpdate)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.version_.ClearToEmpty();
_impl_.sha_.ClearToEmpty();
_impl_.download_url_.ClearToEmpty();
_impl_.has_update_ = false;
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* SoftwareUpdate::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 4, 0, 54, 2> SoftwareUpdate::_table_ = {
{
0, // no _has_bits_
0, // no _extensions_
4, 24, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967280, // skipmap
offsetof(decltype(_table_), field_entries),
4, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
&_SoftwareUpdate_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::tari::rpc::SoftwareUpdate>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// string download_url = 4;
{::_pbi::TcParser::FastUS1,
{34, 63, 0, PROTOBUF_FIELD_OFFSET(SoftwareUpdate, _impl_.download_url_)}},
// bool has_update = 1;
{::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(SoftwareUpdate, _impl_.has_update_), 63>(),
{8, 63, 0, PROTOBUF_FIELD_OFFSET(SoftwareUpdate, _impl_.has_update_)}},
// string version = 2;
{::_pbi::TcParser::FastUS1,
{18, 63, 0, PROTOBUF_FIELD_OFFSET(SoftwareUpdate, _impl_.version_)}},
// string sha = 3;
{::_pbi::TcParser::FastUS1,
{26, 63, 0, PROTOBUF_FIELD_OFFSET(SoftwareUpdate, _impl_.sha_)}},
}}, {{
65535, 65535
}}, {{
// bool has_update = 1;
{PROTOBUF_FIELD_OFFSET(SoftwareUpdate, _impl_.has_update_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBool)},
// string version = 2;
{PROTOBUF_FIELD_OFFSET(SoftwareUpdate, _impl_.version_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
// string sha = 3;
{PROTOBUF_FIELD_OFFSET(SoftwareUpdate, _impl_.sha_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
// string download_url = 4;
{PROTOBUF_FIELD_OFFSET(SoftwareUpdate, _impl_.download_url_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
}},
// no aux_entries
{{
"\27\0\7\3\14\0\0\0"
"tari.rpc.SoftwareUpdate"
"version"
"sha"
"download_url"
}},
};
::uint8_t* SoftwareUpdate::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:tari.rpc.SoftwareUpdate)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// bool has_update = 1;
if (this->_internal_has_update() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(
1, this->_internal_has_update(), target);
}
// string version = 2;
if (!this->_internal_version().empty()) {
const std::string& _s = this->_internal_version();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tari.rpc.SoftwareUpdate.version");
target = stream->WriteStringMaybeAliased(2, _s, target);
}
// string sha = 3;
if (!this->_internal_sha().empty()) {
const std::string& _s = this->_internal_sha();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tari.rpc.SoftwareUpdate.sha");
target = stream->WriteStringMaybeAliased(3, _s, target);
}
// string download_url = 4;
if (!this->_internal_download_url().empty()) {
const std::string& _s = this->_internal_download_url();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tari.rpc.SoftwareUpdate.download_url");
target = stream->WriteStringMaybeAliased(4, _s, target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:tari.rpc.SoftwareUpdate)
return target;
}
::size_t SoftwareUpdate::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.SoftwareUpdate)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string version = 2;
if (!this->_internal_version().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this->_internal_version());
}
// string sha = 3;
if (!this->_internal_sha().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this->_internal_sha());
}
// string download_url = 4;
if (!this->_internal_download_url().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this->_internal_download_url());
}
// bool has_update = 1;
if (this->_internal_has_update() != 0) {
total_size += 2;
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
void SoftwareUpdate::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
auto* const _this = static_cast<SoftwareUpdate*>(&to_msg);
auto& from = static_cast<const SoftwareUpdate&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.SoftwareUpdate)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_version().empty()) {
_this->_internal_set_version(from._internal_version());
}
if (!from._internal_sha().empty()) {
_this->_internal_set_sha(from._internal_sha());
}
if (!from._internal_download_url().empty()) {
_this->_internal_set_download_url(from._internal_download_url());
}
if (from._internal_has_update() != 0) {
_this->_impl_.has_update_ = from._impl_.has_update_;
}
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void SoftwareUpdate::CopyFrom(const SoftwareUpdate& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.SoftwareUpdate)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool SoftwareUpdate::IsInitialized() const {
return true;
}
void SoftwareUpdate::InternalSwap(SoftwareUpdate* PROTOBUF_RESTRICT other) {
using std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.version_, &other->_impl_.version_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.sha_, &other->_impl_.sha_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.download_url_, &other->_impl_.download_url_, arena);
swap(_impl_.has_update_, other->_impl_.has_update_);
}
::google::protobuf::Metadata SoftwareUpdate::GetMetadata() const {
return ::_pbi::AssignDescriptors(&descriptor_table_network_2eproto_getter,
&descriptor_table_network_2eproto_once,
file_level_metadata_network_2eproto[6]);
}
// ===================================================================
class GetIdentityRequest::_Internal {
public:
};
GetIdentityRequest::GetIdentityRequest(::google::protobuf::Arena* arena)
: ::google::protobuf::internal::ZeroFieldsBase(arena) {
// @@protoc_insertion_point(arena_constructor:tari.rpc.GetIdentityRequest)
}
GetIdentityRequest::GetIdentityRequest(
::google::protobuf::Arena* arena,
const GetIdentityRequest& from)
: ::google::protobuf::internal::ZeroFieldsBase(arena) {
GetIdentityRequest* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:tari.rpc.GetIdentityRequest)
}
::google::protobuf::Metadata GetIdentityRequest::GetMetadata() const {
return ::_pbi::AssignDescriptors(&descriptor_table_network_2eproto_getter,
&descriptor_table_network_2eproto_once,
file_level_metadata_network_2eproto[7]);
}
// ===================================================================
class GetIdentityResponse::_Internal {
public:
};
GetIdentityResponse::GetIdentityResponse(::google::protobuf::Arena* arena)
: ::google::protobuf::Message(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:tari.rpc.GetIdentityResponse)
}
inline PROTOBUF_NDEBUG_INLINE GetIdentityResponse::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: public_key_(arena, from.public_key_),
public_address_(arena, from.public_address_),
node_id_(arena, from.node_id_),
_cached_size_{0} {}
GetIdentityResponse::GetIdentityResponse(
::google::protobuf::Arena* arena,
const GetIdentityResponse& from)
: ::google::protobuf::Message(arena) {
GetIdentityResponse* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
// @@protoc_insertion_point(copy_constructor:tari.rpc.GetIdentityResponse)
}
inline PROTOBUF_NDEBUG_INLINE GetIdentityResponse::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: public_key_(arena),
public_address_(arena),
node_id_(arena),
_cached_size_{0} {}
inline void GetIdentityResponse::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
GetIdentityResponse::~GetIdentityResponse() {
// @@protoc_insertion_point(destructor:tari.rpc.GetIdentityResponse)
_internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
SharedDtor();
}
inline void GetIdentityResponse::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.public_key_.Destroy();
_impl_.public_address_.Destroy();
_impl_.node_id_.Destroy();
_impl_.~Impl_();
}
const ::google::protobuf::MessageLite::ClassData*
GetIdentityResponse::GetClassData() const {
PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
ClassDataFull _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(GetIdentityResponse, _impl_._cached_size_),
false,
},
&GetIdentityResponse::MergeImpl,
&GetIdentityResponse::kDescriptorMethods,
};
return &_data_;
}
PROTOBUF_NOINLINE void GetIdentityResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:tari.rpc.GetIdentityResponse)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.public_key_.ClearToEmpty();
_impl_.public_address_.ClearToEmpty();
_impl_.node_id_.ClearToEmpty();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
const char* GetIdentityResponse::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 3, 0, 51, 2> GetIdentityResponse::_table_ = {
{
0, // no _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
&_GetIdentityResponse_default_instance_._instance,
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::tari::rpc::GetIdentityResponse>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
{::_pbi::TcParser::MiniParse, {}},
// bytes public_key = 1;
{::_pbi::TcParser::FastBS1,
{10, 63, 0, PROTOBUF_FIELD_OFFSET(GetIdentityResponse, _impl_.public_key_)}},
// string public_address = 2;
{::_pbi::TcParser::FastUS1,
{18, 63, 0, PROTOBUF_FIELD_OFFSET(GetIdentityResponse, _impl_.public_address_)}},
// bytes node_id = 3;
{::_pbi::TcParser::FastBS1,
{26, 63, 0, PROTOBUF_FIELD_OFFSET(GetIdentityResponse, _impl_.node_id_)}},
}}, {{
65535, 65535
}}, {{
// bytes public_key = 1;
{PROTOBUF_FIELD_OFFSET(GetIdentityResponse, _impl_.public_key_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
// string public_address = 2;
{PROTOBUF_FIELD_OFFSET(GetIdentityResponse, _impl_.public_address_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
// bytes node_id = 3;
{PROTOBUF_FIELD_OFFSET(GetIdentityResponse, _impl_.node_id_), 0, 0,
(0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
}},
// no aux_entries
{{
"\34\0\16\0\0\0\0\0"
"tari.rpc.GetIdentityResponse"
"public_address"
}},
};
::uint8_t* GetIdentityResponse::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:tari.rpc.GetIdentityResponse)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// bytes public_key = 1;
if (!this->_internal_public_key().empty()) {
const std::string& _s = this->_internal_public_key();
target = stream->WriteBytesMaybeAliased(1, _s, target);
}
// string public_address = 2;
if (!this->_internal_public_address().empty()) {
const std::string& _s = this->_internal_public_address();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "tari.rpc.GetIdentityResponse.public_address");
target = stream->WriteStringMaybeAliased(2, _s, target);
}
// bytes node_id = 3;
if (!this->_internal_node_id().empty()) {
const std::string& _s = this->_internal_node_id();
target = stream->WriteBytesMaybeAliased(3, _s, target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:tari.rpc.GetIdentityResponse)
return target;
}
::size_t GetIdentityResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:tari.rpc.GetIdentityResponse)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// bytes public_key = 1;
if (!this->_internal_public_key().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this->_internal_public_key());
}
// string public_address = 2;
if (!this->_internal_public_address().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this->_internal_public_address());
}
// bytes node_id = 3;
if (!this->_internal_node_id().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this->_internal_node_id());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
void GetIdentityResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
auto* const _this = static_cast<GetIdentityResponse*>(&to_msg);
auto& from = static_cast<const GetIdentityResponse&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:tari.rpc.GetIdentityResponse)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_public_key().empty()) {
_this->_internal_set_public_key(from._internal_public_key());
}
if (!from._internal_public_address().empty()) {
_this->_internal_set_public_address(from._internal_public_address());
}
if (!from._internal_node_id().empty()) {
_this->_internal_set_node_id(from._internal_node_id());
}
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
}
void GetIdentityResponse::CopyFrom(const GetIdentityResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:tari.rpc.GetIdentityResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool GetIdentityResponse::IsInitialized() const {
return true;
}
void GetIdentityResponse::InternalSwap(GetIdentityResponse* PROTOBUF_RESTRICT other) {
using std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.public_key_, &other->_impl_.public_key_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.public_address_, &other->_impl_.public_address_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.node_id_, &other->_impl_.node_id_, arena);
}
::google::protobuf::Metadata GetIdentityResponse::GetMetadata() const {
return ::_pbi::AssignDescriptors(&descriptor_table_network_2eproto_getter,
&descriptor_table_network_2eproto_once,
file_level_metadata_network_2eproto[8]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace rpc
} // namespace tari
namespace google {
namespace protobuf {
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
static ::std::false_type _static_init_ PROTOBUF_UNUSED =
(::_pbi::AddDescriptors(&descriptor_table_network_2eproto),
::std::false_type{});
#include "google/protobuf/port_undef.inc"