7de3f31fd0
* feat: support c++ targets * fix: compile all protos under ./proto * chore: Apply suggestions from code review --------- Co-authored-by: Yingwen <realevenyag@gmail.com>
1615 lines
60 KiB
C++
1615 lines
60 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: prometheus/remote/remote.proto
|
|
|
|
#include "prometheus/remote/remote.pb.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/extension_set.h>
|
|
#include <google/protobuf/wire_format_lite.h>
|
|
#include <google/protobuf/descriptor.h>
|
|
#include <google/protobuf/generated_message_reflection.h>
|
|
#include <google/protobuf/reflection_ops.h>
|
|
#include <google/protobuf/wire_format.h>
|
|
// @@protoc_insertion_point(includes)
|
|
#include <google/protobuf/port_def.inc>
|
|
|
|
PROTOBUF_PRAGMA_INIT_SEG
|
|
|
|
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
|
|
namespace _pbi = _pb::internal;
|
|
|
|
namespace prometheus {
|
|
PROTOBUF_CONSTEXPR WriteRequest::WriteRequest(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.timeseries_)*/{}
|
|
, /*decltype(_impl_.metadata_)*/{}
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct WriteRequestDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR WriteRequestDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~WriteRequestDefaultTypeInternal() {}
|
|
union {
|
|
WriteRequest _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WriteRequestDefaultTypeInternal _WriteRequest_default_instance_;
|
|
PROTOBUF_CONSTEXPR ReadRequest::ReadRequest(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.queries_)*/{}
|
|
, /*decltype(_impl_.accepted_response_types_)*/{}
|
|
, /*decltype(_impl_._accepted_response_types_cached_byte_size_)*/{0}
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct ReadRequestDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR ReadRequestDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~ReadRequestDefaultTypeInternal() {}
|
|
union {
|
|
ReadRequest _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReadRequestDefaultTypeInternal _ReadRequest_default_instance_;
|
|
PROTOBUF_CONSTEXPR ReadResponse::ReadResponse(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.results_)*/{}
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct ReadResponseDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR ReadResponseDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~ReadResponseDefaultTypeInternal() {}
|
|
union {
|
|
ReadResponse _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReadResponseDefaultTypeInternal _ReadResponse_default_instance_;
|
|
PROTOBUF_CONSTEXPR Query::Query(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.matchers_)*/{}
|
|
, /*decltype(_impl_.hints_)*/nullptr
|
|
, /*decltype(_impl_.start_timestamp_ms_)*/int64_t{0}
|
|
, /*decltype(_impl_.end_timestamp_ms_)*/int64_t{0}
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct QueryDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR QueryDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~QueryDefaultTypeInternal() {}
|
|
union {
|
|
Query _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 QueryDefaultTypeInternal _Query_default_instance_;
|
|
PROTOBUF_CONSTEXPR QueryResult::QueryResult(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.timeseries_)*/{}
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct QueryResultDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR QueryResultDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~QueryResultDefaultTypeInternal() {}
|
|
union {
|
|
QueryResult _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 QueryResultDefaultTypeInternal _QueryResult_default_instance_;
|
|
PROTOBUF_CONSTEXPR ChunkedReadResponse::ChunkedReadResponse(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.chunked_series_)*/{}
|
|
, /*decltype(_impl_.query_index_)*/int64_t{0}
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct ChunkedReadResponseDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR ChunkedReadResponseDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~ChunkedReadResponseDefaultTypeInternal() {}
|
|
union {
|
|
ChunkedReadResponse _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChunkedReadResponseDefaultTypeInternal _ChunkedReadResponse_default_instance_;
|
|
} // namespace prometheus
|
|
static ::_pb::Metadata file_level_metadata_prometheus_2fremote_2fremote_2eproto[6];
|
|
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_prometheus_2fremote_2fremote_2eproto[1];
|
|
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_prometheus_2fremote_2fremote_2eproto = nullptr;
|
|
|
|
const uint32_t TableStruct_prometheus_2fremote_2fremote_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::WriteRequest, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::WriteRequest, _impl_.timeseries_),
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::WriteRequest, _impl_.metadata_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::ReadRequest, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::ReadRequest, _impl_.queries_),
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::ReadRequest, _impl_.accepted_response_types_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::ReadResponse, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::ReadResponse, _impl_.results_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::Query, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::Query, _impl_.start_timestamp_ms_),
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::Query, _impl_.end_timestamp_ms_),
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::Query, _impl_.matchers_),
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::Query, _impl_.hints_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::QueryResult, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::QueryResult, _impl_.timeseries_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::ChunkedReadResponse, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::ChunkedReadResponse, _impl_.chunked_series_),
|
|
PROTOBUF_FIELD_OFFSET(::prometheus::ChunkedReadResponse, _impl_.query_index_),
|
|
};
|
|
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
{ 0, -1, -1, sizeof(::prometheus::WriteRequest)},
|
|
{ 8, -1, -1, sizeof(::prometheus::ReadRequest)},
|
|
{ 16, -1, -1, sizeof(::prometheus::ReadResponse)},
|
|
{ 23, -1, -1, sizeof(::prometheus::Query)},
|
|
{ 33, -1, -1, sizeof(::prometheus::QueryResult)},
|
|
{ 40, -1, -1, sizeof(::prometheus::ChunkedReadResponse)},
|
|
};
|
|
|
|
static const ::_pb::Message* const file_default_instances[] = {
|
|
&::prometheus::_WriteRequest_default_instance_._instance,
|
|
&::prometheus::_ReadRequest_default_instance_._instance,
|
|
&::prometheus::_ReadResponse_default_instance_._instance,
|
|
&::prometheus::_Query_default_instance_._instance,
|
|
&::prometheus::_QueryResult_default_instance_._instance,
|
|
&::prometheus::_ChunkedReadResponse_default_instance_._instance,
|
|
};
|
|
|
|
const char descriptor_table_protodef_prometheus_2fremote_2fremote_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
|
"\n\036prometheus/remote/remote.proto\022\npromet"
|
|
"heus\032\035prometheus/remote/types.proto\"n\n\014W"
|
|
"riteRequest\022*\n\ntimeseries\030\001 \003(\0132\026.promet"
|
|
"heus.TimeSeries\022,\n\010metadata\030\003 \003(\0132\032.prom"
|
|
"etheus.MetricMetadataJ\004\010\002\020\003\"\256\001\n\013ReadRequ"
|
|
"est\022\"\n\007queries\030\001 \003(\0132\021.prometheus.Query\022"
|
|
"E\n\027accepted_response_types\030\002 \003(\0162$.prome"
|
|
"theus.ReadRequest.ResponseType\"4\n\014Respon"
|
|
"seType\022\013\n\007SAMPLES\020\000\022\027\n\023STREAMED_XOR_CHUN"
|
|
"KS\020\001\"8\n\014ReadResponse\022(\n\007results\030\001 \003(\0132\027."
|
|
"prometheus.QueryResult\"\217\001\n\005Query\022\032\n\022star"
|
|
"t_timestamp_ms\030\001 \001(\003\022\030\n\020end_timestamp_ms"
|
|
"\030\002 \001(\003\022*\n\010matchers\030\003 \003(\0132\030.prometheus.La"
|
|
"belMatcher\022$\n\005hints\030\004 \001(\0132\025.prometheus.R"
|
|
"eadHints\"9\n\013QueryResult\022*\n\ntimeseries\030\001 "
|
|
"\003(\0132\026.prometheus.TimeSeries\"]\n\023ChunkedRe"
|
|
"adResponse\0221\n\016chunked_series\030\001 \003(\0132\031.pro"
|
|
"metheus.ChunkedSeries\022\023\n\013query_index\030\002 \001"
|
|
"(\003B=Z;github.com/GreptimeTeam/greptime-p"
|
|
"roto/go/prometheus/remoteb\006proto3"
|
|
;
|
|
static const ::_pbi::DescriptorTable* const descriptor_table_prometheus_2fremote_2fremote_2eproto_deps[1] = {
|
|
&::descriptor_table_prometheus_2fremote_2ftypes_2eproto,
|
|
};
|
|
static ::_pbi::once_flag descriptor_table_prometheus_2fremote_2fremote_2eproto_once;
|
|
const ::_pbi::DescriptorTable descriptor_table_prometheus_2fremote_2fremote_2eproto = {
|
|
false, false, 793, descriptor_table_protodef_prometheus_2fremote_2fremote_2eproto,
|
|
"prometheus/remote/remote.proto",
|
|
&descriptor_table_prometheus_2fremote_2fremote_2eproto_once, descriptor_table_prometheus_2fremote_2fremote_2eproto_deps, 1, 6,
|
|
schemas, file_default_instances, TableStruct_prometheus_2fremote_2fremote_2eproto::offsets,
|
|
file_level_metadata_prometheus_2fremote_2fremote_2eproto, file_level_enum_descriptors_prometheus_2fremote_2fremote_2eproto,
|
|
file_level_service_descriptors_prometheus_2fremote_2fremote_2eproto,
|
|
};
|
|
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_prometheus_2fremote_2fremote_2eproto_getter() {
|
|
return &descriptor_table_prometheus_2fremote_2fremote_2eproto;
|
|
}
|
|
|
|
// Force running AddDescriptors() at dynamic initialization time.
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_prometheus_2fremote_2fremote_2eproto(&descriptor_table_prometheus_2fremote_2fremote_2eproto);
|
|
namespace prometheus {
|
|
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ReadRequest_ResponseType_descriptor() {
|
|
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_prometheus_2fremote_2fremote_2eproto);
|
|
return file_level_enum_descriptors_prometheus_2fremote_2fremote_2eproto[0];
|
|
}
|
|
bool ReadRequest_ResponseType_IsValid(int value) {
|
|
switch (value) {
|
|
case 0:
|
|
case 1:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
|
|
constexpr ReadRequest_ResponseType ReadRequest::SAMPLES;
|
|
constexpr ReadRequest_ResponseType ReadRequest::STREAMED_XOR_CHUNKS;
|
|
constexpr ReadRequest_ResponseType ReadRequest::ResponseType_MIN;
|
|
constexpr ReadRequest_ResponseType ReadRequest::ResponseType_MAX;
|
|
constexpr int ReadRequest::ResponseType_ARRAYSIZE;
|
|
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
|
|
|
|
// ===================================================================
|
|
|
|
class WriteRequest::_Internal {
|
|
public:
|
|
};
|
|
|
|
void WriteRequest::clear_timeseries() {
|
|
_impl_.timeseries_.Clear();
|
|
}
|
|
void WriteRequest::clear_metadata() {
|
|
_impl_.metadata_.Clear();
|
|
}
|
|
WriteRequest::WriteRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:prometheus.WriteRequest)
|
|
}
|
|
WriteRequest::WriteRequest(const WriteRequest& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
WriteRequest* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.timeseries_){from._impl_.timeseries_}
|
|
, decltype(_impl_.metadata_){from._impl_.metadata_}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
// @@protoc_insertion_point(copy_constructor:prometheus.WriteRequest)
|
|
}
|
|
|
|
inline void WriteRequest::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.timeseries_){arena}
|
|
, decltype(_impl_.metadata_){arena}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
}
|
|
|
|
WriteRequest::~WriteRequest() {
|
|
// @@protoc_insertion_point(destructor:prometheus.WriteRequest)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void WriteRequest::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.timeseries_.~RepeatedPtrField();
|
|
_impl_.metadata_.~RepeatedPtrField();
|
|
}
|
|
|
|
void WriteRequest::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void WriteRequest::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:prometheus.WriteRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.timeseries_.Clear();
|
|
_impl_.metadata_.Clear();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* WriteRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// repeated .prometheus.TimeSeries timeseries = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_timeseries(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// repeated .prometheus.MetricMetadata metadata = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_metadata(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* WriteRequest::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:prometheus.WriteRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .prometheus.TimeSeries timeseries = 1;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_timeseries_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_timeseries(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// repeated .prometheus.MetricMetadata metadata = 3;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_metadata_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_metadata(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:prometheus.WriteRequest)
|
|
return target;
|
|
}
|
|
|
|
size_t WriteRequest::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:prometheus.WriteRequest)
|
|
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 .prometheus.TimeSeries timeseries = 1;
|
|
total_size += 1UL * this->_internal_timeseries_size();
|
|
for (const auto& msg : this->_impl_.timeseries_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
// repeated .prometheus.MetricMetadata metadata = 3;
|
|
total_size += 1UL * this->_internal_metadata_size();
|
|
for (const auto& msg : this->_impl_.metadata_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WriteRequest::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
WriteRequest::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WriteRequest::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void WriteRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<WriteRequest*>(&to_msg);
|
|
auto& from = static_cast<const WriteRequest&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:prometheus.WriteRequest)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.timeseries_.MergeFrom(from._impl_.timeseries_);
|
|
_this->_impl_.metadata_.MergeFrom(from._impl_.metadata_);
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void WriteRequest::CopyFrom(const WriteRequest& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.WriteRequest)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool WriteRequest::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void WriteRequest::InternalSwap(WriteRequest* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.timeseries_.InternalSwap(&other->_impl_.timeseries_);
|
|
_impl_.metadata_.InternalSwap(&other->_impl_.metadata_);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata WriteRequest::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_prometheus_2fremote_2fremote_2eproto_getter, &descriptor_table_prometheus_2fremote_2fremote_2eproto_once,
|
|
file_level_metadata_prometheus_2fremote_2fremote_2eproto[0]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class ReadRequest::_Internal {
|
|
public:
|
|
};
|
|
|
|
ReadRequest::ReadRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:prometheus.ReadRequest)
|
|
}
|
|
ReadRequest::ReadRequest(const ReadRequest& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
ReadRequest* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.queries_){from._impl_.queries_}
|
|
, decltype(_impl_.accepted_response_types_){from._impl_.accepted_response_types_}
|
|
, /*decltype(_impl_._accepted_response_types_cached_byte_size_)*/{0}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
// @@protoc_insertion_point(copy_constructor:prometheus.ReadRequest)
|
|
}
|
|
|
|
inline void ReadRequest::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.queries_){arena}
|
|
, decltype(_impl_.accepted_response_types_){arena}
|
|
, /*decltype(_impl_._accepted_response_types_cached_byte_size_)*/{0}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
}
|
|
|
|
ReadRequest::~ReadRequest() {
|
|
// @@protoc_insertion_point(destructor:prometheus.ReadRequest)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void ReadRequest::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.queries_.~RepeatedPtrField();
|
|
_impl_.accepted_response_types_.~RepeatedField();
|
|
}
|
|
|
|
void ReadRequest::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void ReadRequest::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:prometheus.ReadRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.queries_.Clear();
|
|
_impl_.accepted_response_types_.Clear();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* ReadRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// repeated .prometheus.Query queries = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_queries(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_accepted_response_types(), ptr, ctx);
|
|
CHK_(ptr);
|
|
} else if (static_cast<uint8_t>(tag) == 16) {
|
|
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
CHK_(ptr);
|
|
_internal_add_accepted_response_types(static_cast<::prometheus::ReadRequest_ResponseType>(val));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* ReadRequest::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:prometheus.ReadRequest)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .prometheus.Query queries = 1;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_queries_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_queries(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
|
|
{
|
|
int byte_size = _impl_._accepted_response_types_cached_byte_size_.load(std::memory_order_relaxed);
|
|
if (byte_size > 0) {
|
|
target = stream->WriteEnumPacked(
|
|
2, _impl_.accepted_response_types_, byte_size, target);
|
|
}
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:prometheus.ReadRequest)
|
|
return target;
|
|
}
|
|
|
|
size_t ReadRequest::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:prometheus.ReadRequest)
|
|
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 .prometheus.Query queries = 1;
|
|
total_size += 1UL * this->_internal_queries_size();
|
|
for (const auto& msg : this->_impl_.queries_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
// repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
|
|
{
|
|
size_t data_size = 0;
|
|
unsigned int count = static_cast<unsigned int>(this->_internal_accepted_response_types_size());for (unsigned int i = 0; i < count; i++) {
|
|
data_size += ::_pbi::WireFormatLite::EnumSize(
|
|
this->_internal_accepted_response_types(static_cast<int>(i)));
|
|
}
|
|
if (data_size > 0) {
|
|
total_size += 1 +
|
|
::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
|
|
}
|
|
int cached_size = ::_pbi::ToCachedSize(data_size);
|
|
_impl_._accepted_response_types_cached_byte_size_.store(cached_size,
|
|
std::memory_order_relaxed);
|
|
total_size += data_size;
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReadRequest::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
ReadRequest::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReadRequest::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void ReadRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<ReadRequest*>(&to_msg);
|
|
auto& from = static_cast<const ReadRequest&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:prometheus.ReadRequest)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.queries_.MergeFrom(from._impl_.queries_);
|
|
_this->_impl_.accepted_response_types_.MergeFrom(from._impl_.accepted_response_types_);
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void ReadRequest::CopyFrom(const ReadRequest& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.ReadRequest)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ReadRequest::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void ReadRequest::InternalSwap(ReadRequest* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.queries_.InternalSwap(&other->_impl_.queries_);
|
|
_impl_.accepted_response_types_.InternalSwap(&other->_impl_.accepted_response_types_);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata ReadRequest::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_prometheus_2fremote_2fremote_2eproto_getter, &descriptor_table_prometheus_2fremote_2fremote_2eproto_once,
|
|
file_level_metadata_prometheus_2fremote_2fremote_2eproto[1]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class ReadResponse::_Internal {
|
|
public:
|
|
};
|
|
|
|
ReadResponse::ReadResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:prometheus.ReadResponse)
|
|
}
|
|
ReadResponse::ReadResponse(const ReadResponse& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
ReadResponse* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.results_){from._impl_.results_}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
// @@protoc_insertion_point(copy_constructor:prometheus.ReadResponse)
|
|
}
|
|
|
|
inline void ReadResponse::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.results_){arena}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
}
|
|
|
|
ReadResponse::~ReadResponse() {
|
|
// @@protoc_insertion_point(destructor:prometheus.ReadResponse)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void ReadResponse::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.results_.~RepeatedPtrField();
|
|
}
|
|
|
|
void ReadResponse::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void ReadResponse::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:prometheus.ReadResponse)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.results_.Clear();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* ReadResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// repeated .prometheus.QueryResult results = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_results(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* ReadResponse::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:prometheus.ReadResponse)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .prometheus.QueryResult results = 1;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_results_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_results(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:prometheus.ReadResponse)
|
|
return target;
|
|
}
|
|
|
|
size_t ReadResponse::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:prometheus.ReadResponse)
|
|
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 .prometheus.QueryResult results = 1;
|
|
total_size += 1UL * this->_internal_results_size();
|
|
for (const auto& msg : this->_impl_.results_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReadResponse::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
ReadResponse::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReadResponse::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void ReadResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<ReadResponse*>(&to_msg);
|
|
auto& from = static_cast<const ReadResponse&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:prometheus.ReadResponse)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.results_.MergeFrom(from._impl_.results_);
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void ReadResponse::CopyFrom(const ReadResponse& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.ReadResponse)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ReadResponse::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void ReadResponse::InternalSwap(ReadResponse* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.results_.InternalSwap(&other->_impl_.results_);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata ReadResponse::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_prometheus_2fremote_2fremote_2eproto_getter, &descriptor_table_prometheus_2fremote_2fremote_2eproto_once,
|
|
file_level_metadata_prometheus_2fremote_2fremote_2eproto[2]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class Query::_Internal {
|
|
public:
|
|
static const ::prometheus::ReadHints& hints(const Query* msg);
|
|
};
|
|
|
|
const ::prometheus::ReadHints&
|
|
Query::_Internal::hints(const Query* msg) {
|
|
return *msg->_impl_.hints_;
|
|
}
|
|
void Query::clear_matchers() {
|
|
_impl_.matchers_.Clear();
|
|
}
|
|
void Query::clear_hints() {
|
|
if (GetArenaForAllocation() == nullptr && _impl_.hints_ != nullptr) {
|
|
delete _impl_.hints_;
|
|
}
|
|
_impl_.hints_ = nullptr;
|
|
}
|
|
Query::Query(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:prometheus.Query)
|
|
}
|
|
Query::Query(const Query& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
Query* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.matchers_){from._impl_.matchers_}
|
|
, decltype(_impl_.hints_){nullptr}
|
|
, decltype(_impl_.start_timestamp_ms_){}
|
|
, decltype(_impl_.end_timestamp_ms_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
if (from._internal_has_hints()) {
|
|
_this->_impl_.hints_ = new ::prometheus::ReadHints(*from._impl_.hints_);
|
|
}
|
|
::memcpy(&_impl_.start_timestamp_ms_, &from._impl_.start_timestamp_ms_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.end_timestamp_ms_) -
|
|
reinterpret_cast<char*>(&_impl_.start_timestamp_ms_)) + sizeof(_impl_.end_timestamp_ms_));
|
|
// @@protoc_insertion_point(copy_constructor:prometheus.Query)
|
|
}
|
|
|
|
inline void Query::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.matchers_){arena}
|
|
, decltype(_impl_.hints_){nullptr}
|
|
, decltype(_impl_.start_timestamp_ms_){int64_t{0}}
|
|
, decltype(_impl_.end_timestamp_ms_){int64_t{0}}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
}
|
|
|
|
Query::~Query() {
|
|
// @@protoc_insertion_point(destructor:prometheus.Query)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void Query::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.matchers_.~RepeatedPtrField();
|
|
if (this != internal_default_instance()) delete _impl_.hints_;
|
|
}
|
|
|
|
void Query::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void Query::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:prometheus.Query)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.matchers_.Clear();
|
|
if (GetArenaForAllocation() == nullptr && _impl_.hints_ != nullptr) {
|
|
delete _impl_.hints_;
|
|
}
|
|
_impl_.hints_ = nullptr;
|
|
::memset(&_impl_.start_timestamp_ms_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&_impl_.end_timestamp_ms_) -
|
|
reinterpret_cast<char*>(&_impl_.start_timestamp_ms_)) + sizeof(_impl_.end_timestamp_ms_));
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Query::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// int64 start_timestamp_ms = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
|
_impl_.start_timestamp_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 end_timestamp_ms = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
|
_impl_.end_timestamp_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// repeated .prometheus.LabelMatcher matchers = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_matchers(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .prometheus.ReadHints hints = 4;
|
|
case 4:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
|
|
ptr = ctx->ParseMessage(_internal_mutable_hints(), ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* Query::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:prometheus.Query)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// int64 start_timestamp_ms = 1;
|
|
if (this->_internal_start_timestamp_ms() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_start_timestamp_ms(), target);
|
|
}
|
|
|
|
// int64 end_timestamp_ms = 2;
|
|
if (this->_internal_end_timestamp_ms() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_end_timestamp_ms(), target);
|
|
}
|
|
|
|
// repeated .prometheus.LabelMatcher matchers = 3;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_matchers_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_matchers(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// .prometheus.ReadHints hints = 4;
|
|
if (this->_internal_has_hints()) {
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(4, _Internal::hints(this),
|
|
_Internal::hints(this).GetCachedSize(), target, stream);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:prometheus.Query)
|
|
return target;
|
|
}
|
|
|
|
size_t Query::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:prometheus.Query)
|
|
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 .prometheus.LabelMatcher matchers = 3;
|
|
total_size += 1UL * this->_internal_matchers_size();
|
|
for (const auto& msg : this->_impl_.matchers_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
// .prometheus.ReadHints hints = 4;
|
|
if (this->_internal_has_hints()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
*_impl_.hints_);
|
|
}
|
|
|
|
// int64 start_timestamp_ms = 1;
|
|
if (this->_internal_start_timestamp_ms() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_start_timestamp_ms());
|
|
}
|
|
|
|
// int64 end_timestamp_ms = 2;
|
|
if (this->_internal_end_timestamp_ms() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_end_timestamp_ms());
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Query::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
Query::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Query::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void Query::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<Query*>(&to_msg);
|
|
auto& from = static_cast<const Query&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:prometheus.Query)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.matchers_.MergeFrom(from._impl_.matchers_);
|
|
if (from._internal_has_hints()) {
|
|
_this->_internal_mutable_hints()->::prometheus::ReadHints::MergeFrom(
|
|
from._internal_hints());
|
|
}
|
|
if (from._internal_start_timestamp_ms() != 0) {
|
|
_this->_internal_set_start_timestamp_ms(from._internal_start_timestamp_ms());
|
|
}
|
|
if (from._internal_end_timestamp_ms() != 0) {
|
|
_this->_internal_set_end_timestamp_ms(from._internal_end_timestamp_ms());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Query::CopyFrom(const Query& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.Query)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Query::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Query::InternalSwap(Query* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.matchers_.InternalSwap(&other->_impl_.matchers_);
|
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(Query, _impl_.end_timestamp_ms_)
|
|
+ sizeof(Query::_impl_.end_timestamp_ms_)
|
|
- PROTOBUF_FIELD_OFFSET(Query, _impl_.hints_)>(
|
|
reinterpret_cast<char*>(&_impl_.hints_),
|
|
reinterpret_cast<char*>(&other->_impl_.hints_));
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Query::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_prometheus_2fremote_2fremote_2eproto_getter, &descriptor_table_prometheus_2fremote_2fremote_2eproto_once,
|
|
file_level_metadata_prometheus_2fremote_2fremote_2eproto[3]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class QueryResult::_Internal {
|
|
public:
|
|
};
|
|
|
|
void QueryResult::clear_timeseries() {
|
|
_impl_.timeseries_.Clear();
|
|
}
|
|
QueryResult::QueryResult(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:prometheus.QueryResult)
|
|
}
|
|
QueryResult::QueryResult(const QueryResult& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
QueryResult* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.timeseries_){from._impl_.timeseries_}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
// @@protoc_insertion_point(copy_constructor:prometheus.QueryResult)
|
|
}
|
|
|
|
inline void QueryResult::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.timeseries_){arena}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
}
|
|
|
|
QueryResult::~QueryResult() {
|
|
// @@protoc_insertion_point(destructor:prometheus.QueryResult)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void QueryResult::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.timeseries_.~RepeatedPtrField();
|
|
}
|
|
|
|
void QueryResult::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void QueryResult::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:prometheus.QueryResult)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.timeseries_.Clear();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* QueryResult::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// repeated .prometheus.TimeSeries timeseries = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_timeseries(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* QueryResult::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:prometheus.QueryResult)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .prometheus.TimeSeries timeseries = 1;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_timeseries_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_timeseries(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::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<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:prometheus.QueryResult)
|
|
return target;
|
|
}
|
|
|
|
size_t QueryResult::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:prometheus.QueryResult)
|
|
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 .prometheus.TimeSeries timeseries = 1;
|
|
total_size += 1UL * this->_internal_timeseries_size();
|
|
for (const auto& msg : this->_impl_.timeseries_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData QueryResult::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
QueryResult::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*QueryResult::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void QueryResult::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<QueryResult*>(&to_msg);
|
|
auto& from = static_cast<const QueryResult&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:prometheus.QueryResult)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.timeseries_.MergeFrom(from._impl_.timeseries_);
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void QueryResult::CopyFrom(const QueryResult& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.QueryResult)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool QueryResult::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void QueryResult::InternalSwap(QueryResult* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.timeseries_.InternalSwap(&other->_impl_.timeseries_);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata QueryResult::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_prometheus_2fremote_2fremote_2eproto_getter, &descriptor_table_prometheus_2fremote_2fremote_2eproto_once,
|
|
file_level_metadata_prometheus_2fremote_2fremote_2eproto[4]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class ChunkedReadResponse::_Internal {
|
|
public:
|
|
};
|
|
|
|
void ChunkedReadResponse::clear_chunked_series() {
|
|
_impl_.chunked_series_.Clear();
|
|
}
|
|
ChunkedReadResponse::ChunkedReadResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
bool is_message_owned)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
|
SharedCtor(arena, is_message_owned);
|
|
// @@protoc_insertion_point(arena_constructor:prometheus.ChunkedReadResponse)
|
|
}
|
|
ChunkedReadResponse::ChunkedReadResponse(const ChunkedReadResponse& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
ChunkedReadResponse* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.chunked_series_){from._impl_.chunked_series_}
|
|
, decltype(_impl_.query_index_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
_this->_impl_.query_index_ = from._impl_.query_index_;
|
|
// @@protoc_insertion_point(copy_constructor:prometheus.ChunkedReadResponse)
|
|
}
|
|
|
|
inline void ChunkedReadResponse::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.chunked_series_){arena}
|
|
, decltype(_impl_.query_index_){int64_t{0}}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
}
|
|
|
|
ChunkedReadResponse::~ChunkedReadResponse() {
|
|
// @@protoc_insertion_point(destructor:prometheus.ChunkedReadResponse)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void ChunkedReadResponse::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.chunked_series_.~RepeatedPtrField();
|
|
}
|
|
|
|
void ChunkedReadResponse::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void ChunkedReadResponse::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:prometheus.ChunkedReadResponse)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.chunked_series_.Clear();
|
|
_impl_.query_index_ = int64_t{0};
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* ChunkedReadResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
while (!ctx->Done(&ptr)) {
|
|
uint32_t tag;
|
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
|
switch (tag >> 3) {
|
|
// repeated .prometheus.ChunkedSeries chunked_series = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_chunked_series(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 query_index = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
|
_impl_.query_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
handle_unusual:
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
CHK_(ptr);
|
|
ctx->SetLastTag(tag);
|
|
goto message_done;
|
|
}
|
|
ptr = UnknownFieldParse(
|
|
tag,
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
ptr, ctx);
|
|
CHK_(ptr != nullptr);
|
|
} // while
|
|
message_done:
|
|
return ptr;
|
|
failure:
|
|
ptr = nullptr;
|
|
goto message_done;
|
|
#undef CHK_
|
|
}
|
|
|
|
uint8_t* ChunkedReadResponse::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:prometheus.ChunkedReadResponse)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .prometheus.ChunkedSeries chunked_series = 1;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_chunked_series_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_chunked_series(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// int64 query_index = 2;
|
|
if (this->_internal_query_index() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_query_index(), target);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:prometheus.ChunkedReadResponse)
|
|
return target;
|
|
}
|
|
|
|
size_t ChunkedReadResponse::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:prometheus.ChunkedReadResponse)
|
|
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 .prometheus.ChunkedSeries chunked_series = 1;
|
|
total_size += 1UL * this->_internal_chunked_series_size();
|
|
for (const auto& msg : this->_impl_.chunked_series_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
// int64 query_index = 2;
|
|
if (this->_internal_query_index() != 0) {
|
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_query_index());
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ChunkedReadResponse::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
ChunkedReadResponse::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ChunkedReadResponse::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void ChunkedReadResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<ChunkedReadResponse*>(&to_msg);
|
|
auto& from = static_cast<const ChunkedReadResponse&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:prometheus.ChunkedReadResponse)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.chunked_series_.MergeFrom(from._impl_.chunked_series_);
|
|
if (from._internal_query_index() != 0) {
|
|
_this->_internal_set_query_index(from._internal_query_index());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void ChunkedReadResponse::CopyFrom(const ChunkedReadResponse& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.ChunkedReadResponse)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ChunkedReadResponse::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void ChunkedReadResponse::InternalSwap(ChunkedReadResponse* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.chunked_series_.InternalSwap(&other->_impl_.chunked_series_);
|
|
swap(_impl_.query_index_, other->_impl_.query_index_);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata ChunkedReadResponse::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_prometheus_2fremote_2fremote_2eproto_getter, &descriptor_table_prometheus_2fremote_2fremote_2eproto_once,
|
|
file_level_metadata_prometheus_2fremote_2fremote_2eproto[5]);
|
|
}
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
} // namespace prometheus
|
|
PROTOBUF_NAMESPACE_OPEN
|
|
template<> PROTOBUF_NOINLINE ::prometheus::WriteRequest*
|
|
Arena::CreateMaybeMessage< ::prometheus::WriteRequest >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::prometheus::WriteRequest >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::prometheus::ReadRequest*
|
|
Arena::CreateMaybeMessage< ::prometheus::ReadRequest >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::prometheus::ReadRequest >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::prometheus::ReadResponse*
|
|
Arena::CreateMaybeMessage< ::prometheus::ReadResponse >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::prometheus::ReadResponse >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::prometheus::Query*
|
|
Arena::CreateMaybeMessage< ::prometheus::Query >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::prometheus::Query >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::prometheus::QueryResult*
|
|
Arena::CreateMaybeMessage< ::prometheus::QueryResult >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::prometheus::QueryResult >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::prometheus::ChunkedReadResponse*
|
|
Arena::CreateMaybeMessage< ::prometheus::ChunkedReadResponse >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::prometheus::ChunkedReadResponse >(arena);
|
|
}
|
|
PROTOBUF_NAMESPACE_CLOSE
|
|
|
|
// @@protoc_insertion_point(global_scope)
|
|
#include <google/protobuf/port_undef.inc>
|