diff options
author | Corey Hulen <corey@hulen.com> | 2016-11-22 11:05:54 -0800 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-11-22 14:05:54 -0500 |
commit | 7961599b2e41c71720a42b3bfde641f7529f05fe (patch) | |
tree | 3c039e1d3790a954ba65fe551c7b348331bce994 /vendor/github.com/prometheus/client_model/cpp | |
parent | e033dcce8e57ed6b6684227adf9b29347e4718b3 (diff) | |
download | chat-7961599b2e41c71720a42b3bfde641f7529f05fe.tar.gz chat-7961599b2e41c71720a42b3bfde641f7529f05fe.tar.bz2 chat-7961599b2e41c71720a42b3bfde641f7529f05fe.zip |
PLT-4357 adding performance monitoring (#4622)
* WIP
* WIP
* Adding metrics collection
* updating vendor packages
* Adding metrics to config
* Adding admin console page for perf monitoring
* Updating glide
* switching to tylerb/graceful
Diffstat (limited to 'vendor/github.com/prometheus/client_model/cpp')
-rw-r--r-- | vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc | 3380 | ||||
-rw-r--r-- | vendor/github.com/prometheus/client_model/cpp/metrics.pb.h | 2072 |
2 files changed, 5452 insertions, 0 deletions
diff --git a/vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc b/vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc new file mode 100644 index 000000000..1ff893b83 --- /dev/null +++ b/vendor/github.com/prometheus/client_model/cpp/metrics.pb.cc @@ -0,0 +1,3380 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: metrics.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "metrics.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/once.h> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/wire_format_lite_inl.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) + +namespace io { +namespace prometheus { +namespace client { + +namespace { + +const ::google::protobuf::Descriptor* LabelPair_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + LabelPair_reflection_ = NULL; +const ::google::protobuf::Descriptor* Gauge_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Gauge_reflection_ = NULL; +const ::google::protobuf::Descriptor* Counter_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Counter_reflection_ = NULL; +const ::google::protobuf::Descriptor* Quantile_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Quantile_reflection_ = NULL; +const ::google::protobuf::Descriptor* Summary_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Summary_reflection_ = NULL; +const ::google::protobuf::Descriptor* Untyped_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Untyped_reflection_ = NULL; +const ::google::protobuf::Descriptor* Histogram_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Histogram_reflection_ = NULL; +const ::google::protobuf::Descriptor* Bucket_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Bucket_reflection_ = NULL; +const ::google::protobuf::Descriptor* Metric_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Metric_reflection_ = NULL; +const ::google::protobuf::Descriptor* MetricFamily_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + MetricFamily_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* MetricType_descriptor_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_metrics_2eproto() { + protobuf_AddDesc_metrics_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "metrics.proto"); + GOOGLE_CHECK(file != NULL); + LabelPair_descriptor_ = file->message_type(0); + static const int LabelPair_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, value_), + }; + LabelPair_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + LabelPair_descriptor_, + LabelPair::default_instance_, + LabelPair_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(LabelPair)); + Gauge_descriptor_ = file->message_type(1); + static const int Gauge_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, value_), + }; + Gauge_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Gauge_descriptor_, + Gauge::default_instance_, + Gauge_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Gauge)); + Counter_descriptor_ = file->message_type(2); + static const int Counter_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, value_), + }; + Counter_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Counter_descriptor_, + Counter::default_instance_, + Counter_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Counter)); + Quantile_descriptor_ = file->message_type(3); + static const int Quantile_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, quantile_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, value_), + }; + Quantile_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Quantile_descriptor_, + Quantile::default_instance_, + Quantile_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Quantile)); + Summary_descriptor_ = file->message_type(4); + static const int Summary_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, sample_count_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, sample_sum_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, quantile_), + }; + Summary_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Summary_descriptor_, + Summary::default_instance_, + Summary_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Summary)); + Untyped_descriptor_ = file->message_type(5); + static const int Untyped_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, value_), + }; + Untyped_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Untyped_descriptor_, + Untyped::default_instance_, + Untyped_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Untyped)); + Histogram_descriptor_ = file->message_type(6); + static const int Histogram_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, sample_count_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, sample_sum_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, bucket_), + }; + Histogram_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Histogram_descriptor_, + Histogram::default_instance_, + Histogram_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Histogram)); + Bucket_descriptor_ = file->message_type(7); + static const int Bucket_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, cumulative_count_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, upper_bound_), + }; + Bucket_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Bucket_descriptor_, + Bucket::default_instance_, + Bucket_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Bucket)); + Metric_descriptor_ = file->message_type(8); + static const int Metric_offsets_[7] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, label_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, gauge_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, counter_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, summary_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, untyped_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, histogram_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, timestamp_ms_), + }; + Metric_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + Metric_descriptor_, + Metric::default_instance_, + Metric_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(Metric)); + MetricFamily_descriptor_ = file->message_type(9); + static const int MetricFamily_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, help_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, metric_), + }; + MetricFamily_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + MetricFamily_descriptor_, + MetricFamily::default_instance_, + MetricFamily_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(MetricFamily)); + MetricType_descriptor_ = file->enum_type(0); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_metrics_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + LabelPair_descriptor_, &LabelPair::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Gauge_descriptor_, &Gauge::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Counter_descriptor_, &Counter::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Quantile_descriptor_, &Quantile::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Summary_descriptor_, &Summary::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Untyped_descriptor_, &Untyped::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Histogram_descriptor_, &Histogram::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Bucket_descriptor_, &Bucket::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Metric_descriptor_, &Metric::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + MetricFamily_descriptor_, &MetricFamily::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_metrics_2eproto() { + delete LabelPair::default_instance_; + delete LabelPair_reflection_; + delete Gauge::default_instance_; + delete Gauge_reflection_; + delete Counter::default_instance_; + delete Counter_reflection_; + delete Quantile::default_instance_; + delete Quantile_reflection_; + delete Summary::default_instance_; + delete Summary_reflection_; + delete Untyped::default_instance_; + delete Untyped_reflection_; + delete Histogram::default_instance_; + delete Histogram_reflection_; + delete Bucket::default_instance_; + delete Bucket_reflection_; + delete Metric::default_instance_; + delete Metric_reflection_; + delete MetricFamily::default_instance_; + delete MetricFamily_reflection_; +} + +void protobuf_AddDesc_metrics_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\rmetrics.proto\022\024io.prometheus.client\"(\n" + "\tLabelPair\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"" + "\026\n\005Gauge\022\r\n\005value\030\001 \001(\001\"\030\n\007Counter\022\r\n\005va" + "lue\030\001 \001(\001\"+\n\010Quantile\022\020\n\010quantile\030\001 \001(\001\022" + "\r\n\005value\030\002 \001(\001\"e\n\007Summary\022\024\n\014sample_coun" + "t\030\001 \001(\004\022\022\n\nsample_sum\030\002 \001(\001\0220\n\010quantile\030" + "\003 \003(\0132\036.io.prometheus.client.Quantile\"\030\n" + "\007Untyped\022\r\n\005value\030\001 \001(\001\"c\n\tHistogram\022\024\n\014" + "sample_count\030\001 \001(\004\022\022\n\nsample_sum\030\002 \001(\001\022," + "\n\006bucket\030\003 \003(\0132\034.io.prometheus.client.Bu" + "cket\"7\n\006Bucket\022\030\n\020cumulative_count\030\001 \001(\004" + "\022\023\n\013upper_bound\030\002 \001(\001\"\276\002\n\006Metric\022.\n\005labe" + "l\030\001 \003(\0132\037.io.prometheus.client.LabelPair" + "\022*\n\005gauge\030\002 \001(\0132\033.io.prometheus.client.G" + "auge\022.\n\007counter\030\003 \001(\0132\035.io.prometheus.cl" + "ient.Counter\022.\n\007summary\030\004 \001(\0132\035.io.prome" + "theus.client.Summary\022.\n\007untyped\030\005 \001(\0132\035." + "io.prometheus.client.Untyped\0222\n\thistogra" + "m\030\007 \001(\0132\037.io.prometheus.client.Histogram" + "\022\024\n\014timestamp_ms\030\006 \001(\003\"\210\001\n\014MetricFamily\022" + "\014\n\004name\030\001 \001(\t\022\014\n\004help\030\002 \001(\t\022.\n\004type\030\003 \001(" + "\0162 .io.prometheus.client.MetricType\022,\n\006m" + "etric\030\004 \003(\0132\034.io.prometheus.client.Metri" + "c*M\n\nMetricType\022\013\n\007COUNTER\020\000\022\t\n\005GAUGE\020\001\022" + "\013\n\007SUMMARY\020\002\022\013\n\007UNTYPED\020\003\022\r\n\tHISTOGRAM\020\004" + "B\026\n\024io.prometheus.client", 1024); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "metrics.proto", &protobuf_RegisterTypes); + LabelPair::default_instance_ = new LabelPair(); + Gauge::default_instance_ = new Gauge(); + Counter::default_instance_ = new Counter(); + Quantile::default_instance_ = new Quantile(); + Summary::default_instance_ = new Summary(); + Untyped::default_instance_ = new Untyped(); + Histogram::default_instance_ = new Histogram(); + Bucket::default_instance_ = new Bucket(); + Metric::default_instance_ = new Metric(); + MetricFamily::default_instance_ = new MetricFamily(); + LabelPair::default_instance_->InitAsDefaultInstance(); + Gauge::default_instance_->InitAsDefaultInstance(); + Counter::default_instance_->InitAsDefaultInstance(); + Quantile::default_instance_->InitAsDefaultInstance(); + Summary::default_instance_->InitAsDefaultInstance(); + Untyped::default_instance_->InitAsDefaultInstance(); + Histogram::default_instance_->InitAsDefaultInstance(); + Bucket::default_instance_->InitAsDefaultInstance(); + Metric::default_instance_->InitAsDefaultInstance(); + MetricFamily::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_metrics_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_metrics_2eproto { + StaticDescriptorInitializer_metrics_2eproto() { + protobuf_AddDesc_metrics_2eproto(); + } +} static_descriptor_initializer_metrics_2eproto_; +const ::google::protobuf::EnumDescriptor* MetricType_descriptor() { + protobuf_AssignDescriptorsOnce(); + return MetricType_descriptor_; +} +bool MetricType_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + + +// =================================================================== + +#ifndef _MSC_VER +const int LabelPair::kNameFieldNumber; +const int LabelPair::kValueFieldNumber; +#endif // !_MSC_VER + +LabelPair::LabelPair() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:io.prometheus.client.LabelPair) +} + +void LabelPair::InitAsDefaultInstance() { +} + +LabelPair::LabelPair(const LabelPair& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:io.prometheus.client.LabelPair) +} + +void LabelPair::SharedCtor() { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +LabelPair::~LabelPair() { + // @@protoc_insertion_point(destructor:io.prometheus.client.LabelPair) + SharedDtor(); +} + +void LabelPair::SharedDtor() { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete name_; + } + if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete value_; + } + if (this != default_instance_) { + } +} + +void LabelPair::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* LabelPair::descriptor() { + protobuf_AssignDescriptorsOnce(); + return LabelPair_descriptor_; +} + +const LabelPair& LabelPair::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); + return *default_instance_; +} + +LabelPair* LabelPair::default_instance_ = NULL; + +LabelPair* LabelPair::New() const { + return new LabelPair; +} + +void LabelPair::Clear() { + if (_has_bits_[0 / 32] & 3) { + if (has_name()) { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_->clear(); + } + } + if (has_value()) { + if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + value_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool LabelPair::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:io.prometheus.client.LabelPair) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "name"); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_value; + break; + } + + // optional string value = 2; + case 2: { + if (tag == 18) { + parse_value: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_value())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->value().data(), this->value().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "value"); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:io.prometheus.client.LabelPair) + return true; +failure: + // @@protoc_insertion_point(parse_failure:io.prometheus.client.LabelPair) + return false; +#undef DO_ +} + +void LabelPair::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:io.prometheus.client.LabelPair) + // optional string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // optional string value = 2; + if (has_value()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->value().data(), this->value().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "value"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->value(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:io.prometheus.client.LabelPair) +} + +::google::protobuf::uint8* LabelPair::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.LabelPair) + // optional string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // optional string value = 2; + if (has_value()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->value().data(), this->value().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "value"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->value(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.LabelPair) + return target; +} + +int LabelPair::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional string name = 1; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string value = 2; + if (has_value()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->value()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void LabelPair::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const LabelPair* source = + ::google::protobuf::internal::dynamic_cast_if_available<const LabelPair*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void LabelPair::MergeFrom(const LabelPair& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_name()) { + set_name(from.name()); + } + if (from.has_value()) { + set_value(from.value()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void LabelPair::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void LabelPair::CopyFrom(const LabelPair& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LabelPair::IsInitialized() const { + + return true; +} + +void LabelPair::Swap(LabelPair* other) { + if (other != this) { + std::swap(name_, other->name_); + std::swap(value_, other->value_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata LabelPair::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = LabelPair_descriptor_; + metadata.reflection = LabelPair_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Gauge::kValueFieldNumber; +#endif // !_MSC_VER + +Gauge::Gauge() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:io.prometheus.client.Gauge) +} + +void Gauge::InitAsDefaultInstance() { +} + +Gauge::Gauge(const Gauge& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Gauge) +} + +void Gauge::SharedCtor() { + _cached_size_ = 0; + value_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Gauge::~Gauge() { + // @@protoc_insertion_point(destructor:io.prometheus.client.Gauge) + SharedDtor(); +} + +void Gauge::SharedDtor() { + if (this != default_instance_) { + } +} + +void Gauge::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Gauge::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Gauge_descriptor_; +} + +const Gauge& Gauge::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); + return *default_instance_; +} + +Gauge* Gauge::default_instance_ = NULL; + +Gauge* Gauge::New() const { + return new Gauge; +} + +void Gauge::Clear() { + value_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Gauge::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:io.prometheus.client.Gauge) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional double value = 1; + case 1: { + if (tag == 9) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, &value_))); + set_has_value(); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:io.prometheus.client.Gauge) + return true; +failure: + // @@protoc_insertion_point(parse_failure:io.prometheus.client.Gauge) + return false; +#undef DO_ +} + +void Gauge::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:io.prometheus.client.Gauge) + // optional double value = 1; + if (has_value()) { + ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:io.prometheus.client.Gauge) +} + +::google::protobuf::uint8* Gauge::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Gauge) + // optional double value = 1; + if (has_value()) { + target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Gauge) + return target; +} + +int Gauge::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional double value = 1; + if (has_value()) { + total_size += 1 + 8; + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Gauge::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Gauge* source = + ::google::protobuf::internal::dynamic_cast_if_available<const Gauge*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Gauge::MergeFrom(const Gauge& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_value()) { + set_value(from.value()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Gauge::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Gauge::CopyFrom(const Gauge& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Gauge::IsInitialized() const { + + return true; +} + +void Gauge::Swap(Gauge* other) { + if (other != this) { + std::swap(value_, other->value_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata Gauge::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Gauge_descriptor_; + metadata.reflection = Gauge_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Counter::kValueFieldNumber; +#endif // !_MSC_VER + +Counter::Counter() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:io.prometheus.client.Counter) +} + +void Counter::InitAsDefaultInstance() { +} + +Counter::Counter(const Counter& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Counter) +} + +void Counter::SharedCtor() { + _cached_size_ = 0; + value_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Counter::~Counter() { + // @@protoc_insertion_point(destructor:io.prometheus.client.Counter) + SharedDtor(); +} + +void Counter::SharedDtor() { + if (this != default_instance_) { + } +} + +void Counter::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Counter::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Counter_descriptor_; +} + +const Counter& Counter::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); + return *default_instance_; +} + +Counter* Counter::default_instance_ = NULL; + +Counter* Counter::New() const { + return new Counter; +} + +void Counter::Clear() { + value_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Counter::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:io.prometheus.client.Counter) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional double value = 1; + case 1: { + if (tag == 9) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, &value_))); + set_has_value(); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:io.prometheus.client.Counter) + return true; +failure: + // @@protoc_insertion_point(parse_failure:io.prometheus.client.Counter) + return false; +#undef DO_ +} + +void Counter::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:io.prometheus.client.Counter) + // optional double value = 1; + if (has_value()) { + ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:io.prometheus.client.Counter) +} + +::google::protobuf::uint8* Counter::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Counter) + // optional double value = 1; + if (has_value()) { + target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Counter) + return target; +} + +int Counter::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional double value = 1; + if (has_value()) { + total_size += 1 + 8; + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Counter::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Counter* source = + ::google::protobuf::internal::dynamic_cast_if_available<const Counter*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Counter::MergeFrom(const Counter& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_value()) { + set_value(from.value()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Counter::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Counter::CopyFrom(const Counter& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Counter::IsInitialized() const { + + return true; +} + +void Counter::Swap(Counter* other) { + if (other != this) { + std::swap(value_, other->value_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata Counter::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Counter_descriptor_; + metadata.reflection = Counter_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Quantile::kQuantileFieldNumber; +const int Quantile::kValueFieldNumber; +#endif // !_MSC_VER + +Quantile::Quantile() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:io.prometheus.client.Quantile) +} + +void Quantile::InitAsDefaultInstance() { +} + +Quantile::Quantile(const Quantile& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Quantile) +} + +void Quantile::SharedCtor() { + _cached_size_ = 0; + quantile_ = 0; + value_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Quantile::~Quantile() { + // @@protoc_insertion_point(destructor:io.prometheus.client.Quantile) + SharedDtor(); +} + +void Quantile::SharedDtor() { + if (this != default_instance_) { + } +} + +void Quantile::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Quantile::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Quantile_descriptor_; +} + +const Quantile& Quantile::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); + return *default_instance_; +} + +Quantile* Quantile::default_instance_ = NULL; + +Quantile* Quantile::New() const { + return new Quantile; +} + +void Quantile::Clear() { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ + &reinterpret_cast<Quantile*>(16)->f) - \ + reinterpret_cast<char*>(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + ZR_(quantile_, value_); + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Quantile::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:io.prometheus.client.Quantile) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional double quantile = 1; + case 1: { + if (tag == 9) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, &quantile_))); + set_has_quantile(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(17)) goto parse_value; + break; + } + + // optional double value = 2; + case 2: { + if (tag == 17) { + parse_value: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, &value_))); + set_has_value(); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:io.prometheus.client.Quantile) + return true; +failure: + // @@protoc_insertion_point(parse_failure:io.prometheus.client.Quantile) + return false; +#undef DO_ +} + +void Quantile::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:io.prometheus.client.Quantile) + // optional double quantile = 1; + if (has_quantile()) { + ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->quantile(), output); + } + + // optional double value = 2; + if (has_value()) { + ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:io.prometheus.client.Quantile) +} + +::google::protobuf::uint8* Quantile::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Quantile) + // optional double quantile = 1; + if (has_quantile()) { + target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->quantile(), target); + } + + // optional double value = 2; + if (has_value()) { + target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->value(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Quantile) + return target; +} + +int Quantile::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional double quantile = 1; + if (has_quantile()) { + total_size += 1 + 8; + } + + // optional double value = 2; + if (has_value()) { + total_size += 1 + 8; + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Quantile::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Quantile* source = + ::google::protobuf::internal::dynamic_cast_if_available<const Quantile*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Quantile::MergeFrom(const Quantile& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_quantile()) { + set_quantile(from.quantile()); + } + if (from.has_value()) { + set_value(from.value()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Quantile::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Quantile::CopyFrom(const Quantile& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Quantile::IsInitialized() const { + + return true; +} + +void Quantile::Swap(Quantile* other) { + if (other != this) { + std::swap(quantile_, other->quantile_); + std::swap(value_, other->value_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata Quantile::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Quantile_descriptor_; + metadata.reflection = Quantile_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Summary::kSampleCountFieldNumber; +const int Summary::kSampleSumFieldNumber; +const int Summary::kQuantileFieldNumber; +#endif // !_MSC_VER + +Summary::Summary() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:io.prometheus.client.Summary) +} + +void Summary::InitAsDefaultInstance() { +} + +Summary::Summary(const Summary& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Summary) +} + +void Summary::SharedCtor() { + _cached_size_ = 0; + sample_count_ = GOOGLE_ULONGLONG(0); + sample_sum_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Summary::~Summary() { + // @@protoc_insertion_point(destructor:io.prometheus.client.Summary) + SharedDtor(); +} + +void Summary::SharedDtor() { + if (this != default_instance_) { + } +} + +void Summary::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Summary::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Summary_descriptor_; +} + +const Summary& Summary::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); + return *default_instance_; +} + +Summary* Summary::default_instance_ = NULL; + +Summary* Summary::New() const { + return new Summary; +} + +void Summary::Clear() { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ + &reinterpret_cast<Summary*>(16)->f) - \ + reinterpret_cast<char*>(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + ZR_(sample_count_, sample_sum_); + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + quantile_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Summary::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:io.prometheus.client.Summary) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional uint64 sample_count = 1; + case 1: { + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &sample_count_))); + set_has_sample_count(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(17)) goto parse_sample_sum; + break; + } + + // optional double sample_sum = 2; + case 2: { + if (tag == 17) { + parse_sample_sum: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, &sample_sum_))); + set_has_sample_sum(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_quantile; + break; + } + + // repeated .io.prometheus.client.Quantile quantile = 3; + case 3: { + if (tag == 26) { + parse_quantile: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_quantile())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_quantile; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:io.prometheus.client.Summary) + return true; +failure: + // @@protoc_insertion_point(parse_failure:io.prometheus.client.Summary) + return false; +#undef DO_ +} + +void Summary::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:io.prometheus.client.Summary) + // optional uint64 sample_count = 1; + if (has_sample_count()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sample_count(), output); + } + + // optional double sample_sum = 2; + if (has_sample_sum()) { + ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->sample_sum(), output); + } + + // repeated .io.prometheus.client.Quantile quantile = 3; + for (int i = 0; i < this->quantile_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->quantile(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:io.prometheus.client.Summary) +} + +::google::protobuf::uint8* Summary::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Summary) + // optional uint64 sample_count = 1; + if (has_sample_count()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sample_count(), target); + } + + // optional double sample_sum = 2; + if (has_sample_sum()) { + target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->sample_sum(), target); + } + + // repeated .io.prometheus.client.Quantile quantile = 3; + for (int i = 0; i < this->quantile_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->quantile(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Summary) + return target; +} + +int Summary::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional uint64 sample_count = 1; + if (has_sample_count()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->sample_count()); + } + + // optional double sample_sum = 2; + if (has_sample_sum()) { + total_size += 1 + 8; + } + + } + // repeated .io.prometheus.client.Quantile quantile = 3; + total_size += 1 * this->quantile_size(); + for (int i = 0; i < this->quantile_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->quantile(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Summary::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Summary* source = + ::google::protobuf::internal::dynamic_cast_if_available<const Summary*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Summary::MergeFrom(const Summary& from) { + GOOGLE_CHECK_NE(&from, this); + quantile_.MergeFrom(from.quantile_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_sample_count()) { + set_sample_count(from.sample_count()); + } + if (from.has_sample_sum()) { + set_sample_sum(from.sample_sum()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Summary::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Summary::CopyFrom(const Summary& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Summary::IsInitialized() const { + + return true; +} + +void Summary::Swap(Summary* other) { + if (other != this) { + std::swap(sample_count_, other->sample_count_); + std::swap(sample_sum_, other->sample_sum_); + quantile_.Swap(&other->quantile_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata Summary::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Summary_descriptor_; + metadata.reflection = Summary_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Untyped::kValueFieldNumber; +#endif // !_MSC_VER + +Untyped::Untyped() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:io.prometheus.client.Untyped) +} + +void Untyped::InitAsDefaultInstance() { +} + +Untyped::Untyped(const Untyped& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Untyped) +} + +void Untyped::SharedCtor() { + _cached_size_ = 0; + value_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Untyped::~Untyped() { + // @@protoc_insertion_point(destructor:io.prometheus.client.Untyped) + SharedDtor(); +} + +void Untyped::SharedDtor() { + if (this != default_instance_) { + } +} + +void Untyped::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Untyped::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Untyped_descriptor_; +} + +const Untyped& Untyped::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); + return *default_instance_; +} + +Untyped* Untyped::default_instance_ = NULL; + +Untyped* Untyped::New() const { + return new Untyped; +} + +void Untyped::Clear() { + value_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Untyped::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:io.prometheus.client.Untyped) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional double value = 1; + case 1: { + if (tag == 9) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, &value_))); + set_has_value(); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:io.prometheus.client.Untyped) + return true; +failure: + // @@protoc_insertion_point(parse_failure:io.prometheus.client.Untyped) + return false; +#undef DO_ +} + +void Untyped::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:io.prometheus.client.Untyped) + // optional double value = 1; + if (has_value()) { + ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:io.prometheus.client.Untyped) +} + +::google::protobuf::uint8* Untyped::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Untyped) + // optional double value = 1; + if (has_value()) { + target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Untyped) + return target; +} + +int Untyped::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional double value = 1; + if (has_value()) { + total_size += 1 + 8; + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Untyped::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Untyped* source = + ::google::protobuf::internal::dynamic_cast_if_available<const Untyped*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Untyped::MergeFrom(const Untyped& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_value()) { + set_value(from.value()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Untyped::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Untyped::CopyFrom(const Untyped& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Untyped::IsInitialized() const { + + return true; +} + +void Untyped::Swap(Untyped* other) { + if (other != this) { + std::swap(value_, other->value_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata Untyped::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Untyped_descriptor_; + metadata.reflection = Untyped_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Histogram::kSampleCountFieldNumber; +const int Histogram::kSampleSumFieldNumber; +const int Histogram::kBucketFieldNumber; +#endif // !_MSC_VER + +Histogram::Histogram() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:io.prometheus.client.Histogram) +} + +void Histogram::InitAsDefaultInstance() { +} + +Histogram::Histogram(const Histogram& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Histogram) +} + +void Histogram::SharedCtor() { + _cached_size_ = 0; + sample_count_ = GOOGLE_ULONGLONG(0); + sample_sum_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Histogram::~Histogram() { + // @@protoc_insertion_point(destructor:io.prometheus.client.Histogram) + SharedDtor(); +} + +void Histogram::SharedDtor() { + if (this != default_instance_) { + } +} + +void Histogram::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Histogram::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Histogram_descriptor_; +} + +const Histogram& Histogram::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); + return *default_instance_; +} + +Histogram* Histogram::default_instance_ = NULL; + +Histogram* Histogram::New() const { + return new Histogram; +} + +void Histogram::Clear() { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ + &reinterpret_cast<Histogram*>(16)->f) - \ + reinterpret_cast<char*>(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + ZR_(sample_count_, sample_sum_); + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + bucket_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Histogram::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:io.prometheus.client.Histogram) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional uint64 sample_count = 1; + case 1: { + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &sample_count_))); + set_has_sample_count(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(17)) goto parse_sample_sum; + break; + } + + // optional double sample_sum = 2; + case 2: { + if (tag == 17) { + parse_sample_sum: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, &sample_sum_))); + set_has_sample_sum(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_bucket; + break; + } + + // repeated .io.prometheus.client.Bucket bucket = 3; + case 3: { + if (tag == 26) { + parse_bucket: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_bucket())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_bucket; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:io.prometheus.client.Histogram) + return true; +failure: + // @@protoc_insertion_point(parse_failure:io.prometheus.client.Histogram) + return false; +#undef DO_ +} + +void Histogram::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:io.prometheus.client.Histogram) + // optional uint64 sample_count = 1; + if (has_sample_count()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sample_count(), output); + } + + // optional double sample_sum = 2; + if (has_sample_sum()) { + ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->sample_sum(), output); + } + + // repeated .io.prometheus.client.Bucket bucket = 3; + for (int i = 0; i < this->bucket_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->bucket(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:io.prometheus.client.Histogram) +} + +::google::protobuf::uint8* Histogram::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Histogram) + // optional uint64 sample_count = 1; + if (has_sample_count()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sample_count(), target); + } + + // optional double sample_sum = 2; + if (has_sample_sum()) { + target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->sample_sum(), target); + } + + // repeated .io.prometheus.client.Bucket bucket = 3; + for (int i = 0; i < this->bucket_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->bucket(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Histogram) + return target; +} + +int Histogram::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional uint64 sample_count = 1; + if (has_sample_count()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->sample_count()); + } + + // optional double sample_sum = 2; + if (has_sample_sum()) { + total_size += 1 + 8; + } + + } + // repeated .io.prometheus.client.Bucket bucket = 3; + total_size += 1 * this->bucket_size(); + for (int i = 0; i < this->bucket_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->bucket(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Histogram::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Histogram* source = + ::google::protobuf::internal::dynamic_cast_if_available<const Histogram*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Histogram::MergeFrom(const Histogram& from) { + GOOGLE_CHECK_NE(&from, this); + bucket_.MergeFrom(from.bucket_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_sample_count()) { + set_sample_count(from.sample_count()); + } + if (from.has_sample_sum()) { + set_sample_sum(from.sample_sum()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Histogram::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Histogram::CopyFrom(const Histogram& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Histogram::IsInitialized() const { + + return true; +} + +void Histogram::Swap(Histogram* other) { + if (other != this) { + std::swap(sample_count_, other->sample_count_); + std::swap(sample_sum_, other->sample_sum_); + bucket_.Swap(&other->bucket_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata Histogram::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Histogram_descriptor_; + metadata.reflection = Histogram_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Bucket::kCumulativeCountFieldNumber; +const int Bucket::kUpperBoundFieldNumber; +#endif // !_MSC_VER + +Bucket::Bucket() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:io.prometheus.client.Bucket) +} + +void Bucket::InitAsDefaultInstance() { +} + +Bucket::Bucket(const Bucket& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Bucket) +} + +void Bucket::SharedCtor() { + _cached_size_ = 0; + cumulative_count_ = GOOGLE_ULONGLONG(0); + upper_bound_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Bucket::~Bucket() { + // @@protoc_insertion_point(destructor:io.prometheus.client.Bucket) + SharedDtor(); +} + +void Bucket::SharedDtor() { + if (this != default_instance_) { + } +} + +void Bucket::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Bucket::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Bucket_descriptor_; +} + +const Bucket& Bucket::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); + return *default_instance_; +} + +Bucket* Bucket::default_instance_ = NULL; + +Bucket* Bucket::New() const { + return new Bucket; +} + +void Bucket::Clear() { +#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \ + &reinterpret_cast<Bucket*>(16)->f) - \ + reinterpret_cast<char*>(16)) + +#define ZR_(first, last) do { \ + size_t f = OFFSET_OF_FIELD_(first); \ + size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \ + ::memset(&first, 0, n); \ + } while (0) + + ZR_(cumulative_count_, upper_bound_); + +#undef OFFSET_OF_FIELD_ +#undef ZR_ + + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Bucket::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:io.prometheus.client.Bucket) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional uint64 cumulative_count = 1; + case 1: { + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, &cumulative_count_))); + set_has_cumulative_count(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(17)) goto parse_upper_bound; + break; + } + + // optional double upper_bound = 2; + case 2: { + if (tag == 17) { + parse_upper_bound: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, &upper_bound_))); + set_has_upper_bound(); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:io.prometheus.client.Bucket) + return true; +failure: + // @@protoc_insertion_point(parse_failure:io.prometheus.client.Bucket) + return false; +#undef DO_ +} + +void Bucket::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:io.prometheus.client.Bucket) + // optional uint64 cumulative_count = 1; + if (has_cumulative_count()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->cumulative_count(), output); + } + + // optional double upper_bound = 2; + if (has_upper_bound()) { + ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->upper_bound(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:io.prometheus.client.Bucket) +} + +::google::protobuf::uint8* Bucket::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Bucket) + // optional uint64 cumulative_count = 1; + if (has_cumulative_count()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->cumulative_count(), target); + } + + // optional double upper_bound = 2; + if (has_upper_bound()) { + target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->upper_bound(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Bucket) + return target; +} + +int Bucket::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional uint64 cumulative_count = 1; + if (has_cumulative_count()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt64Size( + this->cumulative_count()); + } + + // optional double upper_bound = 2; + if (has_upper_bound()) { + total_size += 1 + 8; + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Bucket::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Bucket* source = + ::google::protobuf::internal::dynamic_cast_if_available<const Bucket*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Bucket::MergeFrom(const Bucket& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_cumulative_count()) { + set_cumulative_count(from.cumulative_count()); + } + if (from.has_upper_bound()) { + set_upper_bound(from.upper_bound()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Bucket::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Bucket::CopyFrom(const Bucket& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Bucket::IsInitialized() const { + + return true; +} + +void Bucket::Swap(Bucket* other) { + if (other != this) { + std::swap(cumulative_count_, other->cumulative_count_); + std::swap(upper_bound_, other->upper_bound_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata Bucket::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Bucket_descriptor_; + metadata.reflection = Bucket_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int Metric::kLabelFieldNumber; +const int Metric::kGaugeFieldNumber; +const int Metric::kCounterFieldNumber; +const int Metric::kSummaryFieldNumber; +const int Metric::kUntypedFieldNumber; +const int Metric::kHistogramFieldNumber; +const int Metric::kTimestampMsFieldNumber; +#endif // !_MSC_VER + +Metric::Metric() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:io.prometheus.client.Metric) +} + +void Metric::InitAsDefaultInstance() { + gauge_ = const_cast< ::io::prometheus::client::Gauge*>(&::io::prometheus::client::Gauge::default_instance()); + counter_ = const_cast< ::io::prometheus::client::Counter*>(&::io::prometheus::client::Counter::default_instance()); + summary_ = const_cast< ::io::prometheus::client::Summary*>(&::io::prometheus::client::Summary::default_instance()); + untyped_ = const_cast< ::io::prometheus::client::Untyped*>(&::io::prometheus::client::Untyped::default_instance()); + histogram_ = const_cast< ::io::prometheus::client::Histogram*>(&::io::prometheus::client::Histogram::default_instance()); +} + +Metric::Metric(const Metric& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Metric) +} + +void Metric::SharedCtor() { + _cached_size_ = 0; + gauge_ = NULL; + counter_ = NULL; + summary_ = NULL; + untyped_ = NULL; + histogram_ = NULL; + timestamp_ms_ = GOOGLE_LONGLONG(0); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +Metric::~Metric() { + // @@protoc_insertion_point(destructor:io.prometheus.client.Metric) + SharedDtor(); +} + +void Metric::SharedDtor() { + if (this != default_instance_) { + delete gauge_; + delete counter_; + delete summary_; + delete untyped_; + delete histogram_; + } +} + +void Metric::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Metric::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Metric_descriptor_; +} + +const Metric& Metric::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); + return *default_instance_; +} + +Metric* Metric::default_instance_ = NULL; + +Metric* Metric::New() const { + return new Metric; +} + +void Metric::Clear() { + if (_has_bits_[0 / 32] & 126) { + if (has_gauge()) { + if (gauge_ != NULL) gauge_->::io::prometheus::client::Gauge::Clear(); + } + if (has_counter()) { + if (counter_ != NULL) counter_->::io::prometheus::client::Counter::Clear(); + } + if (has_summary()) { + if (summary_ != NULL) summary_->::io::prometheus::client::Summary::Clear(); + } + if (has_untyped()) { + if (untyped_ != NULL) untyped_->::io::prometheus::client::Untyped::Clear(); + } + if (has_histogram()) { + if (histogram_ != NULL) histogram_->::io::prometheus::client::Histogram::Clear(); + } + timestamp_ms_ = GOOGLE_LONGLONG(0); + } + label_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool Metric::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:io.prometheus.client.Metric) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .io.prometheus.client.LabelPair label = 1; + case 1: { + if (tag == 10) { + parse_label: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_label())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_label; + if (input->ExpectTag(18)) goto parse_gauge; + break; + } + + // optional .io.prometheus.client.Gauge gauge = 2; + case 2: { + if (tag == 18) { + parse_gauge: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_gauge())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_counter; + break; + } + + // optional .io.prometheus.client.Counter counter = 3; + case 3: { + if (tag == 26) { + parse_counter: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_counter())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_summary; + break; + } + + // optional .io.prometheus.client.Summary summary = 4; + case 4: { + if (tag == 34) { + parse_summary: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_summary())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_untyped; + break; + } + + // optional .io.prometheus.client.Untyped untyped = 5; + case 5: { + if (tag == 42) { + parse_untyped: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_untyped())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(48)) goto parse_timestamp_ms; + break; + } + + // optional int64 timestamp_ms = 6; + case 6: { + if (tag == 48) { + parse_timestamp_ms: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, ×tamp_ms_))); + set_has_timestamp_ms(); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_histogram; + break; + } + + // optional .io.prometheus.client.Histogram histogram = 7; + case 7: { + if (tag == 58) { + parse_histogram: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_histogram())); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:io.prometheus.client.Metric) + return true; +failure: + // @@protoc_insertion_point(parse_failure:io.prometheus.client.Metric) + return false; +#undef DO_ +} + +void Metric::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:io.prometheus.client.Metric) + // repeated .io.prometheus.client.LabelPair label = 1; + for (int i = 0; i < this->label_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->label(i), output); + } + + // optional .io.prometheus.client.Gauge gauge = 2; + if (has_gauge()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->gauge(), output); + } + + // optional .io.prometheus.client.Counter counter = 3; + if (has_counter()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, this->counter(), output); + } + + // optional .io.prometheus.client.Summary summary = 4; + if (has_summary()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->summary(), output); + } + + // optional .io.prometheus.client.Untyped untyped = 5; + if (has_untyped()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, this->untyped(), output); + } + + // optional int64 timestamp_ms = 6; + if (has_timestamp_ms()) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->timestamp_ms(), output); + } + + // optional .io.prometheus.client.Histogram histogram = 7; + if (has_histogram()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 7, this->histogram(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:io.prometheus.client.Metric) +} + +::google::protobuf::uint8* Metric::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Metric) + // repeated .io.prometheus.client.LabelPair label = 1; + for (int i = 0; i < this->label_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->label(i), target); + } + + // optional .io.prometheus.client.Gauge gauge = 2; + if (has_gauge()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, this->gauge(), target); + } + + // optional .io.prometheus.client.Counter counter = 3; + if (has_counter()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 3, this->counter(), target); + } + + // optional .io.prometheus.client.Summary summary = 4; + if (has_summary()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->summary(), target); + } + + // optional .io.prometheus.client.Untyped untyped = 5; + if (has_untyped()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, this->untyped(), target); + } + + // optional int64 timestamp_ms = 6; + if (has_timestamp_ms()) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->timestamp_ms(), target); + } + + // optional .io.prometheus.client.Histogram histogram = 7; + if (has_histogram()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 7, this->histogram(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Metric) + return target; +} + +int Metric::ByteSize() const { + int total_size = 0; + + if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { + // optional .io.prometheus.client.Gauge gauge = 2; + if (has_gauge()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->gauge()); + } + + // optional .io.prometheus.client.Counter counter = 3; + if (has_counter()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->counter()); + } + + // optional .io.prometheus.client.Summary summary = 4; + if (has_summary()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->summary()); + } + + // optional .io.prometheus.client.Untyped untyped = 5; + if (has_untyped()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->untyped()); + } + + // optional .io.prometheus.client.Histogram histogram = 7; + if (has_histogram()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->histogram()); + } + + // optional int64 timestamp_ms = 6; + if (has_timestamp_ms()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->timestamp_ms()); + } + + } + // repeated .io.prometheus.client.LabelPair label = 1; + total_size += 1 * this->label_size(); + for (int i = 0; i < this->label_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->label(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Metric::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const Metric* source = + ::google::protobuf::internal::dynamic_cast_if_available<const Metric*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void Metric::MergeFrom(const Metric& from) { + GOOGLE_CHECK_NE(&from, this); + label_.MergeFrom(from.label_); + if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { + if (from.has_gauge()) { + mutable_gauge()->::io::prometheus::client::Gauge::MergeFrom(from.gauge()); + } + if (from.has_counter()) { + mutable_counter()->::io::prometheus::client::Counter::MergeFrom(from.counter()); + } + if (from.has_summary()) { + mutable_summary()->::io::prometheus::client::Summary::MergeFrom(from.summary()); + } + if (from.has_untyped()) { + mutable_untyped()->::io::prometheus::client::Untyped::MergeFrom(from.untyped()); + } + if (from.has_histogram()) { + mutable_histogram()->::io::prometheus::client::Histogram::MergeFrom(from.histogram()); + } + if (from.has_timestamp_ms()) { + set_timestamp_ms(from.timestamp_ms()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void Metric::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Metric::CopyFrom(const Metric& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Metric::IsInitialized() const { + + return true; +} + +void Metric::Swap(Metric* other) { + if (other != this) { + label_.Swap(&other->label_); + std::swap(gauge_, other->gauge_); + std::swap(counter_, other->counter_); + std::swap(summary_, other->summary_); + std::swap(untyped_, other->untyped_); + std::swap(histogram_, other->histogram_); + std::swap(timestamp_ms_, other->timestamp_ms_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata Metric::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Metric_descriptor_; + metadata.reflection = Metric_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int MetricFamily::kNameFieldNumber; +const int MetricFamily::kHelpFieldNumber; +const int MetricFamily::kTypeFieldNumber; +const int MetricFamily::kMetricFieldNumber; +#endif // !_MSC_VER + +MetricFamily::MetricFamily() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:io.prometheus.client.MetricFamily) +} + +void MetricFamily::InitAsDefaultInstance() { +} + +MetricFamily::MetricFamily(const MetricFamily& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:io.prometheus.client.MetricFamily) +} + +void MetricFamily::SharedCtor() { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + help_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +MetricFamily::~MetricFamily() { + // @@protoc_insertion_point(destructor:io.prometheus.client.MetricFamily) + SharedDtor(); +} + +void MetricFamily::SharedDtor() { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete name_; + } + if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete help_; + } + if (this != default_instance_) { + } +} + +void MetricFamily::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* MetricFamily::descriptor() { + protobuf_AssignDescriptorsOnce(); + return MetricFamily_descriptor_; +} + +const MetricFamily& MetricFamily::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto(); + return *default_instance_; +} + +MetricFamily* MetricFamily::default_instance_ = NULL; + +MetricFamily* MetricFamily::New() const { + return new MetricFamily; +} + +void MetricFamily::Clear() { + if (_has_bits_[0 / 32] & 7) { + if (has_name()) { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_->clear(); + } + } + if (has_help()) { + if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + help_->clear(); + } + } + type_ = 0; + } + metric_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool MetricFamily::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:io.prometheus.client.MetricFamily) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "name"); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_help; + break; + } + + // optional string help = 2; + case 2: { + if (tag == 18) { + parse_help: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_help())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->help().data(), this->help().length(), + ::google::protobuf::internal::WireFormat::PARSE, + "help"); + } else { + goto handle_unusual; + } + if (input->ExpectTag(24)) goto parse_type; + break; + } + + // optional .io.prometheus.client.MetricType type = 3; + case 3: { + if (tag == 24) { + parse_type: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::io::prometheus::client::MetricType_IsValid(value)) { + set_type(static_cast< ::io::prometheus::client::MetricType >(value)); + } else { + mutable_unknown_fields()->AddVarint(3, value); + } + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_metric; + break; + } + + // repeated .io.prometheus.client.Metric metric = 4; + case 4: { + if (tag == 34) { + parse_metric: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_metric())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_metric; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:io.prometheus.client.MetricFamily) + return true; +failure: + // @@protoc_insertion_point(parse_failure:io.prometheus.client.MetricFamily) + return false; +#undef DO_ +} + +void MetricFamily::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:io.prometheus.client.MetricFamily) + // optional string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // optional string help = 2; + if (has_help()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->help().data(), this->help().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "help"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->help(), output); + } + + // optional .io.prometheus.client.MetricType type = 3; + if (has_type()) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 3, this->type(), output); + } + + // repeated .io.prometheus.client.Metric metric = 4; + for (int i = 0; i < this->metric_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, this->metric(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:io.prometheus.client.MetricFamily) +} + +::google::protobuf::uint8* MetricFamily::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.MetricFamily) + // optional string name = 1; + if (has_name()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // optional string help = 2; + if (has_help()) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->help().data(), this->help().length(), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "help"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->help(), target); + } + + // optional .io.prometheus.client.MetricType type = 3; + if (has_type()) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 3, this->type(), target); + } + + // repeated .io.prometheus.client.Metric metric = 4; + for (int i = 0; i < this->metric_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, this->metric(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.MetricFamily) + return target; +} + +int MetricFamily::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional string name = 1; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string help = 2; + if (has_help()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->help()); + } + + // optional .io.prometheus.client.MetricType type = 3; + if (has_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + } + // repeated .io.prometheus.client.Metric metric = 4; + total_size += 1 * this->metric_size(); + for (int i = 0; i < this->metric_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->metric(i)); + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void MetricFamily::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const MetricFamily* source = + ::google::protobuf::internal::dynamic_cast_if_available<const MetricFamily*>( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void MetricFamily::MergeFrom(const MetricFamily& from) { + GOOGLE_CHECK_NE(&from, this); + metric_.MergeFrom(from.metric_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_name()) { + set_name(from.name()); + } + if (from.has_help()) { + set_help(from.help()); + } + if (from.has_type()) { + set_type(from.type()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void MetricFamily::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void MetricFamily::CopyFrom(const MetricFamily& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MetricFamily::IsInitialized() const { + + return true; +} + +void MetricFamily::Swap(MetricFamily* other) { + if (other != this) { + std::swap(name_, other->name_); + std::swap(help_, other->help_); + std::swap(type_, other->type_); + metric_.Swap(&other->metric_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata MetricFamily::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = MetricFamily_descriptor_; + metadata.reflection = MetricFamily_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace client +} // namespace prometheus +} // namespace io + +// @@protoc_insertion_point(global_scope) diff --git a/vendor/github.com/prometheus/client_model/cpp/metrics.pb.h b/vendor/github.com/prometheus/client_model/cpp/metrics.pb.h new file mode 100644 index 000000000..206ba3704 --- /dev/null +++ b/vendor/github.com/prometheus/client_model/cpp/metrics.pb.h @@ -0,0 +1,2072 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: metrics.proto + +#ifndef PROTOBUF_metrics_2eproto__INCLUDED +#define PROTOBUF_metrics_2eproto__INCLUDED + +#include <string> + +#include <google/protobuf/stubs/common.h> + +#if GOOGLE_PROTOBUF_VERSION < 2006000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> +#include <google/protobuf/extension_set.h> +#include <google/protobuf/generated_enum_reflection.h> +#include <google/protobuf/unknown_field_set.h> +// @@protoc_insertion_point(includes) + +namespace io { +namespace prometheus { +namespace client { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_metrics_2eproto(); +void protobuf_AssignDesc_metrics_2eproto(); +void protobuf_ShutdownFile_metrics_2eproto(); + +class LabelPair; +class Gauge; +class Counter; +class Quantile; +class Summary; +class Untyped; +class Histogram; +class Bucket; +class Metric; +class MetricFamily; + +enum MetricType { + COUNTER = 0, + GAUGE = 1, + SUMMARY = 2, + UNTYPED = 3, + HISTOGRAM = 4 +}; +bool MetricType_IsValid(int value); +const MetricType MetricType_MIN = COUNTER; +const MetricType MetricType_MAX = HISTOGRAM; +const int MetricType_ARRAYSIZE = MetricType_MAX + 1; + +const ::google::protobuf::EnumDescriptor* MetricType_descriptor(); +inline const ::std::string& MetricType_Name(MetricType value) { + return ::google::protobuf::internal::NameOfEnum( + MetricType_descriptor(), value); +} +inline bool MetricType_Parse( + const ::std::string& name, MetricType* value) { + return ::google::protobuf::internal::ParseNamedEnum<MetricType>( + MetricType_descriptor(), name, value); +} +// =================================================================== + +class LabelPair : public ::google::protobuf::Message { + public: + LabelPair(); + virtual ~LabelPair(); + + LabelPair(const LabelPair& from); + + inline LabelPair& operator=(const LabelPair& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const LabelPair& default_instance(); + + void Swap(LabelPair* other); + + // implements Message ---------------------------------------------- + + LabelPair* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const LabelPair& from); + void MergeFrom(const LabelPair& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string name = 1; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 1; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // optional string value = 2; + inline bool has_value() const; + inline void clear_value(); + static const int kValueFieldNumber = 2; + inline const ::std::string& value() const; + inline void set_value(const ::std::string& value); + inline void set_value(const char* value); + inline void set_value(const char* value, size_t size); + inline ::std::string* mutable_value(); + inline ::std::string* release_value(); + inline void set_allocated_value(::std::string* value); + + // @@protoc_insertion_point(class_scope:io.prometheus.client.LabelPair) + private: + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_value(); + inline void clear_has_value(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* name_; + ::std::string* value_; + friend void protobuf_AddDesc_metrics_2eproto(); + friend void protobuf_AssignDesc_metrics_2eproto(); + friend void protobuf_ShutdownFile_metrics_2eproto(); + + void InitAsDefaultInstance(); + static LabelPair* default_instance_; +}; +// ------------------------------------------------------------------- + +class Gauge : public ::google::protobuf::Message { + public: + Gauge(); + virtual ~Gauge(); + + Gauge(const Gauge& from); + + inline Gauge& operator=(const Gauge& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Gauge& default_instance(); + + void Swap(Gauge* other); + + // implements Message ---------------------------------------------- + + Gauge* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Gauge& from); + void MergeFrom(const Gauge& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional double value = 1; + inline bool has_value() const; + inline void clear_value(); + static const int kValueFieldNumber = 1; + inline double value() const; + inline void set_value(double value); + + // @@protoc_insertion_point(class_scope:io.prometheus.client.Gauge) + private: + inline void set_has_value(); + inline void clear_has_value(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + double value_; + friend void protobuf_AddDesc_metrics_2eproto(); + friend void protobuf_AssignDesc_metrics_2eproto(); + friend void protobuf_ShutdownFile_metrics_2eproto(); + + void InitAsDefaultInstance(); + static Gauge* default_instance_; +}; +// ------------------------------------------------------------------- + +class Counter : public ::google::protobuf::Message { + public: + Counter(); + virtual ~Counter(); + + Counter(const Counter& from); + + inline Counter& operator=(const Counter& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Counter& default_instance(); + + void Swap(Counter* other); + + // implements Message ---------------------------------------------- + + Counter* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Counter& from); + void MergeFrom(const Counter& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional double value = 1; + inline bool has_value() const; + inline void clear_value(); + static const int kValueFieldNumber = 1; + inline double value() const; + inline void set_value(double value); + + // @@protoc_insertion_point(class_scope:io.prometheus.client.Counter) + private: + inline void set_has_value(); + inline void clear_has_value(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + double value_; + friend void protobuf_AddDesc_metrics_2eproto(); + friend void protobuf_AssignDesc_metrics_2eproto(); + friend void protobuf_ShutdownFile_metrics_2eproto(); + + void InitAsDefaultInstance(); + static Counter* default_instance_; +}; +// ------------------------------------------------------------------- + +class Quantile : public ::google::protobuf::Message { + public: + Quantile(); + virtual ~Quantile(); + + Quantile(const Quantile& from); + + inline Quantile& operator=(const Quantile& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Quantile& default_instance(); + + void Swap(Quantile* other); + + // implements Message ---------------------------------------------- + + Quantile* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Quantile& from); + void MergeFrom(const Quantile& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional double quantile = 1; + inline bool has_quantile() const; + inline void clear_quantile(); + static const int kQuantileFieldNumber = 1; + inline double quantile() const; + inline void set_quantile(double value); + + // optional double value = 2; + inline bool has_value() const; + inline void clear_value(); + static const int kValueFieldNumber = 2; + inline double value() const; + inline void set_value(double value); + + // @@protoc_insertion_point(class_scope:io.prometheus.client.Quantile) + private: + inline void set_has_quantile(); + inline void clear_has_quantile(); + inline void set_has_value(); + inline void clear_has_value(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + double quantile_; + double value_; + friend void protobuf_AddDesc_metrics_2eproto(); + friend void protobuf_AssignDesc_metrics_2eproto(); + friend void protobuf_ShutdownFile_metrics_2eproto(); + + void InitAsDefaultInstance(); + static Quantile* default_instance_; +}; +// ------------------------------------------------------------------- + +class Summary : public ::google::protobuf::Message { + public: + Summary(); + virtual ~Summary(); + + Summary(const Summary& from); + + inline Summary& operator=(const Summary& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Summary& default_instance(); + + void Swap(Summary* other); + + // implements Message ---------------------------------------------- + + Summary* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Summary& from); + void MergeFrom(const Summary& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint64 sample_count = 1; + inline bool has_sample_count() const; + inline void clear_sample_count(); + static const int kSampleCountFieldNumber = 1; + inline ::google::protobuf::uint64 sample_count() const; + inline void set_sample_count(::google::protobuf::uint64 value); + + // optional double sample_sum = 2; + inline bool has_sample_sum() const; + inline void clear_sample_sum(); + static const int kSampleSumFieldNumber = 2; + inline double sample_sum() const; + inline void set_sample_sum(double value); + + // repeated .io.prometheus.client.Quantile quantile = 3; + inline int quantile_size() const; + inline void clear_quantile(); + static const int kQuantileFieldNumber = 3; + inline const ::io::prometheus::client::Quantile& quantile(int index) const; + inline ::io::prometheus::client::Quantile* mutable_quantile(int index); + inline ::io::prometheus::client::Quantile* add_quantile(); + inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile >& + quantile() const; + inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile >* + mutable_quantile(); + + // @@protoc_insertion_point(class_scope:io.prometheus.client.Summary) + private: + inline void set_has_sample_count(); + inline void clear_has_sample_count(); + inline void set_has_sample_sum(); + inline void clear_has_sample_sum(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint64 sample_count_; + double sample_sum_; + ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile > quantile_; + friend void protobuf_AddDesc_metrics_2eproto(); + friend void protobuf_AssignDesc_metrics_2eproto(); + friend void protobuf_ShutdownFile_metrics_2eproto(); + + void InitAsDefaultInstance(); + static Summary* default_instance_; +}; +// ------------------------------------------------------------------- + +class Untyped : public ::google::protobuf::Message { + public: + Untyped(); + virtual ~Untyped(); + + Untyped(const Untyped& from); + + inline Untyped& operator=(const Untyped& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Untyped& default_instance(); + + void Swap(Untyped* other); + + // implements Message ---------------------------------------------- + + Untyped* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Untyped& from); + void MergeFrom(const Untyped& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional double value = 1; + inline bool has_value() const; + inline void clear_value(); + static const int kValueFieldNumber = 1; + inline double value() const; + inline void set_value(double value); + + // @@protoc_insertion_point(class_scope:io.prometheus.client.Untyped) + private: + inline void set_has_value(); + inline void clear_has_value(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + double value_; + friend void protobuf_AddDesc_metrics_2eproto(); + friend void protobuf_AssignDesc_metrics_2eproto(); + friend void protobuf_ShutdownFile_metrics_2eproto(); + + void InitAsDefaultInstance(); + static Untyped* default_instance_; +}; +// ------------------------------------------------------------------- + +class Histogram : public ::google::protobuf::Message { + public: + Histogram(); + virtual ~Histogram(); + + Histogram(const Histogram& from); + + inline Histogram& operator=(const Histogram& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Histogram& default_instance(); + + void Swap(Histogram* other); + + // implements Message ---------------------------------------------- + + Histogram* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Histogram& from); + void MergeFrom(const Histogram& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint64 sample_count = 1; + inline bool has_sample_count() const; + inline void clear_sample_count(); + static const int kSampleCountFieldNumber = 1; + inline ::google::protobuf::uint64 sample_count() const; + inline void set_sample_count(::google::protobuf::uint64 value); + + // optional double sample_sum = 2; + inline bool has_sample_sum() const; + inline void clear_sample_sum(); + static const int kSampleSumFieldNumber = 2; + inline double sample_sum() const; + inline void set_sample_sum(double value); + + // repeated .io.prometheus.client.Bucket bucket = 3; + inline int bucket_size() const; + inline void clear_bucket(); + static const int kBucketFieldNumber = 3; + inline const ::io::prometheus::client::Bucket& bucket(int index) const; + inline ::io::prometheus::client::Bucket* mutable_bucket(int index); + inline ::io::prometheus::client::Bucket* add_bucket(); + inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket >& + bucket() const; + inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket >* + mutable_bucket(); + + // @@protoc_insertion_point(class_scope:io.prometheus.client.Histogram) + private: + inline void set_has_sample_count(); + inline void clear_has_sample_count(); + inline void set_has_sample_sum(); + inline void clear_has_sample_sum(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint64 sample_count_; + double sample_sum_; + ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket > bucket_; + friend void protobuf_AddDesc_metrics_2eproto(); + friend void protobuf_AssignDesc_metrics_2eproto(); + friend void protobuf_ShutdownFile_metrics_2eproto(); + + void InitAsDefaultInstance(); + static Histogram* default_instance_; +}; +// ------------------------------------------------------------------- + +class Bucket : public ::google::protobuf::Message { + public: + Bucket(); + virtual ~Bucket(); + + Bucket(const Bucket& from); + + inline Bucket& operator=(const Bucket& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Bucket& default_instance(); + + void Swap(Bucket* other); + + // implements Message ---------------------------------------------- + + Bucket* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Bucket& from); + void MergeFrom(const Bucket& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional uint64 cumulative_count = 1; + inline bool has_cumulative_count() const; + inline void clear_cumulative_count(); + static const int kCumulativeCountFieldNumber = 1; + inline ::google::protobuf::uint64 cumulative_count() const; + inline void set_cumulative_count(::google::protobuf::uint64 value); + + // optional double upper_bound = 2; + inline bool has_upper_bound() const; + inline void clear_upper_bound(); + static const int kUpperBoundFieldNumber = 2; + inline double upper_bound() const; + inline void set_upper_bound(double value); + + // @@protoc_insertion_point(class_scope:io.prometheus.client.Bucket) + private: + inline void set_has_cumulative_count(); + inline void clear_has_cumulative_count(); + inline void set_has_upper_bound(); + inline void clear_has_upper_bound(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint64 cumulative_count_; + double upper_bound_; + friend void protobuf_AddDesc_metrics_2eproto(); + friend void protobuf_AssignDesc_metrics_2eproto(); + friend void protobuf_ShutdownFile_metrics_2eproto(); + + void InitAsDefaultInstance(); + static Bucket* default_instance_; +}; +// ------------------------------------------------------------------- + +class Metric : public ::google::protobuf::Message { + public: + Metric(); + virtual ~Metric(); + + Metric(const Metric& from); + + inline Metric& operator=(const Metric& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Metric& default_instance(); + + void Swap(Metric* other); + + // implements Message ---------------------------------------------- + + Metric* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Metric& from); + void MergeFrom(const Metric& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .io.prometheus.client.LabelPair label = 1; + inline int label_size() const; + inline void clear_label(); + static const int kLabelFieldNumber = 1; + inline const ::io::prometheus::client::LabelPair& label(int index) const; + inline ::io::prometheus::client::LabelPair* mutable_label(int index); + inline ::io::prometheus::client::LabelPair* add_label(); + inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair >& + label() const; + inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair >* + mutable_label(); + + // optional .io.prometheus.client.Gauge gauge = 2; + inline bool has_gauge() const; + inline void clear_gauge(); + static const int kGaugeFieldNumber = 2; + inline const ::io::prometheus::client::Gauge& gauge() const; + inline ::io::prometheus::client::Gauge* mutable_gauge(); + inline ::io::prometheus::client::Gauge* release_gauge(); + inline void set_allocated_gauge(::io::prometheus::client::Gauge* gauge); + + // optional .io.prometheus.client.Counter counter = 3; + inline bool has_counter() const; + inline void clear_counter(); + static const int kCounterFieldNumber = 3; + inline const ::io::prometheus::client::Counter& counter() const; + inline ::io::prometheus::client::Counter* mutable_counter(); + inline ::io::prometheus::client::Counter* release_counter(); + inline void set_allocated_counter(::io::prometheus::client::Counter* counter); + + // optional .io.prometheus.client.Summary summary = 4; + inline bool has_summary() const; + inline void clear_summary(); + static const int kSummaryFieldNumber = 4; + inline const ::io::prometheus::client::Summary& summary() const; + inline ::io::prometheus::client::Summary* mutable_summary(); + inline ::io::prometheus::client::Summary* release_summary(); + inline void set_allocated_summary(::io::prometheus::client::Summary* summary); + + // optional .io.prometheus.client.Untyped untyped = 5; + inline bool has_untyped() const; + inline void clear_untyped(); + static const int kUntypedFieldNumber = 5; + inline const ::io::prometheus::client::Untyped& untyped() const; + inline ::io::prometheus::client::Untyped* mutable_untyped(); + inline ::io::prometheus::client::Untyped* release_untyped(); + inline void set_allocated_untyped(::io::prometheus::client::Untyped* untyped); + + // optional .io.prometheus.client.Histogram histogram = 7; + inline bool has_histogram() const; + inline void clear_histogram(); + static const int kHistogramFieldNumber = 7; + inline const ::io::prometheus::client::Histogram& histogram() const; + inline ::io::prometheus::client::Histogram* mutable_histogram(); + inline ::io::prometheus::client::Histogram* release_histogram(); + inline void set_allocated_histogram(::io::prometheus::client::Histogram* histogram); + + // optional int64 timestamp_ms = 6; + inline bool has_timestamp_ms() const; + inline void clear_timestamp_ms(); + static const int kTimestampMsFieldNumber = 6; + inline ::google::protobuf::int64 timestamp_ms() const; + inline void set_timestamp_ms(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:io.prometheus.client.Metric) + private: + inline void set_has_gauge(); + inline void clear_has_gauge(); + inline void set_has_counter(); + inline void clear_has_counter(); + inline void set_has_summary(); + inline void clear_has_summary(); + inline void set_has_untyped(); + inline void clear_has_untyped(); + inline void set_has_histogram(); + inline void clear_has_histogram(); + inline void set_has_timestamp_ms(); + inline void clear_has_timestamp_ms(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair > label_; + ::io::prometheus::client::Gauge* gauge_; + ::io::prometheus::client::Counter* counter_; + ::io::prometheus::client::Summary* summary_; + ::io::prometheus::client::Untyped* untyped_; + ::io::prometheus::client::Histogram* histogram_; + ::google::protobuf::int64 timestamp_ms_; + friend void protobuf_AddDesc_metrics_2eproto(); + friend void protobuf_AssignDesc_metrics_2eproto(); + friend void protobuf_ShutdownFile_metrics_2eproto(); + + void InitAsDefaultInstance(); + static Metric* default_instance_; +}; +// ------------------------------------------------------------------- + +class MetricFamily : public ::google::protobuf::Message { + public: + MetricFamily(); + virtual ~MetricFamily(); + + MetricFamily(const MetricFamily& from); + + inline MetricFamily& operator=(const MetricFamily& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const MetricFamily& default_instance(); + + void Swap(MetricFamily* other); + + // implements Message ---------------------------------------------- + + MetricFamily* New() const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const MetricFamily& from); + void MergeFrom(const MetricFamily& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string name = 1; + inline bool has_name() const; + inline void clear_name(); + static const int kNameFieldNumber = 1; + inline const ::std::string& name() const; + inline void set_name(const ::std::string& value); + inline void set_name(const char* value); + inline void set_name(const char* value, size_t size); + inline ::std::string* mutable_name(); + inline ::std::string* release_name(); + inline void set_allocated_name(::std::string* name); + + // optional string help = 2; + inline bool has_help() const; + inline void clear_help(); + static const int kHelpFieldNumber = 2; + inline const ::std::string& help() const; + inline void set_help(const ::std::string& value); + inline void set_help(const char* value); + inline void set_help(const char* value, size_t size); + inline ::std::string* mutable_help(); + inline ::std::string* release_help(); + inline void set_allocated_help(::std::string* help); + + // optional .io.prometheus.client.MetricType type = 3; + inline bool has_type() const; + inline void clear_type(); + static const int kTypeFieldNumber = 3; + inline ::io::prometheus::client::MetricType type() const; + inline void set_type(::io::prometheus::client::MetricType value); + + // repeated .io.prometheus.client.Metric metric = 4; + inline int metric_size() const; + inline void clear_metric(); + static const int kMetricFieldNumber = 4; + inline const ::io::prometheus::client::Metric& metric(int index) const; + inline ::io::prometheus::client::Metric* mutable_metric(int index); + inline ::io::prometheus::client::Metric* add_metric(); + inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric >& + metric() const; + inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric >* + mutable_metric(); + + // @@protoc_insertion_point(class_scope:io.prometheus.client.MetricFamily) + private: + inline void set_has_name(); + inline void clear_has_name(); + inline void set_has_help(); + inline void clear_has_help(); + inline void set_has_type(); + inline void clear_has_type(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* name_; + ::std::string* help_; + ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric > metric_; + int type_; + friend void protobuf_AddDesc_metrics_2eproto(); + friend void protobuf_AssignDesc_metrics_2eproto(); + friend void protobuf_ShutdownFile_metrics_2eproto(); + + void InitAsDefaultInstance(); + static MetricFamily* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +// LabelPair + +// optional string name = 1; +inline bool LabelPair::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void LabelPair::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void LabelPair::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void LabelPair::clear_name() { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_->clear(); + } + clear_has_name(); +} +inline const ::std::string& LabelPair::name() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.LabelPair.name) + return *name_; +} +inline void LabelPair::set_name(const ::std::string& value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set:io.prometheus.client.LabelPair.name) +} +inline void LabelPair::set_name(const char* value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set_char:io.prometheus.client.LabelPair.name) +} +inline void LabelPair::set_name(const char* value, size_t size) { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.LabelPair.name) +} +inline ::std::string* LabelPair::mutable_name() { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:io.prometheus.client.LabelPair.name) + return name_; +} +inline ::std::string* LabelPair::release_name() { + clear_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + return NULL; + } else { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } +} +inline void LabelPair::set_allocated_name(::std::string* name) { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete name_; + } + if (name) { + set_has_name(); + name_ = name; + } else { + clear_has_name(); + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.LabelPair.name) +} + +// optional string value = 2; +inline bool LabelPair::has_value() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void LabelPair::set_has_value() { + _has_bits_[0] |= 0x00000002u; +} +inline void LabelPair::clear_has_value() { + _has_bits_[0] &= ~0x00000002u; +} +inline void LabelPair::clear_value() { + if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + value_->clear(); + } + clear_has_value(); +} +inline const ::std::string& LabelPair::value() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.LabelPair.value) + return *value_; +} +inline void LabelPair::set_value(const ::std::string& value) { + set_has_value(); + if (value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + value_ = new ::std::string; + } + value_->assign(value); + // @@protoc_insertion_point(field_set:io.prometheus.client.LabelPair.value) +} +inline void LabelPair::set_value(const char* value) { + set_has_value(); + if (value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + value_ = new ::std::string; + } + value_->assign(value); + // @@protoc_insertion_point(field_set_char:io.prometheus.client.LabelPair.value) +} +inline void LabelPair::set_value(const char* value, size_t size) { + set_has_value(); + if (value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + value_ = new ::std::string; + } + value_->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.LabelPair.value) +} +inline ::std::string* LabelPair::mutable_value() { + set_has_value(); + if (value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + value_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:io.prometheus.client.LabelPair.value) + return value_; +} +inline ::std::string* LabelPair::release_value() { + clear_has_value(); + if (value_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + return NULL; + } else { + ::std::string* temp = value_; + value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } +} +inline void LabelPair::set_allocated_value(::std::string* value) { + if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete value_; + } + if (value) { + set_has_value(); + value_ = value; + } else { + clear_has_value(); + value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.LabelPair.value) +} + +// ------------------------------------------------------------------- + +// Gauge + +// optional double value = 1; +inline bool Gauge::has_value() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Gauge::set_has_value() { + _has_bits_[0] |= 0x00000001u; +} +inline void Gauge::clear_has_value() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Gauge::clear_value() { + value_ = 0; + clear_has_value(); +} +inline double Gauge::value() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Gauge.value) + return value_; +} +inline void Gauge::set_value(double value) { + set_has_value(); + value_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Gauge.value) +} + +// ------------------------------------------------------------------- + +// Counter + +// optional double value = 1; +inline bool Counter::has_value() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Counter::set_has_value() { + _has_bits_[0] |= 0x00000001u; +} +inline void Counter::clear_has_value() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Counter::clear_value() { + value_ = 0; + clear_has_value(); +} +inline double Counter::value() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Counter.value) + return value_; +} +inline void Counter::set_value(double value) { + set_has_value(); + value_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Counter.value) +} + +// ------------------------------------------------------------------- + +// Quantile + +// optional double quantile = 1; +inline bool Quantile::has_quantile() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Quantile::set_has_quantile() { + _has_bits_[0] |= 0x00000001u; +} +inline void Quantile::clear_has_quantile() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Quantile::clear_quantile() { + quantile_ = 0; + clear_has_quantile(); +} +inline double Quantile::quantile() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Quantile.quantile) + return quantile_; +} +inline void Quantile::set_quantile(double value) { + set_has_quantile(); + quantile_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Quantile.quantile) +} + +// optional double value = 2; +inline bool Quantile::has_value() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Quantile::set_has_value() { + _has_bits_[0] |= 0x00000002u; +} +inline void Quantile::clear_has_value() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Quantile::clear_value() { + value_ = 0; + clear_has_value(); +} +inline double Quantile::value() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Quantile.value) + return value_; +} +inline void Quantile::set_value(double value) { + set_has_value(); + value_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Quantile.value) +} + +// ------------------------------------------------------------------- + +// Summary + +// optional uint64 sample_count = 1; +inline bool Summary::has_sample_count() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Summary::set_has_sample_count() { + _has_bits_[0] |= 0x00000001u; +} +inline void Summary::clear_has_sample_count() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Summary::clear_sample_count() { + sample_count_ = GOOGLE_ULONGLONG(0); + clear_has_sample_count(); +} +inline ::google::protobuf::uint64 Summary::sample_count() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Summary.sample_count) + return sample_count_; +} +inline void Summary::set_sample_count(::google::protobuf::uint64 value) { + set_has_sample_count(); + sample_count_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Summary.sample_count) +} + +// optional double sample_sum = 2; +inline bool Summary::has_sample_sum() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Summary::set_has_sample_sum() { + _has_bits_[0] |= 0x00000002u; +} +inline void Summary::clear_has_sample_sum() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Summary::clear_sample_sum() { + sample_sum_ = 0; + clear_has_sample_sum(); +} +inline double Summary::sample_sum() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Summary.sample_sum) + return sample_sum_; +} +inline void Summary::set_sample_sum(double value) { + set_has_sample_sum(); + sample_sum_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Summary.sample_sum) +} + +// repeated .io.prometheus.client.Quantile quantile = 3; +inline int Summary::quantile_size() const { + return quantile_.size(); +} +inline void Summary::clear_quantile() { + quantile_.Clear(); +} +inline const ::io::prometheus::client::Quantile& Summary::quantile(int index) const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Summary.quantile) + return quantile_.Get(index); +} +inline ::io::prometheus::client::Quantile* Summary::mutable_quantile(int index) { + // @@protoc_insertion_point(field_mutable:io.prometheus.client.Summary.quantile) + return quantile_.Mutable(index); +} +inline ::io::prometheus::client::Quantile* Summary::add_quantile() { + // @@protoc_insertion_point(field_add:io.prometheus.client.Summary.quantile) + return quantile_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile >& +Summary::quantile() const { + // @@protoc_insertion_point(field_list:io.prometheus.client.Summary.quantile) + return quantile_; +} +inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Quantile >* +Summary::mutable_quantile() { + // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.Summary.quantile) + return &quantile_; +} + +// ------------------------------------------------------------------- + +// Untyped + +// optional double value = 1; +inline bool Untyped::has_value() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Untyped::set_has_value() { + _has_bits_[0] |= 0x00000001u; +} +inline void Untyped::clear_has_value() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Untyped::clear_value() { + value_ = 0; + clear_has_value(); +} +inline double Untyped::value() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Untyped.value) + return value_; +} +inline void Untyped::set_value(double value) { + set_has_value(); + value_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Untyped.value) +} + +// ------------------------------------------------------------------- + +// Histogram + +// optional uint64 sample_count = 1; +inline bool Histogram::has_sample_count() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Histogram::set_has_sample_count() { + _has_bits_[0] |= 0x00000001u; +} +inline void Histogram::clear_has_sample_count() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Histogram::clear_sample_count() { + sample_count_ = GOOGLE_ULONGLONG(0); + clear_has_sample_count(); +} +inline ::google::protobuf::uint64 Histogram::sample_count() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Histogram.sample_count) + return sample_count_; +} +inline void Histogram::set_sample_count(::google::protobuf::uint64 value) { + set_has_sample_count(); + sample_count_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Histogram.sample_count) +} + +// optional double sample_sum = 2; +inline bool Histogram::has_sample_sum() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Histogram::set_has_sample_sum() { + _has_bits_[0] |= 0x00000002u; +} +inline void Histogram::clear_has_sample_sum() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Histogram::clear_sample_sum() { + sample_sum_ = 0; + clear_has_sample_sum(); +} +inline double Histogram::sample_sum() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Histogram.sample_sum) + return sample_sum_; +} +inline void Histogram::set_sample_sum(double value) { + set_has_sample_sum(); + sample_sum_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Histogram.sample_sum) +} + +// repeated .io.prometheus.client.Bucket bucket = 3; +inline int Histogram::bucket_size() const { + return bucket_.size(); +} +inline void Histogram::clear_bucket() { + bucket_.Clear(); +} +inline const ::io::prometheus::client::Bucket& Histogram::bucket(int index) const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Histogram.bucket) + return bucket_.Get(index); +} +inline ::io::prometheus::client::Bucket* Histogram::mutable_bucket(int index) { + // @@protoc_insertion_point(field_mutable:io.prometheus.client.Histogram.bucket) + return bucket_.Mutable(index); +} +inline ::io::prometheus::client::Bucket* Histogram::add_bucket() { + // @@protoc_insertion_point(field_add:io.prometheus.client.Histogram.bucket) + return bucket_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket >& +Histogram::bucket() const { + // @@protoc_insertion_point(field_list:io.prometheus.client.Histogram.bucket) + return bucket_; +} +inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Bucket >* +Histogram::mutable_bucket() { + // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.Histogram.bucket) + return &bucket_; +} + +// ------------------------------------------------------------------- + +// Bucket + +// optional uint64 cumulative_count = 1; +inline bool Bucket::has_cumulative_count() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void Bucket::set_has_cumulative_count() { + _has_bits_[0] |= 0x00000001u; +} +inline void Bucket::clear_has_cumulative_count() { + _has_bits_[0] &= ~0x00000001u; +} +inline void Bucket::clear_cumulative_count() { + cumulative_count_ = GOOGLE_ULONGLONG(0); + clear_has_cumulative_count(); +} +inline ::google::protobuf::uint64 Bucket::cumulative_count() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Bucket.cumulative_count) + return cumulative_count_; +} +inline void Bucket::set_cumulative_count(::google::protobuf::uint64 value) { + set_has_cumulative_count(); + cumulative_count_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Bucket.cumulative_count) +} + +// optional double upper_bound = 2; +inline bool Bucket::has_upper_bound() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Bucket::set_has_upper_bound() { + _has_bits_[0] |= 0x00000002u; +} +inline void Bucket::clear_has_upper_bound() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Bucket::clear_upper_bound() { + upper_bound_ = 0; + clear_has_upper_bound(); +} +inline double Bucket::upper_bound() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Bucket.upper_bound) + return upper_bound_; +} +inline void Bucket::set_upper_bound(double value) { + set_has_upper_bound(); + upper_bound_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Bucket.upper_bound) +} + +// ------------------------------------------------------------------- + +// Metric + +// repeated .io.prometheus.client.LabelPair label = 1; +inline int Metric::label_size() const { + return label_.size(); +} +inline void Metric::clear_label() { + label_.Clear(); +} +inline const ::io::prometheus::client::LabelPair& Metric::label(int index) const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.label) + return label_.Get(index); +} +inline ::io::prometheus::client::LabelPair* Metric::mutable_label(int index) { + // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.label) + return label_.Mutable(index); +} +inline ::io::prometheus::client::LabelPair* Metric::add_label() { + // @@protoc_insertion_point(field_add:io.prometheus.client.Metric.label) + return label_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair >& +Metric::label() const { + // @@protoc_insertion_point(field_list:io.prometheus.client.Metric.label) + return label_; +} +inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::LabelPair >* +Metric::mutable_label() { + // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.Metric.label) + return &label_; +} + +// optional .io.prometheus.client.Gauge gauge = 2; +inline bool Metric::has_gauge() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void Metric::set_has_gauge() { + _has_bits_[0] |= 0x00000002u; +} +inline void Metric::clear_has_gauge() { + _has_bits_[0] &= ~0x00000002u; +} +inline void Metric::clear_gauge() { + if (gauge_ != NULL) gauge_->::io::prometheus::client::Gauge::Clear(); + clear_has_gauge(); +} +inline const ::io::prometheus::client::Gauge& Metric::gauge() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.gauge) + return gauge_ != NULL ? *gauge_ : *default_instance_->gauge_; +} +inline ::io::prometheus::client::Gauge* Metric::mutable_gauge() { + set_has_gauge(); + if (gauge_ == NULL) gauge_ = new ::io::prometheus::client::Gauge; + // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.gauge) + return gauge_; +} +inline ::io::prometheus::client::Gauge* Metric::release_gauge() { + clear_has_gauge(); + ::io::prometheus::client::Gauge* temp = gauge_; + gauge_ = NULL; + return temp; +} +inline void Metric::set_allocated_gauge(::io::prometheus::client::Gauge* gauge) { + delete gauge_; + gauge_ = gauge; + if (gauge) { + set_has_gauge(); + } else { + clear_has_gauge(); + } + // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.gauge) +} + +// optional .io.prometheus.client.Counter counter = 3; +inline bool Metric::has_counter() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void Metric::set_has_counter() { + _has_bits_[0] |= 0x00000004u; +} +inline void Metric::clear_has_counter() { + _has_bits_[0] &= ~0x00000004u; +} +inline void Metric::clear_counter() { + if (counter_ != NULL) counter_->::io::prometheus::client::Counter::Clear(); + clear_has_counter(); +} +inline const ::io::prometheus::client::Counter& Metric::counter() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.counter) + return counter_ != NULL ? *counter_ : *default_instance_->counter_; +} +inline ::io::prometheus::client::Counter* Metric::mutable_counter() { + set_has_counter(); + if (counter_ == NULL) counter_ = new ::io::prometheus::client::Counter; + // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.counter) + return counter_; +} +inline ::io::prometheus::client::Counter* Metric::release_counter() { + clear_has_counter(); + ::io::prometheus::client::Counter* temp = counter_; + counter_ = NULL; + return temp; +} +inline void Metric::set_allocated_counter(::io::prometheus::client::Counter* counter) { + delete counter_; + counter_ = counter; + if (counter) { + set_has_counter(); + } else { + clear_has_counter(); + } + // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.counter) +} + +// optional .io.prometheus.client.Summary summary = 4; +inline bool Metric::has_summary() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void Metric::set_has_summary() { + _has_bits_[0] |= 0x00000008u; +} +inline void Metric::clear_has_summary() { + _has_bits_[0] &= ~0x00000008u; +} +inline void Metric::clear_summary() { + if (summary_ != NULL) summary_->::io::prometheus::client::Summary::Clear(); + clear_has_summary(); +} +inline const ::io::prometheus::client::Summary& Metric::summary() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.summary) + return summary_ != NULL ? *summary_ : *default_instance_->summary_; +} +inline ::io::prometheus::client::Summary* Metric::mutable_summary() { + set_has_summary(); + if (summary_ == NULL) summary_ = new ::io::prometheus::client::Summary; + // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.summary) + return summary_; +} +inline ::io::prometheus::client::Summary* Metric::release_summary() { + clear_has_summary(); + ::io::prometheus::client::Summary* temp = summary_; + summary_ = NULL; + return temp; +} +inline void Metric::set_allocated_summary(::io::prometheus::client::Summary* summary) { + delete summary_; + summary_ = summary; + if (summary) { + set_has_summary(); + } else { + clear_has_summary(); + } + // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.summary) +} + +// optional .io.prometheus.client.Untyped untyped = 5; +inline bool Metric::has_untyped() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void Metric::set_has_untyped() { + _has_bits_[0] |= 0x00000010u; +} +inline void Metric::clear_has_untyped() { + _has_bits_[0] &= ~0x00000010u; +} +inline void Metric::clear_untyped() { + if (untyped_ != NULL) untyped_->::io::prometheus::client::Untyped::Clear(); + clear_has_untyped(); +} +inline const ::io::prometheus::client::Untyped& Metric::untyped() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.untyped) + return untyped_ != NULL ? *untyped_ : *default_instance_->untyped_; +} +inline ::io::prometheus::client::Untyped* Metric::mutable_untyped() { + set_has_untyped(); + if (untyped_ == NULL) untyped_ = new ::io::prometheus::client::Untyped; + // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.untyped) + return untyped_; +} +inline ::io::prometheus::client::Untyped* Metric::release_untyped() { + clear_has_untyped(); + ::io::prometheus::client::Untyped* temp = untyped_; + untyped_ = NULL; + return temp; +} +inline void Metric::set_allocated_untyped(::io::prometheus::client::Untyped* untyped) { + delete untyped_; + untyped_ = untyped; + if (untyped) { + set_has_untyped(); + } else { + clear_has_untyped(); + } + // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.untyped) +} + +// optional .io.prometheus.client.Histogram histogram = 7; +inline bool Metric::has_histogram() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void Metric::set_has_histogram() { + _has_bits_[0] |= 0x00000020u; +} +inline void Metric::clear_has_histogram() { + _has_bits_[0] &= ~0x00000020u; +} +inline void Metric::clear_histogram() { + if (histogram_ != NULL) histogram_->::io::prometheus::client::Histogram::Clear(); + clear_has_histogram(); +} +inline const ::io::prometheus::client::Histogram& Metric::histogram() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.histogram) + return histogram_ != NULL ? *histogram_ : *default_instance_->histogram_; +} +inline ::io::prometheus::client::Histogram* Metric::mutable_histogram() { + set_has_histogram(); + if (histogram_ == NULL) histogram_ = new ::io::prometheus::client::Histogram; + // @@protoc_insertion_point(field_mutable:io.prometheus.client.Metric.histogram) + return histogram_; +} +inline ::io::prometheus::client::Histogram* Metric::release_histogram() { + clear_has_histogram(); + ::io::prometheus::client::Histogram* temp = histogram_; + histogram_ = NULL; + return temp; +} +inline void Metric::set_allocated_histogram(::io::prometheus::client::Histogram* histogram) { + delete histogram_; + histogram_ = histogram; + if (histogram) { + set_has_histogram(); + } else { + clear_has_histogram(); + } + // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.Metric.histogram) +} + +// optional int64 timestamp_ms = 6; +inline bool Metric::has_timestamp_ms() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +inline void Metric::set_has_timestamp_ms() { + _has_bits_[0] |= 0x00000040u; +} +inline void Metric::clear_has_timestamp_ms() { + _has_bits_[0] &= ~0x00000040u; +} +inline void Metric::clear_timestamp_ms() { + timestamp_ms_ = GOOGLE_LONGLONG(0); + clear_has_timestamp_ms(); +} +inline ::google::protobuf::int64 Metric::timestamp_ms() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.Metric.timestamp_ms) + return timestamp_ms_; +} +inline void Metric::set_timestamp_ms(::google::protobuf::int64 value) { + set_has_timestamp_ms(); + timestamp_ms_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.Metric.timestamp_ms) +} + +// ------------------------------------------------------------------- + +// MetricFamily + +// optional string name = 1; +inline bool MetricFamily::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void MetricFamily::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void MetricFamily::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void MetricFamily::clear_name() { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_->clear(); + } + clear_has_name(); +} +inline const ::std::string& MetricFamily::name() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.name) + return *name_; +} +inline void MetricFamily::set_name(const ::std::string& value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set:io.prometheus.client.MetricFamily.name) +} +inline void MetricFamily::set_name(const char* value) { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_ = new ::std::string; + } + name_->assign(value); + // @@protoc_insertion_point(field_set_char:io.prometheus.client.MetricFamily.name) +} +inline void MetricFamily::set_name(const char* value, size_t size) { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_ = new ::std::string; + } + name_->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.MetricFamily.name) +} +inline ::std::string* MetricFamily::mutable_name() { + set_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + name_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:io.prometheus.client.MetricFamily.name) + return name_; +} +inline ::std::string* MetricFamily::release_name() { + clear_has_name(); + if (name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + return NULL; + } else { + ::std::string* temp = name_; + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } +} +inline void MetricFamily::set_allocated_name(::std::string* name) { + if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete name_; + } + if (name) { + set_has_name(); + name_ = name; + } else { + clear_has_name(); + name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.MetricFamily.name) +} + +// optional string help = 2; +inline bool MetricFamily::has_help() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void MetricFamily::set_has_help() { + _has_bits_[0] |= 0x00000002u; +} +inline void MetricFamily::clear_has_help() { + _has_bits_[0] &= ~0x00000002u; +} +inline void MetricFamily::clear_help() { + if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + help_->clear(); + } + clear_has_help(); +} +inline const ::std::string& MetricFamily::help() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.help) + return *help_; +} +inline void MetricFamily::set_help(const ::std::string& value) { + set_has_help(); + if (help_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + help_ = new ::std::string; + } + help_->assign(value); + // @@protoc_insertion_point(field_set:io.prometheus.client.MetricFamily.help) +} +inline void MetricFamily::set_help(const char* value) { + set_has_help(); + if (help_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + help_ = new ::std::string; + } + help_->assign(value); + // @@protoc_insertion_point(field_set_char:io.prometheus.client.MetricFamily.help) +} +inline void MetricFamily::set_help(const char* value, size_t size) { + set_has_help(); + if (help_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + help_ = new ::std::string; + } + help_->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:io.prometheus.client.MetricFamily.help) +} +inline ::std::string* MetricFamily::mutable_help() { + set_has_help(); + if (help_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + help_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:io.prometheus.client.MetricFamily.help) + return help_; +} +inline ::std::string* MetricFamily::release_help() { + clear_has_help(); + if (help_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + return NULL; + } else { + ::std::string* temp = help_; + help_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } +} +inline void MetricFamily::set_allocated_help(::std::string* help) { + if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete help_; + } + if (help) { + set_has_help(); + help_ = help; + } else { + clear_has_help(); + help_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:io.prometheus.client.MetricFamily.help) +} + +// optional .io.prometheus.client.MetricType type = 3; +inline bool MetricFamily::has_type() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void MetricFamily::set_has_type() { + _has_bits_[0] |= 0x00000004u; +} +inline void MetricFamily::clear_has_type() { + _has_bits_[0] &= ~0x00000004u; +} +inline void MetricFamily::clear_type() { + type_ = 0; + clear_has_type(); +} +inline ::io::prometheus::client::MetricType MetricFamily::type() const { + // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.type) + return static_cast< ::io::prometheus::client::MetricType >(type_); +} +inline void MetricFamily::set_type(::io::prometheus::client::MetricType value) { + assert(::io::prometheus::client::MetricType_IsValid(value)); + set_has_type(); + type_ = value; + // @@protoc_insertion_point(field_set:io.prometheus.client.MetricFamily.type) +} + +// repeated .io.prometheus.client.Metric metric = 4; +inline int MetricFamily::metric_size() const { + return metric_.size(); +} +inline void MetricFamily::clear_metric() { + metric_.Clear(); +} +inline const ::io::prometheus::client::Metric& MetricFamily::metric(int index) const { + // @@protoc_insertion_point(field_get:io.prometheus.client.MetricFamily.metric) + return metric_.Get(index); +} +inline ::io::prometheus::client::Metric* MetricFamily::mutable_metric(int index) { + // @@protoc_insertion_point(field_mutable:io.prometheus.client.MetricFamily.metric) + return metric_.Mutable(index); +} +inline ::io::prometheus::client::Metric* MetricFamily::add_metric() { + // @@protoc_insertion_point(field_add:io.prometheus.client.MetricFamily.metric) + return metric_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric >& +MetricFamily::metric() const { + // @@protoc_insertion_point(field_list:io.prometheus.client.MetricFamily.metric) + return metric_; +} +inline ::google::protobuf::RepeatedPtrField< ::io::prometheus::client::Metric >* +MetricFamily::mutable_metric() { + // @@protoc_insertion_point(field_mutable_list:io.prometheus.client.MetricFamily.metric) + return &metric_; +} + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace client +} // namespace prometheus +} // namespace io + +#ifndef SWIG +namespace google { +namespace protobuf { + +template <> struct is_proto_enum< ::io::prometheus::client::MetricType> : ::google::protobuf::internal::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::io::prometheus::client::MetricType>() { + return ::io::prometheus::client::MetricType_descriptor(); +} + +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_metrics_2eproto__INCLUDED |